Compare commits

...

5 commits

Author SHA1 Message Date
0b4bc2569a update modpack
Some checks failed
Activate Homelab Configuration / rebuild (push) Failing after 34s
2026-07-07 13:53:30 +08:00
02caf6655d input tweak 2026-07-07 13:47:22 +08:00
67df930504 cleanup hyprlan specifics 2026-07-07 13:10:24 +08:00
e3070b231c use unstable, migrate the rest of the keybinds, a bit of styling config 2026-07-07 13:05:45 +08:00
e1f7fb5c5f migrate waybar to niri 2026-07-07 12:51:41 +08:00
5 changed files with 70 additions and 33 deletions

View file

@ -12,15 +12,14 @@
modules-left = [ modules-left = [
"custom/start" "custom/start"
"hyprland/workspaces" "niri/workspaces"
"hyprland/window" "niri/window"
"mpris" "mpris"
]; ];
modules-center = if rice.bar.minimal then [] else [ modules-center = if rice.bar.minimal then [] else [
"custom/dunst" "custom/dunst"
"clock" "clock"
"tray" "tray"
"hyprland/submap"
]; ];
modules-right = if rice.bar.minimal then [ modules-right = if rice.bar.minimal then [
"tray" "tray"
@ -54,7 +53,7 @@
}; };
interval = 1; interval = 1;
format = " {used:0.1f}GiB"; format = " {used:0.1f}GiB";
on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; on-click = "kitty btop";
}; };
"disk" = { "disk" = {
states = { states = {
@ -62,7 +61,7 @@
}; };
interval = 5; interval = 5;
format = " {used}"; format = " {used}";
on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; on-click = "kitty btop";
on-click-right = "kitty sh -c 'sudo nix-collect-garbage -d; nix-collect-garbage -d; nix store optimise; sudo journalctl --rotate --vacuum-time=1s --vacuum-files=1; read'"; on-click-right = "kitty sh -c 'sudo nix-collect-garbage -d; nix-collect-garbage -d; nix store optimise; sudo journalctl --rotate --vacuum-time=1s --vacuum-files=1; read'";
}; };
"network" = { "network" = {
@ -81,7 +80,7 @@
critical-threshold = 80; critical-threshold = 80;
format = " {temperatureC}°C"; format = " {temperatureC}°C";
interval = 1; interval = 1;
on-click = "hyprctl dispatch exec '[float; size 75%]' kitty btop"; on-click = "kitty btop";
}; };
"power-profiles-daemon" = { "power-profiles-daemon" = {
format = "{icon} {profile}"; format = "{icon} {profile}";
@ -91,15 +90,10 @@
balanced = ""; balanced = "";
}; };
}; };
"hyprland/workspaces" = { "niri/workspaces" = {
format = "{name}"; format = "{value}";
format-icons = { on-scroll-down = "niri msg action focus-workspace-down";
default = " "; on-scroll-up = "niri msg action focus-workspace-up";
active = " ";
urgent = " ";
};
on-scroll-down = "hyprctl dispatch workspace e+1";
on-scroll-up = "hyprctl dispatch workspace e-1";
}; };
"custom/dunst" = { "custom/dunst" = {
format = "{}"; format = "{}";
@ -119,7 +113,7 @@
on-click-right = "playerctl next"; on-click-right = "playerctl next";
on-click = "playerctl previous"; on-click = "playerctl previous";
}; };
"hyprland/window" = { "niri/window" = {
icon = true; icon = true;
max-length = 35; max-length = 35;
separate-outputs = false; separate-outputs = false;
@ -128,15 +122,9 @@
"~" = "${username}@${hostname}"; "~" = "${username}@${hostname}";
"btop" = "${username}@${hostname}"; "btop" = "${username}@${hostname}";
}; };
on-click-right = "hyprctl dispatch fullscreen 0"; on-click-right = "niri msg action fullscreen-window";
on-click-middle = "hyprctl dispatch killactive"; on-click-middle = "niri msg action close-window";
on-click = "hyprctl dispatch fullscreen 1"; on-click = "niri msg action maximize-column";
on-scroll-up = "hyprctl dispatch cyclenext";
on-scroll-down = "hyprctl dispatch cyclenext prev";
};
"hyprland/submap" = {
format = " {}";
on-click = "hyprctl dispatch submap reset";
}; };
"clock" = { "clock" = {
format = "{:%b %d, %I:%M:%S %p}"; format = "{:%b %d, %I:%M:%S %p}";
@ -184,8 +172,7 @@
}; };
"custom/start" = { "custom/start" = {
format = ""; format = "";
on-click-middle = "wlogout"; on-click-right = "wlogout";
on-click-right = "hyprctl dispatch togglespecialworkspace hidden";
on-click = "rofi -show drun -show-icons -display-drun '' -run-command \"uwsm app -- {cmd}\""; on-click = "rofi -show drun -show-icons -display-drun '' -run-command \"uwsm app -- {cmd}\"";
}; };
} }
@ -228,12 +215,13 @@
border: ${toString rice.borders.size}px solid transparent; border: ${toString rice.borders.size}px solid transparent;
} }
#window, #submap { padding: 0px 5px; } #window { padding: 0px 5px; }
#submap, #workspaces, #cpu, #memory, #disk, #clock, #window, #tray, #pulseaudio, #battery, #network, #temperature, #power-profiles-daemon, #custom-exit, #custom-start, #custom-dunst, #mpris { padding: 0px 5px; margin: 0px 5px; } #workspaces, #cpu, #memory, #disk, #clock, #window, #tray, #pulseaudio, #battery, #network, #temperature, #power-profiles-daemon, #custom-exit, #custom-start, #custom-dunst, #mpris { padding: 0px 5px; margin: 0px 5px; }
#workspaces button { #workspaces button {
border-radius: 0px; border-radius: 0px;
margin: 0px; margin: 0px;
padding: 4px;
background: none; background: none;
border: none; border: none;
} }
@ -247,7 +235,7 @@
background: @base; background: @base;
} }
#workspaces button.active, #submap { #workspaces button.active {
background: @surface0; background: @surface0;
} }

View file

@ -3,6 +3,8 @@
./keybinds.nix ./keybinds.nix
]; ];
# TODO: https://github.com/sodiboo/niri-flake/issues/1393 for nwg-displays monitor dynamic config
programs.niri = { programs.niri = {
settings = { settings = {
outputs."eDP-1" = { outputs."eDP-1" = {
@ -10,6 +12,14 @@
position = { x=0; y=0; }; position = { x=0; y=0; };
scale = 1.0; scale = 1.0;
}; };
input = {
warp-mouse-to-focus.enable = true;
focus-follows-mouse = {
max-scroll-amount = "5%";
enable = true;
};
};
environment = { environment = {
XCURSOR_SIZE = "24"; XCURSOR_SIZE = "24";
XCURSOR_THEME = "catppuccin-${ctp-opt.flavor}-light-cursors"; XCURSOR_THEME = "catppuccin-${ctp-opt.flavor}-light-cursors";
@ -31,6 +41,17 @@
"nm-applet &" "nm-applet &"
"tailscale systray &" "tailscale systray &"
]; ];
prefer-no-csd = true;
layout = {
tab-indicator.enable = false;
gaps = rice.gap.outer;
border = {
enable = true;
width = rice.borders.size;
};
};
}; };
}; };

View file

@ -29,6 +29,7 @@
"Mod+Q".action.close-window = {}; "Mod+Q".action.close-window = {};
"Mod+W".action.maximize-column = {}; "Mod+W".action.maximize-column = {};
"Mod+S".action.fullscreen-window = {};
"Print".action.screenshot-screen = {}; "Print".action.screenshot-screen = {};
"Mod+Up".action.focus-workspace-up = {}; "Mod+Up".action.focus-workspace-up = {};
@ -36,11 +37,35 @@
"Mod+Left".action.focus-column-left = {}; "Mod+Left".action.focus-column-left = {};
"Mod+Right".action.focus-column-right = {}; "Mod+Right".action.focus-column-right = {};
"Mod+Space" = { action.spawn = [ "playerctl" "play-pause" ]; allow-when-locked = true; };
"Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" ":" "-run-command" "uwsm app -- {cmd}" ]; "Mod+R".action.spawn = [ "rofi" "-show" "drun" "-show-icons" "-display-drun" ":" "-run-command" "uwsm app -- {cmd}" ];
"Mod+E".action.spawn = [ "pcmanfm-qt" ]; "Mod+E".action.spawn = [ "pcmanfm-qt" ];
"Mod+T".action.spawn = [ "kitty" ]; "Mod+T".action.spawn = [ "kitty" ];
"Mod+Y".action.spawn = [ "brave" "--restore-last-session" ]; "Mod+Y".action.spawn = [ "brave" "--restore-last-session" ];
"Mod+Return".action.spawn-sh = "ls ~/Projects | rofi -dmenu -p \"Open Project\" | xargs -I {} sh -c 'mkdir -p ~/Projects/\"{}\" && zeditor ~/Projects/\"{}\"'"; "Mod+Return".action.spawn-sh = "ls ~/Projects | rofi -dmenu -p \"Open Project\" | xargs -I {} sh -c 'mkdir -p ~/Projects/\"{}\" && zeditor ~/Projects/\"{}\"'";
"Mod+M".action.spawn = [ "wlogout" ];
"Mod+Tab".action.spawn = [ "pkill" "-SIGUSR1" "waybar" ];
"XF86Bluetooth".action.spawn = [ "blueman-manager" ];
"XF86Display".action.spawn = [ "nwg-displays" ];
"Ctrl+Alt+Delete".action.spawn = [ "wlogout" ];
"Ctrl+Shift+Escape".action.spawn = [ "kitty" "btop" ];
"Mod+Grave".action.spawn = [ "dunstctl" "set-paused" "toggle" ];
"Mod+N".action.spawn = [ "rofi-network-manager" ];
"Mod+J".action.spawn-sh = "notify-send -u critical ${hostname} 'Caffein Mode' && notify-send '(SUPER+X to reset)' && systemctl --user stop hypridle";
"Mod+Z".action.spawn = [ "dunstctl" "close-all" ];
"Mod+V".action.spawn = [ "rofi" "-modi" "clipboard:cliphist-rofi-img" "-show" "clipboard" "-show-icons" ];
"Mod+A".action.spawn = [ "zeditor" ];
"Mod+C".action.spawn = [ "kitty" "btop" ];
"Mod+Shift+C".action.spawn = [ "kitty" "zsh" "-c" "fastfetch; exec zsh -i" ];
"Mod+D".action.spawn = [ "steam" "steam://open/bigpicture" ];
"Mod+Shift+D".action.spawn = [ "steam" ];
"Mod+L".action.spawn = [ "loginctl" "lock-session" ];
}; };
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {

View file

@ -11,7 +11,10 @@
]; ];
programs = { programs = {
niri.enable = true; niri = {
enable = true;
package = pkgs.niri-unstable;
};
hyprland = { hyprland = {
enable = true; enable = true;
withUWSM = true; withUWSM = true;

View file

@ -5,10 +5,10 @@
rcon-pass = "howdy"; rcon-pass = "howdy";
modpack = let modpack = let
useLatest = false; useLatest = false;
commit = "bf95d65e758963899f9d5a4eba6b589c50faffc9"; commit = "86bf13316ed1352a676d9056d284448ea5e5a079";
path = if !useLatest then "commit/${commit}" else "branch/main"; path = if !useLatest then "commit/${commit}" else "branch/main";
in pkgs.fetchPackwizModpack { in pkgs.fetchPackwizModpack {
packHash = "sha256-4AbpwvbzndeQC18sCKbWkIo8npQRHTftOJ69au3AjXc="; packHash = "";
url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml"; url = "https://git.satr14.my.id/satr14/server-modpack/raw/${path}/pack.toml";
}; };
in { in {