mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
refactor: expose all scripts as modules
This commit is contained in:
parent
db231d4b83
commit
8f4fe686a5
29 changed files with 785 additions and 330 deletions
22
scripts/e.sh
Normal file
22
scripts/e.sh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
wait=0
|
||||
while :; do
|
||||
case ${1:-} in
|
||||
-w|--wait) wait=1
|
||||
;;
|
||||
*) break
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
STR=$(swaymsg -t get_tree | jq -r 'recurse(.nodes[]) | select(.name == "__i3_scratch")' | grep kittyterm || true )
|
||||
if [ "$STR" == "" ]; then
|
||||
swaymsg '[title="kittyterm"]' scratchpad show
|
||||
emacsclient -c -a "" "$@"
|
||||
swaymsg '[title="kittyterm"]' scratchpad show
|
||||
else
|
||||
if [[ $wait -eq 0 ]]; then
|
||||
emacsclient -n -c -a "" "$@"
|
||||
else
|
||||
emacsclient -c -a "" "$@"
|
||||
fi
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue