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.
 
 
 
 
 
 

54 lines
760 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
}
# Logout function
logout() {
pkill dwm
}
# Load dmenu config
# shellcheck source=/dev/null
[ -f "$HOME/.dmenurc" ] && . "$HOME/.dmenurc" || DMENU='dmenu -z 1900 -x 10 -y 10 -i'
# Menu items
items="logout
suspend
hibernate
reboot
poweroff"
# Open menu
selection=$(printf '%s' "$items" | $DMENU)
case $selection in
logout)
logout
;;
hibernate)
loginctl hibernate
;;
suspend)
sudo /sbin/sleep
;;
reboot)
sudo /sbin/reboot
;;
halt|poweroff|shutdown)
sudo /sbin/shutdown
;;
esac
exit