From f2baa47bed93a33a240d8ba2f461ae576072301a Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Sat, 2 Mar 2024 17:50:50 +0000 Subject: [PATCH] waybar: tweak Time Warrior integration --- waybar/config | 10 ++++++++++ waybar/style.css | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/waybar/config b/waybar/config index 2f00756..8dcddf6 100644 --- a/waybar/config +++ b/waybar/config @@ -20,6 +20,8 @@ "battery", "custom/wakatime", "clock", + "custom/timewarrior", + "idle_inhibitor", "custom/logout" ], "wlr/taskbar": { @@ -199,6 +201,14 @@ "return-type": "json", "interval": 600 }, + "custom/timewarrior": { + "exec": "python3 $HOME/.config/waybar/resources/custom_modules/time_warrior_waybar.py", + "format": "{}", + "on-click": "timew stop && notify-send 'Time Warrior' 'Timer stopped'", + "on-click-right": "timew continue && notify-send 'Time Warrior' 'Timer resumed'", + "return-type": "json", + "interval": 5 + }, "custom/logout": { "format": "󰠜", "on-click": "wlogout", diff --git a/waybar/style.css b/waybar/style.css index ce2c278..e2013a9 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -77,7 +77,7 @@ button { #user, #bluetooth, #custom-wakatime, -#custom-toggl, +#custom-timewarrior, #custom-logout { font-weight: 400; padding: 3px 10px; @@ -225,10 +225,11 @@ button { color: #282828; } -#custom-toggl.active { +#custom-timewarrior.active { background-color: #98971a; + color: #282828; } -#custom-toggl.inactive { +#custom-timewarrior.inactive { background-color: #928374; }