-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlebardock
executable file
·37 lines (25 loc) · 1.24 KB
/
lebardock
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!/bin/bash
/opt/lebar/lebar &
sleep 5 # Give the application some time to start
WINDOW_ID=$(xdotool search --name 'LEBAR_WM_TB' | head -n 1)
# Set window type to dock
xprop -id $WINDOW_ID -f _NET_WM_WINDOW_TYPE 32a -set _NET_WM_WINDOW_TYPE "_NET_WM_WINDOW_TYPE_DOCK"
# Set window to be on all workspaces and below other windows
xprop -id $WINDOW_ID -f _NET_WM_STATE 32a -set _NET_WM_STATE "_NET_WM_STATE_STICKY, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _NET_WM_STATE_BELOW"
# Set the window to appear on all workspaces
wmctrl -ir $WINDOW_ID -b add,sticky
wmctrl -ir $WINDOW_ID -b add,below
wmctrl -ir $WINDOW_ID -b add,skip_taskbar
wmctrl -ir $WINDOW_ID -b add,skip_pager
# Set the window to appear on all workspaces (set to -1)
xprop -id $WINDOW_ID -f _NET_WM_DESKTOP 32c -set _NET_WM_DESKTOP "-1"
# Set reserved space (modify values as needed)
LEFT=0
RIGHT=0
TOP=27
BOTTOM=0
TOP_END_X=$(xdpyinfo | awk '/dimensions:/ {print $2}' | cut -d 'x' -f 1)
xprop -id $WINDOW_ID -f _NET_WM_STRUT_PARTIAL 32c -set _NET_WM_STRUT_PARTIAL \
"$LEFT, $RIGHT, $TOP, $BOTTOM, 0, 0, 0, 0, 0, $TOP_END_X, 0, 0"
xprop -id $WINDOW_ID -f _NET_WM_STRUT 32c -set _NET_WM_STRUT "$LEFT, $RIGHT, $TOP, $BOTTOM"
echo "Application launched and window properties set."