home/hyprland: use xdg-desktop-portal-termfilechooser
This commit is contained in:
@@ -35,16 +35,28 @@ in
|
||||
extraPortals = with pkgs; [
|
||||
gnome-keyring
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-termfilechooser
|
||||
];
|
||||
config.hyprland = {
|
||||
default = "hyprland;gtk;";
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "termfilechooser" ];
|
||||
"org.freedesktop.impl.portal.OpenURI" = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.Notification" = [ "gtk" ];
|
||||
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
||||
};
|
||||
};
|
||||
|
||||
xdg.configFile."xdg-desktop-portal-termfilechooser/config".source =
|
||||
(pkgs.formats.ini { listsAsDuplicateKeys = true; }).generate "xdg-desktop-portal-termfilechooser.ini" {
|
||||
filechooser = {
|
||||
cmd = "${pkgs.xdg-desktop-portal-termfilechooser}/share/xdg-desktop-portal-termfilechooser/yazi-wrapper.sh";
|
||||
default_dir = "$HOME";
|
||||
env = [
|
||||
"TERMCMD=alacritty -T \"Filechooser\" --class \"xdg-desktop-portal-termfilechooser\" --command"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
@@ -287,14 +299,18 @@ in
|
||||
|
||||
"workspace 5, class:^(discord)$"
|
||||
"workspace 5, class:^(Element)$"
|
||||
|
||||
"float, class:^(xdg-desktop-portal-termfilechooser)$"
|
||||
"size 70% 80%, class:^(xdg-desktop-portal-termfilechooser)$"
|
||||
"move 15% 10%, class:^(xdg-desktop-portal-termfilechooser)$"
|
||||
]
|
||||
++
|
||||
(lib.pipe scratchpads [
|
||||
(map ({ class, size, ... }: [
|
||||
"workspace special:${class}Ws, class:^${class}$"
|
||||
"workspace special:${class}Ws, class:^(${class})$"
|
||||
"float, class:^${class}$"
|
||||
"size ${toString size.w}% ${toString size.h}%, class:^${class}$"
|
||||
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^${class}$"
|
||||
"size ${toString size.w}% ${toString size.h}%, class:^(${class})$"
|
||||
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^(${class})$"
|
||||
]))
|
||||
lib.flatten
|
||||
]);
|
||||
|
Reference in New Issue
Block a user