diff options
Diffstat (limited to '.local/bin/desktop')
-rwxr-xr-x | .local/bin/desktop/brightness | 1 | ||||
-rwxr-xr-x | .local/bin/desktop/dmenu-file-history | 6 | ||||
-rwxr-xr-x | .local/bin/desktop/dmenu-sound | 6 | ||||
-rwxr-xr-x | .local/bin/desktop/dmenu-unicode | 2 | ||||
-rwxr-xr-x | .local/bin/desktop/setbg | 2 | ||||
-rwxr-xr-x | .local/bin/desktop/setdp | 4 | ||||
-rwxr-xr-x | .local/bin/desktop/windowshot | 3 | ||||
-rwxr-xr-x | .local/bin/desktop/zbarscreen | 3 | ||||
-rwxr-xr-x | .local/bin/desktop/zbarwindow | 3 |
9 files changed, 26 insertions, 4 deletions
diff --git a/.local/bin/desktop/brightness b/.local/bin/desktop/brightness index 11733f4..74d3e36 100755 --- a/.local/bin/desktop/brightness +++ b/.local/bin/desktop/brightness @@ -15,6 +15,7 @@ case "$1" in esac brightness="$(brightnessctl --machine-readable | cut -d, -f4)" +echo "$brightness" > "${XDG_STATE_HOME:-$HOME/.local/state}/brightness" if [ -n "$TMUX" ]; then tmux display "Brightness: $brightness" diff --git a/.local/bin/desktop/dmenu-file-history b/.local/bin/desktop/dmenu-file-history new file mode 100755 index 0000000..0997c76 --- /dev/null +++ b/.local/bin/desktop/dmenu-file-history @@ -0,0 +1,6 @@ +#!/bin/sh + +[ -n "$OPEN_HISTFILE" ] || + export OPEN_HISTFILE="${XDG_STATE_HOME:-$HOME/.local/state}/open_history" + +tac "$OPEN_HISTFILE" | dmenu -i -l 30 | xargs -I{} "${OPENER:-xdg-open}" "{}" diff --git a/.local/bin/desktop/dmenu-sound b/.local/bin/desktop/dmenu-sound new file mode 100755 index 0000000..967e9fa --- /dev/null +++ b/.local/bin/desktop/dmenu-sound @@ -0,0 +1,6 @@ +#!/bin/sh + +node="$(wpctl status | grep vol: | cut -c5- | dmenu -i -l 30 | + sed -E "s/^[ *]*([0-9]{2}).*$/\1/")" + +[ -n "$node" ] && wpctl set-default "$node" diff --git a/.local/bin/desktop/dmenu-unicode b/.local/bin/desktop/dmenu-unicode index 16e1cfc..5a3a0f5 100755 --- a/.local/bin/desktop/dmenu-unicode +++ b/.local/bin/desktop/dmenu-unicode @@ -1,6 +1,6 @@ #!/bin/sh -chosen=$(cat ~/.local/share/chars/* | dmenu -i -l 25 -fn :size=20) +chosen=$(cat ~/.local/share/chars/* | dmenu -i -l 25) [ -z "$chosen" ] && exit diff --git a/.local/bin/desktop/setbg b/.local/bin/desktop/setbg index c288895..8277caf 100755 --- a/.local/bin/desktop/setbg +++ b/.local/bin/desktop/setbg @@ -36,6 +36,6 @@ else [ -f "$zathuraconf.bak" ] && unlink "$zathuraconf" && mv "$zathuraconf.bak" "$zathuraconf" fi -xwallpaper --zoom "$bgloc" +xwallpaper --focus "$bgloc" # If running, dwm hit the key to refresh the color scheme. pidof dwm >/dev/null && xdotool key super+F5 diff --git a/.local/bin/desktop/setdp b/.local/bin/desktop/setdp index 48c6a7a..afe4498 100755 --- a/.local/bin/desktop/setdp +++ b/.local/bin/desktop/setdp @@ -13,8 +13,8 @@ if [ "$display_count" = 2 ]; then for display in $displays; do case "$display" in - eDP*) export PRIMARY="$display"; set -- "$@" --output "$display" --mode 1920x1080 --primary --pos 0x270 ;; - HDMI*) set -- "$@" --output "$display" --mode 1920x1080 --pos 1920x0 --scale "1.25x1.25" ;; + eDP*) export PRIMARY="$display"; set -- "$@" --output "$display" --mode 1920x1080 --primary --pos 0x162 ;; + HDMI*) set -- "$@" --output "$display" --mode 1920x1080 --pos 2112x0 --scale "1.25x1.25" ;; esac done diff --git a/.local/bin/desktop/windowshot b/.local/bin/desktop/windowshot new file mode 100755 index 0000000..e4de6b0 --- /dev/null +++ b/.local/bin/desktop/windowshot @@ -0,0 +1,3 @@ +#!/bin/sh + +import -silent -window "$(xdotool selectwindow)" png:- | xclip -sel clipboard -t image/png -i diff --git a/.local/bin/desktop/zbarscreen b/.local/bin/desktop/zbarscreen new file mode 100755 index 0000000..e325ce5 --- /dev/null +++ b/.local/bin/desktop/zbarscreen @@ -0,0 +1,3 @@ +#!/bin/sh + + import -silent -window root bmp:- | zbarimg - | sed -e 's/QR-Code://' | xclip -selection clipboard diff --git a/.local/bin/desktop/zbarwindow b/.local/bin/desktop/zbarwindow new file mode 100755 index 0000000..7085f69 --- /dev/null +++ b/.local/bin/desktop/zbarwindow @@ -0,0 +1,3 @@ +#!/bin/sh + +import -silent -window "$(xdotool selectwindow)" bmp:- | zbarimg - | sed -e 's/QR-Code://' | xclip -selection clipboard |