You are not logged in.
Pages: 1
The dialog says you can select multiple Conkys to edit. However, no matter how many are selected, only one opens up for editing in Geany. Then when you close Geany, it opens back up with two, repent, then three, etc.
Last edited by johnraff (2023-09-29 05:03:17)
Offline
It works OK for me, both on Beryllium and Boron. The chosen conkys are opened in separate geany tabs.
Some geany setting you've changed?
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Offline
OK now I'm seeing the same issue.
If geany is already open then all the selected conkys will be opened in new tabs, but if a new instance has to be started then they only get added one at a time, as you describe. I usually have geany open with multiple files which is why I didn't notice this before I guess. I hope it's a simple fix...
---
But the "Close" button on the imgur uploads window works fine for me.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
It looks like a simple fix.
The editor script was passing each conky file in a separate call to bl-text-editor, which worked fine if geany was already open.
Try this tweak to open all the selected files in a single call:
pkexec bl-text-editor /usr/bin/bl-conky-edit
Go to the bottom of the file and edit the last section beginning with 'if' from this
if [[ $? == 1 ]]; then # cancel button pressed
exit 0
else
while read -r path
do
[[ -r $path ]] || continue
bl-text-editor "$path"
done <<< "$choice"
fi
to this:
if [[ $? == 1 ]]; then # cancel button pressed
exit 0
else
paths=()
while read -r path
do
[[ -r $path ]] || continue
paths+=("$path")
done <<< "$choice"
bl-text-editor "${paths[@]}"
fi
Does that fix it for you?
If so I'll put it in the next upgrade of bunsen-utilities (for the tint2 editor too).
And thanks for catching it!
Last edited by johnraff (2023-07-20 06:51:51)
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Thanks @johnraff, that works here.
Offline
This isn't really a bug, but I wanted to mention it as there might be a fix and it could be confusing to new users.
In User Settings -- Tint2 -- Edit Tint2s -- Tint2 Editor it's possible to click on a Tint2 and then OK _without_ clicking the "Select" checkbox. The color highlight sort of makes it look as though one particular Tint2 is selected.
Instead of an error message such as "No Tint2 selected", a new instance of Geany is opened (with nothing to edit). The same behaviour happens with the Conky Editor.
Offline
^Yes that looks like something worth fixing. (btw you can double-click the highlighted entry to check the box.)
I'll have a look at the code to see if there's a simple tweak.
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^OK it looks easy: add the yad option '--no-selection' which prevents a row from being selected just by clicking on it. Only the checkbox will work. Easier than adding a new "No Tint2 selected" dialog box.
If you want to test it, paste this code into a file, make it executable and run it from a terminal:
#!/bin/bash
#
# bl-tintedit: a BunsenLabs tint2 config file editor
# Copyright (C) 2015 damo <damo@bunsenlabs.org>
# 2021 John Crawley <john@bunsenlabs.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
########################################################################
#
# Tint2 files must be in $TINT2PATH
#
# Checkmarked tint2s will be opened in the text editor
# Multiple tint2s can be chosen
#
########################################################################
TINT2PATH="$HOME/.config/tint2"
HELP="bl-tint2edit is a script to edit selected tint2 config files
which are displayed in a yad window with checkboxes.
Usage: bl-tint2edit
or: bl-tint2edit -h|--help
Optional arguments:
-h | --help Show this message (no other options are supported at this time)
Tint2 files must be in $TINT2PATH
Checkmarked tint2s will be opened in the text editor.
Multiple tint2s can be chosen.
"
### DIALOG VARIABLES
DLGDEC="yad --center --borders=20 --width=400 --height=500 "
TITLE="BunsenLabs Tint2 Edit"
WINICON="--window-icon=distributor-logo-bunsenlabs"
OK="--button=OK:0"
CANCEL="--button=gtk-cancel:1"
########## FUNCTIONS ###################################################
findTints(){
LISTTINT=() # global
local file name
shopt -s globstar
for file in "$TINT2PATH"/**;do
[[ -f $file ]] || continue
[[ $file = *~ ]] && continue # ignore backups
grep -q "panel_monitor" "$file" || continue # not a tint2rc file
name=${file#$TINT2PATH/}
LISTTINT+=(FALSE "$(pangoEscape "$name")" "$file")
done
shopt -u globstar
}
######## END FUNCTIONS #################################################
# look for a help option somewhere
for i in "$@"
do
case "$i" in
-h|--help)
echo "$HELP"
exit 0
;;
esac
done
BL_COMMON_LIBDIR='/usr/lib/bunsen/common'
if ! . "$BL_COMMON_LIBDIR/bl-includes" 2> /dev/null; then
echo $"Error: Failed to locate bl-includes in $BL_COMMON_LIBDIR" >&2
exit 1
fi
# pangoEscape() for yad text display of filenames
# is provided in bl-includes
# get tint2s in $TINT2PATH, recursively, add to array LISTTINT
findTints
## Populate yad dialog from array, get choice(s)
choice=$( $DLGDEC $WINICON --list --title="$TITLE" \
--text="Select Tint2s to edit from the list\nMultiple Tint2s can be chosen\n" \
--checklist --separator='' --no-selection \
--column="Select:CHK" --column="Tint2 Name:TEXT" --column="path:HD" "${LISTTINT[@]}" \
--print-column=3 $OK $CANCEL )
if [[ $? == 1 ]]; then # cancel button pressed
exit 0
else
paths=()
while read -r path
do
[[ -r $path ]] || continue
paths+=("$path")
done <<< "$choice"
bl-text-editor "${paths[@]}"
fi
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
^ Yep, that works fine for me!
Offline
^Thanks! It'll go in an update of bunsen-utilities eventually...
...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )
Offline
Pages: 1