middle click menu update (jgdesktops)

master
Daniel Napora 2023-05-18 16:05:29 +02:00
parent 87fdb0c9f2
commit 155d3d8f5e
4 changed files with 56 additions and 21 deletions

View File

@ -80,9 +80,9 @@ ROWS=${rows:-12}
me="jgdeskgrid -s"
out+=("^sep(DesktopGrid)")
out+=("$ABOUT,notify-send.sh -u critical -i mbcc '$title' '$help' -o '$SHOW_IMGHELPER:drawgrid' -o '$EDITCONF:xdg-open ~/.config/deskgrid/deskgrid.cfg'")
out+=("$SHOW_IMGHELPER,drawgrid")
out+=("$QUICK_TILE,yhtml /usr/share/mabox/help/Quick_tiling.html 'Mabox Quick tiling trainer - Ctrl + Shift + click'")
out+=("<big>󱇙</big> $ABOUT,notify-send.sh -u critical -i mbcc '$title' '$help' -o '$SHOW_IMGHELPER:drawgrid' -o '$EDITCONF:xdg-open ~/.config/deskgrid/deskgrid.cfg'")
out+=("<big>󰕰</big> $SHOW_IMGHELPER,drawgrid")
out+=("<big>󰋁</big> $QUICK_TILE,yhtml /usr/share/mabox/help/Quick_tiling.html 'Mabox Quick tiling trainer - Ctrl + Shift + click'")
out+=("^sep($CONFIGURATION)")
#out+=("$LCOLUMNS [ <b>$COL</b> ],^checkout(columns)")
#out+=("$LROWS [ <b>$ROWS</b> ],^checkout(rows)")

View File

@ -77,7 +77,7 @@ SESSIONDIR="$HOME/.config/deskmngr/"
mkdir -p $SESSIONDIR
out+=("^sep($DESKMNGR)")
out+=("$ABOUT,\"\"\"notify-send.sh -u critical -i mbcc '$title' '$help';$me\"\"\"")
out+=("<big></big> $ABOUT,\"\"\"notify-send.sh -u critical -i mbcc '$title' '$help';$me\"\"\"")
out+=("^sep(<i><small>$SAVED_SESS</small></i>)")

View File

@ -32,6 +32,12 @@ case $LANG in
MCORNERS="<b>Krawędzie ekranu</b>"
RUNNING="(uruchomiona)"
STOPPED="(zatrzymana)"
MOUSE_DESK_ACTIONS="Akcje myszy na pulpicie"
SHOW_DESK="Pokaż pulpit - lewy klik"
SWITCH_DESK="Zmień pulpit - kółko myszy"
FOCUS="Fokus podąża za myszą"
WALLPAPER="Tapeta"
TOOLS="Narzędzia"
;;
es*)
REMOVE="Eliminar este menú del panel"
@ -50,7 +56,7 @@ case $LANG in
DESKMNGR="Desktop session Manager"
WALLCHANGER="Wallpaper"
DESKGRID="Desktop Grid"
SCREEN_RES="Screen resolution"
SCREEN_RES="Screen Settings"
ENABLE="Enable"
DISABLE="Disable"
DESK_SERVICES="Desktop services"
@ -60,6 +66,12 @@ case $LANG in
MCORNERS="<b>Screen Edges</b> - hot corners"
RUNNING="(running)"
STOPPED="(stopped)"
MOUSE_DESK_ACTIONS="Mouse on Desktop Actions"
SHOW_DESK="Show Desktop on left click"
SWITCH_DESK="Switch Desktop on mousewheel up/down"
FOCUS="Focus follow Mouse"
WALLPAPER="Wallpaper"
TOOLS="Tools"
;;
*)
REMOVE="Remove this menu from panel"
@ -88,6 +100,12 @@ case $LANG in
MCORNERS="<b>Screen Edges</b> - hot corners"
RUNNING="(running)"
STOPPED="(stopped)"
MOUSE_DESK_ACTIONS="Mouse on Desktop Actions"
SHOW_DESK="Show Desktop on left click"
SWITCH_DESK="Switch Desktop on mousewheel up/down"
FOCUS="Focus follow Mouse"
WALLPAPER="Wallpaper"
TOOLS="Tools"
;;
esac
@ -95,14 +113,12 @@ CSVFILE="$HOME/.config/mabox/jgdesktops-bottom.csv"
# If config file not exist create one with defaults
if [ ! -f $CSVFILE ]; then
cat <<EOF > ${CSVFILE}
^sep(WALLPAPER)
^sep($TOOLS)
<big>󰸉</big> $WALLCHANGER,^pipe(jgwallpaperchanger)
^sep(TOOLS)
<big>󱇙</big> $DESKGRID,^pipe(jgdeskgrid)
<big></big> $DESKMNGR,^pipe(jgdeskmngr)
^sep($SCREEN_RES)
ARandR,arandr
LXRandr,lxrandr
<big>󰹑</big> $SCREEN_RES - ARandR,arandr
<big>󰹑</big> $SCREEN_RES - LXRandr,lxrandr
EOF
fi
@ -151,14 +167,11 @@ out+=("^sep($MANAGE)")
desktops=$(wmctrl -d |wc -l)
out+=("  $ADD,wmctrl -n $((desktops+1));$me")
out+=("  $REMOVE_LAST,wmctrl -n $((desktops-1));$me")
out+=("^sep($DESK_SERVICES)")
if command -v mcorners &> /dev/null;then
if [[ -f /tmp/mcorners.lck ]]; then
out+=("<big>󰄲</big> $MCORNERS <i>$RUNNING</i>,mcorners --stop;$me")
else
out+=("<big>󰄱</big> $MCORNERS <i>$STOPPED</i>,mcorners -tl 'colorizer -s' -l 'mb-jgtools places' -t mabox-terminal -tr 'mb-music -s' -bl 'colorizer-menus -s' -b 'mb-fetch' -br 'skippy-xd-fix' -r 'mb-jgtools right' -iof;$me")
fi
fi
if pidof conky &>/dev/null; then
out+=("<big>󰄲</big> $CONKY <i>$RUNNING</i>,conky_toggle;$me")
else
@ -169,6 +182,13 @@ out+=("<big>󰄲</big> $PICOM <i>$RUNNING</i>,compton_toggle;$me")
else
out+=("<big>󰄱</big> $PICOM <i>$STOPPED</i>,compton_toggle;$me")
fi
if command -v mcorners &> /dev/null;then
if [[ -f /tmp/mcorners.lck ]]; then
out+=("<big>󰄲</big> $MCORNERS <i>$RUNNING</i>,mcorners --stop;$me")
else
out+=("<big>󰄱</big> $MCORNERS <i>$STOPPED</i>,mcorners -tl 'colorizer -s' -l 'mb-jgtools places' -t mabox-terminal -tr 'mb-music -s' -bl 'colorizer-menus -s' -b 'mb-fetch' -br 'skippy-xd-fix' -r 'mb-jgtools right' -iof;$me")
fi
fi
if command -v cortilectl &> /dev/null;then
if pidof cortile &>/dev/null; then
out+=("<big>󰄲</big> $CORTILE <i>$RUNNING</i>,cortilectl stop;$me")
@ -176,6 +196,21 @@ if command -v cortilectl &> /dev/null;then
out+=("<big>󰄱</big> $CORTILE <i>$STOPPED</i>,cortilectl start;$me")
fi
fi
# DESKTOP MOUSE ACTIONS
lclick=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:mouse/a:context[@name="Root"]/a:mousebind[@action="Press"][@button="Left"]/a:action/@name' $HOME/.config/openbox/rc.xml)
mousewheel=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:mouse/a:context[@name="Root"]/a:mousebind[@action="Click"][@button="Up"]/a:action/a:to' $HOME/.config/openbox/rc.xml)
focus=$(xml sel -N a=http://openbox.org/3.4/rc -t -v '/a:openbox_config/a:focus/a:followMouse' $HOME/.config/openbox/rc.xml)
out+=("^sep($MOUSE_DESK_ACTIONS)")
if [[ ! -z "$lclick" ]];then
[[ "$lclick" = "none" ]] && out+=("<big>󰄱</big> $SHOW_DESK,obxml show_desk on") || out+=("<big>󰄲</big> $SHOW_DESK,obxml show_desk off")
fi
if [[ ! -z "$mousewheel" ]];then
[[ "$mousewheel" = "none" ]] && out+=("<big>󰄱</big> $SWITCH_DESK,obxml switch_desk on") || out+=("<big>󰄲</big> $SWITCH_DESK,obxml switch_desk off")
fi
[[ "$focus" = "no" ]] && out+=("<big>󰄱</big> $FOCUS,obxml focus_follow_mouse on") || out+=("<big>󰄲</big> $FOCUS,obxml focus_follow_mouse off")
out+=(". ~/.config/mabox/jgdesktops-bottom.csv")

View File

@ -1,5 +1,5 @@
#!/bin/bash
# jgwallpaperchanger - submenu to configure wallpapers
# jgwallpaperchanger - dynamic menu (or submenu) to configure/set wallpapers
#
CONFIG_DIR="$HOME/.config/mbwallpaper"
@ -76,13 +76,13 @@ help='\nBased on Mabox forum member Shwaybo <a href="https://forum.maboxlinux.or
out+=("^sep($WALLPAPERS)")
if ! pgrep mbwallpaper > /dev/null; then
#out+=("$NITROGEN,nitrogen")
out+=("$RANDWALL,mbwallpaper -o;$me")
out+=("$CHOOSE,pcmanwp")
out+=("<big>󰇎</big> $RANDWALL,mbwallpaper -o;$me")
out+=("<big>󰉔</big> $CHOOSE,pcmanwp")
out+=("$GENERATOR,^pipe(jgwallpapergenerate)")
out+=("^sep(<i>$SLIDESHOW</i>)")
out+=("$STARTS,run_wallpaperslideshow;$me")
else
out+=("$STOPS,killall mbwallpaper;$me")
out+=("$STOPS,killall mbwallpaper;pkill -f 'yad --not';$me")
fi