2024-01-30 14:21:50 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}: {
|
2024-01-30 16:10:12 +00:00
|
|
|
stylix.targets = {
|
|
|
|
avizo.enable = true;
|
|
|
|
xresources.enable = true;
|
|
|
|
};
|
2024-01-28 12:01:18 +00:00
|
|
|
imports = [
|
|
|
|
../default.nix
|
|
|
|
../accounts/default.nix
|
|
|
|
../swaylock/default.nix
|
|
|
|
../waybar/default.nix
|
|
|
|
../rofi/default.nix
|
|
|
|
../swaync/default.nix
|
2024-01-30 16:10:12 +00:00
|
|
|
../alacritty/default.nix
|
2024-01-28 12:01:18 +00:00
|
|
|
../emacs/default.nix
|
|
|
|
../nyxt/default.nix
|
|
|
|
../obs/default.nix
|
|
|
|
];
|
2024-01-31 07:21:01 +00:00
|
|
|
programs.rofi = with pkgs; {
|
|
|
|
package = rofi-wayland;
|
|
|
|
terminal = "${alacritty}/bin/alacritty";
|
|
|
|
pass.package = rofi-pass-wayland;
|
|
|
|
};
|
2023-10-26 17:15:51 +01:00
|
|
|
services = {
|
2024-01-12 08:19:20 +00:00
|
|
|
gpg-agent.pinentryFlavor = "gnome3";
|
2023-10-26 17:15:51 +01:00
|
|
|
avizo.enable = true;
|
2024-01-30 16:10:12 +00:00
|
|
|
blueman-applet.enable = true;
|
|
|
|
network-manager-applet.enable = true;
|
2023-11-09 11:54:55 +00:00
|
|
|
syncthing.enable = true;
|
2023-11-09 11:42:12 +00:00
|
|
|
udiskie = {
|
|
|
|
enable = true;
|
|
|
|
notify = true;
|
|
|
|
automount = true;
|
2023-11-09 11:54:55 +00:00
|
|
|
tray = "never";
|
2023-11-09 11:42:12 +00:00
|
|
|
};
|
2023-10-26 17:15:51 +01:00
|
|
|
};
|
2023-12-21 13:05:27 +00:00
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
cursorTheme = {
|
|
|
|
package = pkgs.catppuccin-cursors.mochaDark;
|
|
|
|
name = "Catppuccin-Mocha-Dark-Cursors";
|
|
|
|
size = 24;
|
|
|
|
};
|
|
|
|
iconTheme = {
|
|
|
|
package = pkgs.papirus-icon-theme;
|
|
|
|
name = "Papirus-Dark";
|
|
|
|
};
|
|
|
|
theme = {
|
|
|
|
package = pkgs.catppuccin-gtk.override {
|
2024-01-30 14:21:50 +00:00
|
|
|
accents = ["lavender"];
|
2023-12-21 13:05:27 +00:00
|
|
|
size = "standard";
|
|
|
|
variant = "mocha";
|
|
|
|
};
|
|
|
|
name = "Catppuccin-Mocha-Standard-Lavender-Dark";
|
|
|
|
};
|
|
|
|
};
|
2024-01-28 12:01:18 +00:00
|
|
|
xdg.configFile = {
|
2024-01-30 14:21:50 +00:00
|
|
|
"hypr/extra.conf" = lib.mkDefault {text = "";};
|
2024-01-28 12:01:18 +00:00
|
|
|
"hypr/hyprpaper.conf".text = ''
|
|
|
|
preload = ${config.stylix.image}
|
|
|
|
wallpaper = ,${config.stylix.image}
|
|
|
|
'';
|
2023-08-21 11:01:19 +01:00
|
|
|
};
|
2024-01-27 06:52:09 +00:00
|
|
|
wayland.windowManager.hyprland = {
|
|
|
|
enable = true;
|
|
|
|
xwayland.enable = true;
|
|
|
|
systemd.enable = true;
|
|
|
|
settings = {
|
2024-01-30 14:21:50 +00:00
|
|
|
monitor = [",preferred,auto,auto"];
|
2024-01-27 06:52:09 +00:00
|
|
|
env = with config; [
|
|
|
|
"XDG_CURRENT_DESKTOP=Hyprland"
|
|
|
|
"XDG_SESSION_TYPE=wayland"
|
|
|
|
"XDG_SESSION_DESKTOP=Hyprland"
|
|
|
|
"GDK_BACKEND=wayland,x11"
|
|
|
|
"GTK_THEME,${gtk.theme.name}"
|
|
|
|
"XCURSOR_THEME,${gtk.cursorTheme.name}"
|
|
|
|
"XCURSOR_SIZE,${toString gtk.cursorTheme.size}"
|
|
|
|
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
|
|
|
"QT_QPA_PLATFORM,wayland"
|
|
|
|
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
|
|
|
"MOZ_ENABLE_WAYLAND,1"
|
|
|
|
"GRIM_DEFAULT_DIR=${xdg.userDirs.pictures}/Grim"
|
|
|
|
];
|
2024-01-27 08:09:57 +00:00
|
|
|
exec-once = with config; [
|
2024-01-30 18:02:35 +00:00
|
|
|
"${wayland.windowManager.hyprland.finalPackage}/bin/hyprctl setcursor ${gtk.theme.name} ${toString gtk.cursorTheme.size}"
|
2024-01-30 16:10:12 +00:00
|
|
|
"${pkgs.swaynotificationcenter}/bin/swaync"
|
2024-01-27 08:09:57 +00:00
|
|
|
"${pkgs.hyprpaper}/bin/hyprpaper"
|
2024-01-30 16:10:12 +00:00
|
|
|
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
|
2024-01-27 08:09:57 +00:00
|
|
|
];
|
2024-01-27 06:52:09 +00:00
|
|
|
gestures.workspace_swipe = true;
|
|
|
|
input = {
|
|
|
|
kb_layout = "gb";
|
|
|
|
kb_options = "ctrl:nocaps";
|
|
|
|
follow_mouse = 1;
|
|
|
|
touchpad.natural_scroll = "yes";
|
|
|
|
};
|
|
|
|
master = {
|
|
|
|
allow_small_split = true;
|
|
|
|
special_scale_factor = 0.95;
|
|
|
|
mfact = 0.5;
|
|
|
|
new_is_master = false;
|
|
|
|
new_on_top = false;
|
|
|
|
no_gaps_when_only = 0;
|
|
|
|
orientation = "left";
|
|
|
|
inherit_fullscreen = false;
|
|
|
|
smart_resizing = false;
|
|
|
|
drop_at_cursor = true;
|
|
|
|
};
|
|
|
|
general = {
|
|
|
|
"col.active_border" = "rgb(b4befe)";
|
|
|
|
"col.inactive_border" = "rgb(313244)";
|
|
|
|
gaps_in = 5;
|
|
|
|
gaps_out = 10;
|
|
|
|
border_size = 1;
|
|
|
|
cursor_inactive_timeout = 5;
|
|
|
|
layout = "master";
|
|
|
|
};
|
|
|
|
decoration = {
|
|
|
|
rounding = 10;
|
|
|
|
"col.shadow" = "rgba(0d0e1c99)";
|
|
|
|
drop_shadow = "yes";
|
|
|
|
shadow_ignore_window = true;
|
|
|
|
shadow_range = 4;
|
|
|
|
shadow_render_power = 3;
|
|
|
|
blur = {
|
|
|
|
enabled = true;
|
|
|
|
size = 5;
|
|
|
|
passes = 3;
|
|
|
|
new_optimizations = true;
|
|
|
|
brightness = 1.0;
|
|
|
|
noise = 2.0e-2;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
animations = {
|
|
|
|
enabled = true;
|
|
|
|
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
|
|
|
animation = [
|
|
|
|
"windows, 1, 7, myBezier"
|
|
|
|
"windowsOut, 1, 7, default, popin 80%"
|
|
|
|
"border, 1, 10, default"
|
|
|
|
"borderangle, 1, 8, default"
|
|
|
|
"fade, 1, 7, default"
|
|
|
|
"workspaces, 1, 6, default"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
misc = {
|
2024-01-29 06:27:37 +00:00
|
|
|
disable_splash_rendering = true;
|
2024-01-27 06:52:09 +00:00
|
|
|
disable_autoreload = true;
|
|
|
|
mouse_move_enables_dpms = true;
|
|
|
|
key_press_enables_dpms = true;
|
|
|
|
};
|
|
|
|
xwayland.force_zero_scaling = true;
|
2024-01-27 08:09:57 +00:00
|
|
|
layerrule = let
|
|
|
|
blur = x: "blur, ^(${x})$";
|
|
|
|
ignorealpha = x: "ignorealpha 0.3, ^(${x})$";
|
|
|
|
layers = [
|
|
|
|
"waybar"
|
|
|
|
"system-menu"
|
|
|
|
"rofi"
|
|
|
|
"gtk-layer-shell"
|
|
|
|
"notifications"
|
|
|
|
"swaync-.*"
|
|
|
|
];
|
2024-01-30 14:21:50 +00:00
|
|
|
in
|
|
|
|
(lib.lists.forEach layers blur)
|
|
|
|
++ (lib.lists.forEach layers ignorealpha);
|
2024-01-27 08:09:57 +00:00
|
|
|
windowrule = [
|
|
|
|
# Float + move system windows
|
2024-01-30 09:23:11 +00:00
|
|
|
"float,org.kde.polkit-kde-authentication-agent-1|Pinentry"
|
|
|
|
"center,org.kde.polkit-kde-authentication-agent-1|Pinentry"
|
|
|
|
"pin,org.kde.polkit-kde-authentication-agent-1|Pinentry"
|
|
|
|
"dimaround,org.kde.polkit-kde-authentication-agent-1|Pinentry"
|
|
|
|
"stayfocused,org.kde.polkit-kde-authentication-agent-1|Pinentry"
|
|
|
|
"float,pavucontrol|.blueman-manager-wrapped|nm-connection-editor"
|
|
|
|
"size 800 600,pavucontrol|.blueman-manager-wrapped|nm-connection-editor"
|
|
|
|
"move onscreen 100%-820 60,pavucontrol|.blueman-manager-wrapped|nm-connection-editor"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
|
|
|
# LibreOffice
|
|
|
|
"nomaximizerequest, (libreoffice|soffice)(.*)"
|
|
|
|
"nofullscreenrequest, (libreoffice|soffice)(.*)"
|
|
|
|
|
|
|
|
# Remmina / NoMachine
|
2024-01-30 09:23:11 +00:00
|
|
|
"nofullscreenrequest,org.remmina.Remmina|Nxplayer.bin"
|
|
|
|
"nomaximizerequest,org.remmina.Remmina|Nxplayer.bin"
|
2024-01-27 08:09:57 +00:00
|
|
|
];
|
|
|
|
windowrulev2 = [
|
|
|
|
# Firefox PIP
|
2024-01-30 09:23:11 +00:00
|
|
|
"float,title:Picture-in-Picture|Library,class:firefox"
|
|
|
|
"size 750 400,title:Picture-in-Picture,class:firefox"
|
|
|
|
"size 800 800,title:Library,class:firefox"
|
|
|
|
"move onscreen 100%-775 100%-425,title:Picture-in-Picture,class:firefox"
|
|
|
|
"center,title:Library,class:firefox"
|
|
|
|
"pin,title:Picture-in-Picture,class:firefox"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
|
|
|
# LibreOffice
|
2024-01-30 09:23:11 +00:00
|
|
|
"float,title:Open,class:(libreoffice|soffice)(.*)"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
|
|
|
# Steam
|
2024-01-30 09:23:11 +00:00
|
|
|
"float,title:Friends List,class:steam"
|
|
|
|
"float,title:Steam Settings,class:steam"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
|
|
|
# Remmina / NoMachine
|
2024-01-30 09:23:11 +00:00
|
|
|
"float,title:Remmina Remote Desktop Client|Remmina Preferences,class:org.remmina.Remmina"
|
|
|
|
"size 800 600,title:Remmina Remote Desktop Client|Remmina Preferences,class:org.remmina.Remmina"
|
|
|
|
"move onscreen 100%-820 60,title:Remmina Remote Desktop Client|Remmina Preferences,class:org.remmina.Remmina"
|
2024-01-27 08:09:57 +00:00
|
|
|
];
|
|
|
|
bind = let
|
|
|
|
workspace = w: [
|
|
|
|
"SUPER, ${toString w}, moveworkspacetomonitor, ${toString w} current"
|
|
|
|
"SUPER, ${toString w}, workspace, ${toString w}"
|
|
|
|
"SUPER SHIFT, ${toString w}, movetoworkspace, ${toString w}"
|
|
|
|
];
|
2024-01-30 14:21:50 +00:00
|
|
|
in
|
2024-01-30 16:10:12 +00:00
|
|
|
with config.programs;
|
2024-01-30 14:21:50 +00:00
|
|
|
with lib.lists;
|
|
|
|
flatten (forEach (range 1 9) workspace)
|
|
|
|
++ [
|
|
|
|
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
2024-01-30 16:10:12 +00:00
|
|
|
"SUPER, F1, exec, ${swaylock.package}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"
|
2024-01-30 14:21:50 +00:00
|
|
|
"SUPER, Q, killactive,"
|
2024-01-31 07:21:01 +00:00
|
|
|
"SUPER SHIFT, Q, exec, ${rofi.finalPackage}/bin/rofi -replace -show power-menu"
|
2024-01-30 14:21:50 +00:00
|
|
|
"SUPER, V, togglefloating"
|
|
|
|
"SUPER, M, fullscreen, 0"
|
|
|
|
"SUPER SHIFT, M, fullscreen, 1"
|
2024-01-31 07:21:01 +00:00
|
|
|
"SUPER, tab, exec, ${rofi.finalPackage}/bin/rofi -replace -show window"
|
2024-01-30 16:17:02 +00:00
|
|
|
"SUPER, P, exec, pkill rofi || ${rofi.pass.package}/bin/rofi-pass"
|
|
|
|
"SUPER SHIFT, P, exec, pkill rofi || ${rofi.pass.package}/bin/rofi-pass --last-used"
|
|
|
|
"SUPER ALT, P, exec, pkill rofi || ${rofi.pass.package}/bin/rofi-pass --insert"
|
2024-01-30 16:10:12 +00:00
|
|
|
"SUPER, Z, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw"
|
|
|
|
"SUPER SHIFT, Z, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
# Common program shortcuts
|
2024-01-31 07:21:01 +00:00
|
|
|
"SUPER, Space, exec, ${rofi.finalPackage}/bin/rofi -replace -show combi"
|
2024-01-30 16:10:12 +00:00
|
|
|
"SUPER, Return, exec, ${alacritty.package}/bin/alacritty"
|
|
|
|
"SUPER SHIFT, Return, exec, ${emacs.finalPackage}/bin/emacsclient -c"
|
|
|
|
"SUPER, S, exec, ${alacritty.package}/bin/alacritty -e btm --group --battery"
|
2024-02-02 08:03:33 +00:00
|
|
|
"SUPER, W, exec, ${pkgs.nyxt}/bin/nyxt --no-socket"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
# Misc useful binds
|
|
|
|
'',Print,exec,${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp)"''
|
2024-01-31 07:21:01 +00:00
|
|
|
",XF86Calculator,exec,${rofi.finalPackage}/bin/rofi -replace -show calc"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
# Movement binds
|
|
|
|
"SUPER, H, movefocus, l"
|
|
|
|
"SUPER, L, movefocus, r"
|
|
|
|
"SUPER, K, movefocus, u"
|
|
|
|
"SUPER, J, movefocus, d"
|
|
|
|
"SUPER SHIFT, H, movewindow, l"
|
|
|
|
"SUPER SHIFT, L, movewindow, r"
|
|
|
|
"SUPER SHIFT, K, movewindow, u"
|
|
|
|
"SUPER SHIFT, J, movewindow, d"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
2024-01-30 14:21:50 +00:00
|
|
|
# Special workspaces
|
|
|
|
"SUPER, comma, workspace, r-1"
|
|
|
|
"SUPER SHIFT, comma, movetoworkspace, r-1"
|
|
|
|
"SUPER, period, workspace, r+1"
|
|
|
|
"SUPER SHIFT, period, movetoworkspace, r+1"
|
|
|
|
"SUPER, N, workspace, empty"
|
|
|
|
"SUPER SHIFT, N, movetoworkspace, empty"
|
|
|
|
"SUPER, minus, togglespecialworkspace"
|
|
|
|
"SUPER SHIFT, minus, movetoworkspace, special"
|
|
|
|
"SUPER, bracketright, focusmonitor, +1"
|
|
|
|
"SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1"
|
|
|
|
"SUPER, bracketleft, focusmonitor, -1"
|
|
|
|
"SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1"
|
|
|
|
"SUPER, O, focusurgentorlast"
|
|
|
|
];
|
2024-01-30 16:10:12 +00:00
|
|
|
bindl = with config.services; [
|
2024-01-27 08:09:57 +00:00
|
|
|
# Sound
|
2024-01-30 16:10:12 +00:00
|
|
|
",XF86AudioMute,exec,${avizo.package}/bin/volumectl %"
|
|
|
|
",XF86AudioMicMute,exec,${avizo.package}/bin/volumectl -m %"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
|
|
|
# Playback
|
|
|
|
",XF86AudioPlay,exec,${pkgs.playerctl}/bin/playerctl play-pause"
|
|
|
|
",XF86AudioStop,exec,${pkgs.playerctl}/bin/playerctl play-pause"
|
|
|
|
",XF86AudioPrev,exec,${pkgs.playerctl}/bin/playerctl previous"
|
|
|
|
",XF86AudioNext,exec,${pkgs.playerctl}/bin/playerctl next"
|
|
|
|
];
|
2024-01-30 16:10:12 +00:00
|
|
|
bindle = with config.services; [
|
2024-01-27 08:09:57 +00:00
|
|
|
# Sound
|
2024-01-30 16:10:12 +00:00
|
|
|
",XF86AudioRaiseVolume,exec,${avizo.package}/bin/volumectl -u + 5"
|
|
|
|
",XF86AudioLowerVolume,exec,${avizo.package}/bin/volumectl -u - 5"
|
2024-01-27 08:09:57 +00:00
|
|
|
|
|
|
|
# Brightness
|
2024-01-30 16:10:12 +00:00
|
|
|
",XF86MonBrightnessUp,exec,${avizo.package}/bin/lightctl + 5"
|
|
|
|
",XF86MonBrightnessDown,exec,${avizo.package}/bin/lightctl - 5"
|
2024-01-27 08:09:57 +00:00
|
|
|
];
|
|
|
|
bindm = [
|
|
|
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
|
|
|
"SUPER, mouse:272, movewindow"
|
|
|
|
"SUPER, mouse:273, resizewindow"
|
|
|
|
];
|
2024-01-27 06:52:09 +00:00
|
|
|
};
|
2024-01-28 08:01:09 +00:00
|
|
|
extraConfig = ''
|
|
|
|
exec-once = systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME
|
|
|
|
exec-once = systemctl --user restart "xdg-desktop-portal*"
|
|
|
|
'';
|
2024-01-27 06:52:09 +00:00
|
|
|
};
|
2023-07-11 09:11:48 +01:00
|
|
|
}
|