remove comments from statusbar and change statusbar location to ~/.cache/statusbar

This commit is contained in:
stupidcomputer 2024-05-28 10:14:39 -05:00
parent 36b441f054
commit a0866a7bfd
2 changed files with 4 additions and 5 deletions

View File

@ -116,7 +116,7 @@ def filecheckerfactory(filename: str, modname: str, timeout=60):
battery = filecheckerfactory("/sys/class/power_supply/BAT0/capacity", "bat")
batterystatus = filecheckerfactory("/sys/class/power_supply/BAT0/status", "batstat")
sxhkdmode = filemodfactory("/home/usr/.cache/sxhkd_mode", "sxhkdmode")
sxhkdmode = filemodfactory("/home/usr/.cache/statusbar/sxhkd_mode", "sxhkdmode")
def render(modules) -> str:
columns, _ = os.get_terminal_size(0)
@ -144,10 +144,9 @@ def render(modules) -> str:
stdout.flush()
def main():
os.mkdir("/home/usr/.cache/statusbar")
if argv[1] == "start_statusbars":
# signal.signal(signal.SIGINT, signal.SIG_IGN)
# os.system("pkill statusbar")
# signal.signal(signal.SIGINT, signal.SIG_DFL)
# get the monitors
xrandr = subprocess.Popen(['xrandr'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
output = list(xrandr.stdout)

View File

@ -4,7 +4,7 @@ if [ -n "$1" ]; then
pkill sxhkd
sxhkd -c ~/.config/sxhkd/$1 & disown
[ -f "~/.config/sxhkd/$1.sh" ] && ~/.config/sxhkd/$1.sh
echo "$1" > ~/.cache/sxhkd_mode
echo "$1" > ~/.cache/statusbar/sxhkd_mode
exit
fi