diff --git a/flake.lock b/flake.lock index b04fa18..d05c6f3 100644 --- a/flake.lock +++ b/flake.lock @@ -60,40 +60,17 @@ "type": "github" } }, - "fenix": { - "inputs": { - "nixpkgs": [ - "ironbar", - "naersk", - "nixpkgs" - ], - "rust-analyzer-src": "rust-analyzer-src" - }, - "locked": { - "lastModified": 1752475459, - "narHash": "sha256-z6QEu4ZFuHiqdOPbYss4/Q8B0BFhacR8ts6jO/F/aOU=", - "owner": "nix-community", - "repo": "fenix", - "rev": "bf0d6f70f4c9a9cf8845f992105652173f4b617f", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "fenix", - "type": "github" - } - }, "firefox-addons": { "inputs": { "nixpkgs": "nixpkgs_2" }, "locked": { "dir": "pkgs/firefox-addons", - "lastModified": 1765876616, - "narHash": "sha256-j9BnLfWdJrJrETfmfnlnpvRGKVp1MLRaw78oYDSnTRY=", + "lastModified": 1765944212, + "narHash": "sha256-t00grDNNFjoUM2MWhBISsChMZJbt0zxYn9SK0ZR+1Ns=", "owner": "rycee", "repo": "nur-expressions", - "rev": "2843ec4d4793815111a1b99e170ec7b1842b7f9f", + "rev": "353247cb60d73387ce75bf058d65a18517f56a7c", "type": "gitlab" }, "original": { @@ -103,21 +80,6 @@ "type": "gitlab" } }, - "flake-compat": { - "locked": { - "lastModified": 1761588595, - "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -146,11 +108,11 @@ ] }, "locked": { - "lastModified": 1765860045, - "narHash": "sha256-7Lxp/PfOy4h3QIDtmWG/EgycaswqRSkDX4DGtet14NE=", + "lastModified": 1765980955, + "narHash": "sha256-rB45jv4uwC90vM9UZ70plfvY/2Kdygs+zlQ07dGQFk4=", "owner": "nix-community", "repo": "home-manager", - "rev": "09de9577d47d8bffb11c449b6a3d24e32ac16c99", + "rev": "89c9508bbe9b40d36b3dc206c2483ef176f15173", "type": "github" }, "original": { @@ -198,51 +160,6 @@ "type": "github" } }, - "ironbar": { - "inputs": { - "flake-compat": "flake-compat", - "naersk": "naersk", - "nix-systems": "nix-systems", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1765808204, - "narHash": "sha256-pnI+SmXYXeNofYBYbcCkj4CTJdoXwJYYPgc1MutMz0Q=", - "owner": "JakeStanger", - "repo": "ironbar", - "rev": "c2f1043524b8eee45369692e56bb170b640df047", - "type": "github" - }, - "original": { - "owner": "JakeStanger", - "repo": "ironbar", - "type": "github" - } - }, - "naersk": { - "inputs": { - "fenix": "fenix", - "nixpkgs": [ - "ironbar", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1763384566, - "narHash": "sha256-r+wgI+WvNaSdxQmqaM58lVNvJYJ16zoq+tKN20cLst4=", - "owner": "nix-community", - "repo": "naersk", - "rev": "d4155d6ebb70fbe2314959842f744aa7cabbbf6a", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -282,21 +199,6 @@ "type": "github" } }, - "nix-systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, "nixpkgs": { "locked": { "lastModified": 1754028485, @@ -315,11 +217,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1765762245, - "narHash": "sha256-3iXM/zTqEskWtmZs3gqNiVtRTsEjYAedIaLL0mSBsrk=", + "lastModified": 1765838191, + "narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c8cfcd6ccd422e41cc631a0b73ed4d5a925c393d", + "rev": "c6f52ebd45e5925c188d1a20119978aa4ffd5ef6", "type": "github" }, "original": { @@ -359,11 +261,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1765803225, - "narHash": "sha256-xwaZV/UgJ04+ixbZZfoDE8IsOWjtvQZICh9aamzPnrg=", + "lastModified": 1765934234, + "narHash": "sha256-pJjWUzNnjbIAMIc5gRFUuKCDQ9S1cuh3b2hKgA7Mc4A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ac9a217389ee622d4e1e727c4efcc9c4bc9089ba", + "rev": "af84f9d270d404c17699522fab95bbf928a2d92f", "type": "github" }, "original": { @@ -423,7 +325,6 @@ "firefox-addons": "firefox-addons", "home-manager": "home-manager_2", "ip-whitelist": "ip-whitelist", - "ironbar": "ironbar", "nix-darwin": "nix-darwin", "nix-homebrew": "nix-homebrew", "nixpkgs": "nixpkgs_4", @@ -432,23 +333,6 @@ "zen-browser": "zen-browser" } }, - "rust-analyzer-src": { - "flake": false, - "locked": { - "lastModified": 1752428706, - "narHash": "sha256-EJcdxw3aXfP8Ex1Nm3s0awyH9egQvB2Gu+QEnJn2Sfg=", - "owner": "rust-lang", - "repo": "rust-analyzer", - "rev": "591e3b7624be97e4443ea7b5542c191311aa141d", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "ref": "nightly", - "repo": "rust-analyzer", - "type": "github" - } - }, "rust-overlay": { "inputs": { "nixpkgs": "nixpkgs_6" @@ -523,11 +407,11 @@ "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1765895443, - "narHash": "sha256-yftYGV0skUwV5neT1BJrs7RRbXPKozQTzC7d9c7kEFs=", + "lastModified": 1765946036, + "narHash": "sha256-R/qaIkzqm00qBMr8onM6ZZFX49lvsQLZ79adVubqjts=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "bc7dfff92cb7919dfb213ea78c11ea0a4d265a56", + "rev": "7db019a64483743a8d92319baafbbe71b687d0a1", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index c7d06bb..5843aa6 100644 --- a/flake.nix +++ b/flake.nix @@ -10,10 +10,6 @@ url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - ironbar = { - url = "github:JakeStanger/ironbar"; - inputs.nixpkgs.follows = "nixpkgs"; - }; nix-darwin.url = "github:LnL7/nix-darwin/master"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; ip-whitelist.url = "github:Oak-Digital/nixos-ip-whitelist-firewall"; @@ -31,7 +27,6 @@ nix-darwin, nix-homebrew, agenix, - ironbar, zellij-switch, ... }@inputs: @@ -55,7 +50,7 @@ nixosModules.steam = import ./modules/steam; nixosModules.niriSystem = import ./modules/wm/niri-system; - nixosConfigurations.dnsc-machine = inputs.nixpkgs-stable.lib.nixosSystem { + nixosConfigurations.dnsc-machine = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; specialArgs = { inherit inputs outputs; }; modules = [ diff --git a/home/linux.nix b/home/linux.nix index 98c296d..cc52cb5 100644 --- a/home/linux.nix +++ b/home/linux.nix @@ -36,6 +36,9 @@ wl-clipboard hyprpicker usbutils + krita + gpustat + librewolf ]; imports = [ @@ -48,13 +51,12 @@ ../modules/fish ../modules/zellij ../modules/mpv - ../modules/firefox ../modules/zen ../modules/wm/swaync ../modules/wm/cliphist ../modules/wm/awww ../modules/wm/fuzzel - ../modules/wm/ironbar + ../modules/wm/waybar ../modules/wm/niri ]; diff --git a/hosts/dnsc-machine/default.nix b/hosts/dnsc-machine/default.nix index 7a7001a..0bc92e9 100644 --- a/hosts/dnsc-machine/default.nix +++ b/hosts/dnsc-machine/default.nix @@ -63,7 +63,6 @@ dennis = { imports = [ inputs.zen-browser.homeModules.beta - inputs.ironbar.homeManagerModules.default ../../home/linux.nix ]; }; diff --git a/modules/wm/default.nix b/modules/wm/default.nix index e290398..7e61ab0 100644 --- a/modules/wm/default.nix +++ b/modules/wm/default.nix @@ -3,7 +3,7 @@ ./awww ./cliphist ./fuzzel - ./ironbar + ./waybar ./niri ./swaync ]; diff --git a/modules/wm/fuzzel/scripts/fuzzel-projects.sh b/modules/wm/fuzzel/scripts/fuzzel-projects.sh index dd5d43c..8ce3508 100755 --- a/modules/wm/fuzzel/scripts/fuzzel-projects.sh +++ b/modules/wm/fuzzel/scripts/fuzzel-projects.sh @@ -8,9 +8,10 @@ for project in ${projects[*]}; do done selected=$(printf "$projects_with_names" | fuzzel --dmenu --with-nth=1 --accept-nth=2 --prompt "Work on: ") +session_name=$(basename "$selected") if [ "$selected" != "" ]; then - niri msg action focus-workspace "code" - firefox & - ghostty --working-directory="$selected" + # niri msg action focus-workspace "code" + # zen-beta & + ghostty -e zellij attach "$session_name" --create fi diff --git a/modules/wm/ironbar/config/config.toml b/modules/wm/ironbar/config/config.toml index fc2256d..bb16a63 100644 --- a/modules/wm/ironbar/config/config.toml +++ b/modules/wm/ironbar/config/config.toml @@ -32,7 +32,7 @@ max_length = 40 type = "sys_info" format = [ "h:dnsc-machine", - " {cpu_percent@sum}% ({temp_c@k10temp Tccd1}°C)", + " {cpu_percent}% ({temp_c@k10temp Tccd1}°C)", " {memory_used#G:<2.1}/{memory_total#G:<2.1}GB", " {disk_used#G@/:.1}GB used ({disk_free#G@/:.0}GB free)" ] diff --git a/modules/wm/niri/config/config.kdl b/modules/wm/niri/config/config.kdl index 42e9ad0..699fe9e 100644 --- a/modules/wm/niri/config/config.kdl +++ b/modules/wm/niri/config/config.kdl @@ -34,22 +34,11 @@ input { mouse { // off // natural-scroll - // accel-speed 0.2 + accel-speed -0.3 // accel-profile "flat" // scroll-method "no-scroll" } - trackpoint { - // off - // natural-scroll - // accel-speed 0.2 - // accel-profile "flat" - // scroll-method "on-button-down" - // scroll-button 273 - // scroll-button-lock - // middle-emulation - } - tablet { map-to-output "DP-3" // calibration-matrix 1.0 1.0 1.0 1.0 1.0 1.0 @@ -111,7 +100,7 @@ layout { // You can change how the focus ring looks. focus-ring { // off - width 2 + width 3 active-color "#c57faf" inactive-color "#d369af" } @@ -188,10 +177,9 @@ layout { } // STARTUP +spawn-at-startup "waybar" spawn-at-startup "swaync" spawn-at-startup "swww-daemon" -spawn-at-startup "ironbar" -spawn-at-startup "blueman-applet" spawn-at-startup "tailscale systray" spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark" @@ -217,7 +205,7 @@ screenshot-path "~/Pictures/Screenshots/taken_at_%Y-%m-%d %H-%M-%S.png" // https://yalter.github.io/niri/Configuration:-Animations animations { // Uncomment to turn off all animations. - // off + off // Slow down all animations by this factor. Values below 1 speed them up instead. // slowdown 3.0 @@ -227,20 +215,12 @@ overview { backdrop-color "#0f0b15" } -workspace "main" -workspace "code" -workspace "gaming" -workspace "other" -workspace "chat" -workspace "media" - // Window rules let you adjust behavior for individual windows. // Find more information on the wiki: // https://yalter.github.io/niri/Configuration:-Window-Rules window-rule { match app-id=r#"^steam$"# - open-on-workspace "gaming" } // window-rule { @@ -258,7 +238,7 @@ window-rule { // This app-id regular expression will work for both: // - host Firefox (app-id is "firefox") // - Flatpak Firefox (app-id is "org.mozilla.firefox") - match app-id=r#"firefox$"# title="^Picture-in-Picture$" + match app-id=r#"zen-beta$"# title="^Picture-in-Picture$" open-floating true } @@ -437,21 +417,21 @@ binds { // // For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on // will all refer to the 3rd workspace. - Alt+1 { focus-workspace "main"; } - Alt+2 { focus-workspace "code"; } - Alt+3 { focus-workspace "gaming"; } - Alt+4 { focus-workspace "other"; } - Alt+5 { focus-workspace "chat"; } - Alt+6 { focus-workspace "media"; } + Alt+1 { focus-workspace 1; } + Alt+2 { focus-workspace 2; } + Alt+3 { focus-workspace 3; } + Alt+4 { focus-workspace 4; } + Alt+5 { focus-workspace 5; } + Alt+6 { focus-workspace 6; } Alt+7 { focus-workspace 7; } Alt+8 { focus-workspace 8; } Alt+9 { focus-workspace 9; } - Alt+Ctrl+1 { move-column-to-workspace "main"; } - Alt+Ctrl+2 { move-column-to-workspace "code"; } - Alt+Ctrl+3 { move-column-to-workspace "gaming"; } - Alt+Ctrl+4 { move-column-to-workspace "other"; } - Alt+Ctrl+5 { move-column-to-workspace "chat"; } - Alt+Ctrl+6 { move-column-to-workspace "media"; } + Alt+Ctrl+1 { move-column-to-workspace 1; } + Alt+Ctrl+2 { move-column-to-workspace 2; } + Alt+Ctrl+3 { move-column-to-workspace 3; } + Alt+Ctrl+4 { move-column-to-workspace 4; } + Alt+Ctrl+5 { move-column-to-workspace 5; } + Alt+Ctrl+6 { move-column-to-workspace 6; } Alt+Ctrl+7 { move-column-to-workspace 7; } Alt+Ctrl+8 { move-column-to-workspace 8; } Alt+Ctrl+9 { move-column-to-workspace 9; } diff --git a/modules/wm/waybar/config/config.jsonc b/modules/wm/waybar/config/config.jsonc new file mode 100644 index 0000000..1c603be --- /dev/null +++ b/modules/wm/waybar/config/config.jsonc @@ -0,0 +1,126 @@ +{ + // Bar Options + "output": "DP-3", + "position": "left", + "width": 36, + "margin-left": 8, + "margin-top": 8, + "margin-bottom": 8, + // Placing Modules + "modules-left": [ + "clock", + "custom/cpu-label", + "cpu", + "custom/memory-label", + "memory", + "custom/disk-label", + "disk", + "custom/nvidia-label", + "custom/nvidia" + ], + "modules-center": [ + "niri/workspaces" + ], + "modules-right": [ + "wireplumber#source", + "wireplumber#sink", + "tray", + "custom/power" + ], + // Module Configuration + "niri/workspaces": { + "format": "{icon}", + "format-icons": { + "active": "󰄯", + "default": "󰄰" + } + }, + "clock": { + "interval": 60, + "format": "{:%H\n%M}", + "format-alt": "{:%d\n%m}", + "tooltip": false, + "justify": "center" + }, + "custom/cpu-label": { + "format": "CPU", + "tooltip": false + }, + "cpu": { + "interval": "30", + "format": "{usage}%", + "max-length": 2 + }, + "custom/memory-label": { + "format": "MEM", + "tooltip": false + }, + "memory": { + "interval": "30", + "format": "{percentage}%", + "max-length": 2 + }, + "custom/disk-label": { + "format": "SSD", + "tooltip": false + }, + "disk": { + "interval": "30", + "format": "{percentage_used}%", + "max-length": 2 + }, + "custom/nvidia-label": { + "format": "GPU", + "tooltip": false + }, + "custom/nvidia": { + "exec": "nvidia-smi --query-gpu=temperature.gpu --format=csv,nounits,noheader", + "format": "{}°", + "tooltip": false, + "interval": 10 + }, + "wireplumber#source": { + "node-type": "Audio/Source", + "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", + "on-click-right": "pwvucontrol", + "scroll-step": 5.0, + "tooltip-format": "{node_name} ({source_volume}%)", + "format": "{icon}", + "format-muted": "󰍭", + "format-icons": { + "default": [ + "󰍬" + ] + } + }, + "wireplumber#sink": { + "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "on-click-right": "pwvucontrol", + "scroll-step": 5.0, + "tooltip-format": "{node_name} ({volume}%)", + "format": "{icon}", + "format-muted": "󰖁", + "format-icons": { + "default": [ + "󰕿", + "󰖀", + "󰕾" + ] + } + }, + "tray": { + "icon-size": 14, + "spacing": 18 + }, + "custom/power": { + "format": "󰐥", + "tooltip": false, + "menu": "on-click", + "menu-file": "~/.config/waybar/power_menu.xml", + "menu-actions": { + "lock": "hyprlock", + "reboot": "reboot", + "shutdown": "shutdown now" + } + } +} diff --git a/modules/wm/waybar/config/power_menu.xml b/modules/wm/waybar/config/power_menu.xml new file mode 100644 index 0000000..8b15c31 --- /dev/null +++ b/modules/wm/waybar/config/power_menu.xml @@ -0,0 +1,20 @@ + + + + + + Lock + + + + + Reboot + + + + + Shutdown + + + + diff --git a/modules/wm/waybar/config/style.css b/modules/wm/waybar/config/style.css new file mode 100644 index 0000000..858e436 --- /dev/null +++ b/modules/wm/waybar/config/style.css @@ -0,0 +1,86 @@ +* { + font-family: "VictorMono Nerd Font Propo"; + font-size: 12px; + font-weight: bold; + background: transparent; +} + +tooltip, +menu { + background: rgba(15, 11, 12, 0.9); + border-radius: 8px; + border: 2px solid #572454; +} + +menuitem { + color: #ffffff; + margin-left: 4px; + margin-right: 4px; + border-radius: 4px; +} + +menuitem:hover { + color: #331531; + background-color: #c57faf; +} + +window#waybar { + background-color: rgba(15, 11, 12, 0.95); + border-radius: 8px; + color: #ffffff; +} + +#workspaces button { + padding: 2px 10px; + margin: 0; + color: #d369af; +} + +#clock { + font-size: 15px; + padding: 8px 0 8px; +} + +#custom-cpu-label, +#custom-memory-label, +#custom-disk-label, +#custom-nvidia-label { + color: #572454; + padding-top: 6px; + border-top: 1px solid #572454; +} + +#custom-nvidia { + border-bottom: 1px solid #572454; +} + +#cpu, +#memory, +#disk, +#custom-nvidia { + color: #d369af; + padding-bottom: 8px; +} + +#wireplumber { + font-size: 16px; + margin-top: 4px; + margin-bottom: 4px; +} + +#tray { + margin: 4px; + margin-top: 0; + border-radius: 4px; + padding-top: 10px; + padding-bottom: 10px; +} + +#custom-power { + background-color: #331531; + font-size: 16px; + border-bottom-left-radius: 8px; + border-bottom-right-radius: 8px; + padding-top: 6px; + padding-bottom: 6px; +} diff --git a/modules/wm/waybar/default.nix b/modules/wm/waybar/default.nix new file mode 100644 index 0000000..698ff0b --- /dev/null +++ b/modules/wm/waybar/default.nix @@ -0,0 +1,15 @@ +{ config, ... }: + +{ + xdg.configFile."waybar" = { + source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/waybar/config"; + }; + + programs.waybar = { + enable = true; + systemd = { + enable = true; + target = "graphical.target"; + }; + }; +} diff --git a/modules/zellij/config.kdl b/modules/zellij/config.kdl index a65ac39..bc1e058 100644 --- a/modules/zellij/config.kdl +++ b/modules/zellij/config.kdl @@ -17,15 +17,15 @@ keybinds clear-defaults=true { floating true move_to_focused_tab true }; - SwitchToMode "Locked" + SwitchToMode "Locked"; } bind "s" { - Run "sessionizer" { + Run "fish" "-ic" "sessionizer" { close_on_exit true floating true }; - SwitchToMode "locked"; + SwitchToMode "Locked"; } // Global keybindings @@ -34,10 +34,10 @@ keybinds clear-defaults=true { bind "x" { CloseFocus; SwitchToMode "Locked"; } bind "-" { NewPane "Down"; SwitchToMode "Locked"; } bind "|" { NewPane "Right"; SwitchToMode "Locked"; } - bind "h" "Left" { MoveFocus "Left"; } - bind "l" "Right" { MoveFocus "Right"; } - bind "j" "Down" { MoveFocus "Down"; } - bind "k" "Up" { MoveFocus "Up"; } + bind "h" "Left" { MoveFocus "Left"; SwitchToMode "Locked"; } + bind "l" "Right" { MoveFocus "Right"; SwitchToMode "Locked"; } + bind "j" "Down" { MoveFocus "Down"; SwitchToMode "Locked"; } + bind "k" "Up" { MoveFocus "Up"; SwitchToMode "Locked"; } bind "1" { GoToTab 1; SwitchToMode "Locked"; } bind "2" { GoToTab 2; SwitchToMode "Locked"; } bind "3" { GoToTab 3; SwitchToMode "Locked"; } diff --git a/modules/zen/default.nix b/modules/zen/default.nix index 1559f9c..eb64533 100644 --- a/modules/zen/default.nix +++ b/modules/zen/default.nix @@ -41,6 +41,23 @@ id = "53d805fa-2cc1-44b5-929b-a72cc83d9587"; position = 1000; container = containers."Personal".id; + theme = { + type = "gradient"; + texture = 0.7; + opacity = 0.8; + colors = [ + { + red = 87; + green = 36; + blue = 84; + } + { + red = 51; + green = 21; + blue = 49; + } + ]; + }; }; }; pins = { @@ -49,7 +66,7 @@ workspace = spaces.Personal.id; container = containers.Personal.id; url = "https://home.dnsc.io"; - position = 100; + position = 101; }; "Apps" = { id = "092abc24-d7c5-4012-b311-d4ee0b193537";