mirror of
https://github.com/elenapan/dotfiles.git
synced 2025-12-26 15:14:58 +08:00
sway: Add missing sway-scratchpad script
This commit is contained in:
parent
5c59c137df
commit
02345f2723
2 changed files with 13 additions and 1 deletions
|
|
@ -143,7 +143,7 @@ bindsym --to-code {
|
|||
|
||||
# Scratchpads
|
||||
$mod+i exec $sway/scratchpad-toggle "[app_id=^scratchpad_input$]" "$term --class scratchpad_input -e nvim /tmp/scratchpad.md"
|
||||
$mod+q exec $sway/scratchpad-toggle "[app_id=^scratchpad$]" "$term --class scratchpad -e sway-scratchpad"
|
||||
$mod+q exec $sway/scratchpad-toggle "[app_id=^scratchpad$]" "$term --class scratchpad -e $sway/sway-scratchpad"
|
||||
|
||||
# Eww keybinds
|
||||
# $mod+grave exec "$eww/manage show sidebar"
|
||||
|
|
|
|||
12
config/sway/scripts/sway-scratchpad
Executable file
12
config/sway/scripts/sway-scratchpad
Executable file
|
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Terminal window with class/app_id = 'scratchpad' needs to exist already
|
||||
SCRATCHPAD_SESSION="$(tmux ls | grep '^sway-scratchpad')"
|
||||
|
||||
# If the session does not exist, create a new one
|
||||
if [ ${#SCRATCHPAD_SESSION} -eq "0" ]; then
|
||||
tmux -2 new-session -s sway-scratchpad
|
||||
else
|
||||
# Else attach to the session
|
||||
tmux -2 attach -t sway-scratchpad
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue