From 000a8c64b4950ec7196b0022a99e072397ad5d92 Mon Sep 17 00:00:00 2001 From: Nikolaos Karaolidis Date: Fri, 13 Jun 2025 14:12:49 +0100 Subject: [PATCH] Add uwsm launch alias Signed-off-by: Nikolaos Karaolidis --- .../configs/user/gui/hyprland/default.nix | 23 +++++++++++++++---- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/hosts/common/configs/user/gui/hyprland/default.nix b/hosts/common/configs/user/gui/hyprland/default.nix index 74991d9..fdd8040 100644 --- a/hosts/common/configs/user/gui/hyprland/default.nix +++ b/hosts/common/configs/user/gui/hyprland/default.nix @@ -163,11 +163,24 @@ extraConfig = "source = ./theme.conf"; }; - programs.zsh.loginExtra = lib.mkAfter '' - if uwsm check may-start; then - exec uwsm start hyprland-uwsm.desktop - fi - ''; + programs.zsh = { + loginExtra = lib.mkAfter '' + if uwsm check may-start; then + exec uwsm start hyprland-uwsm.desktop + fi + ''; + + initContent = '' + launch() { + if [[ $# -eq 0 ]]; then + echo "Usage: launch [args...]" + return 1 + fi + + uwsm app -S both -- "$@" &! + } + ''; + }; theme = { template.".config/hypr/theme.conf".source = ./theme.conf;