From a0866a7bfdb013ed23994c62f0fb738153afdcea Mon Sep 17 00:00:00 2001 From: stupidcomputer Date: Tue, 28 May 2024 10:14:39 -0500 Subject: [PATCH] remove comments from statusbar and change statusbar location to ~/.cache/statusbar --- builds/statusbar/statusbar/statusbar.py | 7 +++---- builds/utils/sh/mode | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/builds/statusbar/statusbar/statusbar.py b/builds/statusbar/statusbar/statusbar.py index 8c74ede..4e796d0 100644 --- a/builds/statusbar/statusbar/statusbar.py +++ b/builds/statusbar/statusbar/statusbar.py @@ -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) diff --git a/builds/utils/sh/mode b/builds/utils/sh/mode index d020d65..7ad2263 100755 --- a/builds/utils/sh/mode +++ b/builds/utils/sh/mode @@ -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