Configs/scripts/etc as part of my workstation
Find a file
2024-06-20 16:41:38 -05:00
outerheaven.init3.home autostarts: typo/quoting for backup exec 2024-06-20 16:15:27 -05:00
README.md readme: de-indent UL to restore styling 2024-06-20 16:41:38 -05:00
update.sh backup_home: cover 2024-06-20 16:11:32 -05:00

dot

Yet another dotfiles repo! Files are organized by hostname and maintained by update.sh

A relatively recent Linux desktop is assumed throughout; PRs are always welcome! I use Fedora btw :)

Notable entries

i3/Sway auto-start script

Click to expand...

Time/date aware autostart manager. The script: .config/sway/scripts/startup.py

This is run by Sway on-login:

~ $ cat ~/.config/sway/config
# Config for sway
#
# See `man 5 sway` for a complete reference.
# [...]
# run script which handles conditional/timely autostarts. uses dict w/ this structure:
# {'autostarts': { 'pre': [], 'weekend': [], 'common': [], 'work': []}}
exec 'python3 ~/.config/sway/scripts/startup.py'

This reads autostart-i3ipc.yml (in ~/.config) to know what programs to exec.

Example with in-line comments:

---
autostarts:
  pre: []     # *always* run, before/blocking others. ie: backup
  weekend: [] # blocking Sat/Sun. after 'pre'/before 'common'. ie: backup tier 2
  common: []  # things started every day, after 'pre' - non-blocking
  work: []    # does not execute on weekends; only if within working day/hours

Touch ~/.vacation to skip work autostarts; rm when work may continue :)

Working days are assumed Monday through Friday. Hours are between 8 AM and 4 PM. These parameters may be changed in the WorkTime class.

homedir backup script

Click to expand...

Intended as part of the auto-starts above, I have written a script to back up $HOME (minus exclusions, of course)!

The meaningful work is given away to other utilities:

  • restic: performs the backup
  • pass: stores the passphrase given to restic