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" \ gsta="git stash" \
gstac="git stash clear" \ gstac="git stash clear" \
gstaa="git stash apply" 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 #!/bin/sh
# autostart="dunst nm-applet picom input-leap" # start universal things here like keyboard map, cursor, and default screenlayout
#
# for program in $autostart; do # keyboard layout
# pidof -s "$program" || "$program" & setxkbmap us -variant dvorak -option ctrl:nocaps
# done >/dev/null 2>&1
# cursor
xsetroot -cursor_name left_ptr
# numlock
numlockx
nextcloud --background &
nitrogen --restore
# set default desktop window layout
"$HOME/.screenlayout/default.sh"
declare -a autostart declare -a autostart
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" "dunst"
"nm-applet" "nm-applet"
"picom" "picom"
"nextcloud --background"
"input-leap" "input-leap"
) )
for program in "${autostart[@]}"; do for program in "${autostart[@]}"; do
pidof -s "$program" || "$program" & pidof -s "$program" || "$program" &
done >/dev/null 2>&1 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 sleep 2
done & done &
while true; do dwm >/dev/null
dwm >/dev/null # to log stderrors to a file
# to log stderrors to a file # dwm 2> ~/Build/dwm/dwm.log
# dwm 2> ~/Build/dwm/dwm.log
done

View File

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