Openbox/Fbpanel, How to set it all up.

How to do things, solutions, recipes, tutorials
Message
Author
User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#41 Post by DaveS »

Heck no, I love that icon :)
I also switch controls to left as it feels more natural to me........

Image
Spup Frugal HD and USB
Root forever!

stu90

#42 Post by stu90 »

based on mrd's update - i have added some more plugins for testing.

added:
Rounded corners option.
New plugins tab.
Free space plugin.
Wifi hotspot name plugin.
System uptime plugin.
System temperature plugin.

(back up your old pfbpanel script)
Unpack script make executable and move to /usr/sbin
Attachments
pfbpanel.gz
pfbpanel 0.3
(5.84 KiB) Downloaded 944 times

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#43 Post by DaveS »

stu90 wrote:based on mrd's update - i have added some more plugins for testing.

added:
Rounded corners option.
New plugins tab.
Free space plugin.
Wifi hotspot name plugin.
System uptime plugin.
System temperature plugin.

(back up your old pfbpanel script)
Unpack script make executable and move to /usr/sbin
When unpacked, script has to be set as 'executable' as this option is not set. Odd..................

OK, sorry RTFM :)
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#44 Post by DaveS »

Temp gauge is really nice ........
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#45 Post by DaveS »

stu90 wrote:based on mrd's update - i have added some more plugins for testing.

added:
Rounded corners option.
New plugins tab.
Free space plugin.
Wifi hotspot name plugin.
System uptime plugin.
System temperature plugin.

(back up your old pfbpanel script)
Unpack script make executable and move to /usr/sbin
Stu, the temp shows twice, presumably because I have a dual-core processor. Is it possible to force only a single instance?
Attachments
temps.png
(16.55 KiB) Downloaded 2961 times
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#46 Post by DaveS »

Stu, I dont know why, but pfbpanel also exists in /sbin
Spup Frugal HD and USB
Root forever!

stu90

#47 Post by stu90 »

Hi DaveS,

I had a look in /sbin i don't have any pfbpanel in there on lucid 260?

Could you check to make sure system uptime is not active in the pfbpanel gui - also what happens when you put this command in the terminal, do you get a double readout?

cat /proc/acpi/thermal_zone/*/temperature

cheers.

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#48 Post by DaveS »

stu90 wrote:Hi DaveS,

I had a look in /sbin i don't have any pfbpanel in there on lucid 260?

Could you check to make sure system uptime is not active in the pfbpanel gui - also what happens when you put this command in the terminal, do you get a double readout?

cat /proc/acpi/thermal_zone/*/temperature

cheers.
System uptime not active. Terminal command also gives double read-out, however, this gives single readout:

Code: Select all

cat /proc/acpi/thermal_zone/TZ00/temperature


Hacked that into script at line 1488 and it shows single display. Dont know if this would be true for all computers though.

Guess with regard to pfbpanel being in /sbin/ as well as /usr/sbin, must be something I did in relation to installing the previous upgrade from mrd.
Attachments
hack.png
(7.57 KiB) Downloaded 2923 times
Spup Frugal HD and USB
Root forever!

stu90

#49 Post by stu90 »

Hi DaveS,

I guess you must have something like TZ00 and TZ01 directories in thermal_zone and the * is picking up both temperature files

Could you try this command in terminal - do you get just the one temperature number?

cat /proc/acpi/thermal_zone/*/temperature | awk 'NR>1{print $2}'

cheers.

stu90

#50 Post by stu90 »

Hi again DaveS,
Forget about my post above, it works in the terminal but for some reason not in the script.
Instead try:
awk 'NR==1 {print $2}' /proc/acpi/thermal_zone/*/temperature

Code: Select all

Command = "echo \$(awk 'NR==1 {print \$2}' /proc/acpi/thermal_zone/*/temperature )ºC" >> $DEFAULT

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#51 Post by DaveS »

stu90 wrote:Hi again DaveS,
Forget about my post above, it works in the terminal but for some reason not in the script.
Instead try:
awk 'NR==1 {print $2}' /proc/acpi/thermal_zone/*/temperature

Code: Select all

Command = "echo \$(awk 'NR==1 {print \$2}' /proc/acpi/thermal_zone/*/temperature )ºC" >> $DEFAULT
Working fine now
Spup Frugal HD and USB
Root forever!

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#52 Post by DaveS »

stu90 wrote:Hi again DaveS,
Forget about my post above, it works in the terminal but for some reason not in the script.
Instead try:
awk 'NR==1 {print $2}' /proc/acpi/thermal_zone/*/temperature

Code: Select all

Command = "echo \$(awk 'NR==1 {print \$2}' /proc/acpi/thermal_zone/*/temperature )ºC" >> $DEFAULT
Transparency is not working correctly. I get transparency, but with about a 10% tint darker than the background.
I had to change line 1000 to tintcolor #ffffff to get it to work. This is the same as the original.
Spup Frugal HD and USB
Root forever!

stu90

#53 Post by stu90 »

Hi DaveS,
Transparency works correctly i just changed the shading to black so it matches the shading of the terminal setup up with urxvtset. 8)

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#54 Post by DaveS »

stu90 wrote:Hi DaveS,
Transparency works correctly i just changed the shading to black so it matches the shading of the terminal setup up with urxvtset. 8)
OK, cool. Set alpa to 1 for max transparency :)
Spup Frugal HD and USB
Root forever!

stu90

#55 Post by stu90 »

Swap fbpanel menu for openbox menu

This is a quick guide for swamping the fbpanel menu for openbox right click menu - tested in Lucid puppy.

Step 1.
First download then install the xdotool-2.20110530.1-3.pet at the bottom of this post.

Step 2.
Now we need to edit the openbox rc.xml file to make a new key binding.
Navigate to /root/.config/openbox/rc.xml and open the file as text ( right mouse click open as text)

This is the code we need to add at around line 157:

Code: Select all

<keybind key="A-C-q">
  <action name="ShowMenu">
    <menu>root-menu</menu>
  </action>
</keybind>
After you have added this code it should now look like this:
Image

Step 3.
Now we need to add a new Launcher for the Fbpanel in the Fbpanel configuration GUI.
Menu > Desktop > Desktop Settings > Fbpanel configuration

First.
Go to the Plugins tab - in the Show Menu option set it to False

Second.
Still in the Fbpanel configuration GUI - In the Launchbar tab we need to set the Use Launch bar for programs option to True
Then in the Enter Executable then Tool tip entry box we need to exter the comand:

Code: Select all

xdotool key ctrl+alt+q:menu
Lastly we need to set an icon for the new Fbpanel Launcher in the Select Icon entry. ( note icons have to be located in /usr/share/fbpanel/images )
I suggest entering the standard Fbpanel menu icon for this guide.
/usr/share/fbpanel/images/start-button.png
Your Launchbar tab in Fbpanel configuration GUI should now look like this:
Image

While still in the Fbpanel configuration GUI go back to the Main tab an click Ok to save your new Fbpanel settings.

If all has gone well your Fbpanel should restart and when you click on the menu icon instead of opening the Fbpanel menu it should open your openbox right click menu.
Note. As we added a new key binding above you can also now open the openbox menu by pressing the keys Ctril+Alt+q

magerlab
Posts: 739
Joined: Sun 08 Jul 2007, 20:08

#56 Post by magerlab »

very usefull and nice additions to fbpanel:)
the only thing i need is to change white font to black. can this be done anyhow?

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#57 Post by DaveS »

magerlab wrote:very usefull and nice additions to fbpanel:)
the only thing i need is to change white font to black. can this be done anyhow?
It is tricky. You can change the colour of the clock font using pupclockset. To change the other font colours, you have to edit /usr/sbin/pfbpanel. Lets take a look at Uptime. In /usr/sbin/pfbpanel you will find this section of code around line 1420:

Code: Select all

 if [ "`cat $CONFIG | grep UTYES | cut -f 2 -d '='`" = true ]; then
 echo Plugin \{ >> $DEFAULT
  echo    type = space >> $DEFAULT
  echo    config \{ >> $DEFAULT
  echo           size = 6 >> $DEFAULT
  echo              \} >> $DEFAULT
  echo              \} >> $DEFAULT
 
 col="#ffffff"

  echo Plugin \{ >> $DEFAULT
  echo  type = genmon >> $DEFAULT
  echo  config \{ >> $DEFAULT
  echo      Command = "echo \$(uptime |grep "," | tr ',' ' ' | awk '{print \$3 }')"  >> $DEFAULT
  echo      PollingTime = 8 >> $DEFAULT
  echo      TextSize = large >> $DEFAULT
  echo      TextColor = $col >> $DEFAULT
  echo  \} >> $DEFAULT
  echo  \} >> $DEFAULT
  fi
The bit you are interested in is in the middle, col="#ffffff"

Change this colour code to whatever you want, save and exit, refresh fbpanel and you should have what you want.

You can do the same for the other plug-ins wherever a colour is expressed. If no colour key is shown, it means that particular plug-in does not accept the colour parameter.
Sorry it is so awkward.
Spup Frugal HD and USB
Root forever!

stu90

Set wallpaper with openbox pipemenu.

#58 Post by stu90 »

Here is a mini guide and the scripts needed to add a pipe menu to openbox that will display all .jpg and .png images in a directory as a menu entry and then apply which ever is selected as a desktop wallpaper.

Image

First download the two scripts at the bottom of this post - then right click > rename and delete the fake .gz extension for both scripts.
Now right click on each script > properties and tick the three boxes under the Exec column - this makes the scripts executable.
If you open this script as text near the top you will see

setwalle script:
This is the script that sets the background wallpaper - move this to /usr/bin

wallp.sh script:
This is the script that generates the openbox pipe menu - move this to /etc/xdg/openbox/scripts
(if you don't have a scripts directory there create one then put wallp.sh inside it.)
If you open this script as text near the top is:
WALLDIR="/usr/share/backgrounds"
This is the directory the script looks in for wallpapers - if your wallpapers are stored in a different directory delete the path between to two quote marks and enter the path to you own wallpaper directory.
WALLDIR="/path/to/my/wallpapers"

This next part can be quite tricky as we now need to add to the main openbox menu the new wallpaper pipe menu.

Code: Select all

 <menu execute="/etc/xdg/openbox/scripts/wallp.sh" id="wallp-menu" label="Wallpapers"/>
/etc/xdg/openbox/menu_top.xml
/etc/xdg/openbox/menu_bottom.xml
/etc/xdg/openbox/menu.xml


These are the three files you could add the new pipe menu to - i have added mine to /etc/xdg/openbox/menu_top.xml
Navigate to this file and open as text - then paste the code above on the line above this one:
<menu id="root-menu" label="Puppy Linux">
Now save the file and open a terminal window and enter the command fixmenus

If all has gone well you should now have a new menu that lists all your wallpapers and when you click on one it should be applied as you desktop wallpaper.
Attachments
setwalle.gz
delete fake .gz and move to /usr/bin
(1.03 KiB) Downloaded 602 times
wallp.sh.gz
delete fake .gz and move to /etc/xdg/openbox/scripts
(549 Bytes) Downloaded 590 times

User avatar
d(O o O)b
Posts: 10
Joined: Wed 11 Apr 2012, 05:39
Location: Usually in the middle of some ocean

#59 Post by d(O o O)b »

The entire thread is absolutely brilliant
So glad I relocated from Redmond :D
Ran away from Redmond 2012 ----- Never going back :wink:
Acer 5332 -- Lucid 528.004 frugal -- usb bluetooth audio

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

#60 Post by DaveS »

d(O o O)b wrote:The entire thread is absolutely brilliant
So glad I relocated from Redmond :D
Cool....
Spup Frugal HD and USB
Root forever!

Post Reply