17.09.2025

#on/off second monitor

#!/bin/bash

pid=`sed '1q;d' /tmp/mon_switch.pid`

if [[ -z "$pid" ]]; then

xrandr --output DVI-I-0 --off & echo "off" > /tmp/mon_switch.pid

else

xrandr --output DVI-I-0 --auto --left-of DVI-I-1

xrandr --output DVI-I-1 --primary & echo "" > /tmp/mon_switch.pid

fi


05.05.2024

dpms off, ignoring mouse and switch composer to prevent possible glitches

xinput --disable "Logitech USB Optical Mouse"
pkill picom
sleep .1
xset dpms force off
while : ; do
status="$(xset q)"
if [[ $status == *"Monitor is On"* ]]; then
xinput --enable "Logitech USB Optical Mouse"
setsid picom
break
fi
done

03.05.2024

try to exclude ai generated from search

vivaldi "https://google.com/?q=$(xclip -o) -\"stable diffusion\" -\"ai\" -\"midjourney\" -\"open art\" -\"prompt hunt\""