Working config for fw13 amd

This commit is contained in:
Jurn Wubben 2025-02-14 19:40:27 +00:00
commit b7147ec26e
49 changed files with 1812 additions and 0 deletions

View file

@ -0,0 +1,102 @@
{
config,
lib,
pkgs,
...
}: let
inherit (lib) getExe;
runOnce = program: "pgrep ${program} || uwsm app -- ${program}";
uwsm = getExe pkgs.uwsm;
hyprlock = runOnce (getExe pkgs.hyprlock);
#TODO: Move these functions into a separate lib file.
#TODO: Possibly migrate some of these applications into an option.
#TODO: Stylix
app = app: "${uwsm} app -- ${app}";
appE = appE: app (getExe appE);
termapp = termapp: "${foot} '${termapp}'";
termappE = termappE: termapp (getExe termappE);
foot = appE pkgs.foot;
fuzzel = appE config.programs.fuzzel.package;
firefox = appE pkgs.firefox;
playerctl = appE pkgs.playerctl;
brightnessctl = appE pkgs.brightnessctl;
wpctl = app "${pkgs.wireplumber}/bin/wpctl";
pulsemixer = termappE pkgs.pulsemixer;
bluetui = termappE pkgs.bluetui;
nmtui = termapp "${pkgs.networkmanager}/bin/nmtui";
# toggle = program: let
# prog = builtins.substring 0 14 program;
# in "pkill ${prog} || ${uwsm} app -- ${program}";
workspaces = builtins.concatLists (builtins.genList (
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}, movetoworkspace, ${toString (x + 1)}"
]
)
10);
in {
wayland.windowManager.hyprland.settings = {
"$mod" = "ALT";
bindm = [
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
bind =
[
"$mod SHIFT, E, exec, uwsm stop"
"$mod, Q, killactive,"
"$mod, F, fullscreen,"
"$mod, SPACE, togglefloating,"
"$mod, O, pseudo,"
"$mod ALT, ,resizeactive,"
"$mod, D, exec, ${fuzzel}"
"$mod, Return, exec, ${foot}"
"$mod Shift, Return, exec, ${firefox}"
"$mod, Escape, exec, ${hyprlock}"
"$mod, A, exec, ${pulsemixer}"
"$mod, B, exec, ${bluetui}"
"$mod, N, exec, ${nmtui}"
"$mod, h, movefocus, l"
"$mod, l, movefocus, r"
"$mod, k, movefocus, u"
"$mod, j, movefocus, d"
]
++ workspaces;
bindl = [
# media controls
", XF86AudioPlay, exec, ${playerctl} play-pause"
", XF86AudioPrev, exec, ${playerctl} previous"
", XF86AudioNext, exec, ${playerctl} next"
# volume
", XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
", XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
];
bindle = [
# volume
", XF86AudioRaiseVolume, exec, ${wpctl} set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%+"
", XF86AudioLowerVolume, exec, ${wpctl} set-volume -l '1.0' @DEFAULT_AUDIO_SINK@ 6%-"
",XF86MonBrightnessUp, exec, ${brightnessctl} s 10%+"
",XF86MonBrightnessDown, exec, ${brightnessctl} s 10%-"
];
};
}