i3: Save terminal related stuff in variables
This commit is contained in:
@@ -12,6 +12,11 @@ default_border pixel 1
|
|||||||
hide_edge_borders smart
|
hide_edge_borders smart
|
||||||
|
|
||||||
set $TERMINAL st
|
set $TERMINAL st
|
||||||
|
set $TERM_CLASS st-256color
|
||||||
|
set $TERM_DIR_FLAG -d
|
||||||
|
set $TERM_TITLE_FLAG -t
|
||||||
|
set $TERM_TRANSPARENCY_FLAG -A
|
||||||
|
set $TERM_CMD_FLAG -e
|
||||||
|
|
||||||
# Focus should not follow mouse
|
# Focus should not follow mouse
|
||||||
# focus_follows_mouse no
|
# focus_follows_mouse no
|
||||||
@@ -29,7 +34,7 @@ exec_always --no-startup-id ~/.config/i3/monitor-setup.sh &
|
|||||||
# Keybindins ###################################################################
|
# Keybindins ###################################################################
|
||||||
|
|
||||||
# Terminal
|
# Terminal
|
||||||
bindsym $mod+Return exec $TERMINAL -d "$(xcwd)"
|
bindsym $mod+Return exec $TERMINAL $TERM_DIR_FLAG "$(xcwd)"
|
||||||
bindsym $mod+Shift+Return exec $TERMINAL
|
bindsym $mod+Shift+Return exec $TERMINAL
|
||||||
|
|
||||||
# Program launcher
|
# Program launcher
|
||||||
@@ -201,7 +206,7 @@ bindsym $mod+Shift+m move scratchpad
|
|||||||
bindsym $mod+Shift+o scratchpad show
|
bindsym $mod+Shift+o scratchpad show
|
||||||
|
|
||||||
# scratchpad-terminal
|
# scratchpad-terminal
|
||||||
for_window [class="^$TERMINAL-256color$" title="^scratchpad-terminal$"] \
|
for_window [class="^$TERM_CLASS$" title="^scratchpad-terminal$"] \
|
||||||
move scratchpad, \
|
move scratchpad, \
|
||||||
scratchpad show, \
|
scratchpad show, \
|
||||||
sticky enable, \
|
sticky enable, \
|
||||||
@@ -210,11 +215,11 @@ for_window [class="^$TERMINAL-256color$" title="^scratchpad-terminal$"] \
|
|||||||
move position center
|
move position center
|
||||||
# Toggle the scratchpad-terminal or create a new one if none exists.
|
# Toggle the scratchpad-terminal or create a new one if none exists.
|
||||||
bindsym $mod+comma exec \
|
bindsym $mod+comma exec \
|
||||||
i3-msg '[class="^$TERMINAL-256color$" title="^scratchpad-terminal$"] \
|
i3-msg '[class="^$TERM_CLASS$" title="^scratchpad-terminal$"] \
|
||||||
scratchpad show' \
|
scratchpad show' \
|
||||||
|| $TERMINAL -A 0.45 \
|
|| $TERMINAL $TERM_TRANSPARENCY_FLAG 0.45 \
|
||||||
-d "$(xcwd)" \
|
$TERM_DIR_FLAG "$(xcwd)" \
|
||||||
-t scratchpad-terminal
|
$TERM_TITLE_FLAG scratchpad-terminal
|
||||||
|
|
||||||
for_window [class="^TelegramDesktop$"] \
|
for_window [class="^TelegramDesktop$"] \
|
||||||
move scratchpad, \
|
move scratchpad, \
|
||||||
@@ -237,13 +242,13 @@ bindsym $mod+Shift+b exec \
|
|||||||
i3-msg '[class="^Bitwarden$"] scratchpad show' \
|
i3-msg '[class="^Bitwarden$"] scratchpad show' \
|
||||||
|| bitwarden-desktop
|
|| bitwarden-desktop
|
||||||
|
|
||||||
for_window [class="^$TERMINAL-256color$" title="^polybar-datetime-calendar$"] \
|
for_window [class="^$TERM_CLASS$" title="^polybar-datetime-calendar$"] \
|
||||||
floating enable, \
|
floating enable, \
|
||||||
border pixel 3, \
|
border pixel 3, \
|
||||||
resize set 378 300, \
|
resize set 378 300, \
|
||||||
move position 1411 32
|
move position 1411 32
|
||||||
|
|
||||||
for_window [class="^$TERMINAL-256color$" title="^polybar-wlan$"] \
|
for_window [class="^$TERM_CLASS$" title="^polybar-wlan$"] \
|
||||||
floating enable, \
|
floating enable, \
|
||||||
border pixel 3, \
|
border pixel 3, \
|
||||||
resize set 1125 750, \
|
resize set 1125 750, \
|
||||||
@@ -259,12 +264,12 @@ bindsym --release Shift+Print exec cd ~/media/pics/screens/ && scrot -s -f
|
|||||||
bindsym $mod+z exec ~/.local/bin/zoom-links
|
bindsym $mod+z exec ~/.local/bin/zoom-links
|
||||||
|
|
||||||
# Monitor selection with fzf
|
# Monitor selection with fzf
|
||||||
for_window [class="^$TERMINAL-256color$" title="^fzf-monitor-setup$"] \
|
for_window [class="^$TERM_CLASS$" title="^fzf-monitor-setup$"] \
|
||||||
floating enable, \
|
floating enable, \
|
||||||
border pixel 3, \
|
border pixel 3, \
|
||||||
resize set 378 300, \
|
resize set 378 300, \
|
||||||
move position 1 32
|
move position 1 32
|
||||||
bindsym $mod+m exec \
|
bindsym $mod+m exec \
|
||||||
pkill -f fzf-monitor-setup -O 1 \
|
pkill -f fzf-monitor-setup -O 1 \
|
||||||
|| $TERMINAL -t fzf-monitor-setup -e \
|
|| $TERMINAL $TERM_TITLE_FLAG fzf-monitor-setup $TERM_CMD_FLAG \
|
||||||
sh -c "~/.local/bin/monitor-setup && ~/.config/polybar/launch.sh"
|
sh -c "~/.local/bin/monitor-setup && ~/.config/polybar/launch.sh"
|
||||||
|
|||||||
Reference in New Issue
Block a user