hyprland config cleanup
This commit is contained in:
parent
c415670e2a
commit
5de371915c
1 changed files with 22 additions and 25 deletions
|
@ -9,7 +9,7 @@
|
||||||
inherit (config.poz.other.system) username;
|
inherit (config.poz.other.system) username;
|
||||||
hmCfg = config.home-manager.users.${username};
|
hmCfg = config.home-manager.users.${username};
|
||||||
|
|
||||||
inherit (lib.attrsets) mapAttrsToList;
|
inherit (lib.attrsets) attrValues mapAttrsToList;
|
||||||
inherit (lib.lists) elem optionals;
|
inherit (lib.lists) elem optionals;
|
||||||
inherit (lib.meta) getExe getExe';
|
inherit (lib.meta) getExe getExe';
|
||||||
inherit (lib.modules) mkIf;
|
inherit (lib.modules) mkIf;
|
||||||
|
@ -25,13 +25,17 @@
|
||||||
footclient = getExe' pkgs.foot "footclient";
|
footclient = getExe' pkgs.foot "footclient";
|
||||||
wl-copy = getExe' pkgs.wl-clipboard "wl-copy";
|
wl-copy = getExe' pkgs.wl-clipboard "wl-copy";
|
||||||
wl-paste = getExe' pkgs.wl-clipboard "wl-paste";
|
wl-paste = getExe' pkgs.wl-clipboard "wl-paste";
|
||||||
|
cliphist = getExe pkgs.cliphist;
|
||||||
swww-daemon = getExe' pkgs.swww "swww-daemon";
|
swww-daemon = getExe' pkgs.swww "swww-daemon";
|
||||||
wlsunset = getExe pkgs.wlsunset;
|
wlsunset = getExe pkgs.wlsunset;
|
||||||
anyrun = getExe inputs.anyrun.packages.${pkgs.system}.anyrun;
|
anyrun = getExe inputs.anyrun.packages.${pkgs.system}.anyrun;
|
||||||
|
|
||||||
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
|
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
|
||||||
|
|
||||||
|
grim = getExe pkgs.grim;
|
||||||
|
slurp = getExe pkgs.slurp;
|
||||||
grimblast = getExe hyprcontrib.grimblast;
|
grimblast = getExe hyprcontrib.grimblast;
|
||||||
|
tesseract = getExe pkgs.tesseract;
|
||||||
|
|
||||||
shadower = getExe inputs.shadower.packages.${pkgs.system}.shadower;
|
shadower = getExe inputs.shadower.packages.${pkgs.system}.shadower;
|
||||||
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland xdg-desktop-portal-hyprland;
|
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland xdg-desktop-portal-hyprland;
|
||||||
|
@ -64,6 +68,7 @@
|
||||||
rg = getExe pkgs.ripgrep;
|
rg = getExe pkgs.ripgrep;
|
||||||
awk = getExe pkgs.gawk;
|
awk = getExe pkgs.gawk;
|
||||||
mpv = getExe pkgs.mpv;
|
mpv = getExe pkgs.mpv;
|
||||||
|
socat = getExe pkgs.socat;
|
||||||
in {
|
in {
|
||||||
options.poz.programs.hypr.land = {
|
options.poz.programs.hypr.land = {
|
||||||
enable = mkEnableOption "hiper ląd";
|
enable = mkEnableOption "hiper ląd";
|
||||||
|
@ -135,8 +140,10 @@ in {
|
||||||
pkgs.xdg-desktop-portal-gtk
|
pkgs.xdg-desktop-portal-gtk
|
||||||
xdg-desktop-portal-hyprland
|
xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
# TODO look into and make use of this
|
config.common = {
|
||||||
config.common.default = "*";
|
default = [ "gtk" ];
|
||||||
|
"org.freedesktop.impl.portal.Screencast" = [ hyprland ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
|
@ -146,12 +153,14 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
# TODO swap back to this whenever fufexan or anyone else
|
|
||||||
# adds an equivalent of hm's settings to this module
|
|
||||||
#imports = [ inputs.hyprland.homeManagerModules.default ];
|
|
||||||
|
|
||||||
xdg.dataFile = mkIf (cfg.startupSound != null) { "hypr/startup_sound".source = cfg.startupSound; };
|
xdg.dataFile = mkIf (cfg.startupSound != null) { "hypr/startup_sound".source = cfg.startupSound; };
|
||||||
|
|
||||||
|
home.packages = attrValues {
|
||||||
|
inherit (pkgs)
|
||||||
|
cliphist
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = hyprland;
|
package = hyprland;
|
||||||
|
@ -232,7 +241,6 @@ in {
|
||||||
gaps_out = 5;
|
gaps_out = 5;
|
||||||
border_size = 2;
|
border_size = 2;
|
||||||
|
|
||||||
#no_border_on_floating = true;
|
|
||||||
allow_tearing = mkIf cfg.tearing true;
|
allow_tearing = mkIf cfg.tearing true;
|
||||||
|
|
||||||
"col.active_border" = "0xFFF5C2E7";
|
"col.active_border" = "0xFFF5C2E7";
|
||||||
|
@ -362,12 +370,10 @@ in {
|
||||||
|
|
||||||
(mkIf config.services.asusd.enable ", XF86Launch3, exec, ${asusctl} led-mode -n")
|
(mkIf config.services.asusd.enable ", XF86Launch3, exec, ${asusctl} led-mode -n")
|
||||||
(mkIf config.services.asusd.enable ", XF86Launch4, exec, ${asusctl} profile -n")
|
(mkIf config.services.asusd.enable ", XF86Launch4, exec, ${asusctl} profile -n")
|
||||||
# TODO what the fuck is this
|
# TODO implement touchpad toggle some day maybe
|
||||||
", XF86TouchpadToggle, exec, "
|
", XF86TouchpadToggle, exec, "
|
||||||
# TODO fix this maybe
|
"$mainMod, T, exec, ${grim} -g \"$(${slurp})\" -t ppm - | ${tesseract} -l pol - - | ${wl-copy} && ${notify-send} \"Copied text: \" \"\\\"$(${wl-paste})\\\"\""
|
||||||
"$mainMod, T, exec, grim -g \"$(slurp)\" -t ppm - | tesseract -l pol - - | wl-copy && ${notify-send} \"Copied text: \" \"\\\"$(wl-paste)\\\"\""
|
"$mainMod, SEMICOLON, exec, quickshell -c powermenu"
|
||||||
# TODO fix this
|
|
||||||
"$mainMod, SEMICOLON, exec, ~/.config/rofi/powermenu/type-2/powermenu.sh"
|
|
||||||
"$mainMod, G, togglegroup"
|
"$mainMod, G, togglegroup"
|
||||||
# this sometimes fixes the portal
|
# this sometimes fixes the portal
|
||||||
"$mainMod CONTROL, K, exec, ${systemctl} --user restart xdg-desktop-portal-hyprland"
|
"$mainMod CONTROL, K, exec, ${systemctl} --user restart xdg-desktop-portal-hyprland"
|
||||||
|
@ -474,13 +480,13 @@ in {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:/tmp/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock |
|
${socat} -U - UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock |
|
||||||
while read -r line; do
|
while read -r line; do
|
||||||
handle "$line"
|
handle "$line"
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
in [
|
in [
|
||||||
"${waybar}"
|
waybar
|
||||||
|
|
||||||
# run persistent special workspace windows
|
# run persistent special workspace windows
|
||||||
"[workspace special:nixos silent;tile] cd ~/niksos; ${foot}"
|
"[workspace special:nixos silent;tile] cd ~/niksos; ${foot}"
|
||||||
|
@ -491,13 +497,10 @@ in {
|
||||||
|
|
||||||
"${hyprctl} setcursor Bibata-Modern-Classic 24"
|
"${hyprctl} setcursor Bibata-Modern-Classic 24"
|
||||||
|
|
||||||
# TODO do something with this
|
"${wl-paste} --watch ${cliphist} store"
|
||||||
#"${wl-paste} --watch cliphist store"
|
|
||||||
|
|
||||||
"${swww-daemon}"
|
"${swww-daemon}"
|
||||||
"${wlsunset} -S 06:00 -s 20:00"
|
"${wlsunset} -S 06:00 -s 20:00"
|
||||||
# TODO fix fcitx5
|
|
||||||
#"fcitx5"
|
|
||||||
# TODO do these do anything anymore
|
# TODO do these do anything anymore
|
||||||
"${systemctl} --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
"${systemctl} --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||||
"${dbus-update-activation-environment} --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP"
|
"${dbus-update-activation-environment} --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP"
|
||||||
|
@ -529,12 +532,6 @@ in {
|
||||||
"noanim, ^(selection)$"
|
"noanim, ^(selection)$"
|
||||||
|
|
||||||
"blur, ^(waybar)$"
|
"blur, ^(waybar)$"
|
||||||
"blur, ^(eww)$"
|
|
||||||
|
|
||||||
# TODO maybe this isn't needed
|
|
||||||
# temporary fix to swaylock screenshoting rofi before locking
|
|
||||||
#"noanim, ^(rofi)$"
|
|
||||||
|
|
||||||
"blur, ^(anyrun)$"
|
"blur, ^(anyrun)$"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue