Created
May 21, 2022 09:51
-
-
Save dharmx/63b1d914fb377c46dc564392e2ccdd05 to your computer and use it in GitHub Desktop.
EWW current window name example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(deflisten node_events "./loop.zsh") | |
(defwindow test :geometry | |
(geometry :anchor "center" :width "500px" :height "50px") | |
(window-test)) | |
(defwidget window-test [] (box :orientation "v" (label :text node_events))) | |
;; vim:ft=yuck |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
function window_name() { | |
local old="$(xdotool getwindowfocus getwindowname)" | |
print "$old" | |
while sleep 0.5; do | |
local new="$(xdotool getwindowfocus getwindowname)" | |
[ ! $old = $new ] && old="$new" && print "$old" | |
done | |
} | |
window_name | |
# vim:filetype=zsh |
Author
dharmx
commented
May 21, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment