desktop-environment/scripts
j4nk ca1d88b85b Changed temps script to reset arduino every 30 minutes 2023-12-21 18:40:05 -05:00
..
README.md Add readme for scripts 2023-12-19 13:29:52 -05:00
Slock Added lock script 2023-08-21 09:26:25 -04:00
send_temps_to_lcd.sh Changed temps script to reset arduino every 30 minutes 2023-12-21 18:40:05 -05:00
status_bar.sh Added status bar script 2023-04-09 09:53:12 -04:00

README.md

Scripts

These are just a collection of scripts I use

Slock

This is the screen locker I use. It displays a fortune piped into cowsay on the lock screen. In order to use it, it needs to be present in /usr/local/bin. Locking the screen should be bound to S-q in dwm/config.h

status_bar.sh

This displays the status bar at the top by continuously running xsetroot with the appropriate argument. This will need to be tweaked for every system it's installed on - it can display battery level, ip addresses, free RAM, and the date. Battery level is useless on desktop computers. IP addresses need to be tweaked because it obtains them via awk'ing and grep'ing the result of ip addr; the interface names may change from system to system. This should be placed in ~/.config/dwm and run on startup.

sends_temps_to_lcd.sh

I have an LCD hooked up to an Arduino that's connected to my system. The Arduino is running the arduino-lcd-writer program, which reads in input on the serial device (e.g. /dev/ttyACM0) and prints the data to the screen. This script dumps the CPU and GPU temps to this device which then get rendered on the LCD. This script updates the temps once per second, and prior to running does all the weird reset stuff required to make the program work (more info on the arduino-lcd-writer page). This should be placed in ~/.config/dwm and run on startup.

Running things on startup

I'm too lazy to set up xdg and I'm too lazy to learn how to write services for runit so I use the suckless-friendly method of placing any commands needing to run on startup that only run in the command line before the exec dwm line of .xinitrc. Note that any commands need to either be nonblocking or delegated to the background via appending & to the end of the program or the system will freeze.