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;
|
||||
hmCfg = config.home-manager.users.${username};
|
||||
|
||||
inherit (lib.attrsets) mapAttrsToList;
|
||||
inherit (lib.attrsets) attrValues mapAttrsToList;
|
||||
inherit (lib.lists) elem optionals;
|
||||
inherit (lib.meta) getExe getExe';
|
||||
inherit (lib.modules) mkIf;
|
||||
|
@ -25,13 +25,17 @@
|
|||
footclient = getExe' pkgs.foot "footclient";
|
||||
wl-copy = getExe' pkgs.wl-clipboard "wl-copy";
|
||||
wl-paste = getExe' pkgs.wl-clipboard "wl-paste";
|
||||
cliphist = getExe pkgs.cliphist;
|
||||
swww-daemon = getExe' pkgs.swww "swww-daemon";
|
||||
wlsunset = getExe pkgs.wlsunset;
|
||||
anyrun = getExe inputs.anyrun.packages.${pkgs.system}.anyrun;
|
||||
|
||||
hyprcontrib = inputs.hyprcontrib.packages.${pkgs.system};
|
||||
|
||||
grim = getExe pkgs.grim;
|
||||
slurp = getExe pkgs.slurp;
|
||||
grimblast = getExe hyprcontrib.grimblast;
|
||||
tesseract = getExe pkgs.tesseract;
|
||||
|
||||
shadower = getExe inputs.shadower.packages.${pkgs.system}.shadower;
|
||||
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland xdg-desktop-portal-hyprland;
|
||||
|
@ -64,6 +68,7 @@
|
|||
rg = getExe pkgs.ripgrep;
|
||||
awk = getExe pkgs.gawk;
|
||||
mpv = getExe pkgs.mpv;
|
||||
socat = getExe pkgs.socat;
|
||||
in {
|
||||
options.poz.programs.hypr.land = {
|
||||
enable = mkEnableOption "hiper ląd";
|
||||
|
@ -135,8 +140,10 @@ in {
|
|||
pkgs.xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-hyprland
|
||||
];
|
||||
# TODO look into and make use of this
|
||||
config.common.default = "*";
|
||||
config.common = {
|
||||
default = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.Screencast" = [ hyprland ];
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
|
@ -146,12 +153,14 @@ in {
|
|||
};
|
||||
|
||||
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; };
|
||||
|
||||
home.packages = attrValues {
|
||||
inherit (pkgs)
|
||||
cliphist
|
||||
;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
package = hyprland;
|
||||
|
@ -232,7 +241,6 @@ in {
|
|||
gaps_out = 5;
|
||||
border_size = 2;
|
||||
|
||||
#no_border_on_floating = true;
|
||||
allow_tearing = mkIf cfg.tearing true;
|
||||
|
||||
"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 ", XF86Launch4, exec, ${asusctl} profile -n")
|
||||
# TODO what the fuck is this
|
||||
# TODO implement touchpad toggle some day maybe
|
||||
", 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)\\\"\""
|
||||
# TODO fix this
|
||||
"$mainMod, SEMICOLON, exec, ~/.config/rofi/powermenu/type-2/powermenu.sh"
|
||||
"$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"
|
||||
"$mainMod, G, togglegroup"
|
||||
# this sometimes fixes the portal
|
||||
"$mainMod CONTROL, K, exec, ${systemctl} --user restart xdg-desktop-portal-hyprland"
|
||||
|
@ -474,13 +480,13 @@ in {
|
|||
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
|
||||
handle "$line"
|
||||
done
|
||||
'';
|
||||
in [
|
||||
"${waybar}"
|
||||
waybar
|
||||
|
||||
# run persistent special workspace windows
|
||||
"[workspace special:nixos silent;tile] cd ~/niksos; ${foot}"
|
||||
|
@ -491,13 +497,10 @@ in {
|
|||
|
||||
"${hyprctl} setcursor Bibata-Modern-Classic 24"
|
||||
|
||||
# TODO do something with this
|
||||
#"${wl-paste} --watch cliphist store"
|
||||
"${wl-paste} --watch ${cliphist} store"
|
||||
|
||||
"${swww-daemon}"
|
||||
"${wlsunset} -S 06:00 -s 20:00"
|
||||
# TODO fix fcitx5
|
||||
#"fcitx5"
|
||||
# TODO do these do anything anymore
|
||||
"${systemctl} --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
"${dbus-update-activation-environment} --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=$XDG_CURRENT_DESKTOP"
|
||||
|
@ -529,12 +532,6 @@ in {
|
|||
"noanim, ^(selection)$"
|
||||
|
||||
"blur, ^(waybar)$"
|
||||
"blur, ^(eww)$"
|
||||
|
||||
# TODO maybe this isn't needed
|
||||
# temporary fix to swaylock screenshoting rofi before locking
|
||||
#"noanim, ^(rofi)$"
|
||||
|
||||
"blur, ^(anyrun)$"
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in a new issue