diff --git a/home/apps/default.nix b/home/apps/default.nix index 67da071..79070b8 100644 --- a/home/apps/default.nix +++ b/home/apps/default.nix @@ -17,6 +17,7 @@ ./rice.nix ./sway.nix ./vscode.nix + ./waybar.nix ./wezterm.nix ./zsh.nix ]; diff --git a/home/apps/discord.nix b/home/apps/discord.nix index 604b1e4..aab853f 100644 --- a/home/apps/discord.nix +++ b/home/apps/discord.nix @@ -13,7 +13,7 @@ in { (pkgs.discord.override {withOpenASAR = true;}) ]) ++ (lib.optionals isLinux [ - pkgs.vesktop + (pkgs.vesktop.override {withSystemVencord = false;}) ]); home.activation.discordSettings = let json = pkgs.writeTextFile { diff --git a/home/apps/hyprland.nix b/home/apps/hyprland.nix index c60b529..2e76052 100644 --- a/home/apps/hyprland.nix +++ b/home/apps/hyprland.nix @@ -9,14 +9,14 @@ home = { packages = with pkgs; [ blueberry + grimblast + hyprpicker kooha libnotify pavucontrol + swaybg swayosd wl-clipboard - swaybg - hyprpicker - grimblast ]; }; @@ -81,6 +81,7 @@ "${mod}, space, exec, rofi -show drun" "${modMove}, space, exec, 1password --quick-access" "${hyper}, p, exec, grimblast --notify --freeze copy area" + "${modMove}, p, exec, hyprpicker -a" "${modFocus}, h, movefocus, l" "${modFocus}, j, movefocus, d" @@ -134,8 +135,11 @@ ]; exec-once = [ "${pkgs.xorg.xprop}/bin/xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2" + "${config.programs.waybar.package}/bin/waybar -b hyprland" ]; + plugin.hy3.autotile.enable = true; }; + plugins = [pkgs.hyprlandPlugins.hy3]; }; }; } diff --git a/home/apps/waybar.nix b/home/apps/waybar.nix new file mode 100644 index 0000000..daf0ae3 --- /dev/null +++ b/home/apps/waybar.nix @@ -0,0 +1,127 @@ +{ + config, + lib, + pkgs, + ... +}: let + commonSettings = { + layer = "top"; + position = "top"; + + height = 32; + spacing = 2; + margin = "2"; + + modules-center = ["hyprland/window"]; + modules-right = ["tray" "idle_inhibitor" "pulseaudio" "clock"]; + + idle_inhibitor = { + format = "{icon}"; + format-icons = { + activated = ""; + deactivated = "󰒲"; + }; + }; + + tray.spacing = 10; + + pulseaudio = { + format = "{icon} {volume}%"; + format-icons.default = ["" "" ""]; + on-click = "pavucontrol"; + }; + }; +in { + config = lib.mkIf (config.isGraphical && pkgs.stdenv.isLinux) { + programs.waybar = { + enable = true; + + settings = { + hyprland = + commonSettings + // { + modules-left = ["hyprland/workspaces"]; + "hyprland/workspaces" = { + format = "{icon}"; + on-click = "activate"; + format-icons = { + "1" = "Ⅰ"; + "2" = "Ⅱ"; + "3" = "Ⅲ"; + "4" = "Ⅳ"; + "5" = "Ⅴ"; + "6" = "Ⅵ"; + "7" = "Ⅶ"; + "8" = "Ⅷ"; + "9" = "Ⅸ"; + "10" = "Ⅹ"; + }; + persistent-workspaces."*" = 10; + }; + }; + }; + + style = '' + @define-color red #f38ba8; + @define-color pink #f5c2e7; + @define-color crust #11111c; + @define-color base #1e1e2e; + @define-color text #cdd6f4; + @define-color surface0 #313244; + @define-color surface2 #585b70; + + * { + font-family: Symbols Nerd Font, IBM Plex Sans; + font-size: 16px; + color: @text; + } + + window#waybar { + background-color: @base; + border: 2px solid @crust; + border-radius: 5px; + } + + #workspaces button:first-child { + padding: 0 5px; + border-radius: 5px 0 0 5px; + border-left: 2px solid @crust; + } + #workspaces button.active:first-child { + padding: 0 5px; + box-shadow: unset; + border-radius: 5px 0 0 5px; + border-left: 2px solid @pink; + border-top: 2px solid @pink; + border-bottom: 2px solid @pink; + } + + #workspaces button { + padding: 0 5px; + border-radius: 0; + border-top: 2px solid @crust; + border-bottom: 2px solid @crust; + } + + #workspaces button:hover { + background: @surface2; + } + + #workspaces button.active { + color: @pink; + background: @surface0; + border-top: 2px solid @pink; + border-bottom: 2px solid @pink; + } + + #workspaces button.urgent { + background-color: @red; + } + + #clock, #network, #pulseaudio, #tray, #idle_inhibitor { + padding: 0 10px; + } + ''; + }; + }; +}