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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user