diff options
Diffstat (limited to 'home/waybar')
| -rw-r--r-- | home/waybar/config | 160 | ||||
| -rw-r--r-- | home/waybar/default.nix | 6 | ||||
| -rw-r--r-- | home/waybar/style.css | 258 |
3 files changed, 424 insertions, 0 deletions
diff --git a/home/waybar/config b/home/waybar/config new file mode 100644 index 0000000..779a9a1 --- /dev/null +++ b/home/waybar/config @@ -0,0 +1,160 @@ +{ + // ------------------------------------------------------------------------- + // Global configuration + // ------------------------------------------------------------------------- + "ipc": true, + "position": "bottom", + "layer": "top", + "height": 30, + "mode": "dock", + "modules-left": [ + "hyprland/hide", + "hyprland/mode", + "hyprland/workspaces", + "disk", + "memory", + "cpu", + "temperature", + "custom/spotify" + ], + "modules-center": [ + "hyprland/window" + ], + "modules-right": [ + "pulseaudio", + "battery", + "backlight", + "clock#date", + "clock#time", + "network", + "tray" + ], + // ------------------------------------------------------------------------- + // Modules + // ------------------------------------------------------------------------- + "hyprland/hide": { + "hide-on-startup": true + }, + "battery": { + "interval": 1, + "states": { + "low": 30, + "warning": 15, + "critical": 5 + }, + "format": "{icon} {capacity}%", + "format-discharging": "{icon} {capacity}%", + "format-charging": " {capacity}%", + "tooltip-format": "{time} left", + "format-icons": [ + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + ], + "tooltip": true, + "full-at": 95 + }, + "clock#time": { + "interval": 10, + "format": "{:%H:%M}", + "tooltip": false + }, + "clock#date": { + "interval": 60, + "format": "{:%A, %e %b %Y}", + "tooltip": true + }, + "cpu": { + "interval": 2, + "tooltip": true, + "format": " {usage}%", + "states": { + "low": 0, + "normal": 20, + "warning": 70, + "critical": 90 + } + }, + "memory": { + "interval": 5, + "format": " {used:0.1f}G", + "tooltip-format": "{used:0.1f}G / {total:0.1f}G", + "states": { + "warning": 70, + "critical": 90 + } + }, + "network": { + "interval": 1, + "format-wifi": "{icon}", + "format-disconnected": "", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "tooltip-format": "{essid} ({signalStrength}%) - {ifname} - {ipaddr} - {bandwidthDownBits} {bandwidthUpBits}", + "tooltip": true, + }, + "hyprland/mode": { + "format": "<span style=\"italic\"> {}</span>", + "tooltip": false + }, + "hyprland/window": { + "format": "{}", + "max-length": 60, + "tooltip": true + }, + "hyprland/workspaces": { + "all-outputs": true, + "format": "{icon}" + }, + "pulseaudio": { + "scroll-step": 1, + "format": "{icon} {volume}%", + "format-muted": "", + "format-bluetooth": " {icon} {volume}%", + "format-bluetooth-muted": "", + "on-click": "pulseaudio-control togmute", + "on-click-middle": "pulseaudio-control --sink-blacklist 'alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink,alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink,alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink' next-sink" + }, + "temperature": { + "critical-threshold": 90, + "interval": 5, + "format": "{icon} {temperatureC}°C", + "format-icons": [ + "", + "", + "", + "", + "" + ], + "tooltip": true + }, + "disk": { + "interval": 10, + "format": "{free}" + }, + "backlight": { + "device": "intel_backlight", + "format": "{icon} {percent}", + "format-icons": [ + "" + ], + "on-scroll-up": "brightnessctl set +1% -e 6 -n 1", + "on-scroll-down": "brightnessctl set 1%- -e 6 -n 1" + }, + "tray": { + "icon-size": 24, + "spacing": 10 + } +} diff --git a/home/waybar/default.nix b/home/waybar/default.nix new file mode 100644 index 0000000..bfe3c39 --- /dev/null +++ b/home/waybar/default.nix @@ -0,0 +1,6 @@ +{ + programs.waybar = { enable = true; }; + + home.file."./config/waybar/config".source = ./config; + home.file."./config/waybar/style.css".source = ./style.css; +} diff --git a/home/waybar/style.css b/home/waybar/style.css new file mode 100644 index 0000000..8fe60c7 --- /dev/null +++ b/home/waybar/style.css @@ -0,0 +1,258 @@ +@keyframes blink-low { + 70% { + color: @foreground; + } + + to { + color: @foreground; + background-color: #744E0D; + } +} + +@keyframes blink-warning { + 70% { + color: @foreground; + } + + to { + color: @foreground; + background-color: @warning; + } +} + +@keyframes blink-critical { + 70% { + color: @foreground; + } + + to { + color: @foreground; + background-color: @critical; + } +} + + +/* ----------------------------------------------------------------------------- + * Styles + * -------------------------------------------------------------------------- */ + +/* Nord */ +/* Gruvbox */ +@define-color foreground #D4BE98; +@define-color background #202020; +@define-color backgroundlight #2A2A2A; +@define-color mode #a89984; +@define-color workspaces #458588; +@define-color workspacesfocused #83a598; +@define-color sound #E78A4E; +@define-color network #A9B665; +@define-color memory #7DAEA3; +@define-color cpu #8EC07C; +@define-color layout #689d6a; +@define-color battery #A9B665; +@define-color date #282828; +@define-color time #ebdbb2; +@define-color warning #DE655E; +@define-color critical #FB4934; +@define-color temp #A9B665; + +/* Reset all styles */ +* { + border: none; + border-radius: 0; + min-height: 0; + margin: 0; + padding: 0; +} + +/* The whole bar */ +#waybar { + background: @background; + color: @foreground; + font-family: Sarasa Term K, JetBrainsMono Nerd Font, Material Design Icons, unifont, Fira Code, Terminus, Siji; + font-size: 12pt; + font-weight: bold; +} + +/* Each module */ +#battery, +#clock, +#cpu, +#memory, +#custom-clockify, +#custom-spotify, +#backlight, +#mode, +#network, +#disk, +#pulseaudio, +#workspaces, +#temperature { + padding: 0 10px; + margin: 5px 5px; + border-radius: 10em; + background-color: @backgroundlight; + color: @foreground; +} + +/* Each module that should blink */ +#mode, +#memory, +#temperature, +#battery { + animation-timing-function: ease-out; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +/* Each critical module */ +#memory.critical, +#cpu.critical, +#temperature.critical, +#battery.critical { + color: @critical; +} + +/* Each critical that should blink */ +#mode, +#memory.critical, +#temperature.critical, +#battery.critical.discharging { + animation-name: blink-critical; + animation-duration: 2s; +} + +/* Each warning */ +#network.disconnected, +#memory.warning, +#cpu.warning, +#temperature.warning, +#battery.warning { + color: @warning; +} + +#cpu.low { + color: @memory; +} + +/* Each warning that should blink */ +#battery.warning.discharging { + animation-name: blink-warning; + animation-duration: 3s; +} + +#battery.low.discharging { + animation-name: blink-low; + animation-duration: 5s; +} + +/* And now modules themselves in their respective order */ + +#mode { /* Shown current Sway mode (resize etc.) */ + color: @foreground; + background: @mode; +} + +/* Workspaces stuff */ +#workspaces { + background: #2A2A2A; +} + +#workspaces button { + padding: 0; + color: #D4BE98; + font-size: 16pt; +} + +#workspaces button.persistent { + color: #3E3E3E; +} + +#workspaces button.visible { + color: #FE8019; +} + +#network { + color: @network; +} + +#disk { + color: #FABD2F; + border-radius: 10em 0 0 10em; + margin-right: 0; +} + +#memory { + color: @memory; + margin-right: 0; + margin-left: 0; + border-radius: 0; +} + +#cpu { + color: @cpu; + margin-right: 0; + margin-left: 0; + border-radius: 0; +} + +#temperature { + color: @temp; + border-radius: 0 10em 10em 0; + margin-left: 0; +} + +#pulseaudio { + color: @sound; + margin-right: 0; + border-radius: 10em 0 0 10em; +} + +#pulseaudio.muted { + color: #3E3E3E; +} + +#battery { + color: @battery; + margin-right: 0; + margin-left: 0; + border-radius: 0; +} + +#backlight { + color: #D3869B; + margin-left: 0; + border-radius: 0 10em 10em 0; +} + +#clock.date { + background: @date; + color: @foreground; + margin-right: 0; + border-radius: 10em 0 0 10em; +} + +#clock.time { + background: @time; + color: @background; + margin-left: 0; + border-radius: 0 10em 10em 0; +} + +#tray { + margin: 0 5px; +} + +tooltip { + color: @foreground; + background-color: @background; + font-weight: 400; + font-family: Fira Code; + margin: 0 10px; + border-radius: 1em; +} + +tooltip label { + color: @foreground; + padding: 0 5px; +} |
