@@ -2,4 +2,4 @@ | |||||
set DIR (cd (dirname (status -f)); and pwd) | set DIR (cd (dirname (status -f)); and pwd) | ||||
i3-msg -t subscribe -m '["workspace"]' | jq --raw-output --unbuffered 'select(.change == "focus").current.name' | xargs -n1 -r on-focus-workspace & | |||||
i3-msg -t subscribe -m '["workspace"]' | jq --raw-output --unbuffered 'select(.change == "focus").current.name' | xargs -n1 -r on-focus-workspace |
@@ -0,0 +1,8 @@ | |||||
#!/bin/bash | |||||
ntfy_url=$1 | |||||
while echo offline | |||||
do | |||||
curl -sN --proto-default https --retry 60 --retry-delay 1 --retry-max-time 60 --keepalive-time 1 $ntfy_url |\ | |||||
jq --unbuffered -r 'select(.event == "message" or .event == "open")|if .event == "message" then .message else "🖧 online" end'; | |||||
sleep 1; | |||||
done |
@@ -36,6 +36,18 @@ | |||||
dest: ~/.config/i3blocks/config | dest: ~/.config/i3blocks/config | ||||
notify: i3 reload | notify: i3 reload | ||||
- name: i3-watchers service for the default xsession | |||||
template: | |||||
src: i3/i3-watchers.service.j2 | |||||
dest: ~/.config/systemd/user/i3-watchers.service | |||||
notify: systemd daemon-reload | |||||
- name: i3-watchers service for specific displays | |||||
template: | |||||
src: i3/i3-watchers@.service.j2 | |||||
dest: ~/.config/systemd/user/i3-watchers@.service | |||||
notify: systemd daemon-reload | |||||
- name: i3wm graphical-session service for the default xsession | - name: i3wm graphical-session service for the default xsession | ||||
template: | template: | ||||
src: i3/i3wm.service.j2 | src: i3/i3wm.service.j2 | ||||
@@ -50,6 +62,6 @@ | |||||
- name: i3wm graphical-session service enabled | - name: i3wm graphical-session service enabled | ||||
systemd: | systemd: | ||||
name: i3wm@.service | |||||
name: i3wm.service | |||||
enabled: true | enabled: true | ||||
scope: user | scope: user |
@@ -0,0 +1,11 @@ | |||||
{{ ansible_managed | comment }} | |||||
[Unit] | |||||
PartOf=graphical-session.target | |||||
Requires=i3wm.service | |||||
[Service] | |||||
ExecStart=/usr/bin/env i3-watchers | |||||
[Install] | |||||
RequiredBy=xsession.target |
@@ -0,0 +1,11 @@ | |||||
[Unit] | |||||
Description=i3 Window Manager for Display %i | |||||
Requires=i3wm@%i.service | |||||
[Service] | |||||
Environment=DISPLAY=%i | |||||
Environment=XAUTHORITY=%h/.Xauthority%i | |||||
ExecStart=/usr/bin/env i3-watchers | |||||
[Install] | |||||
WantedBy=default.target |
@@ -368,6 +368,3 @@ assign [title="^Citrix maximized probe window$"] → citrix | |||||
{% set ws = workspaces[workspace] %} | {% set ws = workspaces[workspace] %} | ||||
assign [class="^(?:Tiger)?V[Nn][Cc] ?[Vv]iewer$" title="^{{ws.host}}:{{ws.display|default(home_vncserver_display_number)}}"] → {{workspace}} | assign [class="^(?:Tiger)?V[Nn][Cc] ?[Vv]iewer$" title="^{{ws.host}}:{{ws.display|default(home_vncserver_display_number)}}"] → {{workspace}} | ||||
{% endfor %} | {% endfor %} | ||||
# Autostart | |||||
exec --no-startup-id i3-watchers |
@@ -30,17 +30,20 @@ command=/usr/share/i3blocks/$BLOCK_NAME | |||||
separator_block_width=15 | separator_block_width=15 | ||||
markup=none | markup=none | ||||
{% if i3blocks_ntfy_url is defined %} | |||||
# todo | # todo | ||||
[todo] | |||||
command=i3block-socket-watcher {{todo_i3block_socket}} | |||||
[ntfy] | |||||
command=i3blocks-ntfy.sh {{ i3blocks_ntfy_url | quote }} | |||||
interval=persist | interval=persist | ||||
markup=pango | |||||
{% endif %} | |||||
{# | |||||
# timer | # timer | ||||
[timer] | [timer] | ||||
command=i3block-socket-watcher {{timer_i3block_socket}} | command=i3block-socket-watcher {{timer_i3block_socket}} | ||||
interval=persist | interval=persist | ||||
markup=pango | markup=pango | ||||
#} | |||||
# hostinfo | # hostinfo | ||||
[hostinfo] | [hostinfo] | ||||
@@ -1,6 +1,7 @@ | |||||
[Unit] | [Unit] | ||||
Description=i3 Window Manager | Description=i3 Window Manager | ||||
PartOf=graphical-session.target | PartOf=graphical-session.target | ||||
Wants=i3-watchers.service | |||||
[Service] | [Service] | ||||
Type=exec | Type=exec | ||||