upd
parent
2ed8cf1e76
commit
43aca40857
|
@ -18,6 +18,17 @@ case $LANG in
|
||||||
;;
|
;;
|
||||||
es*)
|
es*)
|
||||||
REMOVE="Eliminar este menú del panel"
|
REMOVE="Eliminar este menú del panel"
|
||||||
|
title="DesktopGrid - arrange your windows on the grid"
|
||||||
|
help='\n\nUse <b>Ctrl+Shift+Keypad_Keys</b> to move windows on the grid\n<b>Ctrl+Shift+LeftMouseClick</b> on appropriate area of the window to snap it in a given direction.\nSee: <a href="https://youtu.be/UzgUYYXnRww">video on YT</a>\n\n If you need even more control of windows size and position on the grid - use <b>super + LeftMouseClick</b> on window and then draw rectangle on the screen to select new window size and position.\nSee: <a href="https://youtu.be/Ba_lV-M0I2o">deskgrid preview on YT</a>\n\nConfigurable settings:\n- columns\n- rows\n- gap\n- show_outer_gap'
|
||||||
|
ABOUT="About DesktopGrid"
|
||||||
|
SHOW_IMGHELPER="Show image helper"
|
||||||
|
CONFIGURATION="Configuration"
|
||||||
|
LCOLUMNS="Columns"
|
||||||
|
LROWS="Rows"
|
||||||
|
LGAP="Gap between windows"
|
||||||
|
OUTER_GAP="Show outer gap"
|
||||||
|
NOTIFY="Notifications"
|
||||||
|
EDITCONF="Edit config file"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
REMOVE="Remove this menu from panel"
|
REMOVE="Remove this menu from panel"
|
||||||
|
@ -35,11 +46,10 @@ case $LANG in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
. ~/.config/mabox/mabox.conf
|
|
||||||
|
|
||||||
CONFIG_DIR="$HOME/.config/deskgrid"
|
CONFIG_DIR="$HOME/.config/deskgrid"
|
||||||
CONFIG_FILE="$CONFIG_DIR/deskgrid.cfg"
|
CONFIG_FILE="$CONFIG_DIR/deskgrid.cfg"
|
||||||
mkdir -p $CONFIG_DIR
|
#mkdir -p $CONFIG_DIR
|
||||||
if [ ! -f $CONFIG_FILE ]; then
|
if [ ! -f $CONFIG_FILE ]; then
|
||||||
cat <<EOF > ${CONFIG_FILE}
|
cat <<EOF > ${CONFIG_FILE}
|
||||||
# Gap between windows in pixels (reasonable values: 0 8 16 24)
|
# Gap between windows in pixels (reasonable values: 0 8 16 24)
|
||||||
|
@ -59,20 +69,18 @@ activate_window=false
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
source <(grep = $CONFIG_FILE)
|
source <(grep = $CONFIG_FILE)
|
||||||
|
|
||||||
GAP=${gap:-16}
|
GAP=${gap:-16}
|
||||||
COLUMNS=${columns:-12}
|
COL=${columns:-12}
|
||||||
ROWS=${rows:-6}
|
ROWS=${rows:-6}
|
||||||
TITLEBAR_HEIGHT=${titlebar_height:-18}
|
TITLEBAR_HEIGHT=${titlebar_height:-18}
|
||||||
|
|
||||||
me="mb-jgtools $jgtools_last"
|
me="jgdeskgrid -s"
|
||||||
|
|
||||||
|
|
||||||
out+=("^sep(DesktopGrid)")
|
out+=("^sep(DesktopGrid)")
|
||||||
out+=("$ABOUT,notify-send.sh -u critical -i mbcc '$title' '$help' -o '$EDITCONF:geany ~/.config/deskgrid/deskgrid.cfg'")
|
out+=("$ABOUT,notify-send.sh -u critical -i mbcc '$title' '$help' -o '$EDITCONF:geany ~/.config/deskgrid/deskgrid.cfg'")
|
||||||
out+=("$SHOW_IMGHELPER,drawgrid")
|
out+=("$SHOW_IMGHELPER,drawgrid")
|
||||||
out+=("^sep($CONFIGURATION)")
|
out+=("^sep($CONFIGURATION)")
|
||||||
out+=("$LCOLUMNS [ <b>$COLUMNS</b> ],^checkout(columns)")
|
out+=("$LCOLUMNS [ <b>$COL</b> ],^checkout(columns)")
|
||||||
out+=("$LROWS [ <b>$ROWS</b> ],^checkout(rows)")
|
out+=("$LROWS [ <b>$ROWS</b> ],^checkout(rows)")
|
||||||
out+=("$LGAP [ <b>$GAP</b> ],^checkout(gap)")
|
out+=("$LGAP [ <b>$GAP</b> ],^checkout(gap)")
|
||||||
out+=("$OUTER_GAP [ <b>$show_outer_gap</b> ],^checkout(outer)")
|
out+=("$OUTER_GAP [ <b>$show_outer_gap</b> ],^checkout(outer)")
|
||||||
|
@ -93,18 +101,17 @@ out2+=("^tag(notify)")
|
||||||
out2+=("$(printf "<tt>%3s</tt>,%s" "true" "mb-setvar notifications=true $CONFIG_FILE;$me")")
|
out2+=("$(printf "<tt>%3s</tt>,%s" "true" "mb-setvar notifications=true $CONFIG_FILE;$me")")
|
||||||
out2+=("$(printf "<tt>%3s</tt>,%s" "false" "mb-setvar notifications=false $CONFIG_FILE;$me")")
|
out2+=("$(printf "<tt>%3s</tt>,%s" "false" "mb-setvar notifications=false $CONFIG_FILE;$me")")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### RUN
|
### RUN
|
||||||
if [[ "$1" == "-s" ]]; then
|
if [[ "$1" == "-s" ]]; then
|
||||||
. /usr/bin/pipemenu-standalone.cfg
|
. /usr/bin/pipemenu-standalone.cfg
|
||||||
|
. $HOME/.config/mabox/mabox.conf
|
||||||
|
|
||||||
|
MENU_PADDING_TOP=${jgtools_padding:-0}
|
||||||
MENU_PADDING_TOP=0
|
MENU_HALIGN="left"
|
||||||
MENU_HALIGN="center"
|
|
||||||
MENU_VALIGN="center"
|
MENU_VALIGN="center"
|
||||||
jgmenu_icon_size=0
|
jgmenu_icon_size=0
|
||||||
|
JGWIDTH=40
|
||||||
|
menu_margin_x=${submenu_spacing:-0}
|
||||||
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
||||||
[ -z $jgmenu_use_borders ] && menu_border=0
|
[ -z $jgmenu_use_borders ] && menu_border=0
|
||||||
|
|
||||||
|
@ -118,7 +125,6 @@ EOF
|
||||||
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
jgmenu --config-file=${CONFIG_FILE} --csv-file=${MENU_ITEMS} 2>/dev/null
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${out[@]}"
|
printf '%s\n' "${out[@]}"
|
||||||
|
|
||||||
|
|
|
@ -55,7 +55,9 @@ fi
|
||||||
### RUN
|
### RUN
|
||||||
if [ $1 == "-s" ]; then
|
if [ $1 == "-s" ]; then
|
||||||
. /usr/bin/pipemenu-standalone.cfg
|
. /usr/bin/pipemenu-standalone.cfg
|
||||||
|
. $HOME/.config/mabox/mabox.conf
|
||||||
|
|
||||||
|
MENU_PADDING_TOP=${jgtools_padding:-0}
|
||||||
MENU_PADDING_TOP=24
|
MENU_PADDING_TOP=24
|
||||||
MENU_HALIGN="center"
|
MENU_HALIGN="center"
|
||||||
MENU_VALIGN="top"
|
MENU_VALIGN="top"
|
||||||
|
@ -63,6 +65,9 @@ MENU_MARGIN_Y=40
|
||||||
jgmenu_icon_size=0
|
jgmenu_icon_size=0
|
||||||
JGWIDTH=500
|
JGWIDTH=500
|
||||||
#MENU_HEIGHT_MAX=600
|
#MENU_HEIGHT_MAX=600
|
||||||
|
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
|
||||||
|
[ -z $jgmenu_use_borders ] && menu_border=0
|
||||||
|
|
||||||
mkconfigfile
|
mkconfigfile
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue