From 3ba1edb4bcceb6a322d3ff8f8c07eb39772bdcc3 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 2 May 2024 12:59:31 +0300 Subject: [PATCH] Waybar : Restyle a bit. --- module/common/Font.nix | 1 + module/desktop/waybar/config/default.nix | 4 ++-- module/desktop/waybar/style/Default.nix | 2 +- module/desktop/waybar/style/Plugin.nix | 17 ++--------------- module/desktop/waybar/style/Workspace.nix | 5 +++-- part/Key.nix | 4 ++-- 6 files changed, 11 insertions(+), 22 deletions(-) diff --git a/module/common/Font.nix b/module/common/Font.nix index 32ff4ce..e7ea178 100644 --- a/module/common/Font.nix +++ b/module/common/Font.nix @@ -2,5 +2,6 @@ fonts.packages = with pkgs; [ (pkgs.callPackage ./applefont {}) (nerdfonts.override { fonts = [ "Terminus" ]; }) + font-awesome ]; } diff --git a/module/desktop/waybar/config/default.nix b/module/desktop/waybar/config/default.nix index 0560a64..5eff31e 100644 --- a/module/desktop/waybar/config/default.nix +++ b/module/desktop/waybar/config/default.nix @@ -6,11 +6,11 @@ "position": "top", // Waybar position (top|bottom|left|right) "height": 30, // Waybar height (to be removed for auto height) "spacing": 4, // Gaps between modules (4px) - "mode": "dock", + // "mode": "dock", + "exclusive": false, "start_hidden": true, "modules-left": [ "sway/workspaces", - "sway/mode", "sway/scratchpad", ], "modules-right": [ diff --git a/module/desktop/waybar/style/Default.nix b/module/desktop/waybar/style/Default.nix index f416b6b..eead89c 100644 --- a/module/desktop/waybar/style/Default.nix +++ b/module/desktop/waybar/style/Default.nix @@ -2,7 +2,7 @@ text = '' * { /* `otf-font-awesome` is required to be installed for icons */ - font-family: "${style.font.serif.name}", FontAwesome, Roboto, Helvetica, Arial, sans-serif; + font-family: "${style.font.serif.name}", FontAwesome; font-size: ${toString(style.font.size.desktop)}px; } ''; diff --git a/module/desktop/waybar/style/Plugin.nix b/module/desktop/waybar/style/Plugin.nix index 14b81d0..11c4fd4 100644 --- a/module/desktop/waybar/style/Plugin.nix +++ b/module/desktop/waybar/style/Plugin.nix @@ -2,23 +2,10 @@ text = '' #clock, #battery, - #cpu, - #memory, - #disk, - #temperature, - #backlight, - #network, #pulseaudio, - #wireplumber, - #custom-media, #tray, - #mode, - #idle_inhibitor, - #scratchpad, - #mpd { - margin: 2px; - padding-left: 4px; - padding-right: 4px; + #language { + padding: 8px 12px; } #clock { diff --git a/module/desktop/waybar/style/Workspace.nix b/module/desktop/waybar/style/Workspace.nix index cb72c3b..1f3257b 100644 --- a/module/desktop/waybar/style/Workspace.nix +++ b/module/desktop/waybar/style/Workspace.nix @@ -1,13 +1,14 @@ { style, ... }: { text = '' #workspaces button { - padding: 0 5px; + padding: 0 4px; color: #${style.color.fg.light}; + border-top: 2px solid transparent; background-color: transparent; + background-color: rgba(${style.color.bg-r},${style.color.bg-g},${style.color.bg-b},${toString(style.opacity.desktop)}); } #workspaces button.focused { - background-color: rgba(${style.color.bg-r},${style.color.bg-g},${style.color.bg-b},${toString(style.opacity.desktop)}); border-top: 2px solid #${style.color.accent}; } ''; diff --git a/part/Key.nix b/part/Key.nix index 2c8d14d..cef554c 100644 --- a/part/Key.nix +++ b/part/Key.nix @@ -37,7 +37,7 @@ seek = "C"; wait = "z"; exit = "Z"; - launch = "Space"; + launch = "r"; repeat = "."; }; @@ -104,7 +104,7 @@ sway = { launch.terminal = "Escape"; mod = "Mod4"; - bar = "r"; + bar = "space"; notification = { dismiss = "shift+N"; restore = "n";