From 5e17418f1eef06e97bb621edf53530437df8b14f Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Tue, 11 Aug 2015 15:58:37 +0200 Subject: Back up several files --- .grmrc | 3 ++ .i3/config | 4 +- .mutt/aliase | 1 + .notes/Notes | 4 ++ .uzbl/config | 23 ++++------- .uzbl/scripts/adblock.py | 86 +++++++++++++++++++++++++++++++++++++++++ .uzbl/scripts/downloadviewer.sh | 7 ++++ .uzbl/scripts/goup.pl | 24 ------------ .uzbl/scripts/mytest.sh | 14 +++++++ .uzbl/scripts/ytdl.sh | 8 ++++ .xinitrc | 3 +- .zsh/aliases | 51 ++++++++++++++++++++++++ .zsh/functions | 25 ++++++++++++ .zsh/plugins | 61 +++++++++++++++++++++++++++++ .zsh/tmp | 3 ++ .zsh/zsh-aliases | 54 -------------------------- .zsh/zsh-functions | 31 --------------- .zsh/zsh-plugins | 59 ---------------------------- .zsh/zsh-tmp | 1 - .zsh/zshrc | 36 ++--------------- bin/keyboard.sh | 3 +- 21 files changed, 280 insertions(+), 221 deletions(-) create mode 100644 .mutt/aliase create mode 100755 .uzbl/scripts/adblock.py create mode 100755 .uzbl/scripts/downloadviewer.sh delete mode 100755 .uzbl/scripts/goup.pl create mode 100755 .uzbl/scripts/mytest.sh create mode 100755 .uzbl/scripts/ytdl.sh create mode 100644 .zsh/aliases create mode 100644 .zsh/functions create mode 100644 .zsh/plugins create mode 100644 .zsh/tmp delete mode 100644 .zsh/zsh-aliases delete mode 100644 .zsh/zsh-functions delete mode 100644 .zsh/zsh-plugins delete mode 100644 .zsh/zsh-tmp diff --git a/.grmrc b/.grmrc index 95b0fa2..0273f5e 100644 --- a/.grmrc +++ b/.grmrc @@ -26,6 +26,9 @@ repodirs[adbrebs/taxi]=/home/urbain/github/adbrebs/taxi repodirs[adbrebs/meg]=/home/urbain/github/adbrebs/meg repodirs[adbrebs/brain_segmentation]=/home/urbain/github/adbrebs/brain_segmentation +# Uzbl +repodirs[zimon/uzbl-config-and-scripts]=/home/urbain/github/uzbl + # Installation function after_vimplug { cd .. diff --git a/.i3/config b/.i3/config index e8b0ff0..0521439 100644 --- a/.i3/config +++ b/.i3/config @@ -44,11 +44,11 @@ bindsym $mod+Return exec i3-sensible-terminal bindsym $mod+d kill # start dmenu (a program launcher) -bindsym $mod+p exec dmenu_run +# bindsym $mod+p exec dmenu_run # There also is the (new) i3-dmenu-desktop which only displays applications # shipping a .desktop file. It is a wrapper around dmenu, so you need that # installed. -# bindsym $mod+p exec --no-startup-id i3-dmenu-desktop +bindsym $mod+p exec --no-startup-id i3-dmenu-desktop # change focus bindsym $mod+h focus left diff --git a/.mutt/aliase b/.mutt/aliase new file mode 100644 index 0000000..dbc8113 --- /dev/null +++ b/.mutt/aliase @@ -0,0 +1 @@ +alias clement.vaes Clement Vaes diff --git a/.notes/Notes b/.notes/Notes index 6976cf5..20af389 100644 --- a/.notes/Notes +++ b/.notes/Notes @@ -21,3 +21,7 @@ Notes # Useful info • Bank number: 930630876 + +# Ideas + • Libgen CLI + • Plugin manager uzbl diff --git a/.uzbl/config b/.uzbl/config index 5539181..bb71fec 100644 --- a/.uzbl/config +++ b/.uzbl/config @@ -39,7 +39,7 @@ set set_mode = set mode = set set_status = set status_message = # Spawn path shortcuts. In spawn the first dir+path match is used in "dir1:dir2:dir3:executable" -set scripts_dir = /home/urbain/dotfiles/config/uzbl/scripts:@data_home/uzbl:@prefix/share/uzbl/examples/data:scripts +set scripts_dir = /home/urbain/dotfiles/.uzbl:@data_home/uzbl:@prefix/share/uzbl/examples/data:scripts ## Hardcoded handlers @@ -359,17 +359,6 @@ set follow_hint_keys = uhetonasidpgcr @cbind F* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'newwindow') >\@ @cbind fL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ set @cbind FL* = spawn @scripts_dir/follow.sh \@< uzbl.follow("\@follow_hint_keys", "%s", 'returnuri') >\@ clipboard -@cbind fi = spawn @scripts_dir/go_input.sh - -@cbind fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ set -@cbind fS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('click') >\@ -@cbind Fs = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('newwindow') >\@ -@cbind FS = spawn @scripts_dir/follow.sh \@< uzbl.follow.followSelection('returnuri') >\@ clipboard - -@cbind ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ set -@cbind fT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@ -@cbind Ft* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'newwindow') >\@ -@cbind FT* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'returnuri') >\@ clipboard @cbind '* = spawn @scripts_dir/follow.sh \@< uzbl.follow.followTextContent("%s", 'click') >\@ @@ -422,9 +411,6 @@ menu_add Quit uzbl = exit # Link context menu menu_link_add Print Link = print \@SELECTED_URI -# Go up one dir -@cbind gu = spawn @scripts_dir/goup.pl - # Mode configuration # Define some mode specific uzbl configurations. @@ -496,4 +482,11 @@ bind 'aur _ = sh 'surfraw -g $8 %s' aur bind 'freshmeat _ = sh 'surfraw -g $8 %s' freshmeat bind 'weather _ = sh 'surfraw -g $8 %s' weather +# Custom binds +@cbind gu = spawn @scripts_dir/test.sh +@cbind gU = spawn @scripts_dir/mytest.sh +@cbind ytdl = sh '$HOME/dotfiles/.uzbl/scripts/ytdl.sh "$UZBL_URI"' + +@on_event DOWNLOAD_COMPLETE spawn @scripts_dir/downloadviewer.sh %s +@on_event LOAD_COMMIT spawn @scripts_dir/adblock.py # vim: set fdm=syntax: diff --git a/.uzbl/scripts/adblock.py b/.uzbl/scripts/adblock.py new file mode 100755 index 0000000..aae39f4 --- /dev/null +++ b/.uzbl/scripts/adblock.py @@ -0,0 +1,86 @@ +#!/usr/bin/python +import os +from sys import argv +from urlparse import urlparse + +# This is the original adblock.py script from http://www.uzbl.org/wiki/adblock +# Nothing was modified. This script is here just to have everything at one place. + +def xdghome(key, default): + '''Attempts to use the environ XDG_*_HOME paths if they exist otherwise + use $HOME and the default path.''' + + xdgkey = "XDG_%s_HOME" % key + if xdgkey in os.environ.keys() and os.environ[xdgkey]: + return os.environ[xdgkey] + + return os.path.join(os.environ['HOME'], default) + +# Setup xdg paths. +DATA_DIR = os.path.join(xdghome('DATA', '.local/share/'), 'uzbl/') + +# Blockfile location. +BLOCKFILE = os.path.join(DATA_DIR, 'adblock') + +JAVASCRIPT = ' '.join(filter(None, map(str.strip, ''' +var uzblAdBlock = function() { + var toblock = %s; + for(var n = 0; n < toblock.length; n++) { + var items; + while (1) { + try { + items = document.evaluate(toblock[n], document, null, XPathResult.ORDERED_NODE_ITERATOR_TYPE, null); + if (items == null) { break; } + var i = items.iterateNext(); + if (i == null) { break; } + i.parentNode.removeChild(i); + } catch (e) { + break; + } + } + } +}; +'''.split('\n')))) + + +def get_domain(url): + '''Return domain segment of url.''' + + if not url.startswith('http'): + url = "http://%s" % url + + loc = urlparse(url).netloc + if loc.startswith('www.'): + loc = loc[4:] + + return loc + + +def adblock(url, fifo): + fh = open(BLOCKFILE, 'r') + lines = [line.strip() for line in fh.readlines()] + fh.close() + + rules, capture = [], False + for l in lines: + if not l: # newline splits section + capture = False + + elif l[0] == '#': + continue + + elif capture: + rules.append(l) + + elif l[-1] == ':': + if get_domain(l[:-1]) == url or l[:-1] == "global": + capture = True + + rulestr = repr(rules).replace("@", "\@") + js = "js %s\n" % (JAVASCRIPT % rulestr) + fh = open(fifo, "w") + fh.write(js) + fh.close() + +if __name__ == '__main__': + adblock(get_domain(argv[6]), argv[4]) diff --git a/.uzbl/scripts/downloadviewer.sh b/.uzbl/scripts/downloadviewer.sh new file mode 100755 index 0000000..306460d --- /dev/null +++ b/.uzbl/scripts/downloadviewer.sh @@ -0,0 +1,7 @@ +#!/bin/sh +case "$1" in +*.pdf*) zathura "$1" & ;; +*.jpg*|*.png*|*.jpeg*) feh "$1" & ;; +*.txt*|*README*|*.pl*|*.sh*|*.py*|*.hs*|*.hl*) urxvt -e vim "$1" & ;; +*.mov*|*.avi*|*.mpeg*|*.mpg*|*.flv*|*.wmv*|*.mp4*) mplayer "$1" & ;; +esac diff --git a/.uzbl/scripts/goup.pl b/.uzbl/scripts/goup.pl deleted file mode 100755 index f7ae275..0000000 --- a/.uzbl/scripts/goup.pl +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/perl - -my ($config,$pid,$xid,$fifo,$socket,$url,$title,$cmd) = @ARGV; -if($fifo eq "") { die "No fifo"; }; - -# Delete last slash -chop($url); - -my $index = index(reverse($url), '/'); - -# if youre already on top of the directory structure -if ($index == -1) -{ - print $url; - exit; -} - -# Workaround for missing reverse index -$url = (substr(reverse($url), $index, length($url) )); -$url = reverse($url); -print $url."\n"; - -# This could look prettier with native fifo access -qx(echo "act uri $url" >> $fifo); diff --git a/.uzbl/scripts/mytest.sh b/.uzbl/scripts/mytest.sh new file mode 100755 index 0000000..f310e49 --- /dev/null +++ b/.uzbl/scripts/mytest.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +. "$UZBL_UTIL_DIR/uzbl-dir.sh" + +>> "$UZBL_BOOKMARKS_FILE" || exit 1 + +which zenity >/dev/null 2>&1 || exit 2 + +tags="$( zenity --entry --text="Enter space-separated tags for bookmark $UZBL_URI:" )" +exitstatus="$?" +[ "$exitstatus" -eq 0 ] || exit "$exitstatus" + +# TODO: check if already exists, if so, and tags are different: ask if you want to replace tags +echo "$UZBL_URI $tags" >> "$UZBL_BOOKMARKS_FILE" diff --git a/.uzbl/scripts/ytdl.sh b/.uzbl/scripts/ytdl.sh new file mode 100755 index 0000000..acf327a --- /dev/null +++ b/.uzbl/scripts/ytdl.sh @@ -0,0 +1,8 @@ +#!/bin/bash +cd ~/Downloads # change this line to determine where the file is saved +python2 youtube-dl -o %\(title\)s.%\(ext\)s "$1" # -o output template is optional +# play with mplayer after download +savename=`python2 youtube-dl -o %\(title\)s.%\(ext\)s --get-filename "$1"` +mplayer -really-quiet "$savename" +ratpoison -c "echo [ytdl-uzbl] $1 done." # change this line to change how you are notified of a + # completed download diff --git a/.xinitrc b/.xinitrc index adc9614..f280da9 100755 --- a/.xinitrc +++ b/.xinitrc @@ -7,11 +7,10 @@ xset r rate 400 50 $HOME/bin/keyboard.sh # Load Xresources to light colorscheme -xrdb $HOME/.Xresources/Xresources.dark +xrdb $HOME/.Xresources/dark # Start gpg-agent killall -9 gpg-agent gpg-agent --daemon --enable-ssh-support \ --write-env-file "${HOME}/.gpg-agent-info" - diff --git a/.zsh/aliases b/.zsh/aliases new file mode 100644 index 0000000..28cd4dd --- /dev/null +++ b/.zsh/aliases @@ -0,0 +1,51 @@ +#!/bin/zsh + +# Apps for filetypes +alias -s vim=$EDITOR +alias -s cpp=$EDITOR +alias -s c=$EDITOR +alias -s tex=$EDITOR +alias -s pdf=zathura + +# Directories +alias books='cd ~/Dropbox/phd/books' +alias cdd='cd ~/dotfiles' +alias papers='cd ~/Dropbox/phd/papers' +alias report='cd ~/Dropbox/phd/reports/9\ months' +alias u='cd ~/Dropbox/phd' +alias uc='cd ~/Dropbox/phd/programs' +alias ul='cd ~/Dropbox/phd/literature' +alias up='cd ~/Dropbox/phd/presentations' +alias ur='cd ~/Dropbox/phd/reports' + +# Commands +alias a='vifm' +alias c='clear' +alias ca='printf "\ec"' +alias g='git' +alias m='mutt' +alias mail='offlineimap -u quiet &' +alias mc='make clean' +alias mca='make clean-all' +alias n='nvim' +alias ns="$EDITOR -S Session.vim" +alias pushs='git push --recurse-submodules=check' +alias v='vim' +alias x='sh ~/.xmodmap' +alias youtube='mpsyt' +alias notes='vim ~/dotfiles/.notes/Notes' + +# Configuration +alias em="$EDITOR ~/.mutt/muttrc" +alias en="$EDITOR ~/.nvimrc" +alias eo="$EDITOR ~/.offlineimaprc" +alias et="$EDITOR ~/.tmux.conf" +alias ev="$EDITOR ~/.vimrc" +alias evi="$EDITOR ~/.vifm/vifmrc" +alias ex="$EDITOR ~/.xmodmap" +alias ez="$EDITOR ~/.zshrc" +alias eza="$EDITOR ~/.zathurarc" + +# Tmux +alias son="tmux set -g status on" +alias soff="tmux set -g status off" diff --git a/.zsh/functions b/.zsh/functions new file mode 100644 index 0000000..557d1af --- /dev/null +++ b/.zsh/functions @@ -0,0 +1,25 @@ +#!/bin/zsh + +function colo { + + # Change colors for current session + $HOME/.bin/recolor.sh < ~/.Xresources/$1 + + # Load Xresources file for future sessions + xrdb ~/.Xresources/$1 + + # Change environment variable + export COLORSCHEME=$1 + + # Change default environment variable for future sessions + sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/.zsh/tmp +} + +fshow() { + git log --graph --color=always \ + --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | + fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ + --bind 'ctrl-m:execute: + echo {} | grep -o "[a-f0-9]\{7\}" | + xargs -I % sh -c "git show --color=always % | less -R"' +} diff --git a/.zsh/plugins b/.zsh/plugins new file mode 100644 index 0000000..b519e4b --- /dev/null +++ b/.zsh/plugins @@ -0,0 +1,61 @@ +#! /bin/zsh + +# Load zgen +source "/home/urbain/.zgen/zgen.zsh" + +# Load plugins +if ! zgen saved; then + + echo "Creating a zgen save" + + # Load oh-my-zsh framework + zgen oh-my-zsh + + # Oh-my-zsh plugins + zgen oh-my-zsh plugins/git + zgen oh-my-zsh plugins/vi-mode + zgen oh-my-zsh plugins/ubuntu + zgen oh-my-zsh plugins/tmux + zgen oh-my-zsh plugins/themes + + # zsh-users plugins + zgen load zsh-users/zsh-completions src + zgen load zsh-users/zsh-syntax-highlighting + + # Appearance + zgen oh-my-zsh themes/eastwood + + # My plugins + zgen load uvaes/fzf-marks + zgen load uvaes/grm + + # Other plugins + zgen load rupa/z + zgen load djui/alias-tips + zgen load tarruda/zsh-autosuggestions + zgen load Tarrasch/zsh-autoenv + zgen load joel-porquet/zsh-dircolors-solarized + + # Save all to init script + zgen save +fi + +# Plugins configuration + +# Autosuggestion +{ + # Environment variables for plugins + AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=6' + + zle-line-init() { + zle autosuggest-start + } + zle -N zle-line-init + + bindkey '^y' autosuggest-execute-suggestion +} + +# GRM +{ + REPOFILE=/home/urbain/.grmrc +} diff --git a/.zsh/tmp b/.zsh/tmp new file mode 100644 index 0000000..aab86c2 --- /dev/null +++ b/.zsh/tmp @@ -0,0 +1,3 @@ +#!/bin/zsh + +export COLORSCHEME=light diff --git a/.zsh/zsh-aliases b/.zsh/zsh-aliases deleted file mode 100644 index 9d2dbe6..0000000 --- a/.zsh/zsh-aliases +++ /dev/null @@ -1,54 +0,0 @@ -# Apps for filetypes -alias -s vim=$EDITOR -alias -s cpp=$EDITOR -alias -s c=$EDITOR -alias -s tex=$EDITOR -alias -s pdf=zathura - -# Directories -alias books='cd ~/Dropbox/phd/books' -alias cdd='cd ~/dotfiles' -alias papers='cd ~/Dropbox/phd/papers' -alias report='cd ~/Dropbox/phd/reports/9\ months' -alias u='cd ~/Dropbox/phd' -alias uc='cd ~/Dropbox/phd/programs' -alias ul='cd ~/Dropbox/phd/literature' -alias up='cd ~/Dropbox/phd/presentations' -alias ur='cd ~/Dropbox/phd/reports' - -# Commands -alias a='vifm' -alias c='clear' -alias ca='printf "\ec"' -alias commit='git commit -a -m' -alias g='git' -alias install='sudo apt-get install' -alias m='mutt' -alias mail='offlineimap -u quiet &' -alias mc='make clean' -alias mca='make clean-all' -alias n='nvim' -alias ns="$EDITOR -S Session.vim" -alias pull='git pull origin master' -alias push='git push origin master' -alias pushs='git push --recurse-submodules=check' -alias update='sudo apt-get update' -alias upgrade='sudo apt-get upgrade' -alias v='vim' -alias x='sh ~/.xmodmap' -alias youtube=mpsyt - -# Configuration -alias em="$EDITOR ~/.mutt/muttrc" -alias en="$EDITOR ~/.nvimrc" -alias eo="$EDITOR ~/.offlineimaprc" -alias et="$EDITOR ~/.tmux.conf" -alias ev="$EDITOR ~/.vimrc" -alias evi="$EDITOR ~/.vifm/vifmrc" -alias ex="$EDITOR ~/.xmodmap" -alias ez="$EDITOR ~/.zshrc" -alias eza="$EDITOR ~/.zathurarc" - -# Tmux -alias son="tmux set -g status on" -alias soff="tmux set -g status off" diff --git a/.zsh/zsh-functions b/.zsh/zsh-functions deleted file mode 100644 index f9f387d..0000000 --- a/.zsh/zsh-functions +++ /dev/null @@ -1,31 +0,0 @@ -function colo { - - # Change colors for current session - $HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 - - # Load Xresources file for future sessions - xrdb ~/.Xresources/Xresources.$1 - - # Change environment variable - export COLORSCHEME=$1 - - # Change default environment variable for future sessions - sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/dotfiles/zshrc -} - -z() { - if [[ -z "$*" ]]; then - cd "$(_z -l 2>&1 | fzf-tmux +s --tac | sed 's/^[0-9,.]* *//')" - else - _z "$@" - fi -} - -fshow() { - git log --graph --color=always \ - --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | - fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ - --bind 'ctrl-m:execute: - echo {} | grep -o "[a-f0-9]\{7\}" | - xargs -I % sh -c "git show --color=always % | less -R"' -} diff --git a/.zsh/zsh-plugins b/.zsh/zsh-plugins deleted file mode 100644 index 26b5726..0000000 --- a/.zsh/zsh-plugins +++ /dev/null @@ -1,59 +0,0 @@ -# Load zgen -source "/home/urbain/.zgen/zgen.zsh" - -# Load plugins -if ! zgen saved; then - - echo "Creating a zgen save" - - # Load oh-my-zsh framework - zgen oh-my-zsh - - # Oh-my-zsh plugins - zgen oh-my-zsh plugins/git - zgen oh-my-zsh plugins/vi-mode - zgen oh-my-zsh plugins/ubuntu - zgen oh-my-zsh plugins/tmux - zgen oh-my-zsh plugins/themes - - # zsh-users plugins - zgen load zsh-users/zsh-completions src - zgen load zsh-users/zsh-syntax-highlighting - - # Appearance - zgen oh-my-zsh themes/eastwood - - # My plugins - zgen load uvaes/fzf-marks - zgen load uvaes/grm - - # Other plugins - zgen load rupa/z - zgen load djui/alias-tips - zgen load tarruda/zsh-autosuggestions - zgen load Tarrasch/zsh-autoenv - zgen load joel-porquet/zsh-dircolors-solarized - - # Save all to init script - zgen save -fi - -# Plugin configuration - -# Autosuggestion -{ - # Environment variables for plugins - AUTOSUGGESTION_HIGHLIGHT_COLOR='fg=6' - - zle-line-init() { - zle autosuggest-start - } - zle -N zle-line-init - - bindkey '^y' autosuggest-execute-suggestion -} - -# GRM -{ - REPOFILE=/home/urbain/.grmrc -} diff --git a/.zsh/zsh-tmp b/.zsh/zsh-tmp deleted file mode 100644 index a5abbce..0000000 --- a/.zsh/zsh-tmp +++ /dev/null @@ -1 +0,0 @@ -export COLORSCHEME=light diff --git a/.zsh/zshrc b/.zsh/zshrc index c891760..f08eee4 100644 --- a/.zsh/zshrc +++ b/.zsh/zshrc @@ -1,11 +1,7 @@ -ZSH_PLUGINS="$HOME/.zsh/zsh-plugins" -ZSH_ALIASES="$HOME/.zsh/zsh-aliases" -ZSH_TMP="$HOME/.zsh/zsh-tmp" - -# Source configurations -source $ZSH_PLUGINS -source $ZSH_ALIASES -source $ZSH_TMP +source "$HOME/.zsh/plugins" +source "$HOME/.zsh/functions" +source "$HOME/.zsh/aliases" +source "$HOME/.zsh/tmp" # Custom key bindings for built-in widgets bindkey -a 'k' history-beginning-search-backward @@ -20,30 +16,6 @@ export PATH="$PATH:/home/urbain/.local/bin" # Editor export EDITOR=/usr/bin/nvim -fshow() { - git log --graph --color=always \ - --format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" | - fzf --ansi --no-sort --reverse --tiebreak=index --toggle-sort=\` \ - --bind 'ctrl-m:execute: - echo {} | grep -o "[a-f0-9]\{7\}" | - xargs -I % sh -c "git show --color=always % | less -R"' -} - -function colo { - -# Change colors for current session -$HOME/.bin/recolor.sh < ~/.Xresources/Xresources.$1 - -# Load Xresources file for future sessions -xrdb ~/.Xresources/Xresources.$1 - -# Change environment variable -export COLORSCHEME=light - -# Change default environment variable for future sessions -sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/dotfiles/zshrc -} - # Fix tmux colors if [[ -n ${TMUX} && -n ${commands[tmux]} ]];then case $(tmux showenv TERM 2>/dev/null) in diff --git a/bin/keyboard.sh b/bin/keyboard.sh index e0759ab..13a599f 100755 --- a/bin/keyboard.sh +++ b/bin/keyboard.sh @@ -1,4 +1,5 @@ -# Dvorak programer setxkbmap us -variant dvp +# Dvorak programer +setxkbmap us -variant dvp # Make caps lock a Control xmodmap -e "clear Lock" -- cgit v1.2.3