nixrice/.config/sxhkd/sxhkdrc
2023-08-28 17:26:49 -04:00

47 lines
1.5 KiB
Bash

#!/bin/sh
# Using super as the main modifier key, so remember to check if a key conflicts with a DWM keybinding.
# Reload sxhkdrc configuration
super + shift + r
pkill -usr1 -x sxhkd; notify-send 'sxhkd' 'Reloaded config'
# Running dmenu scripts
super + d
dmenu_run
super + D
passmenu
super + S
sinkmenu
super + grave
dmenuunicode
super + m
layoutmenu
# Spawn programs
super + Return
$TERMINAL
super + w
$BROWSER
super + e
$TERMINAL -t "lf" -e $SHELL -c 'tmp="$(mktemp)" && command lf -last-dir-path="$tmp" "$@" && test -f "$tmp" && dir="$(command cat "$tmp")" && rm -f "$tmp" && test -d "$dir" && cd "$dir" && exec $SHELL'
# Implementing basic control hotkeys
super + l
xsecurelock
super + Print
dmenu -p "Screenshot filename:" < /dev/null | xargs -I "name" maim -s ~/name
super + shift + Print
dmenu -p "Screenshot filename:" < /dev/null | xargs -I "name" maim ~/name
super + minus
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
super + shift + minus
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
super + equal
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
super + shift + equal
wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+; notify-send -r 44 "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
XF86MonBrightnessUp
change-brightness up
XF86MonBrightnessDown
change-brightness down