Compare commits
3 Commits
78f6ede871
...
975b2c2002
| Author | SHA1 | Date | |
|---|---|---|---|
| 975b2c2002 | |||
| f28ed60390 | |||
| 63becaaa09 |
@@ -11,7 +11,7 @@
|
|||||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
ignore_dbus_inhibit = false;
|
ignore_dbus_inhibit = false;
|
||||||
lock_cmd = "hakase-hyprlock";
|
lock_cmd = "hakase-hyprlock";
|
||||||
before_sleep_cmd = "loginctl lock-session"; # lock before suspend
|
before_sleep_cmd = "hakase-hyprlock"; # lock before suspend
|
||||||
};
|
};
|
||||||
|
|
||||||
listener = [
|
listener = [
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
# }
|
# }
|
||||||
{
|
{
|
||||||
timeout = 300; # 5min
|
timeout = 300; # 5min
|
||||||
on-timeout = "loginctl lock-session"; # lock screen when timeout has passed
|
on-timeout = "hakase-hyprlock"; # lock screen when timeout has passed
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
timeout = 330; # 5.5min
|
timeout = 330; # 5.5min
|
||||||
|
|||||||
@@ -4,6 +4,14 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
windowrulev2 = [
|
windowrulev2 = [
|
||||||
|
"suppressevent maximize, class:.*"
|
||||||
|
|
||||||
|
# --- YAZI FILE PICKER ---
|
||||||
|
"float, class:^(yazi-picker)$"
|
||||||
|
"center, class:^(yazi-picker)$"
|
||||||
|
"size 60% 60%, class:^(yazi-picker)$"
|
||||||
|
"dimaround, class:^(yazi-picker)$"
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
+46
-1
@@ -1,4 +1,40 @@
|
|||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
yazi-picker = pkgs.writeShellScriptBin "yazi-picker" ''
|
||||||
|
echo "--- $(date) ---" >> /tmp/yazi-picker.log
|
||||||
|
echo "Args: $@" >> /tmp/yazi-picker.log
|
||||||
|
|
||||||
|
path="$1"
|
||||||
|
[ -z "$path" ] && path="."
|
||||||
|
|
||||||
|
if [ "$2" = "true" ]; then
|
||||||
|
echo "Mode: Save" >> /tmp/yazi-picker.log
|
||||||
|
# Future: handle save mode better (maybe prompts?)
|
||||||
|
else
|
||||||
|
echo "Mode: Open" >> /tmp/yazi-picker.log
|
||||||
|
fi
|
||||||
|
|
||||||
|
out="$HOME/.cache/yazi-chooser"
|
||||||
|
rm -f "$out"
|
||||||
|
|
||||||
|
echo "Launching ghostty..." >> /tmp/yazi-picker.log
|
||||||
|
${pkgs.ghostty}/bin/ghostty --class="yazi-picker" --title="File Picker" -e ${pkgs.yazi}/bin/yazi "$path" --chooser-file="$out"
|
||||||
|
ret=$?
|
||||||
|
echo "Ghostty exited with $ret" >> /tmp/yazi-picker.log
|
||||||
|
|
||||||
|
if [ -f "$out" ]; then
|
||||||
|
selected=$(cat "$out")
|
||||||
|
echo "Selected: $selected" >> /tmp/yazi-picker.log
|
||||||
|
echo "$selected"
|
||||||
|
rm "$out"
|
||||||
|
else
|
||||||
|
echo "No selection" >> /tmp/yazi-picker.log
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
in {
|
||||||
programs.yazi = {
|
programs.yazi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
@@ -11,4 +47,13 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
yazi-picker
|
||||||
|
];
|
||||||
|
|
||||||
|
xdg.configFile."xdg-desktop-portal-termfilechooser/config".text = ''
|
||||||
|
[filechooser]
|
||||||
|
cmd=${yazi-picker}/bin/yazi-picker
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,4 +24,16 @@
|
|||||||
default = ["${myConfig.terminal.default}"];
|
default = ["${myConfig.terminal.default}"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
|
pkgs.xdg-desktop-portal-termfilechooser
|
||||||
|
];
|
||||||
|
config.common = {
|
||||||
|
default = ["hyprland"];
|
||||||
|
"org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user