From f83eb579c255fc764c182a02e70c149d913e9b6a Mon Sep 17 00:00:00 2001 From: Ruben Beltran del Rio Date: Fri, 21 Mar 2025 22:32:21 +0100 Subject: Add niri and firends --- config/waybar/config.jsonc | 92 ++++++++++++++++++++++++++++++++++++++ config/waybar/power_menu.xml | 28 ++++++++++++ config/waybar/style.css | 102 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 222 insertions(+) create mode 100644 config/waybar/config.jsonc create mode 100644 config/waybar/power_menu.xml create mode 100644 config/waybar/style.css (limited to 'config/waybar') diff --git a/config/waybar/config.jsonc b/config/waybar/config.jsonc new file mode 100644 index 0000000..ee3f180 --- /dev/null +++ b/config/waybar/config.jsonc @@ -0,0 +1,92 @@ +{ + "position": "top", + "modules-left": [ + "niri/workspaces" + ], + "modules-center": [ + "niri/window" + ], + "modules-right": [ + "idle_inhibitor", + "pulseaudio", + "network", + "power-profiles-daemon", + "battery", + "clock", + "tray", + "custom/power" + ], + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "clock": { + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "{:%Y-%m-%d}" + }, + "battery": { + "states": { + "warning": 30, + "critical": 10 + }, + "format": "{capacity}% {icon}", + "format-full": "{capacity}% {icon}", + "format-charging": "{capacity}% 󱐋", + "format-plugged": "{capacity}% ", + "format-alt": "{time} {icon}", + "format-icons": ["", "", "", "", ""] + }, + "network": { + "format-wifi": "{essid} ({signalStrength}%) ", + "format-ethernet": "{ipaddr}/{cidr} ", + "tooltip-format": "{ifname} via {gwaddr} ", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "Disconnected ", + "format-alt": "{ifname}: {ipaddr}/{cidr}" + }, + "power-profiles-daemon": { + "format": "{icon}", + "tooltip-format": "Power profile: {profile}\nDriver: {driver}", + "tooltip": true, + "format-icons": { + "default": "", + "performance": "", + "balanced": "", + "power-saver": "" + } + }, + "pulseaudio": { + // "scroll-step": 1, // %, can be a float + "format": "{volume}% {icon} {format_source}", + "format-bluetooth": "{volume}% {icon} {format_source}", + "format-bluetooth-muted": " {icon} {format_source}", + "format-muted": " {format_source}", + "format-source": "{volume}% ", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "on-click": "pavucontrol" + }, + "custom/power": { + "format" : "", + "tooltip": false, + "menu": "on-click", + "menu-file": "$HOME/.config/waybar/power_menu.xml", // Menu file in resources folder + "menu-actions": { + "shutdown": "shutdown", + "reboot": "reboot", + "suspend": "systemctl suspend", + "hibernate": "systemctl hibernate" + } + } +} diff --git a/config/waybar/power_menu.xml b/config/waybar/power_menu.xml new file mode 100644 index 0000000..aa2a42c --- /dev/null +++ b/config/waybar/power_menu.xml @@ -0,0 +1,28 @@ + + + + + + Suspend + + + + + Hibernate + + + + + Shutdown + + + + + + + + Reboot + + + + diff --git a/config/waybar/style.css b/config/waybar/style.css new file mode 100644 index 0000000..cc182e9 --- /dev/null +++ b/config/waybar/style.css @@ -0,0 +1,102 @@ +* { + font-family: "Input Sans Compressed", sans-serif; + font-size: 13px; +} + +window#waybar { + background-color: #0F261F; + color: #DAE6E3; + transition-property: background-color; + transition-duration: .5s; +} + +window #waybar.hidden { + opacity: 0.2; +} + +button { + /* Use box-shadow instead of border so the text isn't offset */ + border: none; + border-radius: 0; + transition-property: background-color; + transition-duration: .1s; +} + +button:hover { + background: #4F8FE6; +} + +#workspaces button { + color: #DAE6E3; + padding: 0 5px; + background-color: transparent; +} + +#workspaces button:hover { + color: #fff; + background-color: #4F8FE6; +} + +#workspaces button.active { + padding: 0 5px; + background-color: #23C17C; + color: #0F261F; +} + +#workspaces button.urgent { + padding: 0 5px; + background-color: #FA2B00; +} + +#clock, +#battery, +#cpu, +#memory, +#disk, +#temperature, +#backlight, +#network, +#pulseaudio, +#wireplumber, +#custom-media, +#tray, +#mode, +#idle_inhibitor, +#scratchpad, +#power-profiles-daemon, +#mpd { + padding: 0 8px; +} + +#battery { + color: #0F261F; + background-color: #DAE6E3; +} + +#battery.critical:not(.charging) { + background-color: #FA2B00; + color: #DAE6E3; +} + +#battery.warning:not(.charging) { + background-color: #FAED8F; +} + +#power-profiles-daemon { + padding-right: 10px; +} + +#power-profiles-daemon.performance { + background-color: #FA2B00; + color: #0F261F; +} + +#power-profiles-daemon.balanced { + color: #DAE6E3; + background-color: #4F8FE6; +} + +#power-profiles-daemon.power-saver { + background-color: #23C17C; + color: #0F261F; +} -- cgit