diff --git a/bin/superclick b/bin/superclick index a092a02..c7af8db 100755 --- a/bin/superclick +++ b/bin/superclick @@ -198,12 +198,12 @@ trainer(){ case "$LANG" in pl*) TITLE="Trener SuperClick" - MOUSE="przytrzymaj klawisz super i kliknij w wybrany obszar okna

...kolejne kliknięcia zmieniają rozmiar

" + MOUSE="przytrzymaj klawisz super i kliknij w wybrany obszar okna

...kolejne kliknięcia zmieniają rozmiar

" KEYB="z klawiatury: Super + KP_1..9" ;; *) TITLE="SuperClick trainer" - MOUSE="hold Super key and click in appropriate area
of any window

...subsequent clicks change the size

" + MOUSE="hold Super key and click in appropriate area
of any window

...subsequent clicks change the size

" KEYB="with keyboard: Super + KP_1..9" ;; esac diff --git a/bin/superclick-desktop b/bin/superclick-desktop new file mode 100755 index 0000000..43e3c97 --- /dev/null +++ b/bin/superclick-desktop @@ -0,0 +1,39 @@ +#!/bin/bash + +# superclick-desktop = actions for w-Leftmouseclick event on desktop + +CONFIG_FILE="$HOME/.config/mabox/superclick-desktop.conf" + +if [ ! -f ${CONFIG_FILE} ]; then +cat < ${CONFIG_FILE} +# SuperClick on desktop config file +# Sidearea width in pixels +sidewidth=300 +# Commands to run on super + clik on left, center or right desktop area +left_cmd="mb-jgtools places 2>/dev/null" +center_cmd="jgdesktops -s 2>/dev/null" +right_cmd="mb-jgtools right 2>/dev/null" +EOF +fi + +# read config variables from file +source <(grep = $CONFIG_FILE) + +SIDEWIDTH=${sidewidth:-0} +CENTER_CMD=${center_cmd:-"jgdesktops -s 2>/dev/null"} +LEFT_CMD=${left_cmd:-"mb-jgtools places 2>/dev/null"} +RIGHT_CMD=${right_cmd:-"mb-jgtools right 2>/dev/null"} + +# TODO: Make it work on dual monitor setups - buy second monitor and look how it is implemented in superclick script ;) +MON_WIDTH=$(xrandr | grep " connected" |awk '{print $3}' |awk -F[x+] '{print $1}') +RIGHT=$((MON_WIDTH-sidewidth)) + +eval $(xdotool getmouselocation --shell) + +if [ $X -lt ${sidewidth} ];then +bash <<< "$LEFT_CMD" +elif [ $X -gt ${RIGHT} ];then +bash <<< "$RIGHT_CMD" +else +bash <<< "$CENTER_CMD" +fi diff --git a/mabox/help/Quick_tiling.html b/mabox/help/Quick_tiling.html deleted file mode 100644 index 5b3968e..0000000 --- a/mabox/help/Quick_tiling.html +++ /dev/null @@ -1,23 +0,0 @@ - -
-
-
-
-
-

hold Super key
and click
in appropriate area
of any window
-
-
-
-
-
- - diff --git a/mabox/img/superclick-keyboard.gif b/mabox/img/superclick-keyboard.gif new file mode 100644 index 0000000..c1b68ac Binary files /dev/null and b/mabox/img/superclick-keyboard.gif differ