Another copy of my dotfiles. Because I don't completely trust GitHub.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
815 B

#!/bin/sh
# Set environment
export BSPWM_CONFIG="${XDG_CONFIG_HOME:-$HOME/.config}/bspwm"
# Function to kill programs
killprogs() {
# Kill udisks-glue
pkill -x udisks-glue
# Kill panel
pkill -x panel
# Kill Redshift
pkill -x redshift
}
# Restart function
# shellcheck source=/dev/null
restart() {
reboot
}
# Logout function
logout() {
pkill dwm
}
# Load dmenu config
# shellcheck source=/dev/null
[ -f "$HOME/.dmenurc" ] && . "$HOME/.dmenurc" || DMENU='dmenu -i'
# Menu items
items="logout
suspend
reboot
poweroff"
# Open menu
selection=$(printf '%s' "$items" | $DMENU)
case $selection in
restart)
restart
;;
logout)
logout
;;
hibernate)
systemctl hibernate
;;
suspend)
systemctl suspend
;;
reboot)
reboot
;;
halt|poweroff|shutdown)
shutdown -h now
;;
esac
exit