Commit f5aa416c authored by Jay Ta'ala's avatar Jay Ta'ala
Browse files

Subscribing to urgent window events and set _NET_WM_STATE for tint2.

Now, tint2 urgent is showing.
parent 1a1f5a8c
......@@ -125,13 +125,23 @@ exec --no-startup-id xfce4-power-manager
exec_always --no-startup-id "pkill conky; sleep 0.5; conky -c ~/.config/conky; conky -c ~/.config/conky_shortcuts"
set $picom_start "pkill picom; sleep 1; picom -b"
exec_always --no-startup-id $picom_start
exec --no-startup-id tint2
#exec --no-startup-id yes | xsm --restore
# picom (compositor)
bindsym $mod+t exec --no-startup-id $picom_start
bindsym $mod+ctrl+t exec --no-startup-id "killall picom"
# tint2 configuration (needs tint2 package)
exec --no-startup-id tint2
# subscribe to urgent event and set _NET_WM_STATE_DEMANDS_ATTENTION (for tint2)
exec_always --no-startup-id i3-msg -t subscribe -m '[ "window" ]' | jq --unbuffered -Mrc '. | select(.change == "urgent" and .container.urgent == true and .container.focused == false) | .container.window' | xargs -I{} xprop -id {} -f _NET_WM_STATE 32a -set _NET_WM_STATE _NET_WM_STATE_DEMANDS_ATTENTION
# subscribe to urgent event being selected and set _NET_WM_STATE_FOCUSED (for tint2)
exec_always --no-startup-id i3-msg -t subscribe -m '[ "window" ]' | jq --unbuffered -Mrc '. | select(.change == "urgent" and .container.focused == true) | .container.window' | xargs -I{} xprop -id {} -f _NET_WM_STATE 32a -set _NET_WM_STATE _NET_WM_STATE_FOCUSED
# never steal focus
focus_on_window_activation urgent
bindsym $mod+period [urgent=latest] focus
# kill focused window
bindsym $mod+Shift+q kill
......@@ -415,9 +425,6 @@ bindsym $mod_next+Shift+d exec --no-startup-id smplayer -send-action forward1
bindsym $mod_next+Shift+h exec --no-startup-id smplayer -send-action rewind1
bindsym $mod_next+Shift+l exec --no-startup-id smplayer -send-action forward1
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# reload the configuration file
bindsym $mod+Ctrl+Shift+c reload
......
#---- Generated by tint2conf 9675 ----
#---- Generated by tint2conf 17d0 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
......@@ -44,20 +44,7 @@ border_color_hover = #ffffff 60
background_color_pressed = #555555 10
border_color_pressed = #ffffff 60
# Background 4: Urgent task
rounded = 5
border_width = 1
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #aa4400 100
border_color = #aa7733 100
background_color_hover = #aa4400 100
border_color_hover = #aa7733 100
background_color_pressed = #aa4400 100
border_color_pressed = #aa7733 100
# Background 5: Active desktop name
# Background 4: Active desktop name
rounded = 3
border_width = 1
border_sides = TBLR
......@@ -70,6 +57,19 @@ border_color_hover = #cccccc 30
background_color_pressed = #777777 0
border_color_pressed = #777777 30
# Background 5: Urgent task
rounded = 2
border_width = 2
border_sides = TBLR
border_content_tint_weight = 0
background_content_tint_weight = 0
background_color = #000000 0
border_color = #ed333b 100
background_color_hover = #000000 0
border_color_hover = #ed333b 100
background_color_pressed = #000000 0
border_color_pressed = #000000 0
#-------------------------------------
# Panel
panel_items = TE:E:E:SBC
......@@ -112,11 +112,11 @@ taskbar_hide_different_desktop = 0
taskbar_always_show_all_desktop_tasks = 1
taskbar_name_padding = 6 0
taskbar_name_background_id = 0
taskbar_name_active_background_id = 5
taskbar_name_active_background_id = 4
taskbar_name_font = sans Bold 12
taskbar_name_font_color = #07eded 100
taskbar_name_active_font_color = #000000 100
taskbar_distribute_size = 0
taskbar_distribute_size = 1
taskbar_sort_order = application
task_align = left
......@@ -125,18 +125,18 @@ task_align = left
task_text = 0
task_icon = 1
task_centered = 1
urgent_nb_of_blink = 100000
task_maximum_size = 24 35
task_padding = 0 0 4
urgent_nb_of_blink = 10
task_maximum_size = 28 0
task_padding = 0 0 0
task_font = Sans 12
task_tooltip = 1
task_thumbnail = 0
task_thumbnail_size = 210
task_font_color = #eeeeee 100
task_icon_asb = 97 0 0
task_icon_asb = 97 30 30
task_background_id = 2
task_active_background_id = 3
task_urgent_background_id = 4
task_urgent_background_id = 5
task_iconified_background_id = 2
mouse_left = toggle
mouse_middle = none
......@@ -209,8 +209,8 @@ ac_disconnected_cmd =
#-------------------------------------
# Separator 1
separator = new
separator_background_id = -1
separator_color = #777777 89
separator_background_id = 0
separator_color = #777777 84
separator_style = line
separator_size = 3
separator_padding = 1 0
......@@ -218,8 +218,8 @@ separator_padding = 1 0
#-------------------------------------
# Separator 2
separator = new
separator_background_id = -1
separator_color = #777777 89
separator_background_id = 0
separator_color = #777777 84
separator_style = dots
separator_size = 3
separator_padding = 1 0
......@@ -227,8 +227,8 @@ separator_padding = 1 0
#-------------------------------------
# Separator 3
separator = new
separator_background_id = -1
separator_color = #777777 89
separator_background_id = 0
separator_color = #777777 84
separator_style = line
separator_size = 3
separator_padding = 1 0
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment