← All posts tagged GNOME

ZimniY

Доработаный вариант приклеивалки окон. Ресурсов жрёт меньше

-----
#!/bin/bash

if [ "$1" = 'start' ]; then

PROGRAMS="$(cat $HOME/.windows | grep -v '#')"

while true; do

for PROGRAM in $PROGRAMS; do

WINCLASS="$(echo $PROGRAM | cut -s -d '=' -f 1)"
WINDESK="$(echo $PROGRAM | cut -s -d '=' -f 2)"

WINLIST="$(wmctrl -x -l | awk '{ print $1, $2, $3 }' | grep -v '\-1' | grep -i "$WINCLASS" | cut -s -d ' ' -f 1)"
for WIN in $WINLIST; do
wmctrl -i -r "$WIN" -t "$WINDESK"
done

done

sleep 0.25

done

else
nice -n 19 "$0" start & > /dev/null
exit 0
fi
-----

ZimniY

Как привязать приложения к определённым рабочим столам...
#!/bin/bash

ENABLED='1'

PROGRAMS='empathy@2 Pidgin@2 Firefox@1 remmina@3'

while [[ "$ENABLED" == '1' ]]; do

for PROGRAM in $PROGRAMS; do

WINCLASS="$(echo $PROGRAM | cut -s -d '@' -f 1)"
WINDESK="$(echo $PROGRAM | cut -s -d '@' -f 2)"

WINLIST="$(wmctrl -x -l | grep -v '\-1' | grep $WINCLASS | cut -s -d ' ' -f 1)"
for WIN in $WINLIST; do
wmctrl -i -r $WIN -t $WINDESK
done

done

done