jordansissel / xdotool

fake keyboard/mouse input, window management, and more
Other
3.17k stars 316 forks source link

script to disable night color before using vlc, mostly of the time night color is not disabled #317

Open promeneur opened 3 years ago

promeneur commented 3 years ago

Hello

i want to disable kde night color before using vlc and enable night color after.

I defined a shortcut Alt_n in kwin for "toggle night color"

I wrote this script

/usr/bin/xdotool Alt+n /usr/bin/vlc /usr/bin/xdotool Alt+n

Mostly of the time the first command xdotool has no effect. Rarely the second command xdotool has no effect.

Lew-Rockwell-Fan commented 2 years ago

Try putting a line sleep 2 after the first 2 commands. If it works, reduce the numeric argument in steps - it will take decimal fraction arguments like 0.2 - until you find the minimum. Then maybe double it to allow for variation in load.