feat(wlr-which-key): use caelestia launcher when available

This commit is contained in:
2026-03-26 22:30:44 +01:00
parent d27f63a0f7
commit 673b32c33b
3 changed files with 27 additions and 5 deletions

View File

@@ -0,0 +1,23 @@
{pkgs, ...}:
pkgs.writeShellScriptBin "app-launcher" ''
LOG_FILE="$HOME/.local/share/app-launcher.log"
logger() {
local level="$1"
local message="$2"
local timestamp
timestamp=$(date +"%Y-%m-%d %H:%M:%S")
printf "[%s] [%-7s] %s\n" "$timestamp" "''${level^^}" "$message" >> "$LOG_FILE"
}
CAELESTIA_ACTIVE=$(systemctl --user is-active caelestia.service)
logger debug "Caelestia activity: $CAELESTIA_ACTIVE"
if systemctl --user is-active caelestia.service | grep 'active' &> /dev/null ; then
logger info "Using Caelestia app launcher"
caelestia shell drawers toggle launcher || \
logger error "failed to launch Caelestia app launcher"
exit 0
fi
rofi -show drun
''

View File

@@ -13,9 +13,7 @@ in {
systemd = {
enable = true;
target = "graphical-session.target";
environment = [
"QT3_QPA_PLATFORMTHEME=gtk3"
];
environment = ["QT3_QPA_PLATFORMTHEME=gtk3"];
};
settings = {
paths.wallpaperDir = "~/Pictures/Wallpapers/nord";

View File

@@ -26,8 +26,9 @@
focus-urgent = import ./focus-urgent.nix {inherit pkgs;};
fullscreen = import ./fullscreen.nix {inherit pkgs;};
logout = import ./logout.nix {inherit pkgs;};
ytplay = import ../../modules/cli/scripts/ytplay.nix {inherit pkgs;};
app-launcher = import ../../modules/cli/scripts/launcher.nix {inherit pkgs;};
plock = import ../../modules/cli/scripts/plock.nix {inherit pkgs;};
ytplay = import ../../modules/cli/scripts/ytplay.nix {inherit pkgs;};
in
[
{
@@ -96,7 +97,7 @@
{
key = "r";
desc = "App Menu";
cmd = "rofi -show drun";
cmd = "${app-launcher}/bin/app-launcher";
}
{
key = "s";