sov: add SwayOverView

This commit is contained in:
Konstantin Koslowski 2022-08-25 10:55:10 +02:00
parent c30ef96b27
commit ccb4da6643
3 changed files with 117 additions and 10 deletions

22
bin/start_sov.sh Executable file
View file

@ -0,0 +1,22 @@
#!/usr/bin/env sh
PATH=$PATH:$HOME/bin
CONFIG=$HOME/.config/sway/sov.d/config
FIFO=/tmp/sovpipe
CMD="sov"
ARGS=" -v -c $CONFIG"
LOG=$HOME/log/sov.log
which $CMD &> /dev/null
if [ $? -ne 0 ]; then
echo "missing $CMD executable in PATH"
exit 1
fi
# Terminate already running bar instances
pkill -x $CMD
rm -f $LOG
# create fifo
rm -f $FIFO
mkfifo $FIFO
# execute new instance
tail -f $FIFO | $CMD $ARGS 2>&1 | tee -a $LOG

34
config
View file

@ -23,6 +23,7 @@ set $volume_cmd $HOME/.config/sway/bin/sway_volume
set $media_cmd /usr/bin/playerctl set $media_cmd /usr/bin/playerctl
set $idle_cmd $HOME/.config/sway/bin/start_swayidle.sh set $idle_cmd $HOME/.config/sway/bin/start_swayidle.sh
set $waybar_cmd $HOME/.config/sway/bin/start_waybar.sh set $waybar_cmd $HOME/.config/sway/bin/start_waybar.sh
set $sov_cmd $HOME/.config/sway/bin/start_sov.sh
set $move_cmd $HOME/.config/sway/bin/sway_move set $move_cmd $HOME/.config/sway/bin/sway_move
set $font Cascadia Code PL Regular 10 set $font Cascadia Code PL Regular 10
set $notify_cmd dunstify -r 123 set $notify_cmd dunstify -r 123
@ -118,16 +119,28 @@ bindsym $mod+Ctrl+$right resize grow width 50px
# Workspaces: # Workspaces:
# #
# Switch to workspace # Switch to workspace
bindsym $mod+1 workspace number 1 bindsym --no-repeat $mod+1 workspace number 1; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+2 workspace number 2 bindsym --no-repeat $mod+2 workspace number 2; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+3 workspace number 3 bindsym --no-repeat $mod+3 workspace number 3; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+4 workspace number 4 bindsym --no-repeat $mod+4 workspace number 4; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+5 workspace number 5 bindsym --no-repeat $mod+5 workspace number 5; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+6 workspace number 6 bindsym --no-repeat $mod+6 workspace number 6; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+7 workspace number 7 bindsym --no-repeat $mod+7 workspace number 7; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+8 workspace number 8 bindsym --no-repeat $mod+8 workspace number 8; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+9 workspace number 9 bindsym --no-repeat $mod+9 workspace number 9; exec "echo 1 > /tmp/sovpipe"
bindsym $mod+0 workspace number 10 bindsym --no-repeat $mod+0 workspace number 10; exec "echo 1 > /tmp/sovpipe"
# hide sov
bindsym --release $mod+1 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+2 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+3 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+4 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+5 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+6 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+7 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+8 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+9 exec "echo 0 > /tmp/sovpipe"
bindsym --release $mod+0 exec "echo 0 > /tmp/sovpipe"
# back and forth
bindsym $mod+Escape workspace back_and_forth bindsym $mod+Escape workspace back_and_forth
# Move focused container to workspace # Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1 bindsym $mod+Shift+1 move container to workspace number 1
@ -342,6 +355,7 @@ no_focus [class="MATLAB R2021a" instance="sun-awt-X11-XDialogPeer"]
# Status Bar: # Status Bar:
# #
exec_always $waybar_cmd exec_always $waybar_cmd
exec_always $sov_cmd
exec_always $idle_cmd exec_always $idle_cmd
# #

71
sov.d/config Normal file
View file

@ -0,0 +1,71 @@
# anchor, where to display sov, top, bottom, left, right, center
anchor center
# margin, distance from edges if anchor is set
margin 0
# show timeout in millisecs
timeout 200
# distance between workspaces
gap 20
# columns
columns 3
# thumbnail to workspace ratio
ratio 8
# font face, use any string that is output by fc-list, recommended is Terminus (TTF):style=Bold
# font_face Terminus (TTF):style=Bold
font_face Cascadia Code PL:style=Bold
# margin size around text
text_margin_size 7
# margin top size over text
text_margin_top_size 4
# title text size
text_title_size 14
# title text color
text_title_color #FFFFFFFF
# description text size
text_description_size 12
# description text color
text_description_color #999999FF
# workspace number text size
text_workspace_size 18
# workspace number text color
# text_workspace_color #FFFFFFFF
text_workspace_color #268bd2FF
# workspace number x shift
text_workspace_xshift 11
# workspace number y shift
text_workspace_yshift -17
# border color
# border_color #BCBCBCFF
border_color #268BD2FF
# background color
background_color #222222FF
# focused background color
background_color_focused #444444FF
# window color
window_color #000000AA
# empty thumb color
empty_color #111111FF
# empty thumb border
empty_frame_color #555555FF