Hi
I am starting to educate myself about openbox menus
[Specifically I am trying to find out why conky editor doesnt open anything when I tick my conky, but this is also a general question about how to see what is ‘inside’ pipemenus)
I know I can go further down the menu to edit running Conkys, but would like to know how these pipemenus work.
(Actually, I would prefer ‘edit running conkys’ at a top level in this menu)
I am reading about pipemenus and found this AL post
leigh@archlabs ~ % pacman -Q archlabs-pipemenus
archlabs-pipemenus 2.6.41-1
In my menu.xml I have
<menu execute="al-compton-pipemenu" id="ComptonPipeMenu" label="Compton"/>
<menu execute="al-conky-pipemenu" id="ConkyPipeMenu" label="Conky"/>
<menu execute="al-tint2-pipemenu" id="Tint2PipeMenu" label="Tint2"/>
And the Conky menu opens fine
But how do I see what action the Conky editor should carry out?
I am guessing it is to open the selected Conky file in an editor?
But which editor?
It could be that I dont have that editor installed?
I use Xed
Of course, I could be on completely the wrong track
Any indications most gratefully received
EDIT:
Found these:
https://bbs.archlinux.org/viewtopic.php?id=263210
And
% echo "$EDITOR"
Didnt return anything so I put this in my .xprofile
#Set default editor to xed
export EDITOR="xed"
And now get
leigh@archlabs ~ % echo "$EDITOR"
xed
but the conky editor still dont do nothing
EDIT 2:
In terminal:
leigh@archlabs ~ % al-conky-pipemenu
error: failed to locate saved-sessions in /home/leigh/.config/conky
<openbox_pipe_menu>
<item label="Conky Chooser">
<action name="Execute">
<command>al-conkyzen</command>
</action>
</item>
<item label="Reload Conkys">
<action name="Execute">
<command>al-conky-session</command>
</action>
</item>
<menu id="EditConky" label="Edit Conkys">
<item label="Conky Editor">
<action name="Execute">
<command>al-conkyedit</command>
</action>
</item>
<item label="Default conkyrc">
<action name="Execute">
<command>exo-open /home/leigh/.config/conky/ArchLabs.conkyrc</command>
</action>
</item>
<menu id="RunningConky" label="Running Conkys">
<item label="conky/ArchLabs.conkyrc">
<action name="Execute">
<command>exo-open /home/leigh/.config/conky/ArchLabs.conkyrc</command>
</action>
</item>
</menu>
</menu>
<separator/>
<item label="Pin moveable Conkys">
<action name="Execute">
<command>al-conkypin</command>
</action>
</item>
<separator/>
<item label="New Conky Session">
<action name="Execute">
<command>al-conkyzen -z</command>
</action>
</item>
<menu id="Sessions" label="Saved Sessions">
<item label="Default">
<action name="Execute">
<command>al-conky-session /home/leigh/.config/conky/conky-sessionfile</command>
</action>
</item>
</menu>
<separator/>
<item label="Conky Help">
<action name="Execute">
<command>zenity --text-info --title='ArchLabs Conky Help' --filename=/usr/share/archlabs/docs/helpfile-conkyzen.txt --width=650 --height=700</command>
</action>
</item>
</openbox_pipe_menu>
leigh@archlabs ~ % al-conkyedit
(zenity:96987): GLib-GObject-CRITICAL **: 11:14:23.052: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
but the al-conkyedit box in my screenshot above does open - but it doesnt do anything on ticking my conky and then OK
EDIT 3:
‘where’ are al-conky-pipemenu & al-conkyedit?
I tried searching using PCManFM but with no luck
I found them in /usr/bin (it helps if you dont have the only search for images option selected in PCManFM search - DOH!)
al-conkyedit is the below, and echo $EDITOR gives xed, so anyone have any idea why it doesnt open anything?
I dont know that bash language thingy and dont know how to check if $file is correct (e.g. has full path)
I doubt its an error in the script though
xed /home/leigh/.config/conky/ArchLabs.conkyrc
works though
#!/usr/bin/env bash
# conky editor: will find conky files in ~/.config/conky, and allow opening them
# Original concept by damo <damo@bunsenlabs.org> for BunsenLabs Linux, April 2015
# Re Written by Nathaniel Maia For ArchLabs, December 2017
readonly TITLE="ArchLabs Conky Edit"
readonly TEXT="<big>Select Conkys to edit from the list</big>"
readonly ICON="--window-icon=/usr/share/icons/ArchLabs-Light/64x64/places/distributor-logo-archlabs.png"
readonly CHECKLIST="zenity --width=400 --height=500 $ICON --list --checklist --multiple"
if [[ -d $HOME/.config/conky ]]; then
for file in $(find -L "$HOME/.config/conky" -maxdepth 4 -type f); do
name="${file##*/}"
[[ $name = *conkyrc || $name = *conky ]] && LIST+="FALSE $name "
done
else
MSG="<big>No conky configs found</big>\n\nConfigs must be located in:\n$HOME/.config/conky"
zenity --info --width=300 --height=150 $ICON --text="$MSG" &>/dev/null ; exit 0
fi
ANSWER="$($CHECKLIST --title="$TITLE" --text="$TEXT" --separator=" " --column="Select" --column="Conky Name" $LIST)"
if [ $? -ne 0 ]; then
exit 0
else
for name in $ANSWER; do
for file in $FILES; do
if [[ "${file##*/}" = "$name" ]]; then
if hash exo-open &>/dev/null; then
(exo-open "$file" &)
elif hash termite &>/dev/null; then
(termite -e "$EDITOR $file" &>/dev/null)
elif hash st &>/dev/null; then
(st -e $EDITOR $file &)
elif hash urxvt &>/dev/null; then
(urxvt -e "$EDITOR $file" &)
fi
break
fi
done
done
fi
exit 0