Big update

This commit is contained in:
ant 2024-08-24 17:49:02 +02:00
parent 739f3d97f2
commit 62d4de0360
10 changed files with 328 additions and 103 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: {
{ config, lib, pkgs, pkgs-24_05, variant, ... }: {
home.packages = with pkgs; [ xdg-desktop-portal-hyprland ];
home.sessionVariables = {
@ -10,30 +10,17 @@
XDG_SESSION_TYPE = "wayland";
XDG_SESSION_DESKTOP = "Hyprland";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
WLR_NO_HARDWARE_CURSORS = "1";
XCURSOR_SIZE = "24";
DXVK_FILTER_DEVICE_NAME="NVIDIA";
};
wayland.windowManager.hyprland = {
enable = true;
package = if variant == "allegro" then pkgs-24_05.hyprland else pkgs.hyprland;
xwayland.enable = true;
# plugins = [
# "${flakes-pkgs.hyprfocus}/lib/libhyprfocus.so"
# ];
systemd.enable = true;
systemd.variables = [
"GDK_BACKEND=wayland,x11"
"QT_QPA_PLATFORM=\"wayland;xcb\""
"SDL_VIDEODRIVER=wayland"
"CLUTTER_BACKEND=wayland"
"XDG_CURRENT_DESKTOP=Hyprland"
"XDG_SESSION_TYPE=wayland"
"XDG_SESSION_DESKTOP=Hyprland"
"QT_AUTO_SCREEN_SCALE_FACTOR=1"
"WLR_NO_HARDWARE_CURSORS=1"
"XCURSOR_SIZE=24"
];
systemd.variables = [ "--all" ];
settings = {
@ -102,8 +89,8 @@
enable_swallow = true;
mouse_move_enables_dpms = true;
key_press_enables_dpms = true;
# swallow_regex = "^(Alacritty)(.*)$";
swallow_regex = "^(kitty)(.*)$";
swallow_regex = "^(Alacritty)(.*)$";
# swallow_regex = "^(kitty)(.*)$";
};
@ -120,24 +107,23 @@
"$mod, Tab, togglesplit"
"$mod, P, pseudo"
"$mod, f, fullscreen"
"$mod SHIFT, f, fakefullscreen"
"$mod, Return, exec, kitty"
"$mod, Return, exec, $TERMINAL"
"$mod SHIFT, e, exec, rofimoji"
"$mod, c, exec, rofi -show calc -modi calc -no-show-match -no-sort"
"$mod, e, exec, $TERMINAL -e lf"
"$mod SHIFT, Return, exec, kitty --working-directory \"$(window_dir)\""
"$mod, w, exec, firefox"
"$mod SHIFT, Return, exec, $TERMINAL --working-directory \"$(window_dir)\""
"$mod, w, exec, $BROWSER"
"$mod SHIFT, w, exec, firefox --private-window"
"$mod SHIFT, s, exec, TMP=$(rofi -dmenu -p \"nix search\" -l 0) && firefox \"https://search.nixos.org/packages?channel=unstable&query=$TMP\""
"$mod SHIFT, s, exec, TMP=$(rofi -dmenu -p \"nix search\" -l 0) && $BROWSER \"https://search.nixos.org/packages?channel=unstable&query=$TMP\""
"$mod SHIFT, e, exec, $(rofi -dmenu -p \"command\" -l 0)"
"$mod, m, exec, kitty --class floating -e pulsemixer"
"$mod, m, exec, $TERMINAL --class floating -e pulsemixer"
"$mod, d, exec, ~/.bin/runmenu"
"$mod, x, exec, keepmenu"
"$mod, z, exec, tmux new -spopup_terminal -d; kitty --class floating -e tmux a -t popup_terminal"
"$mod, z, exec, tmux new -spopup_terminal -d; $TERMINAL --class floating -e tmux a -t popup_terminal"
"$mod, f11, exec, ocrzone"
"$mod, f12, exec, kitty --class floating -e nmtui"
"$mod, f2, exec, dark"
"$mod, f12, exec, $TERMINAL --class floating -e nmtui"
"$mod, f2, exec, darkman toggle"
"$mod, f3, exec, hyprctl reload"
"$mod, f4, exec, rofi-udisk"
"$mod, f5, exec, mount-android"
@ -164,10 +150,10 @@
"$mod, Up, movefocus, u"
"$mod, Down, movefocus, d"
# "$mod SHIFT, h, movewindow, l"
# "$mod SHIFT, l, movewindow, r"
# "$mod SHIFT, k, movewindow, u"
# "$mod SHIFT, j, movewindow, d"
"$mod SHIFT, h, movewindow, l"
"$mod SHIFT, l, movewindow, r"
"$mod SHIFT, k, movewindow, u"
"$mod SHIFT, j, movewindow, d"
# "$mod SHIFT, Left, movewindow, l"
# "$mod SHIFT, Right, movewindow, r"
@ -197,6 +183,18 @@
"$mod SHIFT, underscore, movetoworkspacesilent, 9"
"$mod SHIFT, ccedilla, movetoworkspacesilent, 10"
"$mod SHIFT, rarenright, movetoworkspacesilent, 11"
"$mod ALT, twosuperior, focusworkspaceoncurrentmonitor, 1"
"$mod ALT, ampersand, focusworkspaceoncurrentmonitor, 2"
"$mod ALT, eacute, focusworkspaceoncurrentmonitor, 3"
"$mod ALT, quotedbl, focusworkspaceoncurrentmonitor, 4"
"$mod ALT, apostrophe, focusworkspaceoncurrentmonitor, 5"
"$mod ALT, parenleft, focusworkspaceoncurrentmonitor, 6"
"$mod ALT, minus, focusworkspaceoncurrentmonitor, 7"
"$mod ALT, egrave, focusworkspaceoncurrentmonitor, 8"
"$mod ALT, underscore, focusworkspaceoncurrentmonitor, 9"
"$mod ALT, ccedilla, focusworkspaceoncurrentmonitor, 10"
"$mod ALT, rarenright, focusworkspaceoncurrentmonitor, 11"
];
bindm = [
@ -205,10 +203,10 @@
];
binde = [
"$mod SHIFT, h, moveactive, -60 0"
"$mod SHIFT, l, moveactive, 60 0"
"$mod SHIFT, k, moveactive, 0 -60"
"$mod SHIFT, j, moveactive, 0 60"
"$mod CTRL SHIFT, h, moveactive, -60 0"
"$mod CTRL SHIFT, l, moveactive, 60 0"
"$mod CTRL SHIFT, k, moveactive, 0 -60"
"$mod CTRL SHIFT, j, moveactive, 0 60"
"$mod CTRL, h, resizeactive, -60 0"
"$mod CTRL, l, resizeactive, 60 0"
"$mod CTRL, k, resizeactive, 0 -60"
@ -299,21 +297,49 @@
# -p pkgs.rubyPackages.gdk_pixbuf2 \
# --run "${pkgs.swaybg}/bin/swaybg -m fill -i $bg"
'');
monitors = if (variant == "default") then ''
monitor=,highrr,auto,1,vrr,1
''
else if variant == "moon" then ''
monitor=,preferred,auto,1
''
else if variant == "allegro" then ''
monitor=eDP-1, 1920x1080, 0x0, 1
monitor= DP-3, 1920x1200, 1920x0, 1
monitor= DP-4, 1920x1200, 3840x0, 1
monitor=HDMI-1, 1920x1080, auto, 1, mirror, eDP-1
monitor=HDMI-A-1, 1920x1080, auto, 1, mirror, eDP-1
''
else ''
'';
in
''
# env = GDK_BACKEND,wayland,x11
# env = QT_QPA_PLATFORM,wayland;xcb
# env = SDL_VIDEODRIVER,wayland
# env = CLUTTER_BACKEND,wayland
#
# env = XDG_CURRENT_DESKTOP,Hyprland
# env = XDG_SESSION_TYPE,wayland
# env = XDG_SESSION_DESKTOP,Hyprland
# env = QT_AUTO_SCREEN_SCALE_FACTOR,1
${monitors}
monitor=,highrr,auto,1,
monitor=Unknown-1,disable
# monitor=HDMI-A-1,preferred,auto,1,mirror,eDP-1
${ # system specific configs
if variant == "default" then ''
env = GBM_BACKEND,nvidia-drm
env = __GLX_VENDOR_LIBRARY_NAME,nvidia
''
else if variant == "allegro" then ''
env = WLR_DRM_DEVICES,/dev/dri/card0
env = AQ_WLR_DEVICES,/dev/ri/card0
env = AQ_DRM_DEVICES,/dev/dri/card0
env = TERMINAL,alacritty
env = NIXOS_OZONE_WL,1
env = GDK_BACKEND,wayland,x11
env = QT_QPA_PLATFORM,wayland;xcb
env = CLUTTER_BACKEND,wayland
env = XDG_CURRENT_DESKTOP,Hyprland
env = XDG_SESSION_TYPE,wayland
env = XDG_SESSION_DESKTOP,Hyprland
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
env = WLR_NO_HARDWARE_CURSORS,1
env = XCURSOR_SIZE,24
'' else ''
''
}
exec = pkill swaybg; ${swaybgScript}
exec = pkill waybar; ${pkgs.waybar}/bin/waybar