Advertising

Welcome to SparkyLinux forums
Zapraszamy również na polsko-języczne Forum https://forum.linuxiarze.pl

[ Solved ] How to use fbpanel in JWM - Joes Window Manager.

Started by way12go, December 16, 2014, 08:04:45 AM

Previous topic - Next topic

way12go

How to use fbpanel in JWM - Joes Window Manager.

RAM usage is around 96 MB.

fbpanel config

[spoiler]########################################
## fbpanel configuration file         ##
########################################


# DESCRIPTION
# Configuration file consists of mandatory 'Global' block that MUST come first,
# and optionally one or more 'Plugin' block.
# Lines having '#' as first non-blank char or blank lines are ignored
# Keywords are not case-sensitive
# Values are case-sensitive
# Value of variable is a text from first non-blank char after '='
# till the last non-blank char. '#' is NOT treated as coment in this context

# 'Global' block describes global parameters like position, size and
# some NETWM settings

# Global {

#     # screen edge
#     # legal values are: left, right, top, bottom
#     edge = bottom

#     # allignment of a panel
#     # legal values are: left, right, center
#     allign = left

#     # length of margin (in pixels)
#     # legal values are numbers
#     margin = 0

#     # widthtype specifies how panel width is calculated
#     # legal values are: request, pixel, percent
#     #   request - follow widgets' size requests. can shrink or grow dynamically
#     #   pixel   - occupy fixed number of pixels, then 'width' variable holds a number
#     #   percent - be 'width' precent of an edge.
#     widthType = percent

#     # numerical value of width (not applicable for 'request' widthtype)
#     # legal values are numbers
#     width = 80

#     # heighttype specifies how panel height is calculated
#     # legal values are: pixel
#     #   pixel   - ocupy fixed number of pixels, then 'height' variable holds a number
#     heightType = pixel

#     # numerical value of height (if applicable)
#     # legal values are numbers
#     height = 28


#     # Identify panel window type as dock
#     # legal values are boolean
#     setDockType = true

#     # Reserve panel's space so that it will not be covered by maximazied windows
#     # legal values are boolean
#     # setPartialStrut = true


#     # Transparency stuff:
#     # tintColor is a color to composite on root background given as #RRGGBB or as name
#     # alpha is transparency of the tint color.
#     # transparent = true
#     # tintColor = #FFFFFF
#         or
#     # tintColor = white
#     # alpha = 127

#     # Autohide
#     # autoHide = false
#     # heightWhenHidden = 2

# }



# 'Plugin' block specifies a plugin to load. It has same syntax for both
# builtin and external plugins.

# First parameter is 'type'. It's mandatory and must come first
# Legal values are plugin names. Names of builtin plugins are:
# separator   - visual separator
# wincmd      - 'show desktop' button
# taskbar     - lists all opened windows (tasks)
# launchbar   - bar with launch button
# image       - just shows an image
# dclock      - digital clock
# space       - just seize space
# pager       - thumbnailed view of the desktop
# tray        - tray for XEMBED icons (aka docklets)

# expand - specifies if plugin can accomodate extra space or not [optional]
# padding - extra padding around plugin  [optional]
# config {} - block of plugin's private configuration.
#             This part is plugin  dependant


#
# Plugin {
#     type = wincmd
#     config {
#         image = ~/.fbpanel/images/Desktop2.png
#         tooltip = Left click to iconify all windows. Middle click to shade them.
#     }
# }


Global {
    edge = top
    allign = left
    margin = 0
    widthtype = percent
    width = 86
    height = 24
    transparent = false
    tintcolor = #ffffff
    alpha = 28
    setdocktype = true
    setpartialstrut = true
    autohide = false
    heightWhenHidden = 2
    roundcorners = true
    roundcornersradius = 7
    layer = none
    MaxElemHeight = 32
}



Plugin {
    type = space
    config {
        size = 2
    }
}


Plugin {
    type = menu
    config {
        IconSize = 22
        #icon = start-here
        # Use a nice Debian logo for the menu list ;-)
        image = /usr/share/icons/sparkylinux.png
        systemmenu {
        }
        separator {
        }
   menu { 
       name = Computer
       icon = computer
           
       item {
      name = Terminal
      icon = terminal
      action = x-terminal
       }
            item {
                name = Lock Display
                icon = gnome-lockscreen
                action = slock
            }
            separator {
            }
            item {
                name = Reboot
                icon = gnome-session-reboot
                action = gksu reboot
            }
            item {
                name = Shutdown
                icon = gnome-session-halt
                action = gksu poweroff
            }
            item {
                name = logout
                icon = gnome-session-logout
                action = /usr/lib/fbpanel/fbpanel/xlogout
            }
        }
    }
}



Plugin {
    type = space
    config {
        size = 15
    }
}


Plugin {
    type = launchbar
    config {
        button {
icon = file-manager
tooltip = File Manager
action = pcmanfm
}
button {
icon = terminal
tooltip = Terminal
action = lxterminal
}
        button {
            icon = iceweasel
            tooltip = Web Browser
            action = iceweasel
       }
        button {
            icon = chromium
            tooltip = Web Browser
            action = chromium
       }
   button {
            image = /usr/share/pixmaps/superbird_logo.png
            tooltip = Web Browser
            action = /usr/share/superbird/superbird
       }
        button {
            icon = google-chrome
            tooltip = Web Browser
            action = google-chrome-stable
       }
    }
}

Plugin {
    type = space
    config {
        size = 15
    }
}


Plugin {
    type = wincmd
    config {
        icon = gnome-fs-desktop
        tooltip = Left click to iconify all windows. Middle click to shade them.
    }
}


Plugin {
    type = space
    config {
        size = 15
    }
}



Plugin {
    type = taskbar
    expand = true
    config {
        ShowIconified = true
        ShowMapped    = true
        ShowAllDesks  = false
        tooltips = true
        IconsOnly = false
        MaxTaskWidth = 150
    }
}


Plugin {
    type = space
   config {
      size = 15
   }
}

Plugin {
    type = pager
    config {
        showwallpaper = true
    }
}

Plugin {
    type = space
    config {
        size = 10
    }
}

Plugin {
    type = mem
    expand = false
    padding = 2
    config {
        ShowSwap = false
    }
}

Plugin {
    type = cpu
    config {
        Color = green
    }
}

Plugin {
    type = net
    expand = false
    padding = 0
    config {
        #interface = ppp0
        interface = eth0
        # set connection limits to make traffic graph more accurate
        TxLimit = 20
        RxLimit = 190
        TxColor = violet
        RxColor = blue
    }
}


Plugin {
    type = space
    config {
        size = 10
    }
}

#plugin {
#    type = volume
#}

#plugin {
#    type = battery
#}
Plugin {
type=genmon
config {
Command = echo $(acpi -b | cut -d, -f2)
PollingTime = 2
TextSize = large
TextColor = black
}
}

Plugin {
    type = tray
}

Plugin {
    type = space
    config {
        size = 10
    }
}

# Digital Clock
Plugin {
    type = dclock
    config {
        ShowSeconds = true
        HoursView = 12
        TooltipFmt = %A %x
        #Action = xmessage Please define some command &
    }
}

# Text Clock
# ClockFmt: (string) Clock format string.  May contain strftime conversion
#           specifications and Pango markup information.
# TooltipFmt: (string) Tooltip format string.
# Action: (string) Shell command to execute when clock is clicked.
# ShowCalendar: (boolean) Show a GTK calendar widget when the clock is
#               clicked.  Only valid if Action is unset.
# ShowTooltip: (boolean) Show tooltip for clock.
#Plugin {
#    type = tclock
#    config {
#        ClockFmt = <b>%I:%M</b>
#        # 2 line view, time in bold above and date below
#        # ClockFmt = <span font="Sans 8"><b>%-l:%M</b> %P&#xA;%a %B %-e</span>
#        TooltipFmt = %A %x
#        #Action = xmessage Please define some command &
#        ShowCalendar = false
#        ShowTooltip = true
#    }
#}

# 'icons' plugin lets you customize window icons.
# these changes apply to entire desktop
Plugin {
    type = icons
    config {
        DefaultIcon = /usr/share/fbpanel/images/default.xpm
        application {
            icon = gnome-terminal
            ClassName = XTerm
        }
        application {
            icon = gnome-terminal
            ClassName = mlterm
        }
        application {
            icon = gnome-terminal
            ClassName = URxvt
        }
        application {
            icon = gnome-emacs
            ClassName = Emacs
        }
        application {
            icon = mozilla-firefox
            ClassName = Firefox-bin
        }
        application {
            icon = mozilla-firefox
            ClassName = Firefox
        }
    }
}[/spoiler]

JWM config

[spoiler]<?xml version="1.0"?>

<JWM>

<!-- The root menu, if this is undefined you will not get a menu. -->
<!-- Additional RootMenu attributes: onroot, labeled, label -->
<RootMenu height="15" onroot="12">
<Program icon="files.png" label="Applications">pcmanfm menu://applications/</Program>
<Program icon="files.png" label="Files">pcmanfm</Program>
<Program icon="iceweasel.png" label="Web browser">iceweasel</Program>
<Program icon="xchat.png" label="IRC Client">xchat</Program>
<Program icon="sparky.png" label="Terminal emulator">x-terminal-emulator</Program>
<Include>/etc/jwm/debian-menu</Include>
<Menu icon="sparky.png" label="Config">
<Program icon="sparky.png" label="AlsaMixer">lxterminal -e alsamixer</Program>
<Program icon="sparky.png" label="APTus">remsu sparky-aptus</Program>
<Program icon="sparky.png" label="Conky">remsu sparky-conky</Program>
<Program icon="sparky.png" label="Screeshot">sparky-screenshot</Program>
<Program icon="sparky.png" label="Synaptic">remsu synaptic</Program>
<Program icon="sparky.png" label="Wallpaper">nitrogen</Program>
</Menu>
<Separator/>
<Program label="Task Manager" confirm="false">/usr/bin/lxtask</Program>
<Separator/>
<Program label="Iceweasel" confirm="false">iceweasel</Program>
<Program label="Chromium" confirm="false">chromium</Program>
<Program label="TOR Browser" confirm="false">/usr/bin/start-tor-browser</Program>
<Separator/>
<Program label="Google Chrome" confirm="false">/usr/bin/google-chrome</Program>
<Separator/>
<Restart label="Restart" icon="restart.png"/>
<Program icon="halt.png" label="Logout">sparky-jwm-exit</Program>
<!-- #DEBIAN
<Program icon="firefox.png" label="Www Browser">gnome-www-browser</Program>
<Menu icon="folder.png" label="Applications">
<Program icon="editor.png" label="Dia">dia</Program>
<Program icon="www.png" label="Firefox">firefox</Program>
<Program icon="gimp.png" label="Gimp">gimp</Program>
<Program icon="mail.png" label="Mutt">
xterm -e mutt
</Program>
<Program icon="word-processor.png" label="Open Office">
ooffice
</Program>
<Program icon="chat.png" label="Pidgin">pidgin</Program>
<Program icon="music.png" label="Rhythmbox">rhythmbox</Program>
<Program icon="development.png" label="Xilinx ISE">
/usr/local/xilinx/bin/ise
</Program>
<Program icon="video.png" label="Xine">gxine</Program>
</Menu>
<Menu icon="folder.png" label="Utilities">
<Program icon="calculator.png" label="Calculator">xcalc</Program>
<Program icon="font.png" label="Fonts">xfontsel</Program>
<Program icon="viewer.png" label="Magnify">xmag</Program>
<Program icon="programs.png" label="Synaptic">
gksudo synaptic
</Program>
<Program icon="window.png" label="Window Properties">
xprop | xmessage -file -
</Program>
</Menu>
-->
</RootMenu>

<Group>
<Class>Pidgin</Class>
<Option>sticky</Option>
</Group>

<Group>
<Name>gkrellm</Name>
<Option>nolist</Option>
<Option>sticky</Option>
</Group>

<Group>
<Name>xterm</Name>
<Option>vmax</Option>
<Option>icon:terminal.png</Option>
</Group>

<!-- Additional tray attributes: autohide, width, border, layer, layout -->
<ray x="0" y="-1" height="32" autohide="false">

<!-- Additional TrayButton attribute: label -->
<TrayButton label="Menu">root:1</TrayButton>

<TrayButton label="__">showdesktop</TrayButton>

<TrayButton popup="pcmanfm" icon="/usr/share/icons/gnome/32x32/apps/xfce-filemanager.png" >exec:pcmanfm</TrayButton>
<TrayButton popup="LXTerminal" icon="/usr/share/icons/gnome/32x32/apps/xfce-terminal.png">exec:/usr/bin/lxterminal</TrayButton>
<TrayButton popup="Iceweasel" icon="/usr/share/iceweasel/browser/chrome/icons/default/default32.png">exec:/usr/bin/iceweasel</TrayButton>
<TrayButton popup="Google Chrome" icon="/usr/share/icons/hicolor/32x32/apps/google-chrome.png">exec:/usr/bin/google-chrome</TrayButton>



<!-- Additional Pager attribute: labeled -->
<Pager labeled="true"/>

<TaskList maxwidth="256"/>

<Dock/>

<!-- Additional Swallow attribute: height -->
<!-- <Swallow name="xload" width="64">
xload -nolabel -bg black -fg red -hl white
</Swallow> -->

<Clock format="%A %B %d/%m/%Y %l:%M:%S %P">xterm -hold -e</Clock>

</ray>

<!-- Visual Styles -->

<Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
<Width>4</Width>
<Height>20</Height>

<Active>
<Text>white</Text>
<!-- #DEBIAN
<Title>#70849d:#2e3a67</Title>
-->
<Title>gray30:gray60</Title>
<Outline>black</Outline>
<Opacity>1.0</Opacity>
</Active>

<Inactive>
<Text>#aaaaaa</Text>
<Title>#ecf0f1:#808488</Title>
<Outline>black</Outline>
<Opacity>0.5:0.9:0.1</Opacity>
</Inactive>

<WindowStyle>

<Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
<Width>4</Width>
<Height>20</Height>

<Active>
<Text>white</Text>
<!-- #DEBIAN
<Title>#70849d:#2e3a67</Title>
-->
<Title>gray60:gray90</Title>
<Outline>black</Outline>
<Opacity>1.0</Opacity>
</Active>

<Inactive>
<Text>#aaaaaa</Text>
<Title>gray30:gray60</Title>
<Outline>black</Outline>
<Opacity>0.5:0.9:0.1</Opacity>
</Inactive>

</WindowStyle>

<TaskListStyle>
<Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
<ActiveForeground>black</ActiveForeground>
<ActiveBackground>gray80:gray90</ActiveBackground>
<Foreground>black</Foreground>
<Background>gray90:gray80</Background>
</TaskListStyle>

<!-- Additional TrayStyle attribute: insert -->
<TrayStyle>
<Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
<Background>gray90</Background>
<Foreground>black</Foreground>
<Opacity>0.75</Opacity>
</TrayStyle>

<PagerStyle>
<Outline>black</Outline>
<Foreground>gray90</Foreground>
<Background>#808488</Background>
<ActiveForeground>#70849d</ActiveForeground>
<ActiveBackground>#2e3a67</ActiveBackground>
</PagerStyle>

<MenuStyle>
<Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
<Foreground>black</Foreground>
<Background>gray90</Background>
<ActiveForeground>white</ActiveForeground>
<ActiveBackground>#70849d:#2e3a67</ActiveBackground>
<Opacity>0.85</Opacity>
</MenuStyle>

<PopupStyle>
<Font>-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*</Font>
<Outline>black</Outline>
<Foreground>black</Foreground>
<Background>yellow</Background>
</PopupStyle>

<IconPath>
/usr/share/icons/NoirCrystal
</IconPath>

<!-- Virtual Desktops -->
<!-- Desktop tags can be contained within Desktops for desktop names. -->
<Desktops width="1" height="2">
<!-- Default background. Note that a Background tag can be
contained within a Desktop tag to give a specific background
for that desktop.
-->
<Background type="image">/home/pavroo/Obrazy/Tapety/sparky35/1840995.jpg</Background>
</Desktops>

<!-- Double click speed (in milliseconds) -->
<DoubleClickSpeed>400</DoubleClickSpeed>

<!-- Double click delta (in pixels) -->
<DoubleClickDelta>2</DoubleClickDelta>

<!-- The focus model (sloppy or click) -->
<FocusModel>click</FocusModel>

<!-- The snap mode (none, screen, or border) -->
<SnapMode distance="10">border</SnapMode>

<!-- The move mode (outline or opaque) -->
<MoveMode>opaque</MoveMode>

<!-- The resize mode (outline or opaque) -->
<ResizeMode>opaque</ResizeMode>

<StartupCommand>nm-applet</StartupCommand>
<StartupCommand>volumeicon</StartupCommand>
<StartupCommand>nitrogen --restore</StartupCommand>
<StartupCommand>xfce4-power-manager</StartupCommand>
<StartupCommand>/usr/bin/lxpolkit</StartupCommand>
<StartupCommand>xscreensaver -nosplash</StartupCommand>
<StartupCommand>conky</StartupCommand>
<StartupCommand>fbpanel</StartupCommand>

<!-- Key bindings -->
<Key key="Up">up</Key>
<Key key="Down">down</Key>
<Key key="Right">right</Key>
<Key key="Left">left</Key>
<Key key="h">left</Key>
<Key key="j">down</Key>
<Key key="k">up</Key>
<Key key="l">right</Key>
<Key key="Return">select</Key>
<Key key="Escape">escape</Key>

<Key mask="A" key="Tab">next</Key>
<Key mask="A" key="F4">close</Key>
<Key mask="A" key="#">desktop#</Key>
<Key mask="A" key="F1">root:1</Key>
<Key mask="A" key="F2">window</Key>
<Key mask="A" key="F10">maximize</Key>
<Key mask="A" key="Right">rdesktop</Key>
<Key mask="A" key="Left">ldesktop</Key>
<Key mask="A" key="Up">udesktop</Key>
<Key mask="A" key="Down">ddesktop</Key>

</JWM>
[/spoiler]

Edited post: Updated: fbpanel battery text display code added.
Success gives birth to success? Failure gives birth to failure? - Sagar Gorijala.

way12go

On my Desktop the above files work flawlessly and I did the same to my Laptop and enabled the Battery setting in fbpanel and I get the error " No Battery Found "

and then I found this patch but, couldn't understand what to do with it...

https://bugzilla.redhat.com/show_bug.cgi?id=982593

https://bbs.archlinux.org/viewtopic.php?pid=1018790
Success gives birth to success? Failure gives birth to failure? - Sagar Gorijala.

way12go

#plugin {
#    type = battery
#}

Plugin {
type=genmon
config {
Command = echo $(acpi -b | cut -d, -f2)
PollingTime = 2
TextSize = small
TextColor = red
}
}


Problem solved

https://paragasu.wordpress.com/2009/04/16/display-battery-information-on-fbpanel/
Success gives birth to success? Failure gives birth to failure? - Sagar Gorijala.

View the most recent posts on the forum