many changes

This commit is contained in:
Kat Inskip 2025-06-17 16:41:48 -07:00
parent 3150cf3c12
commit 0262081094
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
43 changed files with 4022 additions and 204 deletions

View file

@ -0,0 +1,210 @@
{
std,
pkgs,
inputs,
...
}: let
inherit (std) list;
in {
home.packages = with pkgs; [
grimblast
wl-clipboard
wlr-randr
wl-screenrec
slurp
grim
swww
pavucontrol
hyprpicker
brightnessctl
playerctl
glib
];
services.swww.enable = true;
wayland.windowManager.hyprland = let
import-gsettings = pkgs.writeShellScriptBin "import-gsettings" ''
# usage: import-gsettings
config="''${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | sed 's/.*\s*=\s*//')"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | sed 's/.*\s*=\s*//')"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | sed 's/.*\s*=\s*//')"
font_name="$(grep 'gtk-font-name' "$config" | sed 's/.*\s*=\s*//')"
${pkgs.glib}/bin/gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
${pkgs.glib}/bin/gsettings set "$gnome_schema" icon-theme "$icon_theme"
${pkgs.glib}/bin/gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
${pkgs.glib}/bin/gsettings set "$gnome_schema" font-name "$font_name"
'';
in {
enable = true;
systemd = {
enable = true;
variables = ["--all"];
extraCommands = [
"systemctl --user stop graphical-session.target"
"systemctl --user start hyprland-session.target"
];
};
xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
plugins = [
inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces
];
settings = {
"$mod" = "SUPER";
input = {
kb_options = "ctrl:nocaps";
};
workspace = let
commonOptions = "gapsin:0,gapsout:0,rounding:false";
in
["1,monitor:DP-1,default:true,${commonOptions}"]
++ (list.map (
workspace: "${toString workspace},monitor:DP-1${commonOptions}"
) (list.range 2 10))
++ [ "11,monitor:DP-2,default:true"] ++ (list.map (
workspace: "${toString workspace},monitor:DP-2${commonOptions}"
) (list.range 12 20));
/*list.concat (list.generate (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"${toString x},monitor:DP-1"
"${toString (x + 10)},monitor:DP-2${commonOptions}"
]
)
10);
*/
env = [
"NVD_BACKEND,direct"
"ELECTRON_OZONE_PLATFORM_HINT,auto"
"LIBVA_DRIVER_NAME,nvidia"
"__GLX_VENDOR_LIBRARY_NAME,nvidia"
"QT_QPA_PLATFORM,wayland"
"__NV_DISABLE_EXPLICIT_SYNC,1"
];
exec-once = [
"${pkgs.swww}/bin/swww init"
"${pkgs.hypridle}/bin/hypridle"
"${pkgs.dbus}/bin/dbus-update-activation-environment --all"
"${pkgs.libsForQt5.polkit-kde-agent}/bin/polkit-kde-agent"
"${pkgs.networkmanagerapplet}/bin/nm-applet"
"${pkgs.mako}/bin/mako"
"${pkgs.udiskie}/bin/udiskie &"
"${pkgs.pasystray}/bin/pasystray"
"${pkgs.systemd}/bin/systemctl restart waybar --user"
"${pkgs.systemd}/bin/systemctl restart konawall-py --user"
];
plugin.split-monitor-workspaces = {
count = 10;
keep_focused = 0;
enable_notifications = 0;
enable_persistent_workspaces = 1;
};
group.groupbar = {
font_family = "Monaspace Krypton";
font_size = 12;
};
exec = [
"${import-gsettings}/bin/import-gsettings"
];
xwayland = {
force_zero_scaling = true;
};
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
binde = [
", XF86AudioRaiseVolume, exec, wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+"
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 5%+"
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl -c backlight set 5%-"
];
bind =
[
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
", XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next"
", XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl prev"
"$mod, R, exec, wofi -t wezterm -IS drun"
"$mod SHIFT, R, exec, wofi -t wezterm -IS run"
"$mod, Return, exec, wezterm"
", Print, exec, grimblast copy area"
"$mod SHIFT, E, exec, pkill Hyprland"
"$mod SHIFT, Q, killactive,"
"$mod, F, fullscreen,"
"$mod, G, togglegroup,"
"$mod SHIFT, N, changegroupactive, f"
"$mod SHIFT, P, changegroupactive, b"
"$mod, T, togglefloating,"
"$mod SHIFT, T, togglesplit,"
"$mod SHIFT, X, pseudo,"
"$mod ALT, ,resizeactive,"
"$mod, Escape, exec, wlogout -p layer-shell"
"$mod, L, exec, loginctl lock-session"
"$mod, left, movefocus, l"
"$mod, right, movefocus, r"
"$mod, up, movefocus, u"
"$mod, down, movefocus, d"
"$mod SHIFT, left, movewindow, l"
"$mod SHIFT, right, movewindow, r"
"$mod SHIFT, up, movewindow, u"
"$mod SHIFT, down, movewindow, d"
"$mod ALT, left, movewindoworgroup, l"
"$mod ALT, right, movewindoworgroup, r"
"$mod ALT, up, movewindoworgroup, u"
"$mod ALT, down, movewindoworgroup, d"
"$mod, P, exec, ${pkgs.hyprpicker}/bin/hyprpicker -na"
"CTRL, Print, exec, grimblast --notify --cursor copysave output"
"$mod SHIFT CTRL, R, exec, grimblast --notify --cursor copysave output"
"ALT, Print, exec, grimblast --notify --cursor copysave screen"
"$mod SHIFT ALT, R, exec, grimblast --notify --cursor copysave screen"
"$mod, bracketleft, workspace, m-1"
"$mod, bracketright, workspace, m+1"
"$mod SHIFT, bracketleft, focusmonitor, l"
"$mod SHIFT, bracketright, focusmonitor, r"
"$mod SHIFT ALT, bracketleft, movecurrentworkspacetomonitor, l"
"$mod SHIFT ALT, bracketright, movecurrentworkspacetomonitor, r"
]
++ (
# workspaces
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
list.concat (list.generate (
x: let
ws = let
c = (x + 1) / 10;
in
builtins.toString (x + 1 - (c * 10));
in [
"$mod, ${ws}, workspace, ${toString (x + 1)}"
"$mod SHIFT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}"
"$mod, F${if ws == "0" then "10" else ws}, workspace, ${toString (x + 11)}"
"$mod SHIFT, F${if ws == "0" then "10" else ws}, movetoworkspacesilent, ${toString (x + 11)}"
"$mod ALT, ${ws}, split-workspace, ${toString (x + 1)}"
"$mod SHIFT ALT, ${ws}, split-movetoworkspacesilent, ${toString (x + 1)}"
"$mod ALT, F${if ws == "0" then "10" else ws}, split-workspace, ${toString (x + 11)}"
"$mod SHIFT ALT, F${if ws == "0" then "10" else ws}, split-movetoworkspacesilent, ${toString (x + 11)}"
]
)
10)
);
};
};
}

View file

@ -0,0 +1,5 @@
_: {
programs.hyprlock = {
enable = true;
};
}

View file

@ -0,0 +1,120 @@
_: {
programs.waybar = {
enable = true;
systemd.enable = true;
style = ''
* {
border: none;
border-radius: 0;
font-family: Monaspace Krypton, monospace;
font-size: 13px;
min-height: 0;
}
window#waybar {
background: @theme_base_color;
border-bottom: 1px solid @unfocused_borders;
color: @theme_text_color;
}
tooltip {
background: rgba(43, 48, 59, 0.5);
border: 1px solid rgba(100, 114, 125, 0.5);
}
tooltip label {
color: white;
}
#workspaces button.persistent {
background: shade(@insensitive_bg_color, 0.5);
color: shade(@insensitive_fg_color, 0.5);
}
#workspaces button {
padding: 0 5px;
background: @theme_unfocused_bg_color;
border-bottom: 3px solid transparent;
}
#workspaces button.active, #workspaces button.focused {
background: @theme_selected_bg_color;
color: @theme_selected_fg_color;
border-bottom: 3px solid white;
}
#mode, #clock, #battery, #idle_inhibitor, #tray, #window, #wireplumber, #bluetooth, #mpris {
padding: 0 5px;
margin: 0 5px;
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#clock, #mpris {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: black;
}
#battery.charging {
color: white;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: black;
}
}
#battery.warning:not(.charging) {
background: #f53c3c;
color: white;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: steps(12);
animation-iteration-count: infinite;
animation-direction: alternate;
}
'';
settings.main = {
layer = "top";
position = "top";
height = 24;
modules-left = [
"hyprland/workspaces"
"hyprland/submap"
"hyprland/window"
];
modules-center = [
"clock"
"mpris"
];
modules-right = [
"privacy"
"bluetooth"
"wireplumber"
"idle_inhibitor"
"power-profiles-daemon"
"battery"
"tray"
];
bluetooth = {
on-click = "blueman-manager";
};
clock = {
format = "{:%F %H:%M %Z}";
};
};
};
}

View file

@ -0,0 +1,5 @@
_: {
programs.wlogout = {
enable = true;
};
}

View file

@ -0,0 +1,12 @@
_: {
programs.wofi = {
enable = true;
settings = {
insensitive = true;
allow_images = true;
hide_scroll = true;
mode = "dmenu";
prompt = "";
};
};
}