From dbd88dde4bc4e03e57505983c0fb199d8625122d Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Thu, 23 Jan 2020 12:38:19 -0600 Subject: [PATCH] Mic script, amd stuff, more fish fixes --- apps/de/polybar/mic.sh | 2 +- apps/de/sxhkd/rc | 16 ++++--------- apps/htop/rc | 2 +- apps/shell/fish/config.fish | 24 +++++++++++-------- apps/shell/fish/paths.fish | 6 ++--- .../arch-linux/provisioning/2-essentials.bash | 1 + bin/lib/arch-linux/provisioning/amd.bash | 3 ++- 7 files changed, 26 insertions(+), 28 deletions(-) diff --git a/apps/de/polybar/mic.sh b/apps/de/polybar/mic.sh index 7fa0665..aaf7dec 100755 --- a/apps/de/polybar/mic.sh +++ b/apps/de/polybar/mic.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh -pidfile="/var/run/user/$(id -u)/polybar-mic-script.pid" +pidfile="/var/run/user/$(id -u)/polybar-mic-script.sh.pid" if [ -e "$pidfile" ]; then kill "$(cat "${pidfile}")" > /dev/null 2>&1 diff --git a/apps/de/sxhkd/rc b/apps/de/sxhkd/rc index ce6bbe8..7110b8e 100755 --- a/apps/de/sxhkd/rc +++ b/apps/de/sxhkd/rc @@ -230,6 +230,9 @@ XF86AudioPrev super + w "app-launcher" -modi window,run -show window +super + shift + v + sh -c 'kill -USR1 $(cat "/var/run/user/$UID/polybar-mic-script.pid")' + # close the current application super + c bspc node -c @@ -241,22 +244,11 @@ super + shift + c # kill the wm, if alt is held, it will reload instead of truly quitting... # I think? super + ctrl + {alt +,_} Escape - {bspc wm -d > "$BSPWM_STATE_FILE" && bspc quit, \ - bspc quit 1} - -Print - scrot "$NICE_HOME/img/scrots/%Y-%m-%d_%H-%M-%S_\$wx\$h.png" + sh -c '{bspc wm -d > "$BSPWM_STATE_FILE" && bspc quit, bspc quit 1}' # make sxhkd reload its configuration files: super + Escape pkill -USR1 -x sxhkd - -super + d - xdotool key super+4 && sleep 0.1 && xdotool key shift+4 && xdotool key shift+4 && xdotool key shift+4 && sleep 0.2 && xdotool key super+1 && xdotool key super+3 - super + ctrl + c bspc rule -a '*' -o state=floating && urxvt --geometry 64x9 -e sh -c "cal -n 3 && bash" - -super + v - tmux new-window 'sh -ci tmuxswitcher' diff --git a/apps/htop/rc b/apps/htop/rc index efe3415..f96fb4f 100644 --- a/apps/htop/rc +++ b/apps/htop/rc @@ -1,7 +1,7 @@ # Beware! This file is rewritten by htop when settings are changed in the interface. # The parser is also very primitive, and not human-friendly. fields=0 48 17 18 38 39 40 2 46 47 49 1 -sort_key=2 +sort_key=46 sort_direction=1 hide_threads=0 hide_kernel_threads=1 diff --git a/apps/shell/fish/config.fish b/apps/shell/fish/config.fish index 6d3788c..2ce0329 100755 --- a/apps/shell/fish/config.fish +++ b/apps/shell/fish/config.fish @@ -30,16 +30,14 @@ end # more sane ls colors set -Ux LS_COLORS 'ow=01;36;40' -# load a per-device config last so anything can be overridden -for cf in config.fish .hidden/config.fish - set f $ENV_PATH/$cf - test -f $f && source $f -end - -mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH - has_command fd && set -Ux FZF_DEFAULT_COMMAND 'fd --type f --hidden --follow --exclude .git' +test -f ~/.fzf/shell/key-bindings.fish && source ~/.fzf/shell/key-bindings.fish + +function fish_greeting + fortune +end + # we assume the user uses "$HOME" to just store their mess of dotfiles and other # nonsense that clutters it up and that they have a preferred starting # directory where they keep the stuff they actually care about @@ -48,10 +46,16 @@ if test $PWD = $HOME; or test $PWD = $NICE_HOME; cd $NICE_HOME || cd end -test -f ~/.fzf/shell/key-bindings.fish && source ~/.fzf/shell/key-bindings.fish - if test -f $HOME/.asdf/asdf.fish source $HOME/.asdf/asdf.fish else if test -f /opt/asdf-vm/asdf.fish source /opt/asdf-vm/asdf.fish end + +# load a per-device config last so anything can be overridden +for cf in config.fish .hidden/config.fish + set f $ENV_PATH/$cf + test -f $f && source $f +end + +mkdir -p $NOTES_PATH $USER_LOGS_PATH $SCROTS_PATH diff --git a/apps/shell/fish/paths.fish b/apps/shell/fish/paths.fish index 38bcf51..f536602 100755 --- a/apps/shell/fish/paths.fish +++ b/apps/shell/fish/paths.fish @@ -40,6 +40,6 @@ set -Ux XDG_PICTURES_DIR $NICE_HOME/img set -Ux XDG_VIDEOS_DIR $NICE_HOME/video set -Ux XDG_GAMES_DIR $NICE_HOME/games -set -Ux NOTES_PATH $NOTES_PATH $XDG_DOCUMENTS_DIR/notes -set -Ux USER_LOGS_PATH $USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs -set -Ux SCROTS_PATH $SCROTS_PATH $XDG_PICTURES_DIR/scrots +set -Ux NOTES_PATH $XDG_DOCUMENTS_DIR/notes +set -Ux USER_LOGS_PATH $XDG_DOCUMENTS_DIR/logs +set -Ux SCROTS_PATH $XDG_PICTURES_DIR/scrots diff --git a/bin/lib/arch-linux/provisioning/2-essentials.bash b/bin/lib/arch-linux/provisioning/2-essentials.bash index 7a6cd53..d0b0cbd 100755 --- a/bin/lib/arch-linux/provisioning/2-essentials.bash +++ b/bin/lib/arch-linux/provisioning/2-essentials.bash @@ -53,6 +53,7 @@ pacaur --needed -S \ fish `# Shell` \ pkgfile `# Package File Metadata` \ swaks `# SMTP CLI` \ + fortune-mod fortune-mod-archlinux `# Fortune` \ --noconfirm --noedit # install rxvt-unicode script for resizing font on-the-fly diff --git a/bin/lib/arch-linux/provisioning/amd.bash b/bin/lib/arch-linux/provisioning/amd.bash index f9fa859..c3ed389 100755 --- a/bin/lib/arch-linux/provisioning/amd.bash +++ b/bin/lib/arch-linux/provisioning/amd.bash @@ -1,3 +1,4 @@ #!/usr/bin/env bash -pacaur --needed -S --noconfirm --noedit +pacaur --needed -S --noconfirm --noedit \ + libva-mesa-driver mesa-vdpau libva-vdpau-driver libvdpau-va-gl `# Hardware Accelerated Video` \