launch a terminal with shortcut
chesty opened this issue · 3 comments
I played around with getting a terminal for quick temporary sessions. It's not perfect but does the job.
meta+d to launch sway-launcher-desktop, then alt+space to launch a terminal.
diff --git a/sway-launcher-desktop.sh b/sway-launcher-desktop.sh
index 6e1d055..8c8dd22 100755
--- a/sway-launcher-desktop.sh
+++ b/sway-launcher-desktop.sh
@@ -13,6 +13,7 @@ DEL=$'\34'
# this or override with an environment variable in your sway config
# It would be good to move this to a config file eventually
TERMINAL_COMMAND="${TERMINAL_COMMAND:="urxvt -e"}"
+SHELL_COMMAND="${SHELL_COMMAND:="urxvt -geometry 55x18 -name launcher"}"
GLYPH_COMMAND=" "
GLYPH_DESKTOP=" "
CONFIG_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/sway-launcher-desktop"
@@ -249,6 +250,7 @@ COMMAND_STR=$(
fzf +s -x -d '\034' --nth ..3 --with-nth 3 \
--preview "$0 describe {2} {1}" \
--preview-window=up:3:wrap --ansi \
+ --bind alt-space:execute:"$SHELL_COMMAND" \
<"$FZFPIPE"
) || exit 1
Thank you! I will have a look soon
This really only opens a new urxvt instance, right? Why not configure that as a keymapping in the window manager?
I do, I have
for_window [class="URxvt" instance="floating"] floating enable, border pixel 2, sticky enable
bindsym $mod+Shift+Return exec urxvt -geometry 80x24 -name floating
I prefer using the above, it handles workspace switches. I wanted to see if I could get sway-launder-desktop to do it, and it kind of can but doesn't handle workspace switches. I just shared it in case you were interested.