changes, as always

This commit is contained in:
Solomon Laing 2025-05-10 22:56:14 +09:30
parent ccaa081a8f
commit aa1fabe5e9
4 changed files with 34 additions and 40 deletions

View File

@ -74,3 +74,8 @@ alias \
gsta="git stash" \
gstac="git stash clear" \
gstaa="git stash apply"
# drawterm
alias \
dtl="drawterm -u solomon -h 9front -a 9front" \
dtr="drawterm -u solomon -h inkletblot.com -a inkletbltot.com"

View File

@ -1,43 +1,34 @@
#!/bin/sh
# autostart="dunst nm-applet picom input-leap"
#
# for program in $autostart; do
# pidof -s "$program" || "$program" &
# done >/dev/null 2>&1
# start universal things here like keyboard map, cursor, and default screenlayout
# keyboard layout
setxkbmap us -variant dvorak -option ctrl:nocaps
# cursor
xsetroot -cursor_name left_ptr
# numlock
numlockx
nextcloud --background &
nitrogen --restore
# set default desktop window layout
"$HOME/.screenlayout/default.sh"
declare -a autostart
autostart=(
# start universal things here like keyboard map, cursor, and default screenlayout
# keyboard layout
"setxkbmap us -variant dvorak -option ctrl:nocaps"
# cursor
"xsetroot -cursor_name left_ptr"
# numlock
"numlockx"
# set default desktop window layout
"$HOME/.screenlayout/default.sh"
"nitrogen --restore"
"dunst"
"nm-applet"
"picom"
"nextcloud --background"
"input-leap"
)
for program in "${autostart[@]}"; do
pidof -s "$program" || "$program" &
done >/dev/null 2>&1
# for program in $autostart; do
# pidof -s "$program" || "$program" &
# done >/dev/null 2>&1

View File

@ -6,8 +6,6 @@ while true; do
sleep 2
done &
while true; do
dwm >/dev/null
# to log stderrors to a file
# dwm 2> ~/Build/dwm/dwm.log
done
dwm >/dev/null
# to log stderrors to a file
# dwm 2> ~/Build/dwm/dwm.log

View File

@ -23,14 +23,14 @@ lock(){
kill -44 $(pidof dwmblocks)
}
case "$(printf "🔒 lock\n🚪 leave $WM\n♻️ renew $WM\n🐻 hibernate\n🔃 reboot\n🖥shutdown\n💤 sleep\n📺 display off" | dmenu -i -p 'Action: ')" in
'🔒 lock') lock ;;
"🚪 leave $WM") kill -TERM "$(wmpid)" ;;
"♻️ renew $WM") kill -HUP "$(wmpid)" ;;
'🐻 hibernate') slock $ctl hibernate -i ;;
'💤 sleep') slock $ctl suspend -i ;;
'🔃 reboot') $ctl reboot -i ;;
'🖥️shutdown') $ctl poweroff -i ;;
'📺 display off') xset dpms force off ;;
case "$(printf "lock\nleave $WM\nrenew $WM\nhibernate\nreboot\nhutdown\nsleep\ndisplay off" | dmenu -i -p 'Action: ')" in
'lock') lock ;;
"leave $WM") kill -TERM "$(wmpid)" ;;
"renew $WM") kill -HUP "$(wmpid)" ;;
'hibernate') slock $ctl hibernate -i ;;
'sleep') slock $ctl suspend -i ;;
'reboot') $ctl reboot -i ;;
'shutdown') $ctl poweroff -i ;;
'display off') xset dpms force off ;;
*) exit 1 ;;
esac