points/bin/once-connected.zsh
2024-11-21 11:32:14 +01:00

51 lines
913 B
Bash
Executable File

#!/bin/zsh
# vi:spl=en
alias xterm='xterm -bg black -fg white -fa Hack -fs 10'
## Execution Log
#
LOG=${0}.log
rm -f $LOG
touch $LOG
## Disk Usage
#
#xterm -geometry 50x8-99+99 -title "Disk Usage" -hold -e "grc --colour=auto df -h --output=pcent,target,size,used,avail / /rw"
## Versions Check
#
#xterm -geometry 100x40-99+99 -title "Versions Check" -hold -e "$HOME/bin/versions_check"
## Qubes: Cleaning
#
#sudo apt clean
rmdir $HOME/QubesIncoming/* --ignore-fail-on-non-empty
## Qubes: Split SSH
#
# https://forum.qubes-os.org/t/split-ssh/19060
#
if [[ -n "$SSH_VAULT_VM" ]]; then
{
umask u=rw,go=
rm -f "${SSH_AUTH_SOCK}"
socat "UNIX-LISTEN:${SSH_AUTH_SOCK},fork" "EXEC:qrexec-client-vm ${SSH_VAULT_VM} user.SshAgent"
} &!
fi
## Periodic Actions
#
#xterm -geometry 80x16 -hold -e $HOME/bin/every-hour.zsh
## XFCE: Default Terminal
#
SHLVL=0 exo-open --launch TerminalEmulator &!