usr

Modulate your userpace into POSIX-compliant shell scripts!
git clone git://clone.theohenson.com/usr.git
Log | Files | Refs | README

commit cc23caafa3d17484d3fcad4006f756d108257aa7
parent 3f5737c23ef7152e59f4e3c4b92238ad07bf5c83
Author: Theo Henson <[email protected]>
Date:   Mon, 11 Jan 2021 21:27:44 -0500

Update scripts and more

Diffstat:
Mhome/.config/fish/config.fish | 3++-
Mhome/.config/nvim/init.vim | 2+-
Mhome/.config/sxhkd/sxhkdrc | 2+-
Rhome/.local/bin/opt/autorss -> home/.local/bin/autorss | 0
Rhome/.local/bin/opt/cpusage -> home/.local/bin/cpusage | 0
Rhome/.local/bin/opt/git_status_prompt -> home/.local/bin/git_status_prompt | 0
Rhome/.local/bin/opt/lock -> home/.local/bin/lock | 0
Rhome/.local/bin/opt/lsearch -> home/.local/bin/lsearch | 0
Rhome/.local/bin/opt/openup -> home/.local/bin/openup | 0
Rhome/.local/bin/opt/randwall -> home/.local/bin/randwall | 0
Rhome/.local/bin/opt/range -> home/.local/bin/range | 0
Rhome/.local/bin/opt/runt -> home/.local/bin/runt | 0
Rhome/.local/bin/opt/spt-mute.sh -> home/.local/bin/spt-mute.sh | 0
Rhome/.local/bin/opt/spt-vol.sh -> home/.local/bin/spt-vol.sh | 0
Rhome/.local/bin/opt/time_bar -> home/.local/bin/time_bar | 0
Rhome/.local/bin/opt/tku -> home/.local/bin/tku | 0
Rhome/.local/bin/opt/volume_bar -> home/.local/bin/volume_bar | 0
Mhome/.profile | 8++++----
Mhome/.xinitrc | 37++++++++++++++++++++++++++-----------
Mmodules/theo_scripts.mod.sh | 27+++++++++++++++------------
20 files changed, 49 insertions(+), 30 deletions(-)

diff --git a/home/.config/fish/config.fish b/home/.config/fish/config.fish @@ -37,8 +37,8 @@ abbr -ag gog go get abbr -ag gol golint ./... abbr -ag gof gofmt -s -w -e -l . +abbr -ag vw vimwiki abbr -ag fn 'fzf | xargs nvim' -abbr -ag vw nvim -c VimwikiIndex abbr -ag mi 'make && sudo make install' abbr -ag t tmux @@ -51,6 +51,7 @@ abbr -ag c fzfcmd # aliases alias bat='cat /sys/class/power_supply/BAT0/capacity' alias lynx='lynx -accept_all_cookies -vikeys' +alias vimwiki='nvim -c VimwikiIndex -c \'cd $VIMWIKI\'' alias pcmn='pacman -Sl | cut -d" " -f2,3,4 | fzf -m --preview "pacman -Si {1}" --preview-window=right:66%:wrap | xargs -ro -n 1 sudo pacman -S' alias fzfcmd='set fzfcmd ( grep " cmd: " $XDG_DATA_HOME/fish/fish_history | sed "s/- cmd: //" | grep -v fzfcmd | tac | fzf -e --color=16 --no-sort ) && echo $fzfcmd && eval $fzfcmd' diff --git a/home/.config/nvim/init.vim b/home/.config/nvim/init.vim @@ -124,7 +124,7 @@ set signcolumn=yes " }}}2 " Vim wiki {{{2 -let g:vimwiki_list = [{'path': '~/docs/vimwiki', 'syntax': 'markdown', 'ext': '.md'}] +let g:vimwiki_list = [{'path': $VIMWIKI, 'syntax': 'markdown', 'ext': '.md'}] " }}}2 " Git fugitive {{{2 diff --git a/home/.config/sxhkd/sxhkdrc b/home/.config/sxhkd/sxhkdrc @@ -43,7 +43,7 @@ alt + shift + r $TERMINAL -e ranger # vimwiki alt + shift + w - $TERMINAL -e nvim -c VimwikiIndex + $TERMINAL -e nvim -c VimwikiIndex -c 'cd $VIMWIKI' # firefox alt + shift + c $BROWSER diff --git a/home/.local/bin/opt/autorss b/home/.local/bin/autorss diff --git a/home/.local/bin/opt/cpusage b/home/.local/bin/cpusage diff --git a/home/.local/bin/opt/git_status_prompt b/home/.local/bin/git_status_prompt diff --git a/home/.local/bin/opt/lock b/home/.local/bin/lock diff --git a/home/.local/bin/opt/lsearch b/home/.local/bin/lsearch diff --git a/home/.local/bin/opt/openup b/home/.local/bin/openup diff --git a/home/.local/bin/opt/randwall b/home/.local/bin/randwall diff --git a/home/.local/bin/opt/range b/home/.local/bin/range diff --git a/home/.local/bin/opt/runt b/home/.local/bin/runt diff --git a/home/.local/bin/opt/spt-mute.sh b/home/.local/bin/spt-mute.sh diff --git a/home/.local/bin/opt/spt-vol.sh b/home/.local/bin/spt-vol.sh diff --git a/home/.local/bin/opt/time_bar b/home/.local/bin/time_bar diff --git a/home/.local/bin/opt/tku b/home/.local/bin/tku diff --git a/home/.local/bin/opt/volume_bar b/home/.local/bin/volume_bar diff --git a/home/.profile b/home/.profile @@ -14,14 +14,14 @@ export XDG_TEMPLATES_DIR="/home/theo/docs/templates" export XDG_VIDEOS_DIR="/home/theo/av" # more envs -export BIN="$HOME/.local/bin" -export OPT_BIN="$BIN/opt" +export LOCAL_BIN="$HOME/.local/bin" export GOPATH="$XDG_DATA_HOME/go" +export VIMWIKI="$XDG_DOCUMENTS_DIR/vimwiki" # set some default programs export VISUAL=/usr/bin/nvim export EDITOR=/usr/bin/nvim -export TERMINAL="$BIN/st" +export TERMINAL="$LOCAL_BIN/st" export BROWSER=/usr/bin/firefox export READER=/usr/bin/zathura @@ -60,4 +60,4 @@ export SUBS_FILE="$XDG_DOCUMENTS_DIR/subs.list" export SUBS_MENU_PROG="fzf --no-sort -e --color=16" # add directories to path -export PATH="$OPT_BIN:$BIN:$GOPATH/bin:$CARGO_HOME/bin:$DENO_INSTALL_ROOT:$PATH" +export PATH="$LOCAL_BIN:$GOPATH/bin:$CARGO_HOME/bin:$DENO_INSTALL_ROOT:$PATH" diff --git a/home/.xinitrc b/home/.xinitrc @@ -1,24 +1,39 @@ #!/bin/sh # configure monitors (system dependent) -xrandr --output DP-3 --primary --mode 1920x1080 --pos 0x840 --rotate normal --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate left --gamma 0.86 -xrdb -load $XDG_CONFIG_HOME/X11/Xresources +runif() { + if which $1 > /dev/null 2>&1 ; then + [email protected] & + fi +} + +# configure x +if [ $(hostname) == "art" ] ; then + xrandr --output DP-3 --primary --mode 1920x1080 --pos 0x840 --rotate normal \ + --output HDMI-1 --mode 1920x1080 --pos 1920x0 --rotate left --gamma 0.86 +fi +xrdb -load "$XDG_CONFIG_HOME/X11/Xresources" +setxkbmap -option caps:swapescape +setxkbmap -option compose:ralt # set wallpaper -randwall +runif randwall # start hotkey daemon, notification daemon, spotify daemon, and compositor -sxhkd & -dunst & -spotifyd -picom -b --config $XDG_CONFIG_HOME/picom/picom.conf +runif sxhkd +runif dunst +runif spotifyd +if which picom > /dev/null 2>&1 ; then + picom -b --config "$XDG_CONFIG_HOME/picom/picom.conf" +else + runif compton --config "$XDG_CONFIG_HOME/picom/picom.conf" +fi # fix java apps with non-reparenting wms export _JAVA_AWT_WM_NONREPARENTING=1 # start window manager -dwmblocks & -lxpolkit & -setxkbmap -option caps:swapescape -setxkbmap -option compose:ralt +runif dwmblocks +runif lxpolkit + exec dwm diff --git a/modules/theo_scripts.mod.sh b/modules/theo_scripts.mod.sh @@ -1,15 +1,18 @@ theo_scripts_add() { - printf "theo_scripts: chmoding scripts\n" - for SCRIPT in $(theo_scripts_files) ; do - chmod +x "$USR_DIR/home/$SCRIPT" + printf "theo_scripts: making directories\n" + mkdir -p "$HOME/.local/bin" + printf "theo_scripts: chmoding and linking scripts\n" + for script in $(theo_scripts_files) ; do + chmod +x "$USR_DIR/home/$script" + ln -sf "$USR_DIR/home/$script" "$HOME/$script" done - printf "theo_scripts: linking %s/.local/bin/opt\n" "$HOME" - ln -sf "$USR_DIR"/home/.local/bin/opt "$HOME"/.local/bin/opt } theo_scripts_remove() { - printf "theo_scripts: removing %s/.local/bin/opt\n" "$HOME" - rm "$HOME"/.local/bin/opt + printf "theo_scripts: removing scripts\n" "$HOME" + for script in $(theo_scripts_files) ; do + rm "$HOME/$script" + done } theo_scripts_info() { @@ -21,9 +24,9 @@ theo_scripts_dirs() { } theo_scripts_files() { - printf ".local/bin/opt/autorss .local/bin/opt/cpusage - .local/bin/opt/git_status_prompt .local/bin/opt/lock .local/bin/opt/lsearch - .local/bin/opt/openup .local/bin/opt/randwall .local/bin/opt/runt - .local/bin/opt/spt-mute.sh .local/bin/opt/spt-vol.sh .local/bin/opt/time_bar - .local/bin/opt/volume_bar .local/bin/opt/range .local/bin/opt/tku" + printf ".local/bin/autorss .local/bin/cpusage + .local/bin/git_status_prompt .local/bin/lock .local/bin/lsearch + .local/bin/openup .local/bin/randwall .local/bin/runt + .local/bin/spt-mute.sh .local/bin/spt-vol.sh .local/bin/time_bar + .local/bin/volume_bar .local/bin/range .local/bin/tku" }