From 36fbf464ed7b292b50bb94668fd422b1138870dd Mon Sep 17 00:00:00 2001 From: fwastring Date: Wed, 10 Sep 2025 14:26:36 +0200 Subject: [PATCH] Fixed waybar and tmux --- flake.lock | 21 +++++ flake.nix | 7 +- maskiner/jobb/configuration.nix | 2 + moduler/hyprland.nix | 150 ++++++++++++++++++++++++++++++-- moduler/tmux.nix | 10 +-- moduler/waybar.nix | 6 -- 6 files changed, 172 insertions(+), 24 deletions(-) delete mode 100644 moduler/waybar.nix diff --git a/flake.lock b/flake.lock index e5f87a9..edecc46 100644 --- a/flake.lock +++ b/flake.lock @@ -628,6 +628,26 @@ "type": "github" } }, + "minimal-tmux": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1748977843, + "narHash": "sha256-0gXtFVan+Urb79AjFOjHdjl3Q73m8M3wFSo3ZhjxcBA=", + "owner": "niksingh710", + "repo": "minimal-tmux-status", + "rev": "de2bb049a743e0f05c08531a0461f7f81da0fc72", + "type": "github" + }, + "original": { + "owner": "niksingh710", + "repo": "minimal-tmux-status", + "type": "github" + } + }, "neovim-nightly-overlay": { "inputs": { "flake-compat": "flake-compat_2", @@ -768,6 +788,7 @@ "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", + "minimal-tmux": "minimal-tmux", "neovim-nightly-overlay": "neovim-nightly-overlay", "nixpkgs": "nixpkgs_3", "stylix": "stylix" diff --git a/flake.nix b/flake.nix index c94e4e6..551eb13 100644 --- a/flake.nix +++ b/flake.nix @@ -14,10 +14,15 @@ neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; # Home manager - home-manager.url = "github:nix-community/home-manager"; + home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; hyprland.url = "github:hyprwm/Hyprland"; + + minimal-tmux = { + url = "github:niksingh710/minimal-tmux-status"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = diff --git a/maskiner/jobb/configuration.nix b/maskiner/jobb/configuration.nix index cda5c1a..cf3b73d 100644 --- a/maskiner/jobb/configuration.nix +++ b/maskiner/jobb/configuration.nix @@ -42,6 +42,8 @@ in lazygit.enable = false; fish.enable = false; kitty.enable = false; + waybar.enable = false; + tmux.enable = false; }; }; diff --git a/moduler/hyprland.nix b/moduler/hyprland.nix index 27b0868..bd51324 100644 --- a/moduler/hyprland.nix +++ b/moduler/hyprland.nix @@ -1,6 +1,7 @@ { host, config, + lib, pkgs, inputs, ... @@ -18,12 +19,10 @@ in hyprpolkitagent hyprland-qtutils waypipe - wmenu + wmenu ]; - services = { - gnome.gnome-keyring.enable = true; greetd = { enable = true; settings = { @@ -49,13 +48,146 @@ in home-manager.users.fw = { pkgs, ... }: { - imports = [ - ./waybar.nix - ]; programs = { hyprlock = { enable = true; }; + rofi = { + enable = true; + font = lib.mkForce "ComicShannsMono Nerd Font 18"; + }; + waybar = { + enable = true; + systemd = { + enable = true; + }; + settings = { + mainBar = { + modules-left = [ + "hyprland/workspaces" + ]; + modules-right = [ + "tray" + "clock" + ]; + "custom/arrow1" = { + format = ""; + + }; + tray = { + format = "{icon}"; + "icon-size" = 14; + spacing = 5; + }; + + clock = { + format = "{:%c}"; + }; + }; + }; + style = '' + @define-color bg #eff1f5; + @define-color fg #4c4f69; + @define-color lbg #e6e9ef; + @define-color yellow #df8e1d; + @define-color lavender #7287fd; + @define-color peach #fe640b; + @define-color red #d20f39; + @define-color green #40a02b; + @define-color blue #1e66f5; + @define-color border #dce0e8; + + * { + min-height: 0; + margin: 0px 0px 0px 0px; + padding: 0; + border-radius: 7px; + font-family: "ComicShannsMono Nerd Font"; + font-size: 14pt; + font-weight: 700; + padding-bottom: 0px; + } + + tooltip { + background: @bg; + border-radius: 7px; + border: 2px solid @border; + } + + #window { + margin: 0px 0px 0px 0px; + padding-left: 10px; + padding-right: 7px; + border-radius: 3px; + border-color: @lbg; + background-color: @yellow; + color: @bg; + } + + window#waybar.empty #window { + background-color: @bg; + border-bottom: none; + border-right: none; + } + + window#waybar { + background-color: @bg; + color: @lavender; + } + + /* Workspaces */ + @keyframes button_activate { + from { opacity: .3 } + to { opacity: 1.; } + } + + #workspaces { + margin: 0px 0px 0px 0px; + border-radius: 3px; + padding: 1px; + background-color: @bg; + color: @bg; + } + + #workspaces button { + margin: 0px 0px 0px 0px; + border-radius: 3px; + padding-left: 3px; + padding-right: 9px; + background-color: @bg; + color: @fg; + } + + #workspaces button.active { + background-color:@blue; + color: @bg; + } + + #workspaces button.urgent { + color: #F38BA8; + } + + #workspaces button:hover { + border: solid transparent; + } + #tray { + margin: 0px 0px 0px 0px; + border-radius: 3px; + padding-left: 10px; + padding-right: 10px; + background-color: @bg; + color: @fg; + } + #clock { + margin: 0px 0px 0px 0px; + padding-left: 10px; + padding-right: 10px; + border-radius: 3px; + color: @bg; + background-color: @green; + } + ''; + }; }; services = { cliphist = { @@ -211,8 +343,8 @@ in misc = { disable_hyprland_logo = true; disable_splash_rendering = true; - enable_swallow = true; - swallow_regex = "^(kitty)$"; + enable_swallow = true; + swallow_regex = "^(kitty)$"; }; bind = [ @@ -267,7 +399,7 @@ in # Applications "$mod, q, exec, ${pkgs.firefox}/bin/firefox" - "$mod, d, exec, ${pkgs.rofi}/bin/rofi -show run" + "$mod, d, exec, ${pkgs.rofi}/bin/rofi -show drun" # Screencapture "$mod, S, exec, ${pkgs.grim}/bin/grim | wl-copy" diff --git a/moduler/tmux.nix b/moduler/tmux.nix index 4764bcb..b5ab1ec 100644 --- a/moduler/tmux.nix +++ b/moduler/tmux.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { programs.tmux = { enable = true; @@ -12,13 +12,7 @@ tmuxPlugins.sensible tmuxPlugins.pain-control tmuxPlugins.sessionist - # { - # plugin = fw-pkgs.tmuxPlugins.minimal; - # extraConfig = '' - # bind-key b set-option status - # ''; - # } - + { plugin = inputs.minimal-tmux.packages.${pkgs.system}.default; } ]; extraConfig = '' set -g set-clipboard on diff --git a/moduler/waybar.nix b/moduler/waybar.nix deleted file mode 100644 index 69a6256..0000000 --- a/moduler/waybar.nix +++ /dev/null @@ -1,6 +0,0 @@ -{...}: let -in { - programs.waybar = { - enable = true; - }; -}