feat(wlr-which-key): use caelestia launcher when available
This commit is contained in:
23
users/modules/cli/scripts/launcher.nix
Normal file
23
users/modules/cli/scripts/launcher.nix
Normal 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
|
||||
''
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user