vivien / i3blocks-contrib

Official repository for community contributed blocklets
https://github.com/vivien/i3blocks
Other
1.29k stars 485 forks source link

i3-focusedwindow rewritten, improved and added arguments #508

Open zDEFz opened 11 months ago

zDEFz commented 11 months ago

Submitting this because the other pull requests for it I found were not performing well enough nor providing the user with enough options.

i3 Focused window

Displays title of focused window in i3Wm

Demo

Requirements

Dependencies: xdotool

Command line arguments

i3-focusedwindow -class or --classname # for classname
i3-focusedwindow -title or --titlename # for titlename
i3-focusedwindow -win or --windowname # for windowname
i3-focusedwindow -dim or --dimensions # for dimensions
i3-focusedwindow -pos or --position # for position

Installation

The recommended i3blocks config is

[i3-focused-window]
command=$SCRIPT_DIR/custom/i3-focusedwindow -class
interval=1
Pysis868 commented 2 months ago

This helps a lot, especially since the former script loops constantly, slowing my system by constantly creating/spawning new processes..

Proposed improvements: https://github.com/zDEFz/i3blocks-contrib/pull/1