Adding tty-popup window.
This commit is contained in:
parent
73945c47ce
commit
099caf3d7a
|
@ -7,6 +7,8 @@ set $down j
|
|||
set $up k
|
||||
set $right l
|
||||
set $term kitty
|
||||
set $scripts $HOME/.config/sway/scripts
|
||||
set $tty-popup $scripts/tty-popup
|
||||
|
||||
set $menu bash ~/.config/sway/scripts/menu
|
||||
set $pass_menu $term --class fzf-pass -e sh -c /usr/bin/fzf-pass
|
||||
|
@ -24,6 +26,8 @@ for_window [class="pip"] $PIP
|
|||
for_window [window_role="PictureInPicture"] $PIP
|
||||
for_window [class="feh"] floating enabled ; border pixel 0
|
||||
for_window [app_id="fzf-pass"] focus, floating enabled, border pixel 1
|
||||
for_window [app_id="tty-popup"] focus; $PIP
|
||||
for_window [app_id="tty-popup" title="^pass$"] resize set 33 ppt 33 ppt
|
||||
|
||||
# Status Bar:
|
||||
bar {
|
||||
|
|
18
sway/scripts/tty-popup
Executable file
18
sway/scripts/tty-popup
Executable file
|
@ -0,0 +1,18 @@
|
|||
#! /bin/bash
|
||||
|
||||
# This can be accessed by child process to tell if this is a popup pane.
|
||||
export TTY_POPUP=1
|
||||
|
||||
if (( $# == 0)) ; then
|
||||
echo "Invalid usage. I need an argument."
|
||||
echo " ➜ $0 title \"command or script\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if (( $# > 1 )) ; then
|
||||
title=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
kitty --class "${class:-"tty-popup"}" --title "$title" -e "$@" &
|
|
@ -11,7 +11,7 @@ if [ "$EUID" -eq 0 ] ; then
|
|||
fi
|
||||
|
||||
# If this this terminal meets any of these return.
|
||||
env_array=($TMUX $EMACS $VIM $INSODE_EMACS $VSCODE)
|
||||
env_array=($TMUX $EMACS $VIM $INSODE_EMACS $VSCODE $POPUP_TTY)
|
||||
if [[ -n $env_array ]]; then
|
||||
return 0
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user