dotfiles

personal dotfiles
git clone anongit@rnpnr.xyz:dotfiles.git
Log | Files | Refs | Feed | Submodules

Commit: 7ef640dac99272795d93b02835abc55ebed1944e
Parent: e6b95e79edf0fa483f92fe824ca94f4625772e2a
Author: Randy Palamar
Date:   Mon,  5 Jul 2021 07:08:48 -0600

cleanup scripts

this fixes a dumb in displaycon and correctly redirects output in
passmenu. the rest is style

Diffstat:
Mbin/bookmarks | 4++--
Mbin/displaycon | 20++++++++++----------
Mbin/passmenu | 2+-
Mbin/volume | 2+-
4 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/bin/bookmarks b/bin/bookmarks @@ -5,8 +5,8 @@ BOOKMARKS="$HOME/doc/urls" -url=$(grep -v -e "#" -e "^$" "$BOOKMARKS" | dmenu -i -p "open:" -l 10 |\ +url=$(grep -v -e "#" -e "^$" "$BOOKMARKS" | dmenu -i -p "open:" -l 10 | cut -f 1 -d ' ') [ -z "$url" ] && exit 0 -browser $url +browser "$url" diff --git a/bin/displaycon b/bin/displaycon @@ -4,39 +4,39 @@ case $(printf "rotate\nmanage" | dmenu -i -p "Action:") in "rotate") - monitor=$(xrandr --listactivemonitors | awk '{print $4}' |\ + monitor=$(xrandr --listactivemonitors | awk '{print $4}' | grep -v "^$" | dmenu -i -p "Monitor:") || exit 0 - direction=$(printf "normal\nright\nleft\ninverted" |\ + direction=$(printf "normal\nright\nleft\ninverted" | dmenu -i -p "Direction:") || exit 0 xrandr --output $monitor --rotate $direction - case $cmd in + case $direction in "left"|"right") - bgs $HOME/.config/v_wallpaper.jpg + bgs "$HOME"/.config/v_wallpaper.* ;; "normal"|"inverted") - bgs -z $HOME/.config/h_wallpaper.jpg + bgs -z "$HOME"/.config/h_wallpaper.* ;; esac ;; "manage") - monitor=$(xrandr | grep ' connected' | cut -f 1 -d ' ' |\ + monitor=$(xrandr | grep ' connected' | cut -f 1 -d ' ' | dmenu -i -p "Monitor:") || exit 0 case $(printf "enable\ndisable\nmove" | dmenu -i -p "Action:") in "enable"|"move") - loc=$(printf "left-of\nright-of\nabove\nbelow" |\ + loc=$(printf "left-of\nright-of\nabove\nbelow" | dmenu -i -p "Location:") || exit 0 - relative=$(xrandr --listactivemonitors | awk '{print $4}' |\ + relative=$(xrandr --listactivemonitors | awk '{print $4}' | grep -v "^$" | dmenu -i -p "Relative:") || exit 0 - direction=$(printf "normal\nright\nleft\ninverted" |\ + direction=$(printf "normal\nright\nleft\ninverted" | dmenu -i -p "Direction:") || exit 0 - xrandr --output $monitor --$loc $relative\ + xrandr --output $monitor --$loc $relative \ --rotate $direction --auto ;; "disable") diff --git a/bin/passmenu b/bin/passmenu @@ -9,4 +9,4 @@ PASS_DIR=~/.spm password=$(cd $PASS_DIR; find . -type f -name \*.gpg | \ sed 's:^\./::; s:\.gpg$::' | dmenu -i -p "Password:") || exit 0 -spm show "$password" | head -1 | xclip -r -sel clip -l 1 |2> /dev/null +spm show "$password" | head -1 | xclip -r -sel clip -l 1 > /dev/null 2>&1 diff --git a/bin/volume b/bin/volume @@ -4,6 +4,6 @@ OUT=${AUDIOSINK:-"Speaker"} -amixer -q set $OUT $@ +amixer -q set "$OUT" $@ pkill -RTMIN+2 status