diff --git a/waybar/config.jsonc b/waybar/config.jsonc index 7442a67..b454251 100644 --- a/waybar/config.jsonc +++ b/waybar/config.jsonc @@ -9,7 +9,8 @@ // Choose the order of the modules "modules-left": [ "hyprland/workspaces", - "custom/goal" + "custom/pomodoro" +// "custom/goal" ], "modules-center": [ "mpd" @@ -95,7 +96,7 @@ "mpd": { "password": "kapuchinamusica", "artist-len": 30, - "title-len": 45, + "title-len": 65, "unknown-tag": "n/a", "format": "{stateIcon} {titleSmart}", "interval": 1, @@ -143,7 +144,7 @@ } }, "cpu": { - "format": "󰓅 {usage}%", + "format": "{max_frequency:1.2f}GHz 󰓅 {usage}%", "tooltip": false, "interval": 3, "format-icons": [ @@ -245,6 +246,13 @@ "exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder // "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name }, + "custom/pomodoro": { + "format": "{}", + "return-type": "json", + "exec": "~/.local/bin/waybar-module-pomodoro --persist -w 20 -s 5 -l 20 -i 3 --autob", + "on-click": "~/.local/bin/waybar-module-pomodoro toggle", + "on-click-right": "~/.local/bin/waybar-module-pomodoro reset" + }, "custom/goal": { "exec": "cat $HOME/.config/waybar/goal.txt", "format": "󱓧 {}", diff --git a/waybar/goal.txt b/waybar/goal.txt index e2bd057..9847958 100644 --- a/waybar/goal.txt +++ b/waybar/goal.txt @@ -1 +1 @@ -Dopamine detox!!! +You survived, congrats! diff --git a/waybar/style.css b/waybar/style.css index e892158..a209a7f 100644 --- a/waybar/style.css +++ b/waybar/style.css @@ -1,16 +1,19 @@ /* GTK Color Definitions */ @define-color bg-primary rgba(23, 28, 39, 0.8); @define-color bg-secondary rgba(23, 28, 39, 0.7); +@define-color bg-opaque rgba(23, 28, 39, 0.8); @define-color border-color rgba(90, 104, 115, 1); @define-color text-primary #ffffff; @define-color text-secondary #888888; @define-color accent-color #E96375; @define-color accent-alt #faa7b3; +@define-color attention #FFFF00; @define-color warning #FFAA00; @define-color warning-alt #FFDDAA; @define-color danger #FF0000; -@define-color success #AAFFAA; -@define-color success-alt #CCEEFF; +@define-color success #00FF00; +@define-color success-alt #AAFFAA; +@define-color info #CCEEFF; * { font-family: "Iosevka Nerd Font"; @@ -74,9 +77,8 @@ window#waybar.chromium { /* Workspaces */ #workspaces { background: linear-gradient(to bottom, @bg-primary, @bg-secondary); - border: 1px solid @border-color; - border-top: none; - border-left: none; + border-right: 1px solid @border-color; + border-bottom: 1px solid @border-color; border-radius: 0 0 10px 0; margin-right: 10px; padding-right: 5px; @@ -104,7 +106,11 @@ window#waybar.chromium { } #workspaces button.urgent { - animation: blink-attention 2s infinite; + color: @bg-opaque; + font-weight: 700; + background-color: @attention; + box-shadow: inset 0 -13px @attention; + transition: color 0.5s ease-out, box-shadow 0.5s ease-out, background 0.5s ease-out; } #cpu, #memory, #memory.swap { @@ -134,20 +140,49 @@ window#waybar.chromium { border-radius: 0 0 10px 0; } -#custom-goal { +#custom-pomodoro, #custom-goal { + color: @warning-alt; background: linear-gradient(to bottom, @bg-primary, @bg-secondary); border: 1px solid @border-color; border-top: none; - border-radius: 0 0 10px 10px; - padding: 0 10px; margin: 0 20px; - color: @warning-alt + padding: 0 10px; + transition: color 2s ease-out, box-shadow 2s ease-out, background 2s ease-out; +} + +#custom-pomodoro { + border-radius: 0 0 10px 10px; + /* margin-right: 0; */ + /* border-right: none; */ +} + +#custom-goal { + border-radius: 0 0 10px 0; + margin: 0; + border-left: none; +} + +#custom-pomodoro.break { + color: @success; + box-shadow: inset 0 -3px @success; +} + +#custom-pomodoro.pause { + color: @warning; + box-shadow: inset 0 -3px @warning; +} + +#custom-pomodoro.break + #custom-goal, +#custom-pomodoro.pause + #custom-goal +{ + color: inherit; + box-shadow: inherit; } #cpu, #memory, #disk { padding: 0 10px; - color: @success-alt; - transition: color 2s ease-out, border-bottom 2s ease-out, background 2s ease-out; + color: @info; + transition: color 2s ease-out, box-shadow 2s ease-out, background 2s ease-out; } /* Module base styling */ @@ -161,7 +196,7 @@ window#waybar.chromium { border-right: none; padding: 0 10px; color: @text-primary; - transition: color 2s ease-out, border-bottom 2s ease-out, background 2s ease-out; + transition: color 2s ease-out, box-shadow 2s ease-out, background 2s ease-out; } #pulseaudio { @@ -176,7 +211,7 @@ window#waybar.chromium { #wireplumber:hover, #custom-media:hover, #mode:hover, #idle_inhibitor:hover, #scratchpad:hover, #power-profiles-daemon:hover { color: @accent-color; - transition: color 0.5s ease-out, border-bottom 0.5s ease-out, background 0.5s ease-out; + transition: color 0.5s ease-out, box-shadow 0.5s ease-out, background 0.5s ease-out; } #mpd.playing:hover, #mpd.paused:hover { @@ -186,8 +221,8 @@ window#waybar.chromium { /* Battery states */ #battery.charging, #battery.plugged { - color: @success; - border-bottom: 3px solid @success; + color: @success-alt; + box-shadow: inset 0 -3px @success-alt; } #battery.warning:not(.charging) {