master
Daniel Napora 2024-08-22 12:01:02 +02:00
parent ebb6a98c45
commit 15aa60623d
3 changed files with 55 additions and 21 deletions

View File

@ -5,42 +5,45 @@ case $LANG in
pl*)
REMOVE="Usuń to menu z panelu"
title="SuperClick - ustaw swoje okna na siatce"
help='\n\nUżyj <b>Super + Keypad_Keys</b> aby umieszczać okna na siatce\n<b>Super + LewyKlikMyszy</b> w odpowiednim miejscu okna - aby przemieścić je w wybranym kierunku.\n\nJeśli potrzebujesz większej kontroli nad pozycją i rozmiarem okien na siatce - użyj <b>Ctrl+Shift+LewyKlikMyszy</b> na wybranym oknie a następnie zaznacz prostokąt na ekranie - aby umieścić okno w danej pozycji.\n\nKonfigurowalne usatwienia:\n- odstęp\n- odstęp zewnętrzny'
help='\n<b>Super + LewyKlikMyszy</b> w odpowiednim miejscu okna - aby przemieścić je w wybranym kierunku.\n\n<i>Działa też z klawiatury...</i>\nUżyj <b>Super + Keypad_Keys</b> aby umieszczać okna na siatce\n\n\nnKonfigurowalne usatwienia:\n- odstęp\n- odstęp zewnętrzny'
ABOUT="O SuperClick"
SHOW_IMGHELPER="Pokaż siatkę na pulpicie"
TRAINER="Ćwicz z trenerem"
QUICK_TILE="Trener SuperClick"
CONFIGURATION="Konfiguracja"
LGAP="Odstęp"
OUTER_GAP="Zewnętrzny odstęp"
NOTIFY="Powiadomienia"
CFG_MENU="Menu konfiguracji"
EDITCONF="Edytuj plik konfiguracyjny"
LEFTPANEL="Lewy panel"
;;
es*)
REMOVE="Eliminar este menú del panel"
title="SuperClick - arrange your windows quickly"
help='\n\nUse <b>Super+Keypad_Keys</b> to move windows on the grid\n<b>Super+LeftMouseClick</b> on appropriate area of the window to snap it in a given direction.\n\n If you need even more control of windows size and position on the grid - use <b>Ctrl+Shift+LeftMouseClick</b> on window and then draw rectangle on the screen to select new window size and position.\n\nConfigurable settings:\n- gap\n- show_outer_gap'
help='\n\n<b>Super + LeftMouseClick</b> on appropriate area of the window to snap it in a given direction.\n\n<i>Works also with keyboard...</i>\nUse <b>Super + Keypad_Keys</b> to move windows on the grid\n\nConfigurable settings:\n- gap\n- show_outer_gap'
ABOUT="About SuperClick"
SHOW_IMGHELPER="Show image helper"
TRAINER="Practice with trainer"
QUICK_TILE="SuperClick trainer"
CONFIGURATION="Configuration"
LGAP="Gap between windows"
OUTER_GAP="Show outer gap"
NOTIFY="Notifications"
CFG_MENU="Config Menu"
EDITCONF="Edit config file"
LEFTPANEL="Left panel"
;;
*)
REMOVE="Remove this menu from panel"
title="SuperClick - arrange your windows quickly"
help='\n\nUse <b>Super+Keypad_Keys</b> to move windows on the grid\n<b>Super+LeftMouseClick</b> on appropriate area of the window to snap it in a given direction.\n\n If you need even more control of windows size and position on the grid - use <b>Ctrl+Shift+LeftMouseClick</b> on window and then draw rectangle on the screen to select new window size and position.\n\nConfigurable settings:\n- gap\n- show_outer_gap'
help='\n\n<b>Super + LeftMouseClick</b> on appropriate area of the window to snap it in a given direction.\n\n<i>Works also with keyboard...</i>\nUse <b>Super + Keypad_Keys</b> to move windows on the grid\n\nConfigurable settings:\n- gap\n- show_outer_gap'
ABOUT="About SuperClick"
SHOW_IMGHELPER="Show DesktopGrid image"
TRAINER="Practice with trainer"
QUICK_TILE="SuperClick trainer"
CONFIGURATION="Configuration"
LGAP="Gap between windows"
OUTER_GAP="Show outer gap"
NOTIFY="Notifications"
CFG_MENU="Config Menu"
EDITCONF="Edit config file"
LEFTPANEL="Left panel"
;;
@ -52,30 +55,26 @@ if [ ! -f $CONFIG_FILE ]; then
cat <<EOF > ${CONFIG_FILE}
# Gap between windows in pixels (reasonable values: 0 8 16 24)
gap=16
#Notifications true or false
notifications=true
# Outer gap (disable if you use WM margins)
show_outer_gap=true
# Only for clicksnap action
# Only for mouse action
activate_window=false
EOF
fi
source <(grep = $CONFIG_FILE)
GAP=${gap:-16}
COL=${columns:-12}
ROWS=${rows:-12}
me="jgdeskgrid -s"
out+=("^sep(SuperClick)")
out+=("<big>󱇙</big> $ABOUT,notify-send.sh -u critical -i mbcc '$title' '$help' -o '$SHOW_IMGHELPER:drawgrid' -o '$EDITCONF:xdg-open $CONFIG_FILE'")
#out+=("^sep(SuperClick)")
out+=("<big>󱇙</big> $ABOUT,notify-send.sh -u critical -i mbcc '$title' '$help' -o '$TRAINER:superclick trainer' -o '$CFG_MENU:jgdeskgrid -s' -o '$EDITCONF:xdg-open $CONFIG_FILE'")
out+=("<big>󰋁</big> $QUICK_TILE,superclick trainer")
out+=("<big>󰕰</big> $SHOW_IMGHELPER,drawgrid")
#out+=("<big>󰕰</big> $SHOW_IMGHELPER,drawgrid")
out+=("^sep($CONFIGURATION)")
out+=("$LGAP [ <b>$GAP</b> ],^checkout(gap)")
[[ "$show_outer_gap" == "true" ]] && out+=("<big></big> $OUTER_GAP,mb-setvar show_outer_gap=false $CONFIG_FILE;$me") || out+=("<big></big> $OUTER_GAP,mb-setvar show_outer_gap=true $CONFIG_FILE;$me")
[[ "$notifications" == "true" ]] && out+=("<big></big> $NOTIFY,mb-setvar notifications=false $CONFIG_FILE;$me") || out+=("<big></big> $NOTIFY,mb-setvar notifications=true $CONFIG_FILE;$me")
#[[ "$notifications" == "true" ]] && out+=("<big></big> $NOTIFY,mb-setvar notifications=false $CONFIG_FILE;$me") || out+=("<big></big> $NOTIFY,mb-setvar notifications=true $CONFIG_FILE;$me")
out+=("^sep()")
out+=("<big></big> $EDITCONF,xdg-open $CONFIG_FILE")
@ -108,9 +107,44 @@ menu_margin_x=${submenu_spacing:-0}
[ $(pidof picom) ] && MENU_RADIUS=$jgtools_radius
[ -z $jgmenu_use_borders ] && menu_border=0
JGWIDTH=$((jgtools_padding + 270 + jgtools_padding))
MENU_PADDING_TOP=$((jgtools_padding + 152))
read WALLPATH<<< $(grep file "$HOME"/.config/nitrogen/bg-saved.cfg | tail -1 | cut -d'=' -f2)
THUMBDIR="$HOME/.cache/colorizer/thumbs"
mkdir -p ${THUMBDIR}
NAME=${WALLPATH////_}
if [[ "${NAME}" =~ ^_home_.* ]]; then
n=${#HOME}
((n++))
NAME=${NAME:${n}}
fi
THUMB="${THUMBDIR}/${NAME}.png"
if [[ ! -f "$THUMB" ]]
then
convert ${WALLPATH} -resize 270x150^ -gravity center -extent 270x150 ${THUMB}
fi
mkconfigfile
cat <<EOF > ${MENU_ITEMS}
@icon,,$((jgtools_padding)),$((jgtools_padding)),270,150,4,left,top,,,${THUMB}
@rect,,$((jgtools_padding + 2)),$((jgtools_padding + 2)),86,46,0,left,top,#FFFFFF 20,#222222 30,
@rect,,$((jgtools_padding + 92)),$((jgtools_padding + 2)),86,46,0,left,top,#FFFFFF 20,#222222 30,
@rect,,$((jgtools_padding + 182)),$((jgtools_padding + 2)),86,46,0,left,top,#FFFFFF 60,#FFFFFF 40,
@text,,$((jgtools_padding + 222)),$((jgtools_padding + 2)),86,46,0,left,top,#FFFFFF 100,#FFFFFF 30,<span size='20800' font_family='Ubuntu'><big></big></span>
@rect,,$((jgtools_padding + 2)),$((jgtools_padding + 52)),86,46,0,left,top,#FFFFFF 20,#222222 30,
#@rect,,$((jgtools_padding + 92)),$((jgtools_padding + 52)),86,46,0,left,top,#FFFFFF 20,#222222 30,
@rect,,$((jgtools_padding + 182)),$((jgtools_padding + 52)),86,46,0,left,top,#FFFFFF 20,#222222 30,
@rect,,$((jgtools_padding + 2)),$((jgtools_padding + 102)),86,46,0,left,top,#FFFFFF 20,#222222 30,
@rect,,$((jgtools_padding + 92)),$((jgtools_padding + 102)),86,46,0,left,top,#FFFFFF 20,#222222 30,
@rect,,$((jgtools_padding + 182)),$((jgtools_padding + 102)),86,46,0,left,top,#FFFFFF 20,#222222 30,
@rect,,$((jgtools_padding + 135)),$((jgtools_padding + 122)),135,22,0,left,top,#222222 20,#222222 70,
@text,,$((jgtools_padding + 168)),$((jgtools_padding + 118)),130,30,0,left,top,#EEEEEE,${WINCLR},<span size='10400' font_family='Ubuntu'><b>SuperClick</b></span>
$(printf '%s\n' "${out[@]}")
$(printf '%s\n' "${out2[@]}")
EOF

View File

@ -2,7 +2,7 @@
case $LANG in
pl*)
declare -a Internet=(chromium opera palemoon thunderbird filezilla deluge telegram-desktop rustdesk-bin)
declare -a Internet=(chromium palemoon thunderbird filezilla deluge telegram-desktop rustdesk-bin)
declare -a Multimedia=(kodi vlc obs-studio audacious smplayer simplescreenrecorder)
declare -a Grafika=(gimp inkscape blender scribus)
declare -a Gry=(0ad warzone2100 wesnoth steam lutris )
@ -19,7 +19,7 @@ case $LANG in
REMOVE="Usuń to menu z panelu"
;;
es*)
declare -a Internet=(chromium opera palemoon thunderbird filezilla deluge telegram-desktop rustdesk-bin)
declare -a Internet=(chromium palemoon thunderbird filezilla deluge telegram-desktop rustdesk-bin)
declare -a Multimedia=(kodi vlc obs-studio audacious smplayer simplescreenrecorder)
declare -a Graficos=(gimp inkscape blender scribus)
declare -a Juegos=(0ad warzone2100 wesnoth steam lutris)
@ -36,7 +36,7 @@ case $LANG in
REMOVE="Eliminar este menú del panel"
;;
*)
declare -a Internet=(chromium opera palemoon thunderbird filezilla deluge telegram-desktop rustdesk-bin)
declare -a Internet=(chromium palemoon thunderbird filezilla deluge telegram-desktop rustdesk-bin)
declare -a Multimedia=(kodi vlc obs-studio audacious smplayer simplescreenrecorder)
declare -a Graphics=(gimp inkscape blender scribus)
declare -a Games=(0ad warzone2100 wesnoth steam lutris)

View File

@ -38,9 +38,9 @@ out+=("Vivaldi,vivaldi,vivaldi")
else out2+=("$INST Vivaldi,pamac-installer vivaldi,package-manager-icon")
fi
if hash opera &>/dev/null; then
out+=("Opera,opera,opera")
else out2+=("$INST Opera,pamac-installer opera,package-manager-icon")
if hash palemoon &>/dev/null; then
out+=("Palemoon,palemoon,palemoon")
else out2+=("$INST Palemoon,pamac-installer palemoon,package-manager-icon")
fi
if hash brave &>/dev/null; then
out+=("Brave,Brave,brave")