Black and White
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
monitor = 0
|
monitor = 0
|
||||||
follow = mouse
|
follow = mouse
|
||||||
geometry = "320x6-30+60"
|
geometry = "400x6-30+60"
|
||||||
indicate_hidden = yes
|
indicate_hidden = yes
|
||||||
shrink = no
|
shrink = no
|
||||||
notification_height = 15
|
notification_height = 15
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
padding = 10
|
padding = 10
|
||||||
horizontal_padding = 10
|
horizontal_padding = 10
|
||||||
frame_width = 0
|
frame_width = 0
|
||||||
frame_color = "#ffffff"
|
frame_color = "#aaaaaa"
|
||||||
separator_color = frame
|
separator_color = frame
|
||||||
sort = yes
|
sort = yes
|
||||||
idle_threshold = 120
|
idle_threshold = 120
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
icon_position = left
|
icon_position = left
|
||||||
min_icon_size = 48
|
min_icon_size = 48
|
||||||
max_icon_size = 96
|
max_icon_size = 96
|
||||||
icon_path = /usr/share/icons/Qogir/status/48/:/usr/share/icons/Qogir/devices/48/:/usr/share/icons/Qogir/48x48/apps/
|
icon_path = /usr/share/icons/Papirus/48x48/status/:/usr/share/icons/Papirus/48x48/devices/:/usr/share/icons/Papirus/48x48/apps/
|
||||||
|
|
||||||
# History
|
# History
|
||||||
|
|
||||||
|
|||||||
@@ -9,18 +9,14 @@ bindsym $mod+Shift+s exec --no-startup-id flameshot gui
|
|||||||
|
|
||||||
# audio and brightness
|
# audio and brightness
|
||||||
bindsym XF86AudioMute exec --no-startup-id amixer -q set Master toggle
|
bindsym XF86AudioMute exec --no-startup-id amixer -q set Master toggle
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 3%-
|
bindsym XF86AudioLowerVolume exec --no-startup-id amixer set Master 1%-
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 3%+
|
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer set Master 1%+
|
||||||
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
|
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
|
||||||
|
bindsym XF86AudioNext exec --no-startup-id playerctl next
|
||||||
|
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 10
|
bindsym XF86MonBrightnessUp exec --no-startup-id light -A 10
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 10
|
bindsym XF86MonBrightnessDown exec --no-startup-id light -U 10
|
||||||
|
|
||||||
# smoother keyboard (autorepeat)
|
|
||||||
exec --no-startup-id xset r rate 300 50
|
|
||||||
|
|
||||||
# no mouse accel
|
|
||||||
exec --no-startup-id xset m 1
|
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+Shift+BackSpace kill
|
bindsym $mod+Shift+BackSpace kill
|
||||||
|
|
||||||
@@ -39,12 +35,6 @@ bindsym $mod+Shift+j move down
|
|||||||
bindsym $mod+Shift+k move up
|
bindsym $mod+Shift+k move up
|
||||||
bindsym $mod+Shift+l move right
|
bindsym $mod+Shift+l move right
|
||||||
|
|
||||||
# alternatively, you can use the cursor keys:
|
|
||||||
bindsym $mod+Shift+Left move left
|
|
||||||
bindsym $mod+Shift+Down move down
|
|
||||||
bindsym $mod+Shift+Up move up
|
|
||||||
bindsym $mod+Shift+Right move right
|
|
||||||
|
|
||||||
# split in horizontal orientation
|
# split in horizontal orientation
|
||||||
bindsym $mod+v split h
|
bindsym $mod+v split h
|
||||||
|
|
||||||
@@ -121,10 +111,10 @@ set $blue "#55b4d4"
|
|||||||
set $yellow "#e7c547"
|
set $yellow "#e7c547"
|
||||||
|
|
||||||
# class border backgr. text indicator child_border
|
# class border backgr. text indicator child_border
|
||||||
client.focused $green $green $black $green $green
|
client.focused $green $green $black $green $black
|
||||||
client.focused_inactive $yellow $yellow $black $yellow $yellow
|
client.focused_inactive $yellow $yellow $black $yellow $black
|
||||||
client.unfocused $yellow $yellow $black $yellow $yellow
|
client.unfocused $white $white $black $white $black
|
||||||
client.urgent $red $red $white $red $red
|
client.urgent $red $red $white $red $black
|
||||||
|
|
||||||
# i3 bar
|
# i3 bar
|
||||||
# flaoting on start
|
# flaoting on start
|
||||||
@@ -136,7 +126,7 @@ hide_edge_borders smart
|
|||||||
for_window [class="^.*"] border pixel 0
|
for_window [class="^.*"] border pixel 0
|
||||||
|
|
||||||
# bar
|
# bar
|
||||||
exec --no-startup-id polybar -r titlebar
|
exec --no-startup-id polybar -r bar
|
||||||
|
|
||||||
# gaps
|
# gaps
|
||||||
gaps inner 10
|
gaps inner 10
|
||||||
@@ -149,5 +139,4 @@ exec --no-startup-id nm-applet
|
|||||||
exec --no-startup-id keepassxc
|
exec --no-startup-id keepassxc
|
||||||
exec --no-startup-id seafile-applet
|
exec --no-startup-id seafile-applet
|
||||||
exec --no-startup-id fcitx5
|
exec --no-startup-id fcitx5
|
||||||
exec --no-startup-id volumeicon
|
exec --no-startup-id picom --backend glx --no-vsync
|
||||||
exec --no-startup-id picom
|
|
||||||
|
|||||||
@@ -5,13 +5,14 @@ rounded-corners-exclude = [
|
|||||||
"class_g = 'Polybar'",
|
"class_g = 'Polybar'",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
detect-rounded-corners = true
|
||||||
|
|
||||||
shadow = true;
|
shadow = true;
|
||||||
shadow-radius = 8;
|
shadow-radius = 15;
|
||||||
shadow-offset-x = 8;
|
|
||||||
shadow-offset-y = 8;
|
|
||||||
shadow-opacity = 0.2
|
shadow-opacity = 0.2
|
||||||
|
|
||||||
shadow-exclude = [
|
shadow-exclude = [
|
||||||
"class_g = 'i3-frame'",
|
"class_g = 'i3-frame'",
|
||||||
"class_g = 'Polybar'",
|
"class_g = 'Polybar'",
|
||||||
|
"class_g = 'Firefox'",
|
||||||
];
|
];
|
||||||
@@ -8,31 +8,29 @@ scroll-down = i3wm-wsnext
|
|||||||
|
|
||||||
fixed-center = true
|
fixed-center = true
|
||||||
|
|
||||||
tray-position = right
|
|
||||||
|
|
||||||
width = 100%
|
width = 100%
|
||||||
height = 30
|
height = 30
|
||||||
|
|
||||||
background = #ffffff
|
background = #ffffff
|
||||||
foreground = #5c6773
|
foreground = #5c6773
|
||||||
|
|
||||||
radius-bottom = 2
|
bottom = false
|
||||||
|
|
||||||
#line-size = 1
|
tray-position = right
|
||||||
#line-color = #f00
|
|
||||||
|
line-size = 4
|
||||||
|
|
||||||
#border-size = 2
|
|
||||||
#border-color = #ffffff
|
|
||||||
padding-left = 1
|
padding-left = 1
|
||||||
padding-right = 1
|
padding-right = 1
|
||||||
module-margin = 1
|
module-margin = 1
|
||||||
|
|
||||||
modules-left = logo i3 title
|
modules-left = logo i3 polywins
|
||||||
modules-center =
|
modules-center = date time
|
||||||
modules-right = wireless-network pulseaudio date time
|
modules-right = backlight pulseaudio battery
|
||||||
|
|
||||||
[module/i3]
|
[module/i3]
|
||||||
strip-wsnumbers = true
|
strip-wsnumbers = true
|
||||||
|
wrapping-scroll = false
|
||||||
type = internal/i3
|
type = internal/i3
|
||||||
format = <label-state> <label-mode>
|
format = <label-state> <label-mode>
|
||||||
|
|
||||||
@@ -47,7 +45,7 @@ label-visible = %index%
|
|||||||
label-visible-padding = 1
|
label-visible-padding = 1
|
||||||
|
|
||||||
label-urgent = %index%
|
label-urgent = %index%
|
||||||
label-urgent-background = #ff3333
|
label-urgent-overline = #ff3333
|
||||||
label-urgent-padding = 1
|
label-urgent-padding = 1
|
||||||
|
|
||||||
[module/date]
|
[module/date]
|
||||||
@@ -62,11 +60,12 @@ date = %H:%M:%S
|
|||||||
|
|
||||||
[module/pulseaudio]
|
[module/pulseaudio]
|
||||||
type = internal/pulseaudio
|
type = internal/pulseaudio
|
||||||
sink = alsa_output.pci-0000_12_00.3.analog-stereo
|
sink = master
|
||||||
use-ui-max = true
|
use-ui-max = true
|
||||||
interval = 5
|
interval = 5
|
||||||
format-volume = <label-volume>
|
format-volume = 音 「<label-volume>」
|
||||||
label-muted = muted
|
label-muted = muted
|
||||||
|
click-right = pavucontrol
|
||||||
|
|
||||||
[module/title]
|
[module/title]
|
||||||
type = internal/xwindow
|
type = internal/xwindow
|
||||||
@@ -78,12 +77,26 @@ type = custom/text
|
|||||||
content = "花"
|
content = "花"
|
||||||
content-padding = 1
|
content-padding = 1
|
||||||
|
|
||||||
[module/wireless-network]
|
[module/battery]
|
||||||
type = internal/network
|
type = internal/battery
|
||||||
interface = wlo1
|
full-at = 99
|
||||||
interval = 3.0
|
battery = BAT0
|
||||||
udspeed-minwidth = 0
|
adapter = ADP1
|
||||||
format-connected = <label-connected>
|
time-format = %H:%M
|
||||||
format-disconnected = <label-disconnected>
|
|
||||||
label-connected = %essid%
|
label-charging = 電池 「charging %percentage%% - %time%」
|
||||||
label-disconnected = "no wifi"
|
label-discharging = 電池 「%percentage%%」
|
||||||
|
label-full = 電池 「full」
|
||||||
|
|
||||||
|
[module/backlight]
|
||||||
|
type = internal/backlight
|
||||||
|
card = amdgpu_bl0
|
||||||
|
label = 電気 「%percentage%%」
|
||||||
|
|
||||||
|
[module/polywins]
|
||||||
|
type = custom/script
|
||||||
|
exec = /home/marc/dots/files/polywins.sh 2>/dev/null
|
||||||
|
format = <label>
|
||||||
|
label = %output%
|
||||||
|
label-padding = 1
|
||||||
|
tail = true
|
||||||
@@ -14,7 +14,7 @@ configuration {
|
|||||||
// blur version
|
// blur version
|
||||||
* {
|
* {
|
||||||
bg: #ffffff;
|
bg: #ffffff;
|
||||||
ac: #0087af;
|
ac: #A6CC70;
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
|
|||||||
@@ -6,6 +6,18 @@ xrdb -merge $HOME/.Xresources
|
|||||||
# map CAPS to ~
|
# map CAPS to ~
|
||||||
setxkbmap -option caps:none
|
setxkbmap -option caps:none
|
||||||
xmodmap -e "keycode 66 = grave asciitilde"
|
xmodmap -e "keycode 66 = grave asciitilde"
|
||||||
|
setxkbmap eu
|
||||||
|
|
||||||
|
# energy options
|
||||||
|
xset s off
|
||||||
|
xset -dpms
|
||||||
|
xset s noblank
|
||||||
|
|
||||||
|
# keyboard repeat
|
||||||
|
xset r rate 300 50
|
||||||
|
|
||||||
|
# no mouse accel
|
||||||
|
xset m 1
|
||||||
|
|
||||||
# path
|
# path
|
||||||
export PATH=$PATH:$HOME/scripts:$HOME/.cargo/bin:$HOME/.cabal/bin:$HOME/.ghcup/bin:$HOME/.local/bin
|
export PATH=$PATH:$HOME/scripts:$HOME/.cargo/bin:$HOME/.cabal/bin:$HOME/.ghcup/bin:$HOME/.local/bin
|
||||||
|
|||||||
@@ -568,7 +568,8 @@
|
|||||||
(rust-mode . lsp)
|
(rust-mode . lsp)
|
||||||
(java-mode . lsp)
|
(java-mode . lsp)
|
||||||
(python-mode . lsp)
|
(python-mode . lsp)
|
||||||
(haskell-mode . lsp))
|
(haskell-mode . lsp)
|
||||||
|
(c++-mode . lsp))
|
||||||
|
|
||||||
;; Tags (search e.g. for structs)
|
;; Tags (search e.g. for structs)
|
||||||
(use-package lsp-ivy
|
(use-package lsp-ivy
|
||||||
@@ -633,7 +634,7 @@
|
|||||||
(use-package yasnippet-snippets
|
(use-package yasnippet-snippets
|
||||||
:straight (yasnippet-snippets :type git :host github :repo "AndreaCrotti/yasnippet-snippets"
|
:straight (yasnippet-snippets :type git :host github :repo "AndreaCrotti/yasnippet-snippets"
|
||||||
:fork (:host github
|
:fork (:host github
|
||||||
:repo "crammk/yasnippet-snippets"))
|
:repo "marcothms/yasnippet-snippets"))
|
||||||
:after yasnippet)
|
:after yasnippet)
|
||||||
|
|
||||||
;; Compilation for lsp
|
;; Compilation for lsp
|
||||||
@@ -668,7 +669,7 @@
|
|||||||
|
|
||||||
;; WebGpuShaderLanguage
|
;; WebGpuShaderLanguage
|
||||||
(use-package wgsl-mode
|
(use-package wgsl-mode
|
||||||
:straight (wgsl-mode :type git :host github :repo "CramMK/wgsl-mode")
|
:straight (wgsl-mode :type git :host github :repo "marcothms/wgsl-mode")
|
||||||
:mode ("\\.wgsl\\'" . wgsl-mode))
|
:mode ("\\.wgsl\\'" . wgsl-mode))
|
||||||
|
|
||||||
;; Java
|
;; Java
|
||||||
|
|||||||
242
files/polywins.sh
Executable file
242
files/polywins.sh
Executable file
@@ -0,0 +1,242 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# POLYWINS
|
||||||
|
|
||||||
|
# SETTINGS {{{ ---
|
||||||
|
|
||||||
|
active_text_color="#5c6773"
|
||||||
|
active_bg=
|
||||||
|
active_underline="#a6cc70"
|
||||||
|
|
||||||
|
inactive_text_color="#5c6773"
|
||||||
|
inactive_bg=
|
||||||
|
inactive_underline=
|
||||||
|
|
||||||
|
separator="·"
|
||||||
|
show="window_class" # options: window_title, window_class, window_classname
|
||||||
|
forbidden_classes="Polybar Conky Gmrun"
|
||||||
|
empty_desktop_message="Desktop"
|
||||||
|
|
||||||
|
char_limit=15
|
||||||
|
max_windows=15
|
||||||
|
char_case="normal" # normal, upper, lower
|
||||||
|
add_spaces="true"
|
||||||
|
resize_increment=16
|
||||||
|
wm_border_width=1 # setting this might be required for accurate resize position
|
||||||
|
|
||||||
|
# --- }}}
|
||||||
|
|
||||||
|
|
||||||
|
main() {
|
||||||
|
# If no argument passed...
|
||||||
|
if [ -z "$2" ]; then
|
||||||
|
# ...print new window list every time
|
||||||
|
# the active window changes or
|
||||||
|
# a window is opened or closed
|
||||||
|
xprop -root -spy _NET_CLIENT_LIST _NET_ACTIVE_WINDOW |
|
||||||
|
while IFS= read -r _; do
|
||||||
|
generate_window_list
|
||||||
|
done
|
||||||
|
|
||||||
|
# If arguments are passed, run requested on-click function
|
||||||
|
else
|
||||||
|
"$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# ON-CLICK FUNCTIONS {{{ ---
|
||||||
|
|
||||||
|
raise_or_minimize() {
|
||||||
|
if [ "$(get_active_wid)" = "$1" ]; then
|
||||||
|
wmctrl -ir "$1" -b toggle,hidden
|
||||||
|
else
|
||||||
|
wmctrl -ir "$1" -b remove,hidden; wmctrl -ia "$1"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
close() {
|
||||||
|
wmctrl -ic "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
slop_resize() {
|
||||||
|
wmctrl -ia "$1"
|
||||||
|
wmctrl -ir "$1" -e "$(slop -f 0,%x,%y,%w,%h)"
|
||||||
|
}
|
||||||
|
|
||||||
|
increment_size() {
|
||||||
|
while IFS="[ .]" read -r wid ws wx wy ww wh _; do
|
||||||
|
test "$wid" != "$1" && continue
|
||||||
|
x=$(( wx - wm_border_width * 2 - resize_increment / 2 ))
|
||||||
|
y=$(( wy - wm_border_width * 2 - resize_increment / 2 ))
|
||||||
|
w=$(( ww + resize_increment ))
|
||||||
|
h=$(( wh + resize_increment ))
|
||||||
|
done <<-EOF
|
||||||
|
$(wmctrl -lG)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
|
||||||
|
}
|
||||||
|
|
||||||
|
decrement_size() {
|
||||||
|
while IFS="[ .]" read -r wid ws wx wy ww wh _; do
|
||||||
|
test "$wid" != "$1" && continue
|
||||||
|
x=$(( wx - wm_border_width * 2 + resize_increment / 2 ))
|
||||||
|
y=$(( wy - wm_border_width * 2 + resize_increment / 2 ))
|
||||||
|
w=$(( ww - resize_increment ))
|
||||||
|
h=$(( wh - resize_increment ))
|
||||||
|
done <<-EOF
|
||||||
|
$(wmctrl -lG)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
wmctrl -ir "$1" -e "0,$x,$y,$w,$h"
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- }}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# WINDOW LIST SETUP {{{ ---
|
||||||
|
|
||||||
|
active_left="%{F$active_text_color}"
|
||||||
|
active_right="%{F-}"
|
||||||
|
inactive_left="%{F$inactive_text_color}"
|
||||||
|
inactive_right="%{F-}"
|
||||||
|
separator="%{F$inactive_text_color}$separator%{F-}"
|
||||||
|
|
||||||
|
if [ -n "$active_underline" ]; then
|
||||||
|
active_left="${active_left}%{+u}%{u$active_underline}"
|
||||||
|
active_right="%{-u}${active_right}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$active_bg" ]; then
|
||||||
|
active_left="${active_left}%{B$active_bg}"
|
||||||
|
active_right="%{B-}${active_right}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$inactive_underline" ]; then
|
||||||
|
inactive_left="${inactive_left}%{+u}%{u$inactive_underline}"
|
||||||
|
inactive_right="%{-u}${inactive_right}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$inactive_bg" ]; then
|
||||||
|
inactive_left="${inactive_left}%{B$inactive_bg}"
|
||||||
|
inactive_right="%{B-}${inactive_right}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
get_active_wid() {
|
||||||
|
active_wid=$(xprop -root _NET_ACTIVE_WINDOW)
|
||||||
|
active_wid="${active_wid#*\# }"
|
||||||
|
active_wid="${active_wid%,*}" # Necessary for XFCE
|
||||||
|
while [ ${#active_wid} -lt 10 ]; do
|
||||||
|
active_wid="0x0${active_wid#*x}"
|
||||||
|
done
|
||||||
|
echo "$active_wid"
|
||||||
|
}
|
||||||
|
|
||||||
|
get_active_workspace() {
|
||||||
|
wmctrl -d |
|
||||||
|
while IFS="[ .]" read -r number active_status _; do
|
||||||
|
test "$active_status" = "*" && echo "$number" && break
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
generate_window_list() {
|
||||||
|
active_workspace=$(get_active_workspace)
|
||||||
|
active_wid=$(get_active_wid)
|
||||||
|
window_count=0
|
||||||
|
on_click="$0"
|
||||||
|
|
||||||
|
# Format each window name one by one
|
||||||
|
# Space and . are both used as IFS,
|
||||||
|
# because classname and class are separated by '.'
|
||||||
|
while IFS="[ .\.]" read -r wid ws cname cls host title; do
|
||||||
|
# Don't show the window if on another workspace (-1 = sticky)
|
||||||
|
if [ "$ws" != "$active_workspace" ] && [ "$ws" != "-1" ]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Don't show the window if its class is forbidden
|
||||||
|
case "$forbidden_classes" in
|
||||||
|
*$cls*) continue ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# If max number of windows reached, just increment
|
||||||
|
# the windows counter
|
||||||
|
if [ "$window_count" -ge "$max_windows" ]; then
|
||||||
|
window_count=$(( window_count + 1 ))
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Show the user-selected window property
|
||||||
|
case "$show" in
|
||||||
|
"window_class") w_name="$cls" ;;
|
||||||
|
"window_classname") w_name="$cname" ;;
|
||||||
|
"window_title") w_name="$title" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Use user-selected character case
|
||||||
|
case "$char_case" in
|
||||||
|
"lower") w_name=$(
|
||||||
|
echo "$w_name" | tr '[:upper:]' '[:lower:]'
|
||||||
|
) ;;
|
||||||
|
"upper") w_name=$(
|
||||||
|
echo "$w_name" | tr '[:lower:]' '[:upper:]'
|
||||||
|
) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Truncate displayed name to user-selected limit
|
||||||
|
if [ "${#w_name}" -gt "$char_limit" ]; then
|
||||||
|
w_name="$(echo "$w_name" | cut -c1-$((char_limit-1)))…"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Apply add-spaces setting
|
||||||
|
if [ "$add_spaces" = "true" ]; then
|
||||||
|
w_name=" $w_name "
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add left and right formatting to displayed name
|
||||||
|
if [ "$wid" = "$active_wid" ]; then
|
||||||
|
w_name="${active_left}${w_name}${active_right}"
|
||||||
|
else
|
||||||
|
w_name="${inactive_left}${w_name}${inactive_right}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add separator unless the window is first in list
|
||||||
|
if [ "$window_count" != 0 ]; then
|
||||||
|
printf "%s" "$separator"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Add on-click action Polybar formatting
|
||||||
|
printf "%s" "%{A1:$on_click raise_or_minimize $wid:}"
|
||||||
|
printf "%s" "%{A2:$on_click close $wid:}"
|
||||||
|
printf "%s" "%{A3:$on_click slop_resize $wid:}"
|
||||||
|
printf "%s" "%{A4:$on_click increment_size $wid:}"
|
||||||
|
printf "%s" "%{A5:$on_click decrement_size $wid:}"
|
||||||
|
# Print the final window name
|
||||||
|
printf "%s" "$w_name"
|
||||||
|
printf "%s" "%{A}%{A}%{A}%{A}%{A}"
|
||||||
|
|
||||||
|
window_count=$(( window_count + 1 ))
|
||||||
|
done <<-EOF
|
||||||
|
$(wmctrl -lx)
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# After printing all the windows,
|
||||||
|
# print number of hidden windows
|
||||||
|
if [ "$window_count" -gt "$max_windows" ]; then
|
||||||
|
printf "%s" "+$(( window_count - max_windows ))"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Print empty desktop message if no windows are open
|
||||||
|
if [ "$window_count" = 0 ]; then
|
||||||
|
printf "%s" "$empty_desktop_message"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Print newline
|
||||||
|
echo ""
|
||||||
|
}
|
||||||
|
|
||||||
|
# --- }}}
|
||||||
|
|
||||||
|
main "$@"
|
||||||
Reference in New Issue
Block a user