home/hyprland: use xdg-desktop-portal-termfilechooser
This commit is contained in:
@@ -35,16 +35,28 @@ in
|
|||||||
extraPortals = with pkgs; [
|
extraPortals = with pkgs; [
|
||||||
gnome-keyring
|
gnome-keyring
|
||||||
xdg-desktop-portal-gtk
|
xdg-desktop-portal-gtk
|
||||||
|
xdg-desktop-portal-termfilechooser
|
||||||
];
|
];
|
||||||
config.hyprland = {
|
config.hyprland = {
|
||||||
default = "hyprland;gtk;";
|
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.OpenURI" = [ "gtk" ];
|
||||||
"org.freedesktop.impl.portal.Notification" = [ "gtk" ];
|
"org.freedesktop.impl.portal.Notification" = [ "gtk" ];
|
||||||
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
|
"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 = {
|
programs.hyprlock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
@@ -287,14 +299,18 @@ in
|
|||||||
|
|
||||||
"workspace 5, class:^(discord)$"
|
"workspace 5, class:^(discord)$"
|
||||||
"workspace 5, class:^(Element)$"
|
"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 [
|
(lib.pipe scratchpads [
|
||||||
(map ({ class, size, ... }: [
|
(map ({ class, size, ... }: [
|
||||||
"workspace special:${class}Ws, class:^${class}$"
|
"workspace special:${class}Ws, class:^(${class})$"
|
||||||
"float, class:^${class}$"
|
"float, class:^${class}$"
|
||||||
"size ${toString size.w}% ${toString size.h}%, class:^${class}$"
|
"size ${toString size.w}% ${toString size.h}%, class:^(${class})$"
|
||||||
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^${class}$"
|
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^(${class})$"
|
||||||
]))
|
]))
|
||||||
lib.flatten
|
lib.flatten
|
||||||
]);
|
]);
|
||||||
|
Reference in New Issue
Block a user