1
0
Fork 0

hlwm: use mprisctl, remove some sd-runs

aa
This commit is contained in:
Vladimír Dudr 2022-12-27 11:24:53 +01:00
parent e988391655
commit 459afa8312

View file

@ -8,7 +8,7 @@ hc() {
hc emit_hook reload
# shellcheck source=${HOME}/.config/herbstluftwm/colors.sh
# shellcheck source={{ .chezmoi.homeDir }}/.config/herbstluftwm/colors.sh
. "$(dirname "$0")/colors.sh"
### disable touchpad, cuz trackpoint rulezzzz
@ -26,10 +26,10 @@ Mod=Mod4 # Use the super key as the main modifier
hc keybind $Mod-Shift-q quit
hc keybind $Mod-Shift-r reload
hc keybind $Mod-Shift-c close
hc keybind $Mod-q close
hc keybind $Mod-Return spawn systemd-run --scope --user kitty
hc keybind $Mod-x spawn systemd-run --scope --user rofi -modi drun -show drun
hc keybind $Mod-Shift-x spawn systemd-run --scope --user rofi -show fb -modi fb:${HOME}/.config/herbstluftwm/file-browser
hc keybind $Mod-Shift-x spawn systemd-run --scope --user rofi -show fb -modi "fb:${HOME}/.config/herbstluftwm/file-browser"
hc keybind $Mod-z spawn systemd-run --scope --user rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
hc keybind $Mod-c spawn systemd-run --scope --user rofi -lines 0 -show calc -modi calc -no-show-match -no-sort -no-history
hc keybind $Mod-a spawn systemd-run --scope --user rofi -show pb -modi "pb:$HOME/.config/herbstluftwm/passmenu2"
@ -130,16 +130,17 @@ hc keybind $Mod-i jumpto urgent
# hc keybind XF86AudioLowerVolume chain , spawn systemd-run --scope --user sh -c 'pactl set-sink-volume $(pactl get-default-sink) -10%' , emit_hook volume
# hc keybind XF86AudioRaiseVolume chain , spawn systemd-run --scope --user sh -c 'pactl set-sink-volume $(pactl get-default-sink) +10%' , emit_hook volume
# shellcheck disable=SC2016
hc keybind XF86AudioMute spawn systemd-run --scope --user sh -c 'pactl set-sink-mute $(pactl get-default-sink) toggle'
hc keybind XF86AudioMute spawn sh -c 'pactl set-sink-mute $(pactl get-default-sink) toggle'
# shellcheck disable=SC2016
hc keybind XF86AudioLowerVolume spawn systemd-run --scope --user sh -c 'pactl set-sink-volume $(pactl get-default-sink) -10%'
hc keybind XF86AudioLowerVolume spawn sh -c 'pactl set-sink-volume $(pactl get-default-sink) -10%'
# shellcheck disable=SC2016
hc keybind XF86AudioRaiseVolume spawn systemd-run --scope --user sh -c 'pactl set-sink-volume $(pactl get-default-sink) +10%'
hc keybind XF86AudioRaiseVolume spawn systemd-run --scope --user sh -c 'pactl set-sink-volume $(pactl get-default-sink) +10%'
hc keybind XF86AudioRaiseVolume spawn sh -c 'pactl set-sink-volume $(pactl get-default-sink) +10%'
# shellcheck disable=SC2016
hc keybind XF86AudioRaiseVolume spawn sh -c 'pactl set-sink-volume $(pactl get-default-sink) +10%'
hc keybind XF86AudioMicMute spawn systemd-run --scope --user rofi -show pulse -modi "pulse:$HOME/.config/herbstluftwm/pulsemenu"
hc keybind XF86AudioNext spawn systemd-run --scope --user cmus-remote -n
hc keybind XF86AudioPrev spawn systemd-run --scope --user cmus-remote -r
hc keybind XF86AudioPlay spawn systemd-run --scope --user "$HOME/bin/mpristoggle"
hc keybind XF86AudioNext spawn systemd-run --scope --user "$HOME/bin/mprisctl" next
hc keybind XF86AudioPrev spawn systemd-run --scope --user "$HOME/bin/mprisctl" prev
hc keybind XF86AudioPlay spawn systemd-run --scope --user "$HOME/bin/mprisctl" toggle
# shellcheck disable=2016 # needed to pass whole script to keybind...
hc keybind XF86TouchpadToggle spawn systemd-run --scope --user dash -c 'xinput --set-prop "SynPS/2 Synaptics TouchPad" "Device Enabled" $(xinput --list-props "SynPS/2 Synaptics TouchPad" | awk -F ":\t+" "/Device Enabled/ { print (1+\$2)%2}")'
@ -147,9 +148,9 @@ hc keybind XF86TouchpadToggle spawn systemd-run --scope --user dash -c 'xinput -
hc keybind XF86Display spawn systemd-run --scope --user ~/.config/herbstluftwm/monitors
hc keybind XF86ScreenSaver and a spawn systemd-run --scope --user slock a spawn xset dpms force off
# shellcheck disable=2016 # $f is scrot interpolation string, not shells
hc keybind Print spawn systemd-run --scope --user scrot --focused --exec 'imv $f' ${HOME}/Pictures/scrot/%F-scrot.png
hc keybind Print spawn systemd-run --scope --user scrot --focused --exec 'imv $f' "${HOME}/Pictures/scrot/%F-scrot.png"
# shellcheck disable=SC2016
hc keybind Shift-Print spawn systemd-run --scope --user scrot --select --exec 'imv $f' ${HOME}/Pictures/scrot/%F-scrot.png
hc keybind Shift-Print spawn systemd-run --scope --user scrot --select --exec 'imv $f' "${HOME}/Pictures/scrot/%F-scrot.png"
# theme
hc attr theme.tiling.reset 1