desktops nad diskmngr menu updates

master
Daniel Napora 2022-02-12 23:20:57 +01:00
parent 71a2a04ab4
commit 58487da5cb
2 changed files with 26 additions and 3 deletions

View File

@ -2,6 +2,18 @@
# jgdeskmngr - pipemenu for deskmngr
#
SESSIONDIR="$HOME/.config/deskmngr/"
CONFIG_FILE="$SESSIONDIR/deskmngr.conf"
mkdir -p $SESSIONDIR
# If config file not exist create one with defaults
if [ ! -f $CONFIG_FILE ]; then
cat <<EOF > ${CONFIG_FILE}
waitsec=1
EOF
fi
source <(grep = $CONFIG_FILE)
waittime=${waitsec:-1}
case $LANG in
pl*)
REMOVE="Usuń to menu z panelu"
@ -15,6 +27,8 @@ case $LANG in
OPEN_CNFDIR="Otwórz katalog z sesjami"
ADD="Dodaj nową..."
NEW="<b>Nowa</b> sesja z bieżącego pulpitu jako..."
SETTINGS="Ustawienia"
INTERVAL="Interwał"
title="DeskMngr - zapisuje i przywraca sesje"
help='\nZapisuje rozmiar i pozycję wszystkich okien z bieżącego pulpitu.\n\nSesję możesz otworzyć poźniej na dowolnym pulpicie.\n\n'
LEFTPANEL="Lewy panel"
@ -31,6 +45,8 @@ case $LANG in
OPEN_CNFDIR="Open config directory"
ADD="Add new..."
NEW="<b>New</b> session from current desktop as..."
SETTINGS="Settings"
INTERVAL="Interval"
title="DeskMngr - save and restore sessions"
help='\nSave all opened windows from active desktop as session.\n\nRestore saved session later on desktop of your choice.\n\n'
LEFTPANEL="Left panel"
@ -47,6 +63,8 @@ case $LANG in
OPEN_CNFDIR="Open config directory"
ADD="Add new..."
NEW="<b>New</b> session from current desktop as..."
SETTINGS="Settings"
INTERVAL="Interval"
title="DeskMngr - save and restore sessions"
help='\nSave all opened windows from active desktop as session.\nRestore saved session later on desktop of your choice.\n\n'
LEFTPANEL="Left panel"
@ -60,6 +78,8 @@ mkdir -p $SESSIONDIR
out+=("^sep($DESKMNGR)")
out+=("$ABOUT,\"\"\"notify-send.sh -u critical -i mbcc '$title' '$help';$me\"\"\"")
out+=("^sep(<i><small>$SAVED_SESS</small></i>)")
i="0"
while IFS= read -r line
@ -82,8 +102,11 @@ done < <(deskmngr -l)
out+=("^sep()" " $OPEN_CNFDIR,pcmanfm ~/.config/deskmngr/")
out+=("^sep(<i><small>$ADD</small></i>)")
out+=("  $NEW,deskmngr -s")
out+=("^sep($SETTINGS)")
out+=("$INTERVAL: <b>[ $waittime ]</b> ,^checkout(time)")
out2+=("^tag(time)")
out2+=("^sep($INTERVAL)")
for i in 1 2 3 4 5; do out2+=("$(printf "<tt>%3s</tt>,%s" "$i" "mb-setvar waitsec=${i} $CONFIG_FILE;$me")");done
### RUN
if [ $1 == "-s" ]; then
. /usr/share/mb-jgtools/pipemenu-standalone.cfg

View File

@ -91,7 +91,7 @@ desktops=$(wmctrl -d |wc -l)
out+=("  $ADD,wmctrl -n $((desktops+1))")
out+=("  $REMOVE_LAST,wmctrl -n $((desktops-1))")
out+=("^sep()")
out+=("$DESKMNGR,jgdeskmngr -s")
out+=("$DESKMNGR,^pipe(jgdeskmngr)")
### RUN