├── .config ├── argparse.py ├── help ├── options.py ├── repl.py ├── rules.mk └── tar.py ├── .gitignore ├── CHANGELOG ├── CHANGELOG.md ├── COPYING ├── CREDITS ├── INSTALL.md ├── Makefile ├── NOTES ├── README.md ├── configure ├── data ├── .gitignore ├── Makefile ├── config │ ├── .gitignore │ ├── Makefile │ ├── default.in │ └── pager.in ├── images │ ├── .gitignore │ ├── Makefile │ ├── battery_0.png │ ├── battery_1.png │ ├── battery_2.png │ ├── battery_3.png │ ├── battery_4.png │ ├── battery_5.png │ ├── battery_6.png │ ├── battery_7.png │ ├── battery_8.png │ ├── battery_charging_0.png │ ├── battery_charging_1.png │ ├── battery_charging_2.png │ ├── battery_charging_3.png │ ├── battery_charging_4.png │ ├── battery_charging_5.png │ ├── battery_charging_6.png │ ├── battery_charging_7.png │ ├── battery_charging_8.png │ ├── battery_na.png │ ├── dclock_glyphs.png │ ├── default.xpm │ ├── gnome-session-halt.png │ ├── gnome-session-reboot.png │ └── logo.png ├── man │ ├── .gitignore │ ├── Makefile │ └── fbpanel.1.in └── shot.png ├── dbg.h ├── exec ├── .gitignore ├── Makefile ├── make_profile.in └── xlogout ├── fbpanel-2009.ebuild ├── fbpanel.ebuild ├── panel ├── .gitignore ├── Makefile ├── bg.c ├── bg.h ├── ev.c ├── ev.h ├── gconf.c ├── gconf.h ├── gconf_panel.c ├── gconf_plugins.c ├── gtkbar.c ├── gtkbar.h ├── gtkbgbox.c ├── gtkbgbox.h ├── misc.c ├── misc.h ├── panel.c ├── panel.h ├── plugin.c ├── plugin.h ├── run.c ├── run.h ├── xconf.c └── xconf.h ├── plugins ├── .gitignore ├── Makefile ├── battery │ ├── .gitignore │ ├── Makefile │ ├── Makefile-test │ ├── battery.c │ ├── main.c │ ├── os_linux.c │ ├── power_supply.c │ └── power_supply.h ├── chart │ ├── .gitignore │ ├── Makefile │ ├── chart.c │ └── chart.h ├── cpu │ ├── .gitignore │ ├── Makefile │ └── cpu.c ├── dclock │ ├── .gitignore │ ├── Makefile │ └── dclock.c ├── deskno │ ├── .gitignore │ ├── Makefile │ └── deskno.c ├── deskno2 │ ├── #Makefile# │ ├── .gitignore │ ├── Makefile │ └── deskno2.c ├── genmon │ ├── .gitignore │ ├── Makefile │ └── genmon.c ├── icons │ ├── .gitignore │ ├── Makefile │ └── icons.c ├── image │ ├── .gitignore │ ├── Makefile │ └── image.c ├── launchbar │ ├── .gitignore │ ├── Makefile │ └── launchbar.c ├── mem │ ├── .gitignore │ ├── Makefile │ ├── mem.c │ └── mt.h ├── mem2 │ ├── .gitignore │ ├── Makefile │ └── mem2.c ├── menu │ ├── .gitignore │ ├── Makefile │ ├── menu.c │ ├── menu.h │ └── system_menu.c ├── meter │ ├── .gitignore │ ├── Makefile │ ├── meter.c │ └── meter.h ├── net │ ├── .gitignore │ ├── Makefile │ └── net.c ├── pager │ ├── .gitignore │ ├── Makefile │ └── pager.c ├── separator │ ├── .gitignore │ ├── Makefile │ └── separator.c ├── space │ ├── .gitignore │ ├── Makefile │ └── space.c ├── systray │ ├── .gitignore │ ├── Makefile │ ├── egg-marshal.c │ ├── eggmarshalers.c │ ├── eggmarshalers.h │ ├── eggtraymanager.c │ ├── eggtraymanager.h │ ├── fixedtip.c │ ├── fixedtip.h │ ├── libsystray.so │ └── main.c ├── taskbar │ ├── .gitignore │ ├── Makefile │ └── taskbar.c ├── tclock │ ├── .gitignore │ ├── Makefile │ └── tclock.c ├── unstable │ ├── Makefile │ └── test │ │ ├── Makefile │ │ └── test.c ├── user │ ├── .gitignore │ ├── Makefile │ └── user.c ├── volume │ ├── .gitignore │ ├── Makefile │ └── volume.c └── wincmd │ ├── .gitignore │ ├── Makefile │ └── wincmd.c ├── po ├── .gitignore ├── Makefile ├── fr_FR.UTF-8.mo ├── fr_FR.UTF-8.po ├── ru_RU.UTF-8.mo └── ru_RU.UTF-8.po ├── scripts ├── .gitignore ├── Makefile ├── create_po.sh ├── custom.sh ├── endianess.sh ├── funcs.sh ├── install.sh ├── install_locale.sh ├── install_locale.sh.in ├── mk_tar ├── rfs-pkg-config ├── update-proj.sh └── update_po.sh ├── version └── www ├── Makefile ├── Makefile.common ├── bottom1 ├── bottom2 ├── configs ├── bottom ├── default └── pager ├── docs.html ├── docs.thtml ├── favicon.ico ├── images ├── fbpanel.png ├── space.png └── top.png ├── index.html ├── index.thtml ├── my.css ├── plugins.html ├── plugins.thtml ├── plugins ├── Makefile └── mk_gallery ├── shots.html ├── shots.thtml ├── shots ├── 2.x-01 │ ├── shot.png │ └── thumb.png ├── 2.x-02 │ ├── shot.png │ └── thumb.png ├── 2.x-03 │ ├── shot.png │ └── thumb.png ├── 3.x-01 │ ├── shot.jpg │ └── thumb.jpg ├── 3.x-02 │ ├── shot.jpg │ └── thumb.jpg ├── 4.10-01 │ ├── shot.jpg │ └── thumb.jpg ├── 4.3-01 │ ├── shot.png │ └── thumb.png ├── 4.3-02 │ ├── shot.jpg │ └── thumb.jpg ├── 4.3-03 │ ├── shot.png │ └── thumb.png ├── 4.8-01 │ ├── shot.jpg │ ├── text.html │ └── thumb.jpg ├── 4.8-02 │ ├── shot.jpg │ ├── text.html │ └── thumb.jpg ├── 6.0-01 │ ├── shot.jpg │ ├── text.html │ └── thumb.jpg ├── 6.0-02 │ ├── shot.jpg │ └── thumb.jpg ├── 6.1-01 │ ├── shot.jpg │ ├── text.html │ └── thumb.jpg ├── Makefile └── mk_gallery └── top /.config/help: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import re, os, sys, textwrap 4 | # Formats help message 5 | # $1 - help type: var, target or example 6 | 7 | text = sys.stdin.read() 8 | 9 | def fmt_2cols(name): 10 | global text 11 | 12 | text = re.sub('(?mi)\s*\n\s+', ' ', text) 13 | text = [ t for t in text.split('\n') if t ] 14 | cols = [] 15 | for t in text: 16 | try: 17 | (n, m) = t.split(' - ', 1) 18 | cols.append((n.strip(), m.strip())) 19 | except: 20 | pass 21 | 22 | m = max([ len(e[0]) for e in cols ]) 23 | ind = ' ' * m 24 | text = "" 25 | for c in cols: 26 | help = textwrap.fill(c[1], initial_indent = ind, 27 | subsequent_indent = ind) 28 | text += ' {0:>{1}s} - {2}\n'.format(c[0],m, help.strip()) 29 | text.strip() 30 | 31 | if text: 32 | print "%s:\n%s" % (name, text) 33 | 34 | 35 | def fmt_pre(): 36 | tok = text.split('@@\n') 37 | tok2 = [] 38 | for t in tok: 39 | if t.strip(): 40 | tok2.append(t.strip()) 41 | 42 | for i, t in enumerate(tok2): 43 | print 'Example %d:' % (i+1) 44 | print t 45 | print 46 | 47 | if sys.argv[1] == 'variable': 48 | fmt_2cols('Variables') 49 | elif sys.argv[1] == 'target': 50 | fmt_2cols('Targets') 51 | elif sys.argv[1] == 'example': 52 | fmt_pre() 53 | else: 54 | raise Exception, 'Unknown arg: ' + sys.argv[1] 55 | -------------------------------------------------------------------------------- /.config/options.py: -------------------------------------------------------------------------------- 1 | 2 | # Initialization. Create your opts here. Runs before command line processing. 3 | def init(): 4 | # standart autoconf options 5 | opt_group_new('autoconf', 'Standart autoconf options') 6 | opt_new("prefix", group = 'autoconf', 7 | help = "install architecture-independent files", metavar='DIR', 8 | default = lambda : '/usr') 9 | opt_new("eprefix", group = 'autoconf', 10 | help = "install architecture-dependent files", metavar='DIR', 11 | default = lambda : opt('prefix')) 12 | opt_new("bindir", group = 'autoconf', 13 | help = "user executables", metavar='DIR', 14 | default = lambda : opt('eprefix') + '/bin') 15 | opt_new("sbindir", group = 'autoconf', 16 | help = "system executables", metavar='DIR', 17 | default = lambda : opt('eprefix') + '/sbin') 18 | opt_new("libexecdir", group = 'autoconf', 19 | help = "program executables", metavar='DIR', 20 | default = lambda : opt('eprefix') + '/libexec/' + opt('project_name')) 21 | opt_new("libdir", group = 'autoconf', 22 | help = "object code libraries", metavar='DIR', 23 | default = lambda : opt('eprefix') + '/lib/' + opt('project_name')) 24 | opt_new("sysconfdir", group = 'autoconf', 25 | help = "read-only single-machine data", metavar='DIR', 26 | default = lambda : opt('prefix') + '/etc') 27 | opt_new("datadir", group = 'autoconf', 28 | help = "read-only architecture-independent data", metavar='DIR', 29 | default = lambda : opt('prefix') + '/share/' + opt('project_name')) 30 | opt_new("localedir", group = 'autoconf', 31 | help = "languagetranslation files", metavar='DIR', 32 | default = lambda : opt('datadir') + '/locale') 33 | opt_new("includedir", group = 'autoconf', 34 | help = "C header files", metavar='DIR', 35 | default = lambda : opt('prefix') + '/include') 36 | opt_new("mandir", group = 'autoconf', 37 | help = "man documentation", metavar='DIR', 38 | default = lambda : opt('prefix') + '/man') 39 | opt_new("infodir", group = 'autoconf', 40 | help = "info documentation", metavar='DIR', 41 | default = lambda : opt('prefix') + '/info') 42 | opt_new("localstatedir", group = 'autoconf', 43 | help = "modifiable single-machine data in DIR", metavar='DIR', 44 | default = lambda : opt('prefix') + '/var') 45 | 46 | opt_group_new('app', 'Application options', default = True) 47 | opt_new("project_name", group = 'app', 48 | help = "Project name", metavar='NAME', 49 | default = 'fbpanel') 50 | opt_new("project_version", group = 'app', 51 | help = "Project version", metavar='VER', 52 | default = lambda : detect_project_version()) 53 | opt_new("sound", group = 'app', 54 | help = "Enable sound plugin (default: autodetect)", 55 | action = ToggleAction, default = None) 56 | 57 | # Logic and stuff that does not require human interaction. Runs after 58 | # command line processing. 59 | # Here you can do anything you want. You can create opts, delete opts, modify 60 | # their values. Just bear in mind: whatever you do here will end up in 61 | # config.h. 62 | def resolve(): 63 | # If user did not set sound on command line, it is autodetected. 64 | if opt('sound') is None and pkg_exists('alsa', '--atleast-version=1.0.10'): 65 | opt_set('sound', True) 66 | 67 | # alsa is required, only if "sound" is enabled. 68 | if opt('sound'): 69 | # if alsa is not installed, will raise exception 70 | opt_new_from_pkg('alsa', 'alsa', pversion = '--atleast-version=1.0.10') 71 | 72 | opt_new_from_pkg('gtk2', 'gtk+-2.0', pversion = '--atleast-version=2.17') 73 | opt_new_from_pkg('gmodule2', 'gmodule-2.0') 74 | opt_new_from_pkg('x11', 'x11') 75 | opt_new('cflags_extra', default='-I$(TOPDIR)/panel') 76 | 77 | def detect_project_name(): 78 | # Hardcode here the name of your project 79 | # ret = "projectname" 80 | 81 | # Alternatively, take top dir name as a project name 82 | ret = os.getcwd().split('/')[-1] 83 | 84 | return ret 85 | 86 | def detect_project_version(): 87 | ret = open('version', 'r').read().strip() 88 | 89 | return ret 90 | 91 | # Give a summary on created configuration 92 | def report(): 93 | str = "Configuration:\n" 94 | str += " Sound plugin: " 95 | if opt('sound'): 96 | str += "yes\n" 97 | else: 98 | str += "no\n" 99 | print str, 100 | 101 | -------------------------------------------------------------------------------- /.config/repl.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import re, sys 4 | 5 | repl_dict = { 6 | #repl_dict# 7 | } 8 | 9 | def repl_func(matchobj): 10 | key = matchobj.group(0)[1:-1] 11 | if key in repl_dict: 12 | return repl_dict[key] 13 | else: 14 | return matchobj.group(0) 15 | 16 | 17 | print re.sub('@\w+@', repl_func, sys.stdin.read()) 18 | 19 | -------------------------------------------------------------------------------- /.config/tar.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | 3 | import subprocess as sp 4 | import re, tempfile 5 | import shutil, os, sys 6 | 7 | ################################################## 8 | # Loging 9 | import logging 10 | def _init_log(): 11 | name = 'app' 12 | x = logging.getLogger(name) 13 | x.setLevel(logging.WARNING) 14 | # x.setLevel(logging.DEBUG) 15 | h = logging.StreamHandler() 16 | # f = logging.Formatter("%(name)s (%(funcName)s:%(lineno)d) :: %(message)s") 17 | f = logging.Formatter("%(message)s") 18 | h.setFormatter(f) 19 | x.addHandler(h) 20 | return x 21 | 22 | x = _init_log() 23 | 24 | ################################################## 25 | # Argument parsing 26 | import argparse 27 | p = argparse.ArgumentParser( 28 | description='Pack project source to tar archive.', 29 | epilog = 'Example: \n%(prog)s /tmp/proj-1.2.tar.bz2' 30 | ) 31 | 32 | p.add_argument('-v', dest = 'verbose', action = 'store_true', 33 | default = False, 34 | help = 'Print more messages [%(default)s]') 35 | p.add_argument('-d', '--debug', dest = 'debug', action = 'store_true', 36 | default = False, 37 | help = 'Print debug messages [%(default)s]') 38 | p.add_argument('tar', nargs=1, 39 | help = 'tar file to create') 40 | 41 | args = p.parse_args() 42 | if args.verbose: 43 | x.setLevel(logging.INFO) 44 | if args.debug: 45 | x.setLevel(logging.DEBUG) 46 | 47 | ################################################## 48 | # main 49 | def my_check_output(*popenargs, **kwargs): 50 | if 'stdout' in kwargs: 51 | raise ValueError('stdout argument not allowed, it will be overridden.') 52 | cmd = kwargs.get("args") 53 | if cmd is None: 54 | cmd = popenargs[0] 55 | x.debug("exec: %s", cmd) 56 | process = sp.Popen(stdout=sp.PIPE, *popenargs, **kwargs) 57 | output, unused_err = process.communicate() 58 | retcode = process.poll() 59 | if retcode: 60 | raise sp.CalledProcessError(retcode, cmd, output=output) 61 | return output 62 | 63 | def svn_is_used(): 64 | f = open('/dev/null', 'w') 65 | p = sp.Popen('svn info'.split(), stdout = f, stderr = f) 66 | p.wait() 67 | return p.returncode == 0 68 | 69 | 70 | def svn_get_file_list(): 71 | text = my_check_output('svn info -R'.split()) 72 | files = [] 73 | tre = '(?m)^Path: (?P.*)$(.|\s)*?^Node Kind: (?P.*)$' 74 | for m in re.finditer(tre, text): 75 | if m.group('type') == 'file': 76 | files.append(m.group('path')) 77 | return files 78 | 79 | def git_is_used(): 80 | f = open('/dev/null', 'w') 81 | p = sp.Popen('git status'.split(), stdout = f, stderr = f) 82 | p.wait() 83 | return p.returncode == 0 84 | 85 | 86 | def git_get_file_list(): 87 | text = my_check_output('git ls-tree --name-only -r HEAD'.split()) 88 | files = text.split('\n') 89 | return files 90 | 91 | def none_is_used(): 92 | f = open('/dev/null', 'w') 93 | p = sp.Popen('make -n distclean'.split(), stdout = f, stderr = f) 94 | p.wait() 95 | return p.returncode == 0 96 | 97 | def none_get_file_list(): 98 | f = open('/dev/null', 'w') 99 | p = sp.Popen('make distclean'.split(), stdout = f, stderr = f) 100 | p.wait() 101 | if p.returncode: 102 | return [] 103 | files = [] 104 | for (dirpath, dirnames, filenames) in os.walk('.'): 105 | if dirpath.startswith('./'): 106 | dirpath = dirpath[2:] 107 | elif dirpath == '.': 108 | dirpath = '' 109 | filenames = [ os.path.join(dirpath, f) for f in filenames ] 110 | files.extend(filenames) 111 | return files 112 | 113 | vcs = [ 114 | { 115 | 'name' : 'svn', 116 | 'is_used' : svn_is_used, 117 | 'get_file_list' : svn_get_file_list 118 | }, 119 | { 120 | 'name' : 'git', 121 | 'is_used' : git_is_used, 122 | 'get_file_list' : git_get_file_list 123 | }, 124 | 125 | # must be last entry 126 | { 127 | 'name' : 'none', 128 | 'is_used' : none_is_used, 129 | 'get_file_list' : none_get_file_list 130 | } 131 | ] 132 | 133 | # Get lists of files. If VCS is used, then lists only controlled files 134 | # otherwise lists all files 135 | def get_file_list(): 136 | files = [] 137 | for v in vcs: 138 | ret = v['is_used']() 139 | x.debug('trying %s, ret %d', v['name'], ret) 140 | if ret: 141 | x.info('VCS: %s', v['name']) 142 | files = v['get_file_list']() 143 | # remove duplicates, if any 144 | files = list(set(files)) 145 | files.remove('') 146 | files.sort() 147 | x.debug('File list: %s', files) 148 | if not files: 149 | x.error('No files. Aborting') 150 | exit(2) 151 | return files 152 | x.error('No files. Aborting') 153 | exit(2) 154 | 155 | tar = args.tar[0] 156 | path, name = os.path.split(tar) 157 | nv = re.sub('.tar.*', '', name) 158 | x.debug('tar %s, nv %s', tar, nv) 159 | # XXX: get compresion type from extension 160 | 161 | files = [ nv + '/' + f for f in get_file_list() ] 162 | files = '\n'.join(files) 163 | x.debug('%s', files) 164 | tdir = tempfile.mkdtemp() 165 | odir = os.path.abspath('.') 166 | os.chdir(tdir) 167 | os.symlink(odir, nv) 168 | open('filelist', 'w').write(files) 169 | cmd = 'tar hjcf %s --files-from filelist' % (tar,) 170 | x.debug('exec: %s', cmd) 171 | p = sp.Popen(cmd.split()) 172 | p.wait() 173 | if p.returncode: 174 | x.error('Aborting') 175 | else: 176 | x.info('Tar: %s', tar) 177 | 178 | shutil.rmtree(tdir) 179 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | config.mk 2 | config.h 3 | repl.py 4 | .config/*.pyc 5 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 2 | ## Version: 7.0 3 | Date: 2015-12-05 08:25:36 4 | 5 | * [#12] fix menu position for top panel 6 | * [#11] new plugin: user menu with gravatar icon 7 | * [#8] Fix for issue #5 (make battery plugin work with /sys) 8 | * [#6] Rounded corners don't work with widthtype=request 9 | * [#5] make battery plugin work with /sys 10 | * [#4] update README 11 | * [#2] Include option for vertical (y) and horizontal (x) margin 12 | 13 | [#12]: https://github.com/aanatoly/fbpanel/issues/12 14 | [#11]: https://github.com/aanatoly/fbpanel/issues/11 15 | [#8]: https://github.com/aanatoly/fbpanel/pull/8 16 | [#6]: https://github.com/aanatoly/fbpanel/issues/6 17 | [#5]: https://github.com/aanatoly/fbpanel/issues/5 18 | [#4]: https://github.com/aanatoly/fbpanel/issues/4 19 | [#2]: https://github.com/aanatoly/fbpanel/issues/2 20 | -------------------------------------------------------------------------------- /COPYING: -------------------------------------------------------------------------------- 1 | Copyright (C) 2002 Anatoly Asviyan (aka Arsen) 2 | Copyright (C) 2000 Peter Zelezny 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a 5 | copy of this software and associated documentation files (the "Soft- 6 | ware"), to deal in the Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, publish, distribute, 8 | sublicense, and/or sell copies of the Software, and to permit persons to 9 | whom the Software is furnished to do so, subject to the following condi- 10 | tions: 11 | 12 | The above copyright notice and this permission notice shall be included 13 | in all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 16 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- 17 | ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 18 | SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 19 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT 20 | OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /CREDITS: -------------------------------------------------------------------------------- 1 | I'd like to thank GNOME project. I learn a lot from its code 2 | and some pieces were used in fbpanel. Correct for version 3.0, 3 | systray code and wm icon code were copied from GNOME 4 | 5 | Credits to all people who contributed by writing code and solving 6 | bugs. 7 | PCMan 8 | Urgency hint implementation 9 | Raise window when drag target is over its name in taskbar 10 | Building menu from *.desktop files 11 | Joe MacDonald 12 | Jens Georg 13 | and others 14 | 15 | Credits and lot of thanks to Peter Zelezny 16 | an author of fspanel (see http://www.chatjunkies.org/fspanel/ 17 | or http://freshmeat.net/projects/fspanel/) 18 | The first version of fBpanel was started as hacking around fSpanel :-) 19 | 20 | Nice battery icons for battery meter plugin were taken 21 | from http://rocketdock.com/addon/docklets/9523 22 | -------------------------------------------------------------------------------- /INSTALL.md: -------------------------------------------------------------------------------- 1 | # Installation: 2 | 3 | ## User install 4 | Build and install it 5 | ``` 6 | ./configure --prefix=$HOME/.local 7 | make 8 | make install 9 | ``` 10 | 11 | Then add `~/.local/bin/` to your `PATH`. Add this line to `~/.bashrc` 12 | ``` 13 | export PATH=$HOME/.local/bin:$PATH 14 | ``` 15 | 16 | ## System Install 17 | Build and install it 18 | ``` 19 | ./configure 20 | make 21 | su -c "make install" 22 | ``` 23 | 24 | # Dependencies 25 | Deps: 26 | * core - gtk2 2.17 or higher 27 | * plugin `foo` - bar 1.0 28 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := . 4 | 5 | SUBDIRS := data \ 6 | exec \ 7 | panel \ 8 | plugins \ 9 | po \ 10 | scripts 11 | 12 | include $(TOPDIR)/.config/rules.mk 13 | -------------------------------------------------------------------------------- /NOTES: -------------------------------------------------------------------------------- 1 | 6.2 2 | 3 | 6.1 4 | This release features major enhancements and bug fixes, namely: 5 | * new plugin - laptop battery monitor 6 | * new plugin - volume control 7 | * multiline placement of elements in taskbar and launchbar 8 | * digital clock in vertical layouts draws hours above minutes 9 | * fixed compilation issues in busybox environments 10 | * fixed locale/NLS issues in configure 11 | * autohide was improved 12 | 13 | 6.0 14 | This release features minor enhancements and bug fixes, namely: 15 | * redesign of configuration engine to be faster and simpler 16 | * script to logout from user session 17 | * ability to show seconds in dclock plugin 18 | * bug fixes in mem, taskbar and menu plugins 19 | * usage of current icon theme was ensured and private icons were 20 | removed from package 21 | 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # fbpanel 2 | A lightweight gtk2 panel for Linux desktop. 3 | 4 | Please visit [project web site](http://aanatoly.github.io/fbpanel/) 5 | for more information. 6 | 7 | ![shot](/data/shot.png) 8 | -------------------------------------------------------------------------------- /data/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/.gitignore -------------------------------------------------------------------------------- /data/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := .. 4 | 5 | SUBDIRS := config \ 6 | images \ 7 | man 8 | 9 | include $(TOPDIR)/.config/rules.mk 10 | -------------------------------------------------------------------------------- /data/config/.gitignore: -------------------------------------------------------------------------------- 1 | default 2 | pager 3 | -------------------------------------------------------------------------------- /data/config/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | TEXT = default pager 6 | all : $(TEXT) 7 | CLEANLIST += $(TEXT) 8 | 9 | install : 10 | $Qinstall -d $(DESTDIR)$(DATADIR) 11 | $Qinstall -m 644 $(TEXT) $(DESTDIR)$(DATADIR) 12 | 13 | include $(TOPDIR)/.config/rules.mk 14 | -------------------------------------------------------------------------------- /data/config/pager.in: -------------------------------------------------------------------------------- 1 | # fbpanel config file 2 | # see http://fbpanel.sf.net/docs.html for complete configuration guide 3 | 4 | 5 | Global { 6 | edge = right 7 | allign = right 8 | margin = 50 9 | widthtype = request 10 | height = 58 11 | transparent = false 12 | tintcolor = #ffffff 13 | alpha = 59 14 | setdocktype = false 15 | setpartialstrut = false 16 | } 17 | 18 | Plugin { 19 | type = pager 20 | config { 21 | ShowWallpaper = true 22 | } 23 | } 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /data/images/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/.gitignore -------------------------------------------------------------------------------- /data/images/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | IMAGES = \ 6 | battery_0.png \ 7 | battery_1.png \ 8 | battery_2.png \ 9 | battery_3.png \ 10 | battery_4.png \ 11 | battery_5.png \ 12 | battery_6.png \ 13 | battery_7.png \ 14 | battery_8.png \ 15 | battery_charging_0.png \ 16 | battery_charging_1.png \ 17 | battery_charging_2.png \ 18 | battery_charging_3.png \ 19 | battery_charging_4.png \ 20 | battery_charging_5.png \ 21 | battery_charging_6.png \ 22 | battery_charging_7.png \ 23 | battery_charging_8.png \ 24 | battery_na.png \ 25 | dclock_glyphs.png \ 26 | default.xpm \ 27 | gnome-session-halt.png \ 28 | gnome-session-reboot.png \ 29 | logo.png 30 | 31 | 32 | install : 33 | $Qinstall -d $(DESTDIR)$(DATADIR)/images 34 | $Qinstall $(IMAGES) $(DESTDIR)$(DATADIR)/images 35 | 36 | include $(TOPDIR)/.config/rules.mk 37 | -------------------------------------------------------------------------------- /data/images/battery_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_0.png -------------------------------------------------------------------------------- /data/images/battery_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_1.png -------------------------------------------------------------------------------- /data/images/battery_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_2.png -------------------------------------------------------------------------------- /data/images/battery_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_3.png -------------------------------------------------------------------------------- /data/images/battery_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_4.png -------------------------------------------------------------------------------- /data/images/battery_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_5.png -------------------------------------------------------------------------------- /data/images/battery_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_6.png -------------------------------------------------------------------------------- /data/images/battery_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_7.png -------------------------------------------------------------------------------- /data/images/battery_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_8.png -------------------------------------------------------------------------------- /data/images/battery_charging_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_0.png -------------------------------------------------------------------------------- /data/images/battery_charging_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_1.png -------------------------------------------------------------------------------- /data/images/battery_charging_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_2.png -------------------------------------------------------------------------------- /data/images/battery_charging_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_3.png -------------------------------------------------------------------------------- /data/images/battery_charging_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_4.png -------------------------------------------------------------------------------- /data/images/battery_charging_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_5.png -------------------------------------------------------------------------------- /data/images/battery_charging_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_6.png -------------------------------------------------------------------------------- /data/images/battery_charging_7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_7.png -------------------------------------------------------------------------------- /data/images/battery_charging_8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_charging_8.png -------------------------------------------------------------------------------- /data/images/battery_na.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/battery_na.png -------------------------------------------------------------------------------- /data/images/dclock_glyphs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/dclock_glyphs.png -------------------------------------------------------------------------------- /data/images/default.xpm: -------------------------------------------------------------------------------- 1 | /* XPM */ 2 | static char * icon_xpm[] = { 3 | "16 16 16 1", 4 | " c None", 5 | ". c #323232", 6 | "+ c #535353", 7 | "@ c #4A8A8E", 8 | "# c #DEE2E2", 9 | "$ c #7E827A", 10 | "% c #8A9292", 11 | "& c #D6D6D6", 12 | "* c #36767E", 13 | "= c #9E9E9E", 14 | "- c #FAFAFA", 15 | "; c #B2B2B2", 16 | "> c #DEEEEA", 17 | ", c #464646", 18 | "' c #5EA2A2", 19 | ") c #52969A", 20 | " ", 21 | " ", 22 | " --#>>>>>>#-#-; ", 23 | " -&%')))))=&=&+ ", 24 | " >;$@*****=;%;+ ", 25 | " &$$$$$$$$$$$$, ", 26 | " &;;;;;;;;;;;;+ ", 27 | " &;;;;;;;;;;;;+ ", 28 | " #;;;;;;;;;;;;+ ", 29 | " &;;;;;;;;;;;;+ ", 30 | " #;;;;;;;;;;;;+ ", 31 | " #;;;;;;;;;;;;+ ", 32 | " &;;;;;;;;;;;;+ ", 33 | " $............. ", 34 | " ", 35 | " "}; 36 | -------------------------------------------------------------------------------- /data/images/gnome-session-halt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/gnome-session-halt.png -------------------------------------------------------------------------------- /data/images/gnome-session-reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/gnome-session-reboot.png -------------------------------------------------------------------------------- /data/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/images/logo.png -------------------------------------------------------------------------------- /data/man/.gitignore: -------------------------------------------------------------------------------- 1 | fbpanel.1 2 | -------------------------------------------------------------------------------- /data/man/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | TEXT = fbpanel.1 6 | all : $(TEXT) 7 | CLEANLIST += $(TEXT) 8 | 9 | install : 10 | $Qinstall -d $(DESTDIR)$(MANDIR) 11 | $Qinstall -m 644 $(TEXT) $(DESTDIR)$(MANDIR) 12 | 13 | include $(TOPDIR)/.config/rules.mk 14 | -------------------------------------------------------------------------------- /data/man/fbpanel.1.in: -------------------------------------------------------------------------------- 1 | .\" man page originally for the Debian/GNU Linux system 2 | .TH FBPANEL "1" "May 2005" "fbpanel %%version%%" "User Commands" 3 | .SH NAME 4 | fbpanel \- a NETWM compliant lightweight GTK2-based panel for UNIX desktop. 5 | .SH SYNOPSIS 6 | .B fbpanel 7 | [\fIOPTION\fR] 8 | .br 9 | .SH DESCRIPTION 10 | .PP 11 | fbpanel is desktop panel which provides graphical information and feedback about 12 | desktop activity and allows interaction with the window manager. 13 | It features: 14 | .HP 15 | \(bu taskbar \- shows a list of the managed windows (tasks) 16 | .HP 17 | \(bu pager \- thumbnailed view of the desktop. 18 | .HP 19 | \(bu launchbar \- buttons to quickly launch applications 20 | .HP 21 | \(bu show desktop \- button to iconify or shade all windows 22 | .HP 23 | \(bu image \- display an image 24 | .HP 25 | \(bu clock \- show the current time and/or date 26 | .HP 27 | \(bu system tray \- tray for XEMBED icons (aka docklets) 28 | .PP 29 | fbpanel requires NETWM (www.freedesktop.org) compliant window manager. 30 | You can run many instances of fbpanel each with its own configuration 31 | (see \fBOPTIONS\fR below). 32 | 33 | Most updated info about fbpanel can be found on its home page: 34 | http://fbpanel.sf.net/ 35 | 36 | .SH OPTIONS 37 | .TP 38 | \fB\--help\fR 39 | \-- print help message and exit. 40 | .TP 41 | \fB\--version\fR 42 | \-- print version and exit. 43 | .TP 44 | \fB\--log \fR 45 | \-- set log level 0-5. 0 - none 5 - chatty 46 | .TP 47 | \fB\--configure\fR 48 | \-- open configuration dialog 49 | .TP 50 | \fB\--profile \fR 51 | \-- use specified profile. The profile is loaded from the file ~/.fbpanel/. 52 | If that fails, fbpanel will load @DATADIR@/. 53 | No -p option is equivalent to -p default 54 | .TP 55 | \fB\-h\fR 56 | \-- same as --help 57 | .TP 58 | \fB\-p\fR 59 | \-- same as --profile 60 | .TP 61 | \fB\-v\fR 62 | \-- same as --version 63 | .TP 64 | \fB\-C\fR 65 | \-- same as --configure 66 | 67 | .SH CUSTOMIZATION 68 | To change default settings, copy profile file to your home directory 69 | .br 70 | mkdir -p ~/.fbpanel 71 | cp @DATADIR@/default ~/.fbpanel 72 | .br 73 | and edit it. Default profile file contains comments and explanation inside, 74 | so it should be easy. For full list of options please visit fbpanel's home page. 75 | 76 | .SH FILES 77 | .TP 78 | @DATADIR@/ 79 | Directory with system-wide resources and default settings 80 | .TP 81 | ~/.fbpanel/ 82 | Directory with the user's private profiles 83 | .TP 84 | ~/.fbpanel/default 85 | The user's default profile. 86 | .SH AUTHOR 87 | fbpanel was written by Anatoly Asviyan . 88 | This manual page was originally written for the 89 | Debian GNU/Linux system by Shyamal Prasad . 90 | -------------------------------------------------------------------------------- /data/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/data/shot.png -------------------------------------------------------------------------------- /dbg.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #define ERR(fmt, args...) fprintf(stderr, fmt, ## args) 4 | #define DBG2(fmt, args...) fprintf(stderr, "%s:%s:%-5d: " fmt, __FILE__, __FUNCTION__, __LINE__, ## args) 5 | #define DBGE2(fmt, args...) fprintf(stderr, fmt, ## args) 6 | #define ENTER2 do { fprintf(stderr, "%s:%s:%-5d: ENTER\n", __FILE__,__FUNCTION__, __LINE__); } while(0) 7 | #define RET2(args...) do { fprintf(stderr, "%s:%s:%-5d: RETURN\n", __FILE__,__FUNCTION__, __LINE__);\ 8 | return args; } while(0) 9 | 10 | enum { LOG_NONE, LOG_ERR, LOG_WARN, LOG_INFO, LOG_DEBUG, LOG_ALL }; 11 | #ifdef DEBUGPRN 12 | 13 | #define ENTER do { fprintf(stderr, "%s:%s:%-5d: ENTER\n", __FILE__,__FUNCTION__, __LINE__); } while(0) 14 | #define RET(args...) do { fprintf(stderr, "%s:%s:%-5d: RETURN\n", __FILE__, __FUNCTION__, __LINE__);\ 15 | return args; } while(0) 16 | #define DBG(fmt, args...) fprintf(stderr, "%s:%s:%-5d: " fmt, __FILE__,__FUNCTION__, __LINE__, ## args) 17 | #define DBGE(fmt, args...) fprintf(stderr, fmt, ## args) 18 | #define LOG(level, fmt, args...) fprintf(stderr, fmt, ## args) 19 | 20 | #else 21 | 22 | extern int log_level; 23 | #define ENTER do { } while(0) 24 | #define RET(args...) return args 25 | #define DBG(fmt, args...) do { } while(0) 26 | #define DBGE(fmt, args...) do { } while(0) 27 | #define LOG(level, fmt, args...) do { if (level <= log_level) fprintf(stderr, fmt, ## args); } while(0) 28 | 29 | #endif 30 | 31 | -------------------------------------------------------------------------------- /exec/.gitignore: -------------------------------------------------------------------------------- 1 | make_profile 2 | -------------------------------------------------------------------------------- /exec/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := .. 4 | 5 | TEXT = make_profile xlogout 6 | all : $(TEXT) 7 | CLEANLIST += make_profile 8 | 9 | install : 10 | $Qinstall -d $(DESTDIR)$(LIBEXECDIR) 11 | $Qinstall -m 755 $(TEXT) $(DESTDIR)$(LIBEXECDIR) 12 | 13 | include $(TOPDIR)/.config/rules.mk 14 | -------------------------------------------------------------------------------- /exec/make_profile.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | umask 0077 4 | # new profile directory 5 | npdir=~/.config/fbpanel 6 | # old profile directory 7 | opdir=~/.fbpanel 8 | # system profile directory 9 | spdir=@datadir@ 10 | # if profile name was not set, use 'default' 11 | profile=${1:-default} 12 | 13 | 14 | # if profile already exists do nothing 15 | if [ -w "$npdir/$profile" ]; then 16 | echo "Profile '$profile' already exists." 17 | echo "$npdir/$profile" 18 | exit 0 19 | fi 20 | 21 | # create profile 22 | echo "Creating profile '$profile' at $npdir/$profile" 23 | mkdir -p "$npdir" 24 | touch "$npdir/$profile" || exit 1 25 | 26 | # if personal profile with same name exists, use it 27 | w="$w###############################################\n" 28 | w="$w# This configuration file is not used anymore.\n" 29 | w="$w# Now, all profiles are stored at\n# $npdir.\n" 30 | w="$w# Edit them instead !!! \n" 31 | w="$w###############################################\n\n" 32 | 33 | if [ -r "$opdir/$profile" ]; then 34 | cp -f "$opdir/$profile" "$npdir/$profile" 35 | echo "Using old $opdir/$profile as template" 36 | echo -e "$w" > "/tmp/$$-$profile" 37 | cat "$opdir/$profile" >> "/tmp/$$-$profile" 38 | mv "/tmp/$$-$profile" "$opdir/$profile" 39 | exit 0 40 | fi 41 | 42 | # Creates new profile using system profile as template 43 | # $1 - system profile name 44 | # $2 - destination profile name 45 | function take_system_profile () 46 | { 47 | [ -r "$spdir/$1" ] || return 1 48 | 49 | local browser terminal filer 50 | for browser in x-www-browser firefox opera; do 51 | if which $browser 2> /dev/null > /dev/null; then 52 | opt="$opt -e s/x-www-browser/$browser/" 53 | break 54 | fi 55 | done 56 | for terminal in x-terminal urxvt gnome-terminal; do 57 | if which $terminal 2> /dev/null > /dev/null; then 58 | opt="$opt -e s/x-terminal/$terminal/" 59 | break 60 | fi 61 | done 62 | for filer in x-file-manager thunar pcmanfm rox; do 63 | if which $filer 2> /dev/null > /dev/null; then 64 | opt="$opt -e s/x-file-manager/$filer/" 65 | break 66 | fi 67 | done 68 | sed $opt < "$spdir/$1" > "$npdir/$2" 69 | echo "Using $spdir/$1 as template" 70 | } 71 | 72 | take_system_profile $profile $profile || take_system_profile default $profile 73 | 74 | -------------------------------------------------------------------------------- /exec/xlogout: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # xlogout - logs user out of its X session 4 | # Linux specific since uses /proc 5 | 6 | # get display name without screen number 7 | [ -z "$DISPLAY" ] && exit 1 8 | DPY=${DISPLAY:1} 9 | DPY=${DPY/.*/} 10 | echo "DPY=${DPY}" 11 | 12 | # get X pid 13 | XPID=`< /tmp/.X${DPY}-lock` 14 | XPID=`echo $XPID` 15 | echo "XPID=$XPID" 16 | 17 | # get pid of xdm (or gdm, kdm, etc). usually it's parent of X 18 | XDMPID=`ps -o ppid --pid=$XPID | awk '{if (FNR != 1) print $1}'` 19 | echo "XDMPID=$XDMPID" 20 | 21 | # recursivly find child of xdm that was started in home dir - 22 | # it's user's session start up script 23 | function pid_scan() 24 | { 25 | 26 | rm -f $PF 27 | while [ $# != 0 ]; do 28 | ps --no-headers -o pid --ppid=$1 >> $PF 29 | shift 30 | done 31 | for pid in `< $PF`; do 32 | if cwd=`ls -al /proc/$pid/cwd 2>/dev/null`; then 33 | cwd=`sed 's/.*-> //' <<< $cwd` 34 | [ "$cwd" == "$HOME" ] && echo $pid && return 35 | fi 36 | done 37 | pids=`< $PF` 38 | [ -n "$pids" ] && pid_scan `< $PF`; 39 | } 40 | 41 | PF=/tmp/$$-pids 42 | SPID=`pid_scan $XDMPID` 43 | rm -f $PF 44 | 45 | [ -z "$SPID" ] && exit 1 46 | echo "Session start up script" 47 | ps -o uid,pid,ppid,sess,cmd --pid $SPID 48 | kill -SIGTERM -$SPID $SPID 49 | 50 | -------------------------------------------------------------------------------- /fbpanel-2009.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2005 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | inherit toolchain-funcs 5 | inherit subversion 6 | 7 | ESVN_REPO_URI="https://fbpanel.svn.sourceforge.net/svnroot/fbpanel/trunk" 8 | ESVN_PROJECT="fbpanel" 9 | 10 | DESCRIPTION="light-weight X11 desktop panel" 11 | HOMEPAGE="http://fbpanel.sourceforge.net/" 12 | 13 | LICENSE="GPL" 14 | SLOT="0" 15 | KEYWORDS="~arm alpha amd64 ppc ~ppc64 x86" 16 | IUSE="" 17 | 18 | RDEPEND=">=x11-libs/gtk+-2" 19 | DEPEND="${RDEPEND} 20 | dev-util/pkgconfig" 21 | 22 | 23 | src_install() { 24 | emake DESTDIR="${D}" install || die "Install failed" 25 | dodoc CHANGELOG CREDITS README 26 | } 27 | 28 | -------------------------------------------------------------------------------- /fbpanel.ebuild: -------------------------------------------------------------------------------- 1 | # Copyright 1999-2009 Gentoo Foundation 2 | # Distributed under the terms of the GNU General Public License v2 3 | 4 | #inherit toolchain-funcs eutils 5 | inherit eutils 6 | 7 | DESCRIPTION="light-weight X11 desktop panel" 8 | HOMEPAGE="http://fbpanel.sourceforge.net/" 9 | SRC_URI="mirror://sourceforge/${PN}/${P}.tbz2" 10 | 11 | LICENSE="GPL" 12 | SLOT="0" 13 | KEYWORDS="~arm alpha amd64 ppc ~ppc64 x86" 14 | IUSE="" 15 | 16 | RDEPEND=">=x11-libs/gtk+-2" 17 | DEPEND="${RDEPEND} 18 | dev-util/pkgconfig" 19 | 20 | 21 | src_install() { 22 | emake DESTDIR="${D}" install || die "Install failed" 23 | dodoc CHANGELOG CREDITS README 24 | } 25 | 26 | -------------------------------------------------------------------------------- /panel/.gitignore: -------------------------------------------------------------------------------- 1 | bg.o 2 | bg.d 3 | ev.o 4 | ev.d 5 | gconf.o 6 | gconf.d 7 | gconf_panel.o 8 | gconf_panel.d 9 | gconf_plugins.o 10 | gconf_plugins.d 11 | gtkbar.o 12 | gtkbar.d 13 | gtkbgbox.o 14 | gtkbgbox.d 15 | misc.o 16 | misc.d 17 | panel.o 18 | panel.d 19 | plugin.o 20 | plugin.d 21 | run.o 22 | run.d 23 | xconf.o 24 | xconf.d 25 | fbpanel 26 | -------------------------------------------------------------------------------- /panel/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := .. 4 | 5 | fbpanel_src = bg.c \ 6 | ev.c \ 7 | gconf.c \ 8 | gconf_panel.c \ 9 | gconf_plugins.c \ 10 | gtkbar.c \ 11 | gtkbgbox.c \ 12 | misc.c \ 13 | panel.c \ 14 | plugin.c \ 15 | run.c \ 16 | xconf.c 17 | fbpanel_cflags = $(GTK2_CFLAGS) $(GMODULE2_CFLAGS) $(X11_CFLAGS) 18 | fbpanel_libs = $(GTK2_LIBS) $(GMODULE2_LIBS) $(X11_LIBS) -lm 19 | fbpanel_type = bin 20 | 21 | include $(TOPDIR)/.config/rules.mk 22 | -------------------------------------------------------------------------------- /panel/bg.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fb-background-monitor.h: 3 | * 4 | * Copyright (C) 2001, 2002 Ian McKellar 5 | * 2002 Sun Microsystems, Inc. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | * 22 | * Authors: 23 | * Ian McKellar 24 | * Mark McLoughlin 25 | */ 26 | 27 | #ifndef __FB_BG_H__ 28 | #define __FB_BG_H__ 29 | 30 | /* FIXME: this needs to be made multiscreen aware 31 | * panel_bg_get should take 32 | * a GdkScreen argument. 33 | */ 34 | 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | #define FB_TYPE_BG (fb_bg_get_type ()) 41 | #define FB_BG(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \ 42 | FB_TYPE_BG, \ 43 | FbBg)) 44 | #define FB_BG_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \ 45 | FB_TYPE_BG, \ 46 | FbBgClass)) 47 | #define FB_IS_BG(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ 48 | FB_TYPE_BG)) 49 | #define FB_IS_BG_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \ 50 | FB_TYPE_BG)) 51 | #define FB_BG_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \ 52 | FB_TYPE_BG, \ 53 | FbBgClass)) 54 | 55 | typedef struct _FbBgClass FbBgClass; 56 | typedef struct _FbBg FbBg; 57 | 58 | GType fb_bg_get_type (void); 59 | FbBg *fb_bg_new(void); 60 | void fb_bg_composite(GdkDrawable *base, GdkGC *gc, guint32 tintcolor, gint alpha); 61 | GdkPixmap *fb_bg_get_xroot_pix_for_win(FbBg *bg, GtkWidget *widget); 62 | GdkPixmap *fb_bg_get_xroot_pix_for_area(FbBg *bg,gint x, gint y, 63 | gint width, gint height, gint depth); 64 | Pixmap fb_bg_get_xrootpmap(FbBg *bg); 65 | void fb_bg_notify_changed_bg(FbBg *bg); 66 | FbBg *fb_bg_get_for_display(void); 67 | #endif /* __FB_BG_H__ */ 68 | -------------------------------------------------------------------------------- /panel/ev.h: -------------------------------------------------------------------------------- 1 | /* 2 | * fb-background-monitor.h: 3 | * 4 | * Copyright (C) 2001, 2002 Ian McKellar 5 | * 2002 Sun Microsystems, Inc. 6 | * 7 | * This library is free software; you can redistribute it and/or 8 | * modify it under the terms of the GNU Library General Public 9 | * License as published by the Free Software Foundation; either 10 | * version 2 of the License, or (at your option) any later version. 11 | * 12 | * This library is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 | * Library General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU Library General Public 18 | * License along with this library; if not, write to the 19 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 20 | * Boston, MA 02111-1307, USA. 21 | * 22 | * Authors: 23 | * Ian McKellar 24 | * Mark McLoughlin 25 | */ 26 | 27 | #ifndef __FB_EV_H__ 28 | #define __FB_EV_H__ 29 | 30 | /* FIXME: this needs to be made multiscreen aware 31 | * panel_bg_get should take 32 | * a GdkScreen argument. 33 | */ 34 | 35 | #include 36 | #include 37 | #include 38 | 39 | #define FB_TYPE_EV (fb_ev_get_type ()) 40 | #define FB_EV(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), \ 41 | FB_TYPE_EV, \ 42 | FbEv)) 43 | #define FB_EV_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), \ 44 | FB_TYPE_EV, \ 45 | FbEvClass)) 46 | #define FB_IS_EV(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), \ 47 | FB_TYPE_EV)) 48 | #define FB_IS_EV_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), \ 49 | FB_TYPE_EV)) 50 | #define FB_EV_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \ 51 | FB_TYPE_EV, \ 52 | FbEvClass)) 53 | 54 | typedef struct _FbEvClass FbEvClass; 55 | typedef struct _FbEv FbEv; 56 | enum { 57 | EV_CURRENT_DESKTOP, 58 | EV_NUMBER_OF_DESKTOPS, 59 | EV_DESKTOP_NAMES, 60 | EV_ACTIVE_WINDOW, 61 | EV_CLIENT_LIST_STACKING, 62 | EV_CLIENT_LIST, 63 | EV_LAST_SIGNAL 64 | }; 65 | 66 | GType fb_ev_get_type (void); 67 | FbEv *fb_ev_new(void); 68 | void fb_ev_notify_changed_ev(FbEv *ev); 69 | void fb_ev_trigger(FbEv *ev, int signal); 70 | 71 | 72 | int fb_ev_current_desktop(FbEv *ev); 73 | int fb_ev_number_of_desktops(FbEv *ev); 74 | Window fb_ev_active_window(FbEv *ev); 75 | Window *fb_ev_client_list(FbEv *ev); 76 | Window *fb_ev_client_list_stacking(FbEv *ev); 77 | 78 | 79 | #endif /* __FB_EV_H__ */ 80 | -------------------------------------------------------------------------------- /panel/gconf.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef _GCONF_H_ 3 | #define _GCONF_H_ 4 | 5 | #include 6 | #include "panel.h" 7 | 8 | typedef struct 9 | { 10 | GtkWidget *main, *area; 11 | GCallback cb; 12 | gpointer data; 13 | GSList *rows; 14 | GtkSizeGroup *sgr; 15 | } gconf_block; 16 | 17 | 18 | gconf_block *gconf_block_new(GCallback cb, gpointer data, int indent); 19 | void gconf_block_free(gconf_block *b); 20 | void gconf_block_add(gconf_block *b, GtkWidget *w, gboolean new_row); 21 | 22 | GtkWidget *gconf_edit_int(gconf_block *b, xconf *xc, int min, int max); 23 | GtkWidget *gconf_edit_enum(gconf_block *b, xconf *xc, xconf_enum *e); 24 | GtkWidget *gconf_edit_boolean(gconf_block *b, xconf *xc, gchar *text); 25 | GtkWidget *gconf_edit_color(gconf_block *b, xconf *xc_color, xconf *xc_alpha); 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /panel/gconf_plugins.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "gconf.h" 4 | #include "panel.h" 5 | 6 | //#define DEBUGPRN 7 | #include "dbg.h" 8 | 9 | enum 10 | { 11 | TYPE_COL, 12 | NAME_COL, 13 | N_COLUMNS 14 | }; 15 | 16 | GtkTreeStore *store; 17 | GtkWidget *tree; 18 | GtkWidget *bbox; 19 | 20 | static void 21 | mk_model(xconf *xc) 22 | { 23 | GtkTreeIter iter; 24 | xconf *pxc; 25 | int i; 26 | gchar *type; 27 | 28 | store = gtk_tree_store_new(N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); 29 | for (i = 0; (pxc = xconf_find(xc, "plugin", i)); i++) 30 | { 31 | XCG(pxc, "type", &type, str); 32 | gtk_tree_store_append(store, &iter, NULL); 33 | gtk_tree_store_set (store, &iter, 34 | TYPE_COL, type, 35 | NAME_COL, "Martin Heidegger", 36 | -1); 37 | } 38 | } 39 | 40 | static void 41 | tree_selection_changed_cb(GtkTreeSelection *selection, gpointer data) 42 | { 43 | GtkTreeIter iter; 44 | GtkTreeModel *model; 45 | gchar *type; 46 | gboolean sel; 47 | 48 | sel = gtk_tree_selection_get_selected(selection, &model, &iter); 49 | if (sel) 50 | { 51 | gtk_tree_model_get(model, &iter, TYPE_COL, &type, -1); 52 | g_print("%s\n", type); 53 | g_free(type); 54 | } 55 | gtk_widget_set_sensitive(bbox, sel); 56 | } 57 | 58 | static GtkWidget * 59 | mk_view() 60 | { 61 | GtkCellRenderer *renderer; 62 | GtkTreeViewColumn *column; 63 | GtkTreeSelection *select; 64 | 65 | tree = gtk_tree_view_new_with_model(GTK_TREE_MODEL(store)); 66 | renderer = gtk_cell_renderer_text_new(); 67 | column = gtk_tree_view_column_new_with_attributes("Type", 68 | renderer, "text", TYPE_COL, NULL); 69 | gtk_tree_view_append_column(GTK_TREE_VIEW(tree), column); 70 | 71 | select = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)); 72 | gtk_tree_selection_set_mode(select, GTK_SELECTION_SINGLE); 73 | g_signal_connect(G_OBJECT(select), "changed", 74 | G_CALLBACK(tree_selection_changed_cb), NULL); 75 | return tree; 76 | } 77 | 78 | GtkWidget * 79 | mk_buttons() 80 | { 81 | GtkWidget *bm, *b, *w; 82 | 83 | bm = gtk_hbox_new(FALSE, 3); 84 | 85 | w = gtk_button_new_from_stock(GTK_STOCK_ADD); 86 | gtk_box_pack_start(GTK_BOX(bm), w, FALSE, TRUE, 0); 87 | 88 | b = gtk_hbox_new(FALSE, 3); 89 | gtk_box_pack_start(GTK_BOX(bm), b, FALSE, TRUE, 0); 90 | bbox = b; 91 | gtk_widget_set_sensitive(bbox, FALSE); 92 | 93 | w = gtk_button_new_from_stock(GTK_STOCK_EDIT); 94 | gtk_box_pack_start(GTK_BOX(b), w, FALSE, TRUE, 0); 95 | w = gtk_button_new_from_stock(GTK_STOCK_DELETE); 96 | gtk_box_pack_start(GTK_BOX(b), w, FALSE, TRUE, 0); 97 | w = gtk_button_new_from_stock(GTK_STOCK_GO_DOWN); 98 | gtk_box_pack_start(GTK_BOX(b), w, FALSE, TRUE, 0); 99 | w = gtk_button_new_from_stock(GTK_STOCK_GO_UP); 100 | gtk_box_pack_start(GTK_BOX(b), w, FALSE, TRUE, 0); 101 | 102 | return bm; 103 | } 104 | 105 | GtkWidget * 106 | mk_tab_plugins(xconf *xc) 107 | { 108 | GtkWidget *page, *w; 109 | 110 | ENTER; 111 | page = gtk_vbox_new(FALSE, 1); 112 | gtk_container_set_border_width(GTK_CONTAINER(page), 10); 113 | 114 | mk_model(xc); 115 | 116 | w = mk_view(); 117 | gtk_box_pack_start(GTK_BOX(page), w, TRUE, TRUE, 0); 118 | w = mk_buttons(); 119 | gtk_box_pack_start(GTK_BOX(page), w, FALSE, TRUE, 0); 120 | 121 | gtk_widget_show_all(page); 122 | RET(page); 123 | } 124 | -------------------------------------------------------------------------------- /panel/gtkbar.h: -------------------------------------------------------------------------------- 1 | /* GTK - The GIMP Toolkit 2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | /* 21 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS 22 | * file for a list of people on the GTK+ Team. See the ChangeLog 23 | * files for a list of changes. These files are distributed with 24 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 25 | */ 26 | 27 | #ifndef __GTK_BAR_H__ 28 | #define __GTK_BAR_H__ 29 | 30 | 31 | #include 32 | #include 33 | 34 | 35 | #ifdef __cplusplus 36 | //extern "C" { 37 | #endif /* __cplusplus */ 38 | 39 | 40 | #define GTK_TYPE_BAR (gtk_bar_get_type ()) 41 | #define GTK_BAR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BAR, GtkBar)) 42 | #define GTK_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BAR, GtkBarClass)) 43 | #define GTK_IS_BAR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BAR)) 44 | #define GTK_IS_BAR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BAR)) 45 | #define GTK_BAR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BAR, GtkBarClass)) 46 | 47 | 48 | typedef struct _GtkBar GtkBar; 49 | typedef struct _GtkBarClass GtkBarClass; 50 | 51 | struct _GtkBar 52 | { 53 | GtkBox box; 54 | gint child_height, child_width; 55 | gint dimension; 56 | GtkOrientation orient; 57 | }; 58 | 59 | struct _GtkBarClass 60 | { 61 | GtkBoxClass parent_class; 62 | }; 63 | 64 | 65 | GType gtk_bar_get_type (void) G_GNUC_CONST; 66 | GtkWidget* gtk_bar_new(GtkOrientation orient, 67 | gint spacing, gint child_height, gint child_width); 68 | void gtk_bar_set_dimension(GtkBar *bar, gint dimension); 69 | gint gtk_bar_get_dimension(GtkBar *bar); 70 | 71 | #ifdef __cplusplus 72 | } 73 | #endif /* __cplusplus */ 74 | 75 | 76 | #endif /* __GTK_BAR_H__ */ 77 | -------------------------------------------------------------------------------- /panel/gtkbgbox.h: -------------------------------------------------------------------------------- 1 | /* GTK - The GIMP Toolkit 2 | * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald 3 | * 4 | * This library is free software; you can redistribute it and/or 5 | * modify it under the terms of the GNU Lesser General Public 6 | * License as published by the Free Software Foundation; either 7 | * version 2 of the License, or (at your option) any later version. 8 | * 9 | * This library is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | * Lesser General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU Lesser General Public 15 | * License along with this library; if not, write to the 16 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 | * Boston, MA 02111-1307, USA. 18 | */ 19 | 20 | /* 21 | * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS 22 | * file for a list of people on the GTK+ Team. See the ChangeLog 23 | * files for a list of changes. These files are distributed with 24 | * GTK+ at ftp://ftp.gtk.org/pub/gtk/. 25 | */ 26 | 27 | #ifndef __GTK_BGBOX_H__ 28 | #define __GTK_BGBOX_H__ 29 | 30 | 31 | #include 32 | #include 33 | #include "bg.h" 34 | 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif /* __cplusplus */ 38 | 39 | 40 | #define GTK_TYPE_BGBOX (gtk_bgbox_get_type ()) 41 | #define GTK_BGBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_BGBOX, GtkBgbox)) 42 | #define GTK_BGBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_BGBOX, GtkBgboxClass)) 43 | #define GTK_IS_BGBOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_BGBOX)) 44 | #define GTK_IS_BGBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_BGBOX)) 45 | #define GTK_BGBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_BGBOX, GtkBgboxClass)) 46 | 47 | typedef struct _GtkBgbox GtkBgbox; 48 | typedef struct _GtkBgboxClass GtkBgboxClass; 49 | 50 | struct _GtkBgbox 51 | { 52 | GtkBin bin; 53 | }; 54 | 55 | struct _GtkBgboxClass 56 | { 57 | GtkBinClass parent_class; 58 | }; 59 | 60 | enum { BG_NONE, BG_STYLE, BG_ROOT, BG_INHERIT, BG_LAST }; 61 | 62 | GType gtk_bgbox_get_type (void) G_GNUC_CONST; 63 | GtkWidget* gtk_bgbox_new (void); 64 | void gtk_bgbox_set_background (GtkWidget *widget, int bg_type, guint32 tintcolor, gint alpha); 65 | 66 | 67 | #ifdef __cplusplus 68 | } 69 | #endif /* __cplusplus */ 70 | 71 | 72 | #endif /* __GTK_BGBOX_H__ */ 73 | -------------------------------------------------------------------------------- /panel/misc.h: -------------------------------------------------------------------------------- 1 | #ifndef MISC_H 2 | #define MISC_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "panel.h" 11 | 12 | int str2num(xconf_enum *p, gchar *str, int defval); 13 | gchar *num2str(xconf_enum *p, int num, gchar *defval); 14 | 15 | 16 | void Xclimsg(Window win, long type, long l0, long l1, long l2, long l3, long l4); 17 | void Xclimsgwm(Window win, Atom type, Atom arg); 18 | void *get_xaproperty (Window win, Atom prop, Atom type, int *nitems); 19 | char *get_textproperty(Window win, Atom prop); 20 | void *get_utf8_property(Window win, Atom atom); 21 | char **get_utf8_property_list(Window win, Atom atom, int *count); 22 | 23 | void fb_init(void); 24 | void fb_free(void); 25 | //Window Select_Window(Display *dpy); 26 | guint get_net_number_of_desktops(); 27 | guint get_net_current_desktop (); 28 | guint get_net_wm_desktop(Window win); 29 | void get_net_wm_state(Window win, net_wm_state *nws); 30 | void get_net_wm_window_type(Window win, net_wm_window_type *nwwt); 31 | 32 | void calculate_position(panel *np); 33 | gchar *expand_tilda(gchar *file); 34 | 35 | void get_button_spacing(GtkRequisition *req, GtkContainer *parent, gchar *name); 36 | guint32 gcolor2rgb24(GdkColor *color); 37 | gchar *gdk_color_to_RRGGBB(GdkColor *color); 38 | 39 | GdkPixbuf *fb_pixbuf_new(gchar *iname, gchar *fname, int width, int height, 40 | gboolean use_fallback); 41 | GtkWidget *fb_image_new(gchar *iname, gchar *fname, int width, int height); 42 | GtkWidget *fb_button_new(gchar *iname, gchar *fname, int width, int height, 43 | gulong hicolor, gchar *name); 44 | 45 | 46 | void menu_pos(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, GtkWidget *widget); 47 | 48 | void configure(); 49 | gchar *indent(int level); 50 | 51 | FILE *get_profile_file(gchar *profile, char *perm); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /panel/panel.h: -------------------------------------------------------------------------------- 1 | #ifndef PANEL_H 2 | #define PANEL_H 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | 9 | #include 10 | #define _(String) gettext(String) 11 | #define c_(String) String 12 | 13 | #include "config.h" 14 | 15 | #include "bg.h" 16 | #include "ev.h" 17 | #include "xconf.h" 18 | 19 | enum { ALLIGN_CENTER, ALLIGN_LEFT, ALLIGN_RIGHT }; 20 | enum { EDGE_BOTTOM, EDGE_LEFT, EDGE_RIGHT, EDGE_TOP }; 21 | enum { WIDTH_PERCENT, WIDTH_REQUEST, WIDTH_PIXEL }; 22 | enum { HEIGHT_PIXEL, HEIGHT_REQUEST }; 23 | enum { POS_NONE, POS_START, POS_END }; 24 | enum { HIDDEN, WAITING, VISIBLE }; 25 | enum { LAYER_ABOVE, LAYER_BELOW }; 26 | 27 | #define PANEL_HEIGHT_DEFAULT 26 28 | #define PANEL_HEIGHT_MAX 200 29 | #define PANEL_HEIGHT_MIN 16 30 | 31 | #define IMGPREFIX DATADIR "/images" 32 | 33 | typedef struct _panel 34 | { 35 | GtkWidget *topgwin; /* main panel window */ 36 | Window topxwin; /* and it X window */ 37 | GtkWidget *lbox; /* primary layout box */ 38 | GtkWidget *bbox; /* backgound box for box */ 39 | GtkWidget *box; /* box that contains all plugins */ 40 | GtkWidget *menu; /* context menu */ 41 | GtkRequisition requisition; 42 | GtkWidget *(*my_box_new) (gboolean, gint); 43 | GtkWidget *(*my_separator_new) (); 44 | 45 | FbBg *bg; 46 | int alpha; 47 | guint32 tintcolor; 48 | GdkColor gtintcolor; 49 | gchar *tintcolor_name; 50 | 51 | int ax, ay, aw, ah; /* prefferd allocation of a panel */ 52 | int cx, cy, cw, ch; /* current allocation (as reported by configure event) allocation */ 53 | int allign, edge, xmargin, ymargin; 54 | GtkOrientation orientation; 55 | int widthtype, width; 56 | int heighttype, height; 57 | int round_corners_radius; 58 | int max_elem_height; 59 | 60 | gint self_destroy; 61 | gint setdocktype; 62 | gint setstrut; 63 | gint round_corners; 64 | gint transparent; 65 | gint autohide; 66 | gint ah_far; 67 | gint layer; 68 | gint setlayer; 69 | 70 | int ah_dx, ah_dy; // autohide shift for x and y 71 | int height_when_hidden; 72 | guint hide_tout; 73 | 74 | int spacing; 75 | 76 | guint desknum; 77 | guint curdesk; 78 | guint32 *workarea; 79 | 80 | int plug_num; 81 | GList *plugins; 82 | 83 | gboolean (*ah_state)(struct _panel *); 84 | 85 | xconf *xc; 86 | } panel; 87 | 88 | 89 | typedef struct { 90 | unsigned int modal : 1; 91 | unsigned int sticky : 1; 92 | unsigned int maximized_vert : 1; 93 | unsigned int maximized_horz : 1; 94 | unsigned int shaded : 1; 95 | unsigned int skip_taskbar : 1; 96 | unsigned int skip_pager : 1; 97 | unsigned int hidden : 1; 98 | unsigned int fullscreen : 1; 99 | unsigned int above : 1; 100 | unsigned int below : 1; 101 | } net_wm_state; 102 | 103 | typedef struct { 104 | unsigned int desktop : 1; 105 | unsigned int dock : 1; 106 | unsigned int toolbar : 1; 107 | unsigned int menu : 1; 108 | unsigned int utility : 1; 109 | unsigned int splash : 1; 110 | unsigned int dialog : 1; 111 | unsigned int normal : 1; 112 | } net_wm_window_type; 113 | 114 | typedef struct { 115 | char *name; 116 | void (*cmd)(void); 117 | } command; 118 | 119 | extern command commands[]; 120 | 121 | extern gchar *cprofile; 122 | 123 | extern Atom a_UTF8_STRING; 124 | extern Atom a_XROOTPMAP_ID; 125 | 126 | extern Atom a_WM_STATE; 127 | extern Atom a_WM_CLASS; 128 | extern Atom a_WM_DELETE_WINDOW; 129 | extern Atom a_WM_PROTOCOLS; 130 | extern Atom a_NET_WORKAREA; 131 | extern Atom a_NET_CLIENT_LIST; 132 | extern Atom a_NET_CLIENT_LIST_STACKING; 133 | extern Atom a_NET_NUMBER_OF_DESKTOPS; 134 | extern Atom a_NET_CURRENT_DESKTOP; 135 | extern Atom a_NET_DESKTOP_NAMES; 136 | extern Atom a_NET_DESKTOP_GEOMETRY; 137 | extern Atom a_NET_ACTIVE_WINDOW; 138 | extern Atom a_NET_CLOSE_WINDOW; 139 | extern Atom a_NET_SUPPORTED; 140 | extern Atom a_NET_WM_STATE; 141 | extern Atom a_NET_WM_STATE_SKIP_TASKBAR; 142 | extern Atom a_NET_WM_STATE_SKIP_PAGER; 143 | extern Atom a_NET_WM_STATE_STICKY; 144 | extern Atom a_NET_WM_STATE_HIDDEN; 145 | extern Atom a_NET_WM_STATE_SHADED; 146 | extern Atom a_NET_WM_STATE_ABOVE; 147 | extern Atom a_NET_WM_STATE_BELOW; 148 | 149 | #define a_NET_WM_STATE_REMOVE 0 /* remove/unset property */ 150 | #define a_NET_WM_STATE_ADD 1 /* add/set property */ 151 | #define a_NET_WM_STATE_TOGGLE 2 /* toggle property */ 152 | 153 | extern Atom a_NET_WM_WINDOW_TYPE; 154 | extern Atom a_NET_WM_WINDOW_TYPE_DESKTOP; 155 | extern Atom a_NET_WM_WINDOW_TYPE_DOCK; 156 | extern Atom a_NET_WM_WINDOW_TYPE_TOOLBAR; 157 | extern Atom a_NET_WM_WINDOW_TYPE_MENU; 158 | extern Atom a_NET_WM_WINDOW_TYPE_UTILITY; 159 | extern Atom a_NET_WM_WINDOW_TYPE_SPLASH; 160 | extern Atom a_NET_WM_WINDOW_TYPE_DIALOG; 161 | extern Atom a_NET_WM_WINDOW_TYPE_NORMAL; 162 | 163 | extern Atom a_NET_WM_DESKTOP; 164 | extern Atom a_NET_WM_NAME; 165 | extern Atom a_NET_WM_VISIBLE_NAME; 166 | extern Atom a_NET_WM_STRUT; 167 | extern Atom a_NET_WM_STRUT_PARTIAL; 168 | extern Atom a_NET_WM_ICON; 169 | extern Atom a_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR; 170 | 171 | 172 | extern xconf_enum allign_enum[]; 173 | extern xconf_enum edge_enum[]; 174 | extern xconf_enum widthtype_enum[]; 175 | extern xconf_enum heighttype_enum[]; 176 | extern xconf_enum bool_enum[]; 177 | extern xconf_enum pos_enum[]; 178 | extern xconf_enum layer_enum[]; 179 | 180 | extern int verbose; 181 | extern gint force_quit; 182 | extern FbEv *fbev; 183 | extern GtkIconTheme *icon_theme; 184 | #define FBPANEL_WIN(win) gdk_window_lookup(win) 185 | void panel_set_wm_strut(panel *p); 186 | 187 | gchar *panel_get_profile(void); 188 | gchar *panel_get_profile_file(void); 189 | 190 | void ah_start(panel *p); 191 | void ah_stop(panel *p); 192 | 193 | #endif 194 | -------------------------------------------------------------------------------- /panel/plugin.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef PLUGIN_H 3 | #define PLUGIN_H 4 | #include 5 | 6 | 7 | #include 8 | #include 9 | #include 10 | #include "panel.h" 11 | 12 | struct _plugin_instance *stam; 13 | 14 | typedef struct { 15 | /* common */ 16 | char *fname; 17 | int count; 18 | GModule *gmodule; 19 | 20 | int dynamic : 1; 21 | int invisible : 1; 22 | /* these fields are pointers to the data within loaded dll */ 23 | char *type; 24 | char *name; 25 | char *version; 26 | char *description; 27 | int priv_size; 28 | 29 | int (*constructor)(struct _plugin_instance *this); 30 | void (*destructor)(struct _plugin_instance *this); 31 | void (*save_config)(struct _plugin_instance *this, FILE *fp); 32 | GtkWidget *(*edit_config)(struct _plugin_instance *this); 33 | } plugin_class; 34 | 35 | #define PLUGIN_CLASS(class) ((plugin_class *) class) 36 | 37 | typedef struct _plugin_instance{ 38 | plugin_class *class; 39 | panel *panel; 40 | xconf *xc; 41 | GtkWidget *pwid; 42 | int expand; 43 | int padding; 44 | int border; 45 | } plugin_instance; 46 | 47 | void class_put(char *name); 48 | gpointer class_get(char *name); 49 | /* if plugin_instance is external it will load its dll */ 50 | plugin_instance * plugin_load(char *type); 51 | void plugin_put(plugin_instance *this); 52 | int plugin_start(plugin_instance *this); 53 | void plugin_stop(plugin_instance *this); 54 | GtkWidget *default_plugin_instance_edit_config(plugin_instance *pl); 55 | 56 | void class_register(plugin_class *p); 57 | void class_unregister(plugin_class *p); 58 | 59 | #ifdef PLUGIN 60 | static plugin_class *class_ptr; 61 | static void ctor(void) __attribute__ ((constructor)); 62 | static void ctor(void) { class_register(class_ptr); } 63 | static void dtor(void) __attribute__ ((destructor)); 64 | static void dtor(void) { class_unregister(class_ptr); } 65 | #endif 66 | 67 | #endif 68 | -------------------------------------------------------------------------------- /panel/run.c: -------------------------------------------------------------------------------- 1 | #include "run.h" 2 | #include "dbg.h" 3 | 4 | void 5 | run_app(gchar *cmd) 6 | { 7 | GError *error = NULL; 8 | 9 | ENTER; 10 | if (!cmd) 11 | RET(); 12 | 13 | if (!g_spawn_command_line_async(cmd, &error)) 14 | { 15 | GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, 16 | GTK_MESSAGE_ERROR, 17 | GTK_BUTTONS_CLOSE, 18 | "%s", error->message); 19 | gtk_dialog_run(GTK_DIALOG(dialog)); 20 | gtk_widget_destroy(dialog); 21 | g_error_free(error); 22 | } 23 | RET(); 24 | } 25 | 26 | 27 | GPid 28 | run_app_argv(gchar **argv) 29 | { 30 | GError *error = NULL; 31 | GSpawnFlags flags = G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH; 32 | GPid pid; 33 | 34 | ENTER; 35 | flags |= G_SPAWN_STDOUT_TO_DEV_NULL; 36 | if (!g_spawn_async(NULL, argv, NULL, flags, NULL, NULL, &pid, &error)) { 37 | GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, 38 | GTK_MESSAGE_ERROR, 39 | GTK_BUTTONS_CLOSE, 40 | "%s", error->message); 41 | gtk_dialog_run(GTK_DIALOG(dialog)); 42 | gtk_widget_destroy(dialog); 43 | g_error_free(error); 44 | } 45 | 46 | RET(pid); 47 | } 48 | -------------------------------------------------------------------------------- /panel/run.h: -------------------------------------------------------------------------------- 1 | #ifndef _RUN_H_ 2 | #define _RUN_H_ 3 | 4 | #include 5 | 6 | void run_app(gchar *cmd); 7 | GPid run_app_argv(gchar **argv); 8 | 9 | #endif 10 | -------------------------------------------------------------------------------- /panel/xconf.h: -------------------------------------------------------------------------------- 1 | #ifndef _XCONF_H_ 2 | #define _XCONF_H_ 3 | 4 | #include 5 | #include 6 | 7 | typedef struct _xconf 8 | { 9 | gchar *name; 10 | gchar *value; 11 | GSList *sons; 12 | struct _xconf *parent; 13 | } xconf; 14 | 15 | typedef struct { 16 | gchar *str; 17 | gchar *desc; 18 | int num; 19 | } xconf_enum; 20 | 21 | xconf *xconf_new(gchar *name, gchar *value); 22 | void xconf_append(xconf *parent, xconf *son); 23 | void xconf_append_sons(xconf *parent, xconf *son); 24 | void xconf_unlink(xconf *x); 25 | void xconf_del(xconf *x, gboolean sons_only); 26 | void xconf_set_value(xconf *x, gchar *value); 27 | void xconf_set_value_ref(xconf *x, gchar *value); 28 | gchar *xconf_get_value(xconf *x); 29 | void xconf_prn(FILE *fp, xconf *x, int n, gboolean sons_only); 30 | xconf *xconf_find(xconf *x, gchar *name, int no); 31 | xconf *xconf_dup(xconf *xc); 32 | gboolean xconf_cmp(xconf *a, xconf *b); 33 | xconf *xconf_new_from_file(gchar *fname, gchar *name); 34 | void xconf_save_to_file(gchar *fname, xconf *xc); 35 | void xconf_save_to_profile(xconf *xc); 36 | 37 | xconf *xconf_get(xconf *x, gchar *name); 38 | void xconf_get_int(xconf *x, int *val); 39 | void xconf_get_enum(xconf *x, int *val, xconf_enum *e); 40 | void xconf_get_str(xconf *x, gchar **val); 41 | void xconf_get_strdup(xconf *x, gchar **val); 42 | void xconf_set_int(xconf *x, int val); 43 | void xconf_set_enum(xconf *x, int val, xconf_enum *e); 44 | 45 | #define XCG(xc, name, var, type, extra...) \ 46 | xconf_get_ ## type(xconf_find(xc, name, 0), var, ## extra) 47 | 48 | #define XCS(xc, name, var, type, extra...) \ 49 | xconf_set_ ## type(xconf_get(xc, name), var, ## extra) 50 | 51 | 52 | #endif 53 | -------------------------------------------------------------------------------- /plugins/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/plugins/.gitignore -------------------------------------------------------------------------------- /plugins/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := .. 4 | 5 | SUBDIRS := battery \ 6 | chart \ 7 | cpu \ 8 | dclock \ 9 | deskno \ 10 | deskno2 \ 11 | genmon \ 12 | icons \ 13 | image \ 14 | launchbar \ 15 | mem \ 16 | mem2 \ 17 | menu \ 18 | meter \ 19 | net \ 20 | pager \ 21 | separator \ 22 | space \ 23 | systray \ 24 | taskbar \ 25 | tclock \ 26 | volume \ 27 | wincmd \ 28 | user 29 | 30 | include $(TOPDIR)/.config/rules.mk 31 | -------------------------------------------------------------------------------- /plugins/battery/.gitignore: -------------------------------------------------------------------------------- 1 | battery.o 2 | battery.d 3 | power_supply.o 4 | power_supply.d 5 | libbattery.so 6 | -------------------------------------------------------------------------------- /plugins/battery/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | battery_src = battery.c power_supply.c 6 | battery_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | battery_libs = $(GTK2_LIBS) 8 | battery_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/battery/Makefile-test: -------------------------------------------------------------------------------- 1 | # -*- mode: Makefile -*- 2 | # Time-stamp: < Makefile-test (2015-12-04 19:02) > 3 | 4 | CC = gcc -Wall -g -O0 `pkg-config --cflags --libs glib-2.0` 5 | 6 | all: main 7 | 8 | clean: 9 | rm -rf *.o main 10 | 11 | main: main.c power_supply.o 12 | $(CC) main.c power_supply.o -o $@ 13 | 14 | power_supply.o: power_supply.h power_supply.c 15 | $(CC) -c power_supply.c -o $@ 16 | 17 | valgrind: main 18 | G_DEBUG=gc-friendly G_SLICE=always-malloc valgrind --leak-check=yes ./main 19 | -------------------------------------------------------------------------------- /plugins/battery/battery.c: -------------------------------------------------------------------------------- 1 | #include "misc.h" 2 | #include "../meter/meter.h" 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | //#define DEBUGPRN 9 | #include "dbg.h" 10 | 11 | static meter_class *k; 12 | 13 | typedef struct { 14 | meter_priv meter; 15 | int timer; 16 | gfloat level; 17 | gboolean charging; 18 | gboolean exist; 19 | } battery_priv; 20 | 21 | static gboolean battery_update_os(battery_priv *c); 22 | 23 | static gchar *batt_working[] = { 24 | "battery_0", 25 | "battery_1", 26 | "battery_2", 27 | "battery_3", 28 | "battery_4", 29 | "battery_5", 30 | "battery_6", 31 | "battery_7", 32 | "battery_8", 33 | NULL 34 | }; 35 | 36 | static gchar *batt_charging[] = { 37 | "battery_charging_0", 38 | "battery_charging_1", 39 | "battery_charging_2", 40 | "battery_charging_3", 41 | "battery_charging_4", 42 | "battery_charging_5", 43 | "battery_charging_6", 44 | "battery_charging_7", 45 | "battery_charging_8", 46 | NULL 47 | }; 48 | 49 | static gchar *batt_na[] = { 50 | "battery_na", 51 | NULL 52 | }; 53 | 54 | #if defined __linux__ 55 | #include "os_linux.c" 56 | #else 57 | 58 | static void 59 | battery_update_os(battery_priv *c) 60 | { 61 | c->exist = FALSE; 62 | } 63 | 64 | #endif 65 | 66 | static gboolean 67 | battery_update(battery_priv *c) 68 | { 69 | gchar buf[50]; 70 | gchar **i; 71 | 72 | ENTER; 73 | battery_update_os(c); 74 | if (c->exist) { 75 | i = c->charging ? batt_charging : batt_working; 76 | g_snprintf(buf, sizeof(buf), "Battery: %d%%%s", 77 | (int) c->level, c->charging ? "\nCharging" : ""); 78 | gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, buf); 79 | } else { 80 | i = batt_na; 81 | gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, 82 | "Runing on AC\nNo battery found"); 83 | } 84 | k->set_icons(&c->meter, i); 85 | k->set_level(&c->meter, c->level); 86 | RET(TRUE); 87 | } 88 | 89 | 90 | static int 91 | battery_constructor(plugin_instance *p) 92 | { 93 | battery_priv *c; 94 | 95 | ENTER; 96 | if (!(k = class_get("meter"))) 97 | RET(0); 98 | if (!PLUGIN_CLASS(k)->constructor(p)) 99 | RET(0); 100 | c = (battery_priv *) p; 101 | c->timer = g_timeout_add(2000, (GSourceFunc) battery_update, c); 102 | battery_update(c); 103 | RET(1); 104 | } 105 | 106 | static void 107 | battery_destructor(plugin_instance *p) 108 | { 109 | battery_priv *c = (battery_priv *) p; 110 | 111 | ENTER; 112 | if (c->timer) 113 | g_source_remove(c->timer); 114 | PLUGIN_CLASS(k)->destructor(p); 115 | class_put("meter"); 116 | RET(); 117 | } 118 | 119 | static plugin_class class = { 120 | .count = 0, 121 | .type = "battery", 122 | .name = "battery usage", 123 | .version = "1.1", 124 | .description = "Display battery usage", 125 | .priv_size = sizeof(battery_priv), 126 | .constructor = battery_constructor, 127 | .destructor = battery_destructor, 128 | }; 129 | 130 | static plugin_class *class_ptr = (plugin_class *) &class; 131 | -------------------------------------------------------------------------------- /plugins/battery/main.c: -------------------------------------------------------------------------------- 1 | // Time-stamp: < main.c (2015-12-04 19:02) > 2 | // run with: make -k -f Makefile-test valgrind 3 | 4 | #include 5 | #include 6 | 7 | #include "power_supply.h" 8 | 9 | int main(int argc, char** args) 10 | { 11 | power_supply* ps = power_supply_new(); 12 | power_supply_parse(ps); 13 | gboolean ac_online = power_supply_is_ac_online(ps); 14 | gdouble bat_capacity = power_supply_get_bat_capacity(ps); 15 | 16 | power_supply_free(ps); 17 | 18 | g_fprintf(stdout, "ac_online: %d\nbat_capacity: %f\n", ac_online, bat_capacity); 19 | 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /plugins/battery/os_linux.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #include "power_supply.h" 5 | 6 | #define LEN 100 7 | #define PROC_ACPI "/proc/acpi/battery/" 8 | 9 | static gboolean 10 | get_token_eq(gchar *buf, gchar *token, gchar *value, gboolean *ret) 11 | { 12 | int len; 13 | gchar *var; 14 | 15 | ENTER; 16 | len = strlen(token); 17 | if (!(var = strstr(buf, token))) 18 | RET(FALSE); 19 | for (var = var + len; isspace(*var); var++) ; 20 | *ret = !strncmp(var, value, strlen(value)); 21 | RET(TRUE); 22 | } 23 | 24 | static gboolean 25 | get_token_int(gchar *buf, gchar *token, gint *value) 26 | { 27 | int len; 28 | gchar *var; 29 | 30 | ENTER; 31 | len = strlen(token); 32 | if (!(var = strstr(buf, token))) 33 | RET(FALSE); 34 | for (var = var + len; isspace(*var); var++) ; 35 | if (sscanf(var, "%d", value) == 1) 36 | RET(TRUE); 37 | RET(FALSE); 38 | } 39 | 40 | static gboolean 41 | read_proc(battery_priv *c, GString *path) 42 | { 43 | int len, lfcap, rcap; 44 | gchar *buf; 45 | gboolean ret, exist, charging; 46 | 47 | ENTER; 48 | len = path->len; 49 | 50 | g_string_append(path, "/info"); 51 | ret = g_file_get_contents(path->str, &buf, 0, NULL); 52 | DBG("reading %s %s\n", path->str, ret ? "ok" : "fail"); 53 | g_string_truncate(path, len); 54 | if (!ret) 55 | RET(FALSE); 56 | ret = get_token_eq(buf, "present:", "yes", &exist) 57 | && exist && get_token_int(buf, "last full capacity:", &lfcap); 58 | 59 | g_free(buf); 60 | if (!ret) 61 | RET(FALSE); 62 | 63 | g_string_append(path, "/state"); 64 | ret = g_file_get_contents(path->str, &buf, 0, NULL); 65 | DBG("reading %s %s\n", path->str, ret ? "ok" : "fail"); 66 | g_string_truncate(path, len); 67 | if (!ret) 68 | RET(FALSE); 69 | ret = get_token_eq(buf, "present:", "yes", &exist) 70 | && exist 71 | && get_token_int(buf, "remaining capacity:", &rcap) 72 | && get_token_eq(buf, "charging state:", "charging", &charging); 73 | g_free(buf); 74 | if (!ret) 75 | RET(FALSE); 76 | DBG("battery=%s\nlast full capacity=%d\nremaining capacity=%d\n" 77 | "charging=%d\n", 78 | path->str, lfcap, rcap, charging); 79 | 80 | if (!(lfcap >= rcap && lfcap > 0 && rcap >= 0)) 81 | RET(FALSE); 82 | 83 | c->exist = TRUE; 84 | c->charging = charging; 85 | c->level = (int) ((gfloat) rcap * 100 / (gfloat) lfcap); 86 | RET(TRUE); 87 | } 88 | 89 | static gboolean 90 | battery_update_os_proc(battery_priv *c) 91 | { 92 | GString *path; 93 | int len; 94 | GDir *dir; 95 | gboolean ret = FALSE; 96 | const gchar *file; 97 | 98 | ENTER; 99 | c->exist = FALSE; 100 | path = g_string_sized_new(200); 101 | g_string_append(path, PROC_ACPI); 102 | len = path->len; 103 | if (!(dir = g_dir_open(path->str, 0, NULL))) { 104 | DBG("can't open dir %s\n", path->str); 105 | goto out; 106 | } 107 | while (!ret && (file = g_dir_read_name(dir))) { 108 | g_string_append(path, file); 109 | DBG("testing %s\n", path->str); 110 | ret = g_file_test(path->str, G_FILE_TEST_IS_DIR); 111 | if (ret) 112 | ret = read_proc(c, path); 113 | g_string_truncate(path, len); 114 | } 115 | g_dir_close(dir); 116 | 117 | out: 118 | g_string_free(path, TRUE); 119 | RET(ret); 120 | } 121 | 122 | static gboolean 123 | battery_update_os_sys(battery_priv *c) 124 | { 125 | ENTER; 126 | c->exist = FALSE; 127 | power_supply* ps = power_supply_new(); 128 | power_supply_parse(ps); 129 | if (g_sequence_get_length(ps->bat_list) > 0) { 130 | gboolean ac_online = power_supply_is_ac_online(ps); 131 | gdouble bat_capacity = power_supply_get_bat_capacity(ps); 132 | c->exist = TRUE; 133 | c->charging = ac_online; 134 | c->level = (gfloat) bat_capacity; 135 | } 136 | power_supply_free(ps); 137 | RET(c->exist); 138 | } 139 | 140 | static gboolean 141 | battery_update_os(battery_priv *c) 142 | { 143 | ENTER; 144 | RET(battery_update_os_proc(c) || battery_update_os_sys(c)); 145 | } 146 | -------------------------------------------------------------------------------- /plugins/battery/power_supply.h: -------------------------------------------------------------------------------- 1 | // Time-stamp: < power_supply.h (2015-12-04 19:01) > 2 | 3 | #ifndef POWER_SUPPLY_H 4 | #define POWER_SUPPLY_H 5 | 6 | #include 7 | 8 | /* Struct representing AC power supply. */ 9 | typedef struct { 10 | /* Path to uevent file. */ 11 | gchar* path; 12 | gchar* name; 13 | gboolean online; 14 | } ac; 15 | 16 | /* Struct representing BATTERY power supply. */ 17 | typedef struct { 18 | /* Path to uevent file. */ 19 | gchar* path; 20 | gchar* name; 21 | gchar* status; 22 | /* In percent 0.0--100.0. */ 23 | gdouble capacity; 24 | } bat; 25 | 26 | /* Struct representing all the power supplies on current system. */ 27 | typedef struct { 28 | /* List of ac structs. */ 29 | GSequence* ac_list; 30 | /* List of bat structs. */ 31 | GSequence* bat_list; 32 | } power_supply; 33 | 34 | /* Allocate memory for struct power_supply. */ 35 | power_supply* power_supply_new(); 36 | 37 | /* Free memory allocated by power_supply_new(). */ 38 | void power_supply_free(gpointer p); 39 | 40 | /* Parses power supplies on the current system. */ 41 | power_supply* power_supply_parse(); 42 | 43 | /* 44 | * Return TRUE if AC power is on (ie. at least one AC adapter is on). 45 | */ 46 | gboolean power_supply_is_ac_online(power_supply* ps); 47 | 48 | /* 49 | * Return total BATTERY capacity (as percentage of capacity) on the 50 | * system as an average of all batteries capacity div by number of 51 | * batteries. 52 | */ 53 | gdouble power_supply_get_bat_capacity(power_supply* ps); 54 | 55 | #endif /* POWER_SUPPLY_H */ 56 | -------------------------------------------------------------------------------- /plugins/chart/.gitignore: -------------------------------------------------------------------------------- 1 | chart.o 2 | chart.d 3 | libchart.so 4 | -------------------------------------------------------------------------------- /plugins/chart/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | chart_src = chart.c 6 | chart_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | chart_libs = $(GTK2_LIBS) 8 | chart_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/chart/chart.h: -------------------------------------------------------------------------------- 1 | #ifndef CHART_H 2 | #define CHART_H 3 | 4 | 5 | #include "plugin.h" 6 | #include "panel.h" 7 | 8 | 9 | /* chart.h */ 10 | typedef struct { 11 | plugin_instance plugin; 12 | GdkGC **gc_cpu; 13 | GtkWidget *da; 14 | 15 | gint **ticks; 16 | gint pos; 17 | gint w, h, rows; 18 | GdkRectangle area; /* frame area and exact positions */ 19 | int fx, fy, fw, fh; 20 | } chart_priv; 21 | 22 | typedef struct { 23 | plugin_class plugin; 24 | void (*add_tick)(chart_priv *c, float *val); 25 | void (*set_rows)(chart_priv *c, int num, gchar *colors[]); 26 | } chart_class; 27 | 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /plugins/cpu/.gitignore: -------------------------------------------------------------------------------- 1 | cpu.o 2 | cpu.d 3 | libcpu.so 4 | -------------------------------------------------------------------------------- /plugins/cpu/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | cpu_src = cpu.c 6 | cpu_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | cpu_libs = $(GTK2_LIBS) 8 | cpu_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/cpu/cpu.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | /* 4 | * Free BSD support 5 | * A little bug fixed by Mykola :) 6 | * FreeBSD support added by Andreas Wiese 7 | * and was extended by Eygene Ryabinkin 8 | */ 9 | 10 | #include 11 | #include "misc.h" 12 | #include "../chart/chart.h" 13 | 14 | //#define DEBUGPRN 15 | #include "dbg.h" 16 | #if defined(__FreeBSD__) 17 | #include 18 | #include 19 | #include 20 | #include 21 | #endif 22 | 23 | struct cpu_stat { 24 | gulong u, n, s, i, w; // user, nice, system, idle, wait 25 | }; 26 | 27 | typedef struct { 28 | chart_priv chart; 29 | struct cpu_stat cpu_prev; 30 | int timer; 31 | gchar *colors[1]; 32 | } cpu_priv; 33 | 34 | static chart_class *k; 35 | 36 | static void cpu_destructor(plugin_instance *p); 37 | 38 | 39 | #if defined __linux__ 40 | static int 41 | cpu_get_load_real(struct cpu_stat *cpu) 42 | { 43 | FILE *stat; 44 | 45 | memset(cpu, 0, sizeof(struct cpu_stat)); 46 | stat = fopen("/proc/stat", "r"); 47 | if(!stat) 48 | return -1; 49 | if (fscanf(stat, "cpu %lu %lu %lu %lu %lu", &cpu->u, &cpu->n, &cpu->s, 50 | &cpu->i, &cpu->w)); 51 | fclose(stat); 52 | return 0; 53 | } 54 | #elif defined __FreeBSD__ 55 | static int 56 | cpu_get_load_real(struct cpu_stat *cpu) 57 | { 58 | static int mib[2] = { -1, -1 }, init = 0; 59 | size_t j; 60 | long ct[CPUSTATES]; 61 | 62 | memset(cpu, 0, sizeof(struct cpu_stat)); 63 | if (init == 0) { 64 | j = 2; 65 | if (sysctlnametomib("kern.cp_time", mib, &j) != 0) 66 | return -1; 67 | 68 | init = 1; 69 | } 70 | 71 | j = sizeof(ct); 72 | if (sysctl(mib, 2, ct, &j, NULL, 0) != 0) 73 | return -1; 74 | cpu->u = ct[CP_USER]; 75 | cpu->n = ct[CP_NICE]; 76 | cpu->s = ct[CP_SYS]; 77 | cpu->i = ct[CP_IDLE]; 78 | cpu->w = 0; 79 | 80 | return 0; 81 | } 82 | #else 83 | static int 84 | cpu_get_load_real(struct cpu_stat *s) 85 | { 86 | memset(cpu, 0, sizeof(struct cpu_stat)); 87 | return 0; 88 | } 89 | #endif 90 | 91 | static int 92 | cpu_get_load(cpu_priv *c) 93 | { 94 | gfloat a, b; 95 | struct cpu_stat cpu, cpu_diff; 96 | float total[1]; 97 | gchar buf[40]; 98 | 99 | ENTER; 100 | memset(&cpu, 0, sizeof(cpu)); 101 | memset(&cpu_diff, 0, sizeof(cpu_diff)); 102 | memset(&total, 0, sizeof(total)); 103 | 104 | if (cpu_get_load_real(&cpu)) 105 | goto end; 106 | 107 | cpu_diff.u = cpu.u - c->cpu_prev.u; 108 | cpu_diff.n = cpu.n - c->cpu_prev.n; 109 | cpu_diff.s = cpu.s - c->cpu_prev.s; 110 | cpu_diff.i = cpu.i - c->cpu_prev.i; 111 | cpu_diff.w = cpu.w - c->cpu_prev.w; 112 | c->cpu_prev = cpu; 113 | 114 | a = cpu_diff.u + cpu_diff.n + cpu_diff.s; 115 | b = a + cpu_diff.i + cpu_diff.w; 116 | total[0] = b ? a / b : 1.0; 117 | 118 | end: 119 | DBG("total=%f a=%f b=%f\n", total[0], a, b); 120 | g_snprintf(buf, sizeof(buf), "Cpu: %d%%", (int)(total[0] * 100)); 121 | gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, buf); 122 | k->add_tick(&c->chart, total); 123 | RET(TRUE); 124 | 125 | } 126 | 127 | static int 128 | cpu_constructor(plugin_instance *p) 129 | { 130 | cpu_priv *c; 131 | 132 | if (!(k = class_get("chart"))) 133 | RET(0); 134 | if (!PLUGIN_CLASS(k)->constructor(p)) 135 | RET(0); 136 | c = (cpu_priv *) p; 137 | c->colors[0] = "green"; 138 | XCG(p->xc, "Color", &c->colors[0], str); 139 | 140 | k->set_rows(&c->chart, 1, c->colors); 141 | gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, "Cpu"); 142 | cpu_get_load(c); 143 | c->timer = g_timeout_add(1000, (GSourceFunc) cpu_get_load, (gpointer) c); 144 | RET(1); 145 | } 146 | 147 | 148 | static void 149 | cpu_destructor(plugin_instance *p) 150 | { 151 | cpu_priv *c = (cpu_priv *) p; 152 | 153 | ENTER; 154 | g_source_remove(c->timer); 155 | PLUGIN_CLASS(k)->destructor(p); 156 | class_put("chart"); 157 | RET(); 158 | } 159 | 160 | 161 | 162 | static plugin_class class = { 163 | .count = 0, 164 | .type = "cpu", 165 | .name = "Cpu usage", 166 | .version = "1.0", 167 | .description = "Display cpu usage", 168 | .priv_size = sizeof(cpu_priv), 169 | .constructor = cpu_constructor, 170 | .destructor = cpu_destructor, 171 | }; 172 | 173 | static plugin_class *class_ptr = (plugin_class *) &class; 174 | -------------------------------------------------------------------------------- /plugins/dclock/.gitignore: -------------------------------------------------------------------------------- 1 | dclock.o 2 | dclock.d 3 | libdclock.so 4 | -------------------------------------------------------------------------------- /plugins/dclock/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | dclock_src = dclock.c 6 | dclock_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | dclock_libs = $(GTK2_LIBS) 8 | dclock_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/deskno/.gitignore: -------------------------------------------------------------------------------- 1 | deskno.o 2 | deskno.d 3 | libdeskno.so 4 | -------------------------------------------------------------------------------- /plugins/deskno/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | deskno_src = deskno.c 6 | deskno_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | deskno_libs = $(GTK2_LIBS) 8 | deskno_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/deskno/deskno.c: -------------------------------------------------------------------------------- 1 | // reused dclock.c and variables from pager.c 2 | // 11/23/04 by cmeury@users.sf.net", 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include "panel.h" 9 | #include "misc.h" 10 | #include "plugin.h" 11 | 12 | //#define DEBUGPRN 13 | #include "dbg.h" 14 | 15 | typedef struct { 16 | plugin_instance plugin; 17 | GtkWidget *main; 18 | GtkWidget *namew; 19 | int deskno, desknum; 20 | } deskno_priv; 21 | 22 | static void 23 | change_desktop(deskno_priv *dc, int delta) 24 | { 25 | int newdesk = dc->deskno + delta; 26 | 27 | ENTER; 28 | if (newdesk < 0) 29 | newdesk = dc->desknum - 1; 30 | else if (newdesk >= dc->desknum) 31 | newdesk = 0; 32 | DBG("%d/%d -> %d\n", dc->deskno, dc->desknum, newdesk); 33 | Xclimsg(GDK_ROOT_WINDOW(), a_NET_CURRENT_DESKTOP, newdesk, 0, 0, 0, 0); 34 | RET(); 35 | } 36 | 37 | static void 38 | clicked(GtkWidget *widget, deskno_priv *dc) 39 | { 40 | ENTER; 41 | change_desktop(dc, 1); 42 | } 43 | 44 | static gboolean 45 | scrolled(GtkWidget *widget, GdkEventScroll *event, deskno_priv *dc) 46 | { 47 | ENTER; 48 | change_desktop(dc, (event->direction == GDK_SCROLL_UP 49 | || event->direction == GDK_SCROLL_LEFT) ? -1 : 1); 50 | return FALSE; 51 | } 52 | 53 | static gint 54 | name_update(GtkWidget *widget, deskno_priv *dc) 55 | { 56 | char buffer [15]; 57 | 58 | ENTER; 59 | dc->deskno = get_net_current_desktop(); 60 | sprintf(buffer, "%d", dc->deskno + 1); 61 | gtk_label_set_markup(GTK_LABEL(dc->namew), buffer); 62 | RET(TRUE); 63 | } 64 | 65 | static gint 66 | update(GtkWidget *widget, deskno_priv *dc) 67 | { 68 | ENTER; 69 | dc->desknum = get_net_number_of_desktops(); 70 | RET(TRUE); 71 | } 72 | 73 | static int 74 | deskno_constructor(plugin_instance *p) 75 | { 76 | deskno_priv *dc; 77 | 78 | ENTER; 79 | dc = (deskno_priv *) p; 80 | dc->main = gtk_button_new(); 81 | gtk_button_set_relief(GTK_BUTTON(dc->main), GTK_RELIEF_NONE); 82 | g_signal_connect(G_OBJECT(dc->main), "clicked", G_CALLBACK(clicked), 83 | (gpointer) dc); 84 | g_signal_connect(G_OBJECT(dc->main), "scroll-event", G_CALLBACK(scrolled), 85 | (gpointer) dc); 86 | dc->namew = gtk_label_new("ww"); 87 | gtk_container_add(GTK_CONTAINER(dc->main), dc->namew); 88 | gtk_container_add(GTK_CONTAINER(p->pwid), dc->main); 89 | //gtk_widget_add_events(p->pwid, GDK_SCROLL_MASK); 90 | //gtk_widget_add_events(dc->main, GDK_SCROLL_MASK); 91 | gtk_widget_show_all(p->pwid); 92 | name_update(dc->main, dc); 93 | update(dc->main, dc); 94 | g_signal_connect(G_OBJECT(fbev), "current_desktop", G_CALLBACK 95 | (name_update), (gpointer) dc); 96 | g_signal_connect(G_OBJECT(fbev), "number_of_desktops", G_CALLBACK 97 | (update), (gpointer) dc); 98 | RET(1); 99 | } 100 | 101 | 102 | static void 103 | deskno_destructor(plugin_instance *p) 104 | { 105 | deskno_priv *dc = (deskno_priv *) p; 106 | 107 | ENTER; 108 | g_signal_handlers_disconnect_by_func(G_OBJECT(fbev), name_update, dc); 109 | g_signal_handlers_disconnect_by_func(G_OBJECT(fbev), update, dc); 110 | RET(); 111 | } 112 | 113 | static plugin_class class = { 114 | .type = "deskno", 115 | .name = "Desktop No v1", 116 | .version = "0.6", 117 | .description = "Display workspace number", 118 | .priv_size = sizeof(deskno_priv), 119 | 120 | .constructor = deskno_constructor, 121 | .destructor = deskno_destructor, 122 | }; 123 | static plugin_class *class_ptr = (plugin_class *) &class; 124 | -------------------------------------------------------------------------------- /plugins/deskno2/#Makefile#: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | 6 | include $(TOPDIR)/.config/rules.mk 7 | -------------------------------------------------------------------------------- /plugins/deskno2/.gitignore: -------------------------------------------------------------------------------- 1 | deskno2.o 2 | deskno2.d 3 | libdeskno2.so 4 | -------------------------------------------------------------------------------- /plugins/deskno2/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | deskno2_src = deskno2.c 6 | deskno2_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | deskno2_libs = $(GTK2_LIBS) 8 | deskno2_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/deskno2/deskno2.c: -------------------------------------------------------------------------------- 1 | /* Display workspace number, by cmeury@users.sf.net */ 2 | 3 | #include 4 | #include 5 | #include 6 | 7 | #include "panel.h" 8 | #include "misc.h" 9 | #include "plugin.h" 10 | 11 | //#define DEBUGPRN 12 | #include "dbg.h" 13 | 14 | typedef struct { 15 | plugin_instance plugin; 16 | GtkWidget *main; 17 | int dno; // current desktop nomer 18 | int dnum; // number of desktops 19 | char **dnames; // desktop names 20 | int dnames_num; // number of desktop names 21 | char **lnames; // label names 22 | char *fmt; 23 | } deskno_priv; 24 | 25 | static void 26 | clicked(GtkWidget *widget, deskno_priv *dc) 27 | { 28 | if (system("xfce-setting-show workspaces")); 29 | } 30 | 31 | static void 32 | update_dno(GtkWidget *widget, deskno_priv *dc) 33 | { 34 | ENTER; 35 | dc->dno = fb_ev_current_desktop(fbev); 36 | gtk_button_set_label(GTK_BUTTON(dc->main), dc->lnames[dc->dno]); 37 | 38 | RET(); 39 | } 40 | 41 | static void 42 | update_all(GtkWidget *widget, deskno_priv *dc) 43 | { 44 | int i; 45 | 46 | ENTER; 47 | dc->dnum = fb_ev_number_of_desktops(fbev); 48 | if (dc->dnames) 49 | g_strfreev (dc->dnames); 50 | if (dc->lnames) 51 | g_strfreev (dc->lnames); 52 | dc->dnames = get_utf8_property_list(GDK_ROOT_WINDOW(), a_NET_DESKTOP_NAMES, &(dc->dnames_num)); 53 | dc->lnames = g_new0 (gchar*, dc->dnum + 1); 54 | for (i = 0; i < MIN(dc->dnum, dc->dnames_num); i++) { 55 | dc->lnames[i] = g_strdup(dc->dnames[i]); 56 | } 57 | for (; i < dc->dnum; i++) { 58 | dc->lnames[i] = g_strdup_printf("%d", i + 1); 59 | } 60 | update_dno(widget, dc); 61 | RET(); 62 | } 63 | 64 | 65 | static gboolean 66 | scroll (GtkWidget *widget, GdkEventScroll *event, deskno_priv *dc) 67 | { 68 | int dno; 69 | 70 | ENTER; 71 | dno = dc->dno + ((event->direction == GDK_SCROLL_UP) ? (-1) : (+1)); 72 | if (dno < 0) 73 | dno = dc->dnum - 1; 74 | else if (dno == dc->dnum) 75 | dno = 0; 76 | Xclimsg(GDK_ROOT_WINDOW(), a_NET_CURRENT_DESKTOP, dno, 0, 0, 0, 0); 77 | RET(TRUE); 78 | 79 | } 80 | 81 | static int 82 | deskno_constructor(plugin_instance *p) 83 | { 84 | deskno_priv *dc; 85 | ENTER; 86 | dc = (deskno_priv *) p; 87 | dc->main = gtk_button_new_with_label("w"); 88 | gtk_button_set_relief(GTK_BUTTON(dc->main),GTK_RELIEF_NONE); 89 | gtk_container_set_border_width(GTK_CONTAINER(dc->main), 0); 90 | //gtk_button_set_alignment(GTK_BUTTON(dc->main), 0, 0.5); 91 | g_signal_connect(G_OBJECT(dc->main), "clicked", G_CALLBACK (clicked), (gpointer) dc); 92 | g_signal_connect(G_OBJECT(dc->main), "scroll-event", G_CALLBACK(scroll), (gpointer) dc); 93 | 94 | update_all(dc->main, dc); 95 | 96 | gtk_container_add(GTK_CONTAINER(p->pwid), dc->main); 97 | gtk_widget_show_all(p->pwid); 98 | 99 | g_signal_connect (G_OBJECT (fbev), "current_desktop", G_CALLBACK (update_dno), (gpointer) dc); 100 | g_signal_connect (G_OBJECT (fbev), "desktop_names", G_CALLBACK (update_all), (gpointer) dc); 101 | g_signal_connect (G_OBJECT (fbev), "number_of_desktops", G_CALLBACK (update_all), (gpointer) dc); 102 | 103 | RET(1); 104 | } 105 | 106 | 107 | static void 108 | deskno_destructor(plugin_instance *p) 109 | { 110 | deskno_priv *dc = (deskno_priv *) p; 111 | 112 | ENTER; 113 | /* disconnect ALL handlers matching func and data */ 114 | g_signal_handlers_disconnect_by_func(G_OBJECT(fbev), update_dno, dc); 115 | g_signal_handlers_disconnect_by_func(G_OBJECT(fbev), update_all, dc); 116 | if (dc->dnames) 117 | g_strfreev(dc->dnames); 118 | if (dc->lnames) 119 | g_strfreev(dc->lnames); 120 | RET(); 121 | } 122 | 123 | static plugin_class class = { 124 | .count = 0, 125 | .type = "deskno2", 126 | .name = "Desktop No v2", 127 | .version = "0.6", 128 | .description = "Display workspace number", 129 | .priv_size = sizeof(deskno_priv), 130 | 131 | .constructor = deskno_constructor, 132 | .destructor = deskno_destructor, 133 | }; 134 | static plugin_class *class_ptr = (plugin_class *) &class; 135 | -------------------------------------------------------------------------------- /plugins/genmon/.gitignore: -------------------------------------------------------------------------------- 1 | genmon.o 2 | genmon.d 3 | libgenmon.so 4 | -------------------------------------------------------------------------------- /plugins/genmon/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | genmon_src = genmon.c 6 | genmon_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | genmon_libs = $(GTK2_LIBS) 8 | genmon_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/genmon/genmon.c: -------------------------------------------------------------------------------- 1 | /* genmon_priv.c -- Generic monitor plugin for fbpanel 2 | * 3 | * Copyright (C) 2007 Davide Truffa 4 | * 5 | * This plugin is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; version 2 dated June, 1991. 8 | * 9 | * It is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | */ 14 | 15 | #include 16 | #include 17 | #include 18 | #include 19 | 20 | #include "panel.h" 21 | #include "misc.h" 22 | #include "plugin.h" 23 | 24 | //#define DEBUG 25 | #include "dbg.h" 26 | 27 | #define FMT "%s" 28 | 29 | typedef struct { 30 | plugin_instance plugin; 31 | int time; 32 | int timer; 33 | int max_text_len; 34 | char *command; 35 | char *textsize; 36 | char *textcolor; 37 | GtkWidget *main; 38 | } genmon_priv; 39 | 40 | static int 41 | text_update(genmon_priv *gm) 42 | { 43 | FILE *fp; 44 | char text[256]; 45 | char *markup; 46 | int len; 47 | 48 | ENTER; 49 | fp = popen(gm->command, "r"); 50 | if (fgets(text, sizeof(text), fp)); 51 | pclose(fp); 52 | len = strlen(text) - 1; 53 | if (len >= 0) { 54 | if (text[len] == '\n') 55 | text[len] = 0; 56 | 57 | markup = g_markup_printf_escaped(FMT, gm->textsize, gm->textcolor, 58 | text); 59 | gtk_label_set_markup (GTK_LABEL(gm->main), markup); 60 | g_free(markup); 61 | } 62 | RET(TRUE); 63 | } 64 | 65 | static void 66 | genmon_destructor(plugin_instance *p) 67 | { 68 | genmon_priv *gm = (genmon_priv *) p; 69 | 70 | ENTER; 71 | if (gm->timer) { 72 | g_source_remove(gm->timer); 73 | } 74 | RET(); 75 | } 76 | 77 | static int 78 | genmon_constructor(plugin_instance *p) 79 | { 80 | genmon_priv *gm; 81 | 82 | ENTER; 83 | gm = (genmon_priv *) p; 84 | gm->command = "date +%R"; 85 | gm->time = 1; 86 | gm->textsize = "medium"; 87 | gm->textcolor = "darkblue"; 88 | gm->max_text_len = 30; 89 | 90 | XCG(p->xc, "Command", &gm->command, str); 91 | XCG(p->xc, "TextSize", &gm->textsize, str); 92 | XCG(p->xc, "TextColor", &gm->textcolor, str); 93 | XCG(p->xc, "PollingTime", &gm->time, int); 94 | XCG(p->xc, "MaxTextLength", &gm->max_text_len, int); 95 | 96 | gm->main = gtk_label_new(NULL); 97 | gtk_label_set_max_width_chars(GTK_LABEL(gm->main), gm->max_text_len); 98 | text_update(gm); 99 | gtk_container_set_border_width (GTK_CONTAINER (p->pwid), 1); 100 | gtk_container_add(GTK_CONTAINER(p->pwid), gm->main); 101 | gtk_widget_show_all(p->pwid); 102 | gm->timer = g_timeout_add((guint) gm->time * 1000, 103 | (GSourceFunc) text_update, (gpointer) gm); 104 | 105 | RET(1); 106 | } 107 | 108 | 109 | static plugin_class class = { 110 | .count = 0, 111 | .type = "genmon", 112 | .name = "Generic Monitor", 113 | .version = "0.3", 114 | .description = "Display the output of a program/script into the panel", 115 | .priv_size = sizeof(genmon_priv), 116 | 117 | .constructor = genmon_constructor, 118 | .destructor = genmon_destructor, 119 | }; 120 | static plugin_class *class_ptr = (plugin_class *) &class; 121 | -------------------------------------------------------------------------------- /plugins/icons/.gitignore: -------------------------------------------------------------------------------- 1 | icons.o 2 | icons.d 3 | libicons.so 4 | -------------------------------------------------------------------------------- /plugins/icons/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | icons_src = icons.c 6 | icons_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | icons_libs = $(GTK2_LIBS) 8 | icons_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/image/.gitignore: -------------------------------------------------------------------------------- 1 | image.o 2 | image.d 3 | libimage.so 4 | -------------------------------------------------------------------------------- /plugins/image/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | image_src = image.c 6 | image_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | image_libs = $(GTK2_LIBS) 8 | image_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/image/image.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include "panel.h" 6 | #include "misc.h" 7 | #include "plugin.h" 8 | 9 | //#define DEBUGPRN 10 | #include "dbg.h" 11 | 12 | 13 | typedef struct { 14 | plugin_instance plugin; 15 | GdkPixmap *pix; 16 | GdkBitmap *mask; 17 | GtkWidget *mainw; 18 | } image_priv; 19 | 20 | 21 | 22 | static void 23 | image_destructor(plugin_instance *p) 24 | { 25 | image_priv *img = (image_priv *) p; 26 | 27 | ENTER; 28 | gtk_widget_destroy(img->mainw); 29 | if (img->mask) 30 | g_object_unref(img->mask); 31 | if (img->pix) 32 | g_object_unref(img->pix); 33 | RET(); 34 | } 35 | 36 | static int 37 | image_constructor(plugin_instance *p) 38 | { 39 | gchar *tooltip, *fname; 40 | image_priv *img; 41 | GdkPixbuf *gp, *gps; 42 | GtkWidget *wid; 43 | GError *err = NULL; 44 | 45 | ENTER; 46 | img = (image_priv *) p; 47 | tooltip = fname = 0; 48 | XCG(p->xc, "image", &fname, str); 49 | XCG(p->xc, "tooltip", &tooltip, str); 50 | fname = expand_tilda(fname); 51 | 52 | img->mainw = gtk_event_box_new(); 53 | gtk_widget_show(img->mainw); 54 | //g_signal_connect(G_OBJECT(img->mainw), "expose_event", 55 | // G_CALLBACK(gtk_widget_queue_draw), NULL); 56 | gp = gdk_pixbuf_new_from_file(fname, &err); 57 | if (!gp) { 58 | g_warning("image: can't read image %s\n", fname); 59 | wid = gtk_label_new("?"); 60 | } else { 61 | float ratio; 62 | 63 | ratio = (p->panel->orientation == GTK_ORIENTATION_HORIZONTAL) ? 64 | (float) (p->panel->ah - 2) / (float) gdk_pixbuf_get_height(gp) 65 | : (float) (p->panel->aw - 2) / (float) gdk_pixbuf_get_width(gp); 66 | gps = gdk_pixbuf_scale_simple (gp, 67 | ratio * ((float) gdk_pixbuf_get_width(gp)), 68 | ratio * ((float) gdk_pixbuf_get_height(gp)), 69 | GDK_INTERP_HYPER); 70 | gdk_pixbuf_render_pixmap_and_mask(gps, &img->pix, &img->mask, 127); 71 | g_object_unref(gp); 72 | g_object_unref(gps); 73 | wid = gtk_image_new_from_pixmap(img->pix, img->mask); 74 | 75 | } 76 | gtk_widget_show(wid); 77 | gtk_container_add(GTK_CONTAINER(img->mainw), wid); 78 | gtk_container_set_border_width(GTK_CONTAINER(img->mainw), 0); 79 | g_free(fname); 80 | gtk_container_add(GTK_CONTAINER(p->pwid), img->mainw); 81 | if (tooltip) { 82 | gtk_widget_set_tooltip_markup(img->mainw, tooltip); 83 | g_free(tooltip); 84 | } 85 | RET(1); 86 | } 87 | 88 | 89 | static plugin_class class = { 90 | .count = 0, 91 | .type = "image", 92 | .name = "Show Image", 93 | .version = "1.0", 94 | .description = "Dispaly Image and Tooltip", 95 | .priv_size = sizeof(image_priv), 96 | 97 | .constructor = image_constructor, 98 | .destructor = image_destructor, 99 | }; 100 | static plugin_class *class_ptr = (plugin_class *) &class; 101 | -------------------------------------------------------------------------------- /plugins/launchbar/.gitignore: -------------------------------------------------------------------------------- 1 | launchbar.o 2 | launchbar.d 3 | liblaunchbar.so 4 | -------------------------------------------------------------------------------- /plugins/launchbar/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | launchbar_src = launchbar.c 6 | launchbar_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | launchbar_libs = $(GTK2_LIBS) 8 | launchbar_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/mem/.gitignore: -------------------------------------------------------------------------------- 1 | mem.o 2 | mem.d 3 | libmem.so 4 | -------------------------------------------------------------------------------- /plugins/mem/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | mem_src = mem.c 6 | mem_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | mem_libs = $(GTK2_LIBS) 8 | mem_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/mem/mem.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | #include "panel.h" 11 | #include "misc.h" 12 | #include "plugin.h" 13 | 14 | //#define DEBUGPRN 15 | #include "dbg.h" 16 | 17 | 18 | typedef struct 19 | { 20 | plugin_instance plugin; 21 | GtkWidget *mem_pb; 22 | GtkWidget *swap_pb; 23 | GtkWidget *box; 24 | int timer; 25 | int show_swap; 26 | } mem_priv; 27 | 28 | typedef struct 29 | { 30 | char *name; 31 | gulong val; 32 | int valid; 33 | } mem_type_t; 34 | 35 | typedef struct 36 | { 37 | struct 38 | { 39 | gulong total; 40 | gulong used; 41 | } mem; 42 | struct 43 | { 44 | gulong total; 45 | gulong used; 46 | } swap; 47 | } stats_t; 48 | 49 | static stats_t stats; 50 | 51 | #if defined __linux__ 52 | #undef MT_ADD 53 | #define MT_ADD(x) MT_ ## x, 54 | enum { 55 | #include "mt.h" 56 | MT_NUM 57 | }; 58 | 59 | #undef MT_ADD 60 | #define MT_ADD(x) { #x, 0, 0 }, 61 | mem_type_t mt[] = 62 | { 63 | #include "mt.h" 64 | }; 65 | 66 | static gboolean 67 | mt_match(char *buf, mem_type_t *m) 68 | { 69 | gulong val; 70 | int len; 71 | 72 | len = strlen(m->name); 73 | if (strncmp(buf, m->name, len)) 74 | return FALSE; 75 | if (sscanf(buf + len + 1, "%lu", &val) != 1) 76 | return FALSE; 77 | m->val = val; 78 | m->valid = 1; 79 | DBG("%s: %lu\n", m->name, val); 80 | return TRUE; 81 | } 82 | 83 | static void 84 | mem_usage() 85 | { 86 | FILE *fp; 87 | char buf[160]; 88 | int i; 89 | 90 | fp = fopen("/proc/meminfo", "r"); 91 | if (!fp) 92 | return; 93 | for (i = 0; i < MT_NUM; i++) 94 | { 95 | mt[i].valid = 0; 96 | mt[i].val = 0; 97 | } 98 | 99 | while ((fgets(buf, sizeof(buf), fp)) != NULL) 100 | { 101 | for (i = 0; i < MT_NUM; i++) 102 | { 103 | if (!mt[i].valid && mt_match(buf, mt + i)) 104 | break; 105 | } 106 | } 107 | fclose(fp); 108 | 109 | stats.mem.total = mt[MT_MemTotal].val; 110 | stats.mem.used = mt[MT_MemTotal].val -(mt[MT_MemFree].val + 111 | mt[MT_Buffers].val + mt[MT_Cached].val + mt[MT_Slab].val); 112 | stats.swap.total = mt[MT_SwapTotal].val; 113 | stats.swap.used = mt[MT_SwapTotal].val - mt[MT_SwapFree].val; 114 | } 115 | #else 116 | static void 117 | mem_usage() 118 | { 119 | 120 | } 121 | #endif 122 | 123 | static gboolean 124 | mem_update(mem_priv *mem) 125 | { 126 | gdouble mu, su; 127 | char str[90]; 128 | 129 | ENTER; 130 | mu = su = 0; 131 | bzero(&stats, sizeof(stats)); 132 | mem_usage(); 133 | if (stats.mem.total) 134 | mu = (gdouble) stats.mem.used / (gdouble) stats.mem.total; 135 | if (stats.swap.total) 136 | su = (gdouble) stats.swap.used / (gdouble) stats.swap.total; 137 | g_snprintf(str, sizeof(str), 138 | "Mem: %d%%, %lu MB of %lu MB\n" 139 | "Swap: %d%%, %lu MB of %lu MB", 140 | (int)(mu * 100), stats.mem.used >> 10, stats.mem.total >> 10, 141 | (int)(su * 100), stats.swap.used >> 10, stats.swap.total >> 10); 142 | DBG("%s\n", str); 143 | gtk_widget_set_tooltip_markup(mem->plugin.pwid, str); 144 | gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(mem->mem_pb), mu); 145 | if (mem->show_swap) 146 | gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR(mem->swap_pb), su); 147 | RET(TRUE); 148 | } 149 | 150 | 151 | static void 152 | mem_destructor(plugin_instance *p) 153 | { 154 | mem_priv *mem = (mem_priv *)p; 155 | 156 | ENTER; 157 | if (mem->timer) 158 | g_source_remove(mem->timer); 159 | gtk_widget_destroy(mem->box); 160 | RET(); 161 | } 162 | 163 | static int 164 | mem_constructor(plugin_instance *p) 165 | { 166 | mem_priv *mem; 167 | gint w, h; 168 | GtkProgressBarOrientation o; 169 | 170 | ENTER; 171 | mem = (mem_priv *) p; 172 | XCG(p->xc, "ShowSwap", &mem->show_swap, enum, bool_enum); 173 | mem->box = p->panel->my_box_new(FALSE, 0); 174 | gtk_container_set_border_width (GTK_CONTAINER (mem->box), 0); 175 | 176 | if (p->panel->orientation == GTK_ORIENTATION_HORIZONTAL) 177 | { 178 | o = GTK_PROGRESS_BOTTOM_TO_TOP; 179 | w = 9; 180 | h = 0; 181 | } 182 | else 183 | { 184 | o = GTK_PROGRESS_LEFT_TO_RIGHT; 185 | w = 0; 186 | h = 9; 187 | } 188 | mem->mem_pb = gtk_progress_bar_new(); 189 | gtk_box_pack_start(GTK_BOX(mem->box), mem->mem_pb, FALSE, FALSE, 0); 190 | gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(mem->mem_pb), o); 191 | gtk_widget_set_size_request(mem->mem_pb, w, h); 192 | 193 | if (mem->show_swap) 194 | { 195 | mem->swap_pb = gtk_progress_bar_new(); 196 | gtk_box_pack_start(GTK_BOX(mem->box), mem->swap_pb, FALSE, FALSE, 0); 197 | gtk_progress_bar_set_orientation(GTK_PROGRESS_BAR(mem->swap_pb), o); 198 | gtk_widget_set_size_request(mem->swap_pb, w, h); 199 | } 200 | 201 | gtk_widget_show_all(mem->box); 202 | gtk_container_add(GTK_CONTAINER(p->pwid), mem->box); 203 | gtk_widget_set_tooltip_markup(mem->plugin.pwid, "XXX"); 204 | mem_update(mem); 205 | mem->timer = g_timeout_add(3000, (GSourceFunc) mem_update, (gpointer)mem); 206 | RET(1); 207 | } 208 | 209 | static plugin_class class = { 210 | .fname = NULL, 211 | .count = 0, 212 | .type = "mem", 213 | .name = "Memory Monitor", 214 | .version = "1.0", 215 | .description = "Show memory usage", 216 | .priv_size = sizeof(mem_priv), 217 | 218 | .constructor = mem_constructor, 219 | .destructor = mem_destructor, 220 | }; 221 | static plugin_class *class_ptr = (plugin_class *) &class; 222 | -------------------------------------------------------------------------------- /plugins/mem/mt.h: -------------------------------------------------------------------------------- 1 | 2 | /* Memory types (MT) to scan in /proc/meminfo */ 3 | MT_ADD(MemTotal) 4 | MT_ADD(MemFree) 5 | MT_ADD(MemShared) 6 | MT_ADD(Slab) 7 | MT_ADD(Buffers) 8 | MT_ADD(Cached) 9 | 10 | MT_ADD(SwapTotal) 11 | MT_ADD(SwapFree) 12 | -------------------------------------------------------------------------------- /plugins/mem2/.gitignore: -------------------------------------------------------------------------------- 1 | mem2.o 2 | mem2.d 3 | libmem2.so 4 | -------------------------------------------------------------------------------- /plugins/mem2/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | mem2_src = mem2.c 6 | mem2_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | mem2_libs = $(GTK2_LIBS) 8 | mem2_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/mem2/mem2.c: -------------------------------------------------------------------------------- 1 | /* 2 | * mem usage plugin to fbpanel 3 | * 4 | * Licence: GPLv2 5 | * 6 | * bercik-rrp@users.sf.net 7 | */ 8 | 9 | #include "../chart/chart.h" 10 | #include 11 | #include 12 | 13 | //#define DEBUGPRN 14 | #include "dbg.h" 15 | 16 | #define CHECK_PERIOD 2 /* second */ 17 | 18 | typedef struct { 19 | chart_priv chart; 20 | int timer; 21 | gulong max; 22 | gchar *colors[2]; 23 | } mem2_priv; 24 | 25 | static chart_class *k; 26 | 27 | static void mem2_destructor(plugin_instance *p); 28 | 29 | typedef struct { 30 | char *name; 31 | gulong val; 32 | int valid; 33 | } mem_type_t; 34 | 35 | 36 | #if defined __linux__ 37 | #undef MT_ADD 38 | #define MT_ADD(x) MT_ ## x, 39 | enum { 40 | #include "../mem/mt.h" 41 | MT_NUM 42 | }; 43 | 44 | #undef MT_ADD 45 | #define MT_ADD(x) { #x, 0, 0 }, 46 | mem_type_t mt[] = 47 | { 48 | #include "../mem/mt.h" 49 | }; 50 | 51 | static gboolean 52 | mt_match(char *buf, mem_type_t *m) 53 | { 54 | gulong val; 55 | int len; 56 | 57 | len = strlen(m->name); 58 | if (strncmp(buf, m->name, len)) 59 | return FALSE; 60 | if (sscanf(buf + len + 1, "%lu", &val) != 1) 61 | return FALSE; 62 | m->val = val; 63 | m->valid = 1; 64 | DBG("%s: %lu\n", m->name, val); 65 | return TRUE; 66 | } 67 | 68 | static int 69 | mem_usage(mem2_priv *c) 70 | { 71 | FILE *fp; 72 | char buf[160]; 73 | long unsigned int total[2]; 74 | float total_r[2]; 75 | int i; 76 | 77 | fp = fopen("/proc/meminfo", "r"); 78 | if (!fp) 79 | RET(FALSE);; 80 | for (i = 0; i < MT_NUM; i++) 81 | { 82 | mt[i].valid = 0; 83 | mt[i].val = 0; 84 | } 85 | 86 | while ((fgets(buf, sizeof(buf), fp)) != NULL) 87 | { 88 | for (i = 0; i < MT_NUM; i++) 89 | { 90 | if (!mt[i].valid && mt_match(buf, mt + i)) 91 | break; 92 | } 93 | } 94 | fclose(fp); 95 | 96 | total[0] = (float)(mt[MT_MemTotal].val -(mt[MT_MemFree].val + 97 | mt[MT_Buffers].val + mt[MT_Cached].val + mt[MT_Slab].val)); 98 | total[1] = (float)(mt[MT_SwapTotal].val - mt[MT_SwapFree].val); 99 | total_r[0] = (float)total[0] / mt[MT_MemTotal].val; 100 | total_r[1] = (float)total[1] / mt[MT_SwapTotal].val; 101 | 102 | g_snprintf(buf, sizeof(buf), 103 | "Mem: %d%%, %lu MB of %lu MB\n" 104 | "Swap: %d%%, %lu MB of %lu MB", 105 | (int)(total_r[0] * 100), total[0] >> 10, mt[MT_MemTotal].val >> 10, 106 | (int)(total_r[1] * 100), total[1] >> 10, mt[MT_SwapTotal].val >> 10); 107 | 108 | k->add_tick(&c->chart, total_r); 109 | gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, buf); 110 | RET(TRUE); 111 | 112 | } 113 | #else 114 | static int 115 | mem_usage() 116 | { 117 | 118 | } 119 | #endif 120 | 121 | static int 122 | mem2_constructor(plugin_instance *p) 123 | { 124 | mem2_priv *c; 125 | 126 | if (!(k = class_get("chart"))) 127 | RET(0); 128 | if (!PLUGIN_CLASS(k)->constructor(p)) 129 | RET(0); 130 | c = (mem2_priv *) p; 131 | 132 | c->colors[0] = "red"; 133 | c->colors[1] = NULL; 134 | XCG(p->xc, "MemColor", &c->colors[0], str); 135 | XCG(p->xc, "SwapColor", &c->colors[1], str); 136 | 137 | if (c->colors[1] == NULL) { 138 | k->set_rows(&c->chart, 1, c->colors); 139 | } else { 140 | k->set_rows(&c->chart, 2, c->colors); 141 | } 142 | gtk_widget_set_tooltip_markup(((plugin_instance *)c)->pwid, 143 | "Memory"); 144 | mem_usage(c); 145 | c->timer = g_timeout_add(CHECK_PERIOD * 1000, 146 | (GSourceFunc) mem_usage, (gpointer) c); 147 | RET(1); 148 | } 149 | 150 | 151 | static void 152 | mem2_destructor(plugin_instance *p) 153 | { 154 | mem2_priv *c = (mem2_priv *) p; 155 | 156 | ENTER; 157 | if (c->timer) 158 | g_source_remove(c->timer); 159 | PLUGIN_CLASS(k)->destructor(p); 160 | class_put("chart"); 161 | RET(); 162 | } 163 | 164 | 165 | static plugin_class class = { 166 | .fname = NULL, 167 | .count = 0, 168 | .type = "mem2", 169 | .name = "Chart Memory Monitor", 170 | .version = "1.0", 171 | .description = "Show memory usage as chart", 172 | .priv_size = sizeof(mem2_priv), 173 | 174 | .constructor = mem2_constructor, 175 | .destructor = mem2_destructor, 176 | }; 177 | static plugin_class *class_ptr = (plugin_class *) &class; 178 | -------------------------------------------------------------------------------- /plugins/menu/.gitignore: -------------------------------------------------------------------------------- 1 | menu.o 2 | menu.d 3 | system_menu.o 4 | system_menu.d 5 | libmenu.so 6 | -------------------------------------------------------------------------------- /plugins/menu/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | menu_src = menu.c \ 6 | system_menu.c 7 | menu_cflags = -DPLUGIN $(GTK2_CFLAGS) 8 | menu_libs = $(GTK2_LIBS) 9 | menu_type = lib 10 | 11 | include $(TOPDIR)/.config/rules.mk 12 | -------------------------------------------------------------------------------- /plugins/menu/menu.h: -------------------------------------------------------------------------------- 1 | #ifndef MENU_H 2 | #define MENU_H 3 | 4 | 5 | #include "plugin.h" 6 | #include "panel.h" 7 | 8 | #define MENU_DEFAULT_ICON_SIZE 22 9 | 10 | typedef struct { 11 | plugin_instance plugin; 12 | GtkWidget *menu, *bg; 13 | int iconsize, paneliconsize; 14 | xconf *xc; 15 | guint tout, rtout; 16 | gboolean has_system_menu; 17 | time_t btime; 18 | gint icon_size; 19 | } menu_priv; 20 | 21 | typedef struct { 22 | plugin_class plugin; 23 | } menu_class; 24 | 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /plugins/meter/.gitignore: -------------------------------------------------------------------------------- 1 | meter.o 2 | meter.d 3 | libmeter.so 4 | -------------------------------------------------------------------------------- /plugins/meter/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | meter_src = meter.c 6 | meter_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | meter_libs = $(GTK2_LIBS) 8 | meter_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/meter/meter.c: -------------------------------------------------------------------------------- 1 | 2 | #include "plugin.h" 3 | #include "panel.h" 4 | #include "meter.h" 5 | 6 | 7 | //#define DEBUGPRN 8 | #include "dbg.h" 9 | float roundf(float x); 10 | 11 | /* level - per cent level from 0 to 100 */ 12 | static void 13 | meter_set_level(meter_priv *m, int level) 14 | { 15 | int i; 16 | GdkPixbuf *pb; 17 | 18 | ENTER; 19 | if (m->level == level) 20 | RET(); 21 | if (!m->num) 22 | RET(); 23 | if (level < 0 || level > 100) { 24 | ERR("meter: illegal level %d\n", level); 25 | RET(); 26 | } 27 | i = roundf((gfloat) level / 100 * (m->num - 1)); 28 | DBG("level=%f icon=%d\n", level, i); 29 | if (i != m->cur_icon) { 30 | m->cur_icon = i; 31 | pb = gtk_icon_theme_load_icon(icon_theme, m->icons[i], 32 | m->size, GTK_ICON_LOOKUP_FORCE_SIZE, NULL); 33 | DBG("loading icon '%s' %s\n", m->icons[i], pb ? "ok" : "failed"); 34 | gtk_image_set_from_pixbuf(GTK_IMAGE(m->meter), pb); 35 | if (pb) 36 | g_object_unref(G_OBJECT(pb)); 37 | } 38 | m->level = level; 39 | RET(); 40 | } 41 | 42 | static void 43 | meter_set_icons(meter_priv *m, gchar **icons) 44 | { 45 | gchar **s; 46 | 47 | ENTER; 48 | if (m->icons == icons) 49 | RET(); 50 | for (s = icons; *s; s++) 51 | DBG("icon %s\n", *s); 52 | m->num = (s - icons); 53 | DBG("total %d icons\n", m->num); 54 | m->icons = icons; 55 | m->cur_icon = -1; 56 | m->level = -1; 57 | RET(); 58 | } 59 | static void 60 | update_view(meter_priv *m) 61 | { 62 | ENTER; 63 | m->cur_icon = -1; 64 | meter_set_level(m, m->level); 65 | RET(); 66 | } 67 | 68 | static int 69 | meter_constructor(plugin_instance *p) 70 | { 71 | meter_priv *m; 72 | 73 | ENTER; 74 | m = (meter_priv *) p; 75 | m->meter = gtk_image_new(); 76 | gtk_misc_set_alignment(GTK_MISC(m->meter), 0.5, 0.5); 77 | gtk_misc_set_padding(GTK_MISC(m->meter), 0, 0); 78 | gtk_widget_show(m->meter); 79 | gtk_container_add(GTK_CONTAINER(p->pwid), m->meter); 80 | m->cur_icon = -1; 81 | m->size = p->panel->max_elem_height; 82 | m->itc_id = g_signal_connect_swapped(G_OBJECT(icon_theme), 83 | "changed", (GCallback) update_view, m); 84 | RET(1); 85 | } 86 | 87 | static void 88 | meter_destructor(plugin_instance *p) 89 | { 90 | meter_priv *m = (meter_priv *) p; 91 | 92 | ENTER; 93 | g_signal_handler_disconnect(G_OBJECT(icon_theme), m->itc_id); 94 | RET(); 95 | } 96 | 97 | static meter_class class = { 98 | .plugin = { 99 | .type = "meter", 100 | .name = "Meter", 101 | .description = "Basic meter plugin", 102 | .version = "1.0", 103 | .priv_size = sizeof(meter_priv), 104 | 105 | .constructor = meter_constructor, 106 | .destructor = meter_destructor, 107 | }, 108 | .set_level = meter_set_level, 109 | .set_icons = meter_set_icons, 110 | }; 111 | 112 | 113 | static plugin_class *class_ptr = (plugin_class *) &class; 114 | -------------------------------------------------------------------------------- /plugins/meter/meter.h: -------------------------------------------------------------------------------- 1 | #ifndef meter_H 2 | #define meter_H 3 | 4 | #include "plugin.h" 5 | #include "panel.h" 6 | 7 | typedef struct { 8 | plugin_instance plugin; 9 | gchar **icons; 10 | gint num; 11 | GtkWidget *meter; 12 | gfloat level; 13 | gint cur_icon; 14 | gint size; 15 | gint itc_id; 16 | } meter_priv; 17 | 18 | typedef struct { 19 | plugin_class plugin; 20 | void (*set_level)(meter_priv *c, int val); 21 | void (*set_icons)(meter_priv *c, gchar **icons); 22 | } meter_class; 23 | 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /plugins/net/.gitignore: -------------------------------------------------------------------------------- 1 | net.o 2 | net.d 3 | libnet.so 4 | -------------------------------------------------------------------------------- /plugins/net/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | net_src = net.c 6 | net_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | net_libs = $(GTK2_LIBS) 8 | net_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/pager/.gitignore: -------------------------------------------------------------------------------- 1 | pager.o 2 | pager.d 3 | libpager.so 4 | -------------------------------------------------------------------------------- /plugins/pager/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | pager_src = pager.c 6 | pager_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | pager_libs = $(GTK2_LIBS) 8 | pager_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/separator/.gitignore: -------------------------------------------------------------------------------- 1 | separator.o 2 | separator.d 3 | libseparator.so 4 | -------------------------------------------------------------------------------- /plugins/separator/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | separator_src = separator.c 6 | separator_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | separator_libs = $(GTK2_LIBS) 8 | separator_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/separator/separator.c: -------------------------------------------------------------------------------- 1 | 2 | 3 | #include "panel.h" 4 | #include "misc.h" 5 | #include "plugin.h" 6 | 7 | 8 | //#define DEBUGPRN 9 | #include "dbg.h" 10 | 11 | 12 | static int 13 | separator_constructor(plugin_instance *p) 14 | { 15 | GtkWidget *sep; 16 | 17 | ENTER; 18 | sep = p->panel->my_separator_new(); 19 | gtk_container_add(GTK_CONTAINER(p->pwid), sep); 20 | gtk_widget_show_all(p->pwid); 21 | RET(1); 22 | } 23 | 24 | static void 25 | separator_destructor(plugin_instance *p) 26 | { 27 | ENTER; 28 | RET(); 29 | } 30 | 31 | 32 | static plugin_class class = { 33 | .count = 0, 34 | .type = "separator", 35 | .name = "Separator", 36 | .version = "1.0", 37 | .description = "Separator line", 38 | .priv_size = sizeof(plugin_instance), 39 | 40 | .constructor = separator_constructor, 41 | .destructor = separator_destructor, 42 | }; 43 | static plugin_class *class_ptr = (plugin_class *) &class; 44 | -------------------------------------------------------------------------------- /plugins/space/.gitignore: -------------------------------------------------------------------------------- 1 | space.o 2 | space.d 3 | libspace.so 4 | -------------------------------------------------------------------------------- /plugins/space/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | space_src = space.c 6 | space_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | space_libs = $(GTK2_LIBS) 8 | space_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/space/space.c: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include 4 | 5 | #include "panel.h" 6 | #include "misc.h" 7 | #include "plugin.h" 8 | 9 | //#define DEBUGPRN 10 | #include "dbg.h" 11 | 12 | 13 | typedef struct { 14 | plugin_instance plugin; 15 | int size; 16 | GtkWidget *mainw; 17 | 18 | } space_priv; 19 | 20 | static void 21 | space_destructor(plugin_instance *p) 22 | { 23 | ENTER; 24 | RET(); 25 | } 26 | 27 | static int 28 | space_constructor(plugin_instance *p) 29 | { 30 | int w, h, size; 31 | 32 | ENTER; 33 | size = 1; 34 | XCG(p->xc, "size", &size, int); 35 | 36 | if (p->panel->orientation == GTK_ORIENTATION_HORIZONTAL) { 37 | h = 2; 38 | w = size; 39 | } else { 40 | w = 2; 41 | h = size; 42 | } 43 | gtk_widget_set_size_request(p->pwid, w, h); 44 | RET(1); 45 | } 46 | 47 | static plugin_class class = { 48 | .fname = NULL, 49 | .count = 0, 50 | .type = "space", 51 | .name = "Space", 52 | .version = "1.0", 53 | .description = "Ocupy space in a panel", 54 | .priv_size = sizeof(space_priv), 55 | 56 | .constructor = space_constructor, 57 | .destructor = space_destructor, 58 | }; 59 | static plugin_class *class_ptr = (plugin_class *) &class; 60 | -------------------------------------------------------------------------------- /plugins/systray/.gitignore: -------------------------------------------------------------------------------- 1 | egg-marshal.o 2 | egg-marshal.d 3 | eggtraymanager.o 4 | eggtraymanager.d 5 | fixedtip.o 6 | fixedtip.d 7 | main.o 8 | main.d 9 | libtray.so 10 | -------------------------------------------------------------------------------- /plugins/systray/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | tray_src = egg-marshal.c \ 6 | eggtraymanager.c \ 7 | fixedtip.c \ 8 | main.c 9 | tray_cflags = -DPLUGIN $(GTK2_CFLAGS) 10 | tray_libs = $(GTK2_LIBS) 11 | tray_type = lib 12 | 13 | include $(TOPDIR)/.config/rules.mk 14 | -------------------------------------------------------------------------------- /plugins/systray/egg-marshal.c: -------------------------------------------------------------------------------- 1 | #include "eggmarshalers.h" 2 | #include "eggmarshalers.c" 3 | -------------------------------------------------------------------------------- /plugins/systray/eggmarshalers.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef ___egg_marshal_MARSHAL_H__ 3 | #define ___egg_marshal_MARSHAL_H__ 4 | 5 | #include 6 | 7 | G_BEGIN_DECLS 8 | 9 | /* VOID:OBJECT,OBJECT (eggmarshalers.list:1) */ 10 | extern void _egg_marshal_VOID__OBJECT_OBJECT (GClosure *closure, 11 | GValue *return_value, 12 | guint n_param_values, 13 | const GValue *param_values, 14 | gpointer invocation_hint, 15 | gpointer marshal_data); 16 | 17 | /* VOID:OBJECT,STRING,LONG,LONG (eggmarshalers.list:2) */ 18 | extern void _egg_marshal_VOID__OBJECT_STRING_LONG_LONG (GClosure *closure, 19 | GValue *return_value, 20 | guint n_param_values, 21 | const GValue *param_values, 22 | gpointer invocation_hint, 23 | gpointer marshal_data); 24 | 25 | /* VOID:OBJECT,LONG (eggmarshalers.list:3) */ 26 | extern void _egg_marshal_VOID__OBJECT_LONG (GClosure *closure, 27 | GValue *return_value, 28 | guint n_param_values, 29 | const GValue *param_values, 30 | gpointer invocation_hint, 31 | gpointer marshal_data); 32 | 33 | G_END_DECLS 34 | 35 | #endif /* ___egg_marshal_MARSHAL_H__ */ 36 | 37 | -------------------------------------------------------------------------------- /plugins/systray/eggtraymanager.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ 2 | /* eggtraymanager.h 3 | * Copyright (C) 2002 Anders Carlsson 4 | * 5 | * This library is free software; you can redistribute it and/or 6 | * modify it under the terms of the GNU Lesser General Public 7 | * License as published by the Free Software Foundation; either 8 | * version 2 of the License, or (at your option) any later version. 9 | * 10 | * This library is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 | * Lesser General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU Lesser General Public 16 | * License along with this library; if not, write to the 17 | * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 | * Boston, MA 02111-1307, USA. 19 | */ 20 | 21 | #ifndef __EGG_TRAY_MANAGER_H__ 22 | #define __EGG_TRAY_MANAGER_H__ 23 | 24 | #include 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define EGG_TYPE_TRAY_MANAGER (egg_tray_manager_get_type ()) 30 | #define EGG_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_TRAY_MANAGER, EggTrayManager)) 31 | #define EGG_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_TRAY_MANAGER, EggTrayManagerClass)) 32 | #define EGG_IS_TRAY_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_TRAY_MANAGER)) 33 | #define EGG_IS_TRAY_MANAGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_TRAY_MANAGER)) 34 | #define EGG_TRAY_MANAGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_TRAY_MANAGER, EggTrayManagerClass)) 35 | 36 | typedef struct _EggTrayManager EggTrayManager; 37 | typedef struct _EggTrayManagerClass EggTrayManagerClass; 38 | typedef struct _EggTrayManagerChild EggTrayManagerChild; 39 | 40 | struct _EggTrayManager 41 | { 42 | GObject parent_instance; 43 | 44 | Atom opcode_atom; 45 | Atom selection_atom; 46 | Atom message_data_atom; 47 | 48 | GtkWidget *invisible; 49 | GdkScreen *screen; 50 | 51 | GList *messages; 52 | GHashTable *socket_table; 53 | }; 54 | 55 | struct _EggTrayManagerClass 56 | { 57 | GObjectClass parent_class; 58 | 59 | void (* tray_icon_added) (EggTrayManager *manager, 60 | EggTrayManagerChild *child); 61 | void (* tray_icon_removed) (EggTrayManager *manager, 62 | EggTrayManagerChild *child); 63 | 64 | void (* message_sent) (EggTrayManager *manager, 65 | EggTrayManagerChild *child, 66 | const gchar *message, 67 | glong id, 68 | glong timeout); 69 | 70 | void (* message_cancelled) (EggTrayManager *manager, 71 | EggTrayManagerChild *child, 72 | glong id); 73 | 74 | void (* lost_selection) (EggTrayManager *manager); 75 | }; 76 | 77 | GType egg_tray_manager_get_type (void); 78 | 79 | gboolean egg_tray_manager_check_running (GdkScreen *screen); 80 | EggTrayManager *egg_tray_manager_new (void); 81 | gboolean egg_tray_manager_manage_screen (EggTrayManager *manager, 82 | GdkScreen *screen); 83 | char *egg_tray_manager_get_child_title (EggTrayManager *manager, 84 | EggTrayManagerChild *child); 85 | 86 | G_END_DECLS 87 | 88 | #endif /* __EGG_TRAY_MANAGER_H__ */ 89 | -------------------------------------------------------------------------------- /plugins/systray/fixedtip.c: -------------------------------------------------------------------------------- 1 | /* Metacity fixed tooltip routine */ 2 | 3 | /* 4 | * Copyright (C) 2001 Havoc Pennington 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as 8 | * published by the Free Software Foundation; either version 2 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | * 02111-1307, USA. 20 | */ 21 | 22 | #include "fixedtip.h" 23 | 24 | static GtkWidget *tip = NULL; 25 | static GtkWidget *label = NULL; 26 | static int screen_width = 0; 27 | static int screen_height = 0; 28 | 29 | static gboolean 30 | button_press_handler (GtkWidget *tip, 31 | GdkEvent *event, 32 | void *data) 33 | { 34 | fixed_tip_hide (); 35 | 36 | return FALSE; 37 | } 38 | 39 | static gboolean 40 | expose_handler (GtkTooltips *tooltips) 41 | { 42 | gtk_paint_flat_box (tip->style, tip->window, 43 | GTK_STATE_NORMAL, GTK_SHADOW_OUT, 44 | NULL, tip, "tooltip", 45 | 0, 0, -1, -1); 46 | 47 | return FALSE; 48 | } 49 | 50 | void 51 | fixed_tip_show (int screen_number, 52 | int root_x, int root_y, 53 | gboolean strut_is_vertical, 54 | int strut, 55 | const char *markup_text) 56 | { 57 | int w, h; 58 | 59 | if (tip == NULL) 60 | { 61 | tip = gtk_window_new (GTK_WINDOW_POPUP); 62 | #ifdef HAVE_GTK_MULTIHEAD 63 | { 64 | GdkScreen *gdk_screen; 65 | 66 | gdk_screen = gdk_display_get_screen (gdk_get_default_display (), 67 | screen_number); 68 | gtk_window_set_screen (GTK_WINDOW (tip), 69 | gdk_screen); 70 | screen_width = gdk_screen_get_width (gdk_screen); 71 | screen_height = gdk_screen_get_height (gdk_screen); 72 | } 73 | #else 74 | screen_width = gdk_screen_width (); 75 | screen_height = gdk_screen_height (); 76 | #endif 77 | 78 | gtk_widget_set_app_paintable (tip, TRUE); 79 | //gtk_window_set_policy (GTK_WINDOW (tip), FALSE, FALSE, TRUE); 80 | gtk_window_set_resizable(GTK_WINDOW (tip), FALSE); 81 | gtk_widget_set_name (tip, "gtk-tooltips"); 82 | gtk_container_set_border_width (GTK_CONTAINER (tip), 4); 83 | 84 | g_signal_connect (G_OBJECT (tip), 85 | "expose_event", 86 | G_CALLBACK (expose_handler), 87 | NULL); 88 | 89 | gtk_widget_add_events (tip, GDK_BUTTON_PRESS_MASK); 90 | 91 | g_signal_connect (G_OBJECT (tip), 92 | "button_press_event", 93 | G_CALLBACK (button_press_handler), 94 | NULL); 95 | 96 | label = gtk_label_new (NULL); 97 | gtk_label_set_line_wrap (GTK_LABEL (label), TRUE); 98 | gtk_misc_set_alignment (GTK_MISC (label), 0.5, 0.5); 99 | gtk_widget_show (label); 100 | 101 | gtk_container_add (GTK_CONTAINER (tip), label); 102 | 103 | g_signal_connect (G_OBJECT (tip), 104 | "destroy", 105 | G_CALLBACK (gtk_widget_destroyed), 106 | &tip); 107 | } 108 | 109 | gtk_label_set_markup (GTK_LABEL (label), markup_text); 110 | 111 | /* FIXME should also handle Xinerama here, just to be 112 | * really cool 113 | */ 114 | gtk_window_get_size (GTK_WINDOW (tip), &w, &h); 115 | 116 | /* pad between panel and message window */ 117 | #define PAD 5 118 | 119 | if (strut_is_vertical) 120 | { 121 | if (strut > root_x) 122 | root_x = strut + PAD; 123 | else 124 | root_x = strut - w - PAD; 125 | 126 | root_y -= h / 2; 127 | } 128 | else 129 | { 130 | if (strut > root_y) 131 | root_y = strut + PAD; 132 | else 133 | root_y = strut - h - PAD; 134 | 135 | root_x -= w / 2; 136 | } 137 | 138 | /* Push onscreen */ 139 | if ((root_x + w) > screen_width) 140 | root_x -= (root_x + w) - screen_width; 141 | 142 | if ((root_y + h) > screen_height) 143 | root_y -= (root_y + h) - screen_height; 144 | 145 | gtk_window_move (GTK_WINDOW (tip), root_x, root_y); 146 | 147 | gtk_widget_show (tip); 148 | } 149 | 150 | void 151 | fixed_tip_hide (void) 152 | { 153 | if (tip) 154 | { 155 | gtk_widget_destroy (tip); 156 | tip = NULL; 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /plugins/systray/fixedtip.h: -------------------------------------------------------------------------------- 1 | /* Fixed tooltip routine */ 2 | 3 | /* 4 | * Copyright (C) 2001 Havoc Pennington, 2002 Red Hat Inc. 5 | * 6 | * This program is free software; you can redistribute it and/or 7 | * modify it under the terms of the GNU General Public License as 8 | * published by the Free Software Foundation; either version 2 of the 9 | * License, or (at your option) any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, but 12 | * WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | * General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 19 | * 02111-1307, USA. 20 | */ 21 | 22 | #ifndef FIXED_TIP_H 23 | #define FIXED_TIP_H 24 | 25 | #include 26 | #include 27 | 28 | /* root_x, root_y are where the speech balloon should be 29 | * "pointing" and the strut is the panel edge we should be 30 | * alongside. 31 | */ 32 | void fixed_tip_show (int screen_number, 33 | int root_x, int root_y, 34 | gboolean strut_is_vertical, 35 | int strut, 36 | const char *markup_text); 37 | void fixed_tip_hide (void); 38 | 39 | 40 | #endif 41 | -------------------------------------------------------------------------------- /plugins/systray/libsystray.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/plugins/systray/libsystray.so -------------------------------------------------------------------------------- /plugins/systray/main.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | #include "panel.h" 8 | #include "misc.h" 9 | #include "plugin.h" 10 | #include "bg.h" 11 | #include "gtkbgbox.h" 12 | #include "gtkbar.h" 13 | 14 | #include "eggtraymanager.h" 15 | #include "fixedtip.h" 16 | 17 | 18 | //#define DEBUGPRN 19 | #include "dbg.h" 20 | 21 | 22 | typedef struct { 23 | plugin_instance plugin; 24 | GtkWidget *box; 25 | EggTrayManager *tray_manager; 26 | FbBg *bg; 27 | gulong sid; 28 | } tray_priv; 29 | 30 | static void 31 | tray_bg_changed(FbBg *bg, GtkWidget *widget) 32 | { 33 | ENTER; 34 | gtk_widget_set_size_request(widget, widget->allocation.width, 35 | widget->allocation.height); 36 | gtk_widget_hide(widget); 37 | if (gtk_events_pending()) 38 | gtk_main_iteration(); 39 | gtk_widget_show(widget); 40 | gtk_widget_set_size_request(widget, -1, -1); 41 | RET(); 42 | } 43 | 44 | static void 45 | tray_added (EggTrayManager *manager, GtkWidget *icon, tray_priv *tr) 46 | { 47 | ENTER; 48 | gtk_box_pack_end(GTK_BOX(tr->box), icon, FALSE, FALSE, 0); 49 | gtk_widget_show(icon); 50 | gdk_display_sync(gtk_widget_get_display(icon)); 51 | tray_bg_changed(NULL, tr->plugin.pwid); 52 | RET(); 53 | } 54 | 55 | static void 56 | tray_removed (EggTrayManager *manager, GtkWidget *icon, tray_priv *tr) 57 | { 58 | ENTER; 59 | DBG("del icon\n"); 60 | tray_bg_changed(NULL, tr->plugin.pwid); 61 | RET(); 62 | } 63 | 64 | static void 65 | message_sent (EggTrayManager *manager, GtkWidget *icon, const char *text, 66 | glong id, glong timeout, void *data) 67 | { 68 | /* FIXME multihead */ 69 | int x, y; 70 | 71 | ENTER; 72 | gdk_window_get_origin (icon->window, &x, &y); 73 | fixed_tip_show (0, x, y, FALSE, gdk_screen_height () - 50, text); 74 | RET(); 75 | } 76 | 77 | static void 78 | message_cancelled (EggTrayManager *manager, GtkWidget *icon, glong id, 79 | void *data) 80 | { 81 | ENTER; 82 | RET(); 83 | } 84 | 85 | static void 86 | tray_destructor(plugin_instance *p) 87 | { 88 | tray_priv *tr = (tray_priv *) p; 89 | 90 | ENTER; 91 | g_signal_handler_disconnect(tr->bg, tr->sid); 92 | g_object_unref(tr->bg); 93 | /* Make sure we drop the manager selection */ 94 | if (tr->tray_manager) 95 | g_object_unref(G_OBJECT(tr->tray_manager)); 96 | fixed_tip_hide(); 97 | RET(); 98 | } 99 | 100 | 101 | static void 102 | tray_size_alloc(GtkWidget *widget, GtkAllocation *a, 103 | tray_priv *tr) 104 | { 105 | int dim, size; 106 | 107 | ENTER; 108 | size = tr->plugin.panel->max_elem_height; 109 | if (tr->plugin.panel->orientation == GTK_ORIENTATION_HORIZONTAL) 110 | dim = a->height / size; 111 | else 112 | dim = a->width / size; 113 | DBG("width=%d height=%d iconsize=%d -> dim=%d\n", 114 | a->width, a->height, size, dim); 115 | gtk_bar_set_dimension(GTK_BAR(tr->box), dim); 116 | RET(); 117 | } 118 | 119 | 120 | static int 121 | tray_constructor(plugin_instance *p) 122 | { 123 | tray_priv *tr; 124 | GdkScreen *screen; 125 | GtkWidget *ali; 126 | 127 | ENTER; 128 | tr = (tray_priv *) p; 129 | class_get("tray"); 130 | ali = gtk_alignment_new(0.5, 0.5, 0, 0); 131 | g_signal_connect(G_OBJECT(ali), "size-allocate", 132 | (GCallback) tray_size_alloc, tr); 133 | gtk_container_set_border_width(GTK_CONTAINER(ali), 0); 134 | gtk_container_add(GTK_CONTAINER(p->pwid), ali); 135 | tr->box = gtk_bar_new(p->panel->orientation, 0, 136 | p->panel->max_elem_height, p->panel->max_elem_height); 137 | gtk_container_add(GTK_CONTAINER(ali), tr->box); 138 | gtk_container_set_border_width(GTK_CONTAINER (tr->box), 0); 139 | gtk_widget_show_all(ali); 140 | tr->bg = fb_bg_get_for_display(); 141 | tr->sid = g_signal_connect(tr->bg, "changed", 142 | G_CALLBACK(tray_bg_changed), p->pwid); 143 | 144 | screen = gtk_widget_get_screen(p->panel->topgwin); 145 | 146 | if (egg_tray_manager_check_running(screen)) { 147 | tr->tray_manager = NULL; 148 | ERR("tray: another systray already running\n"); 149 | RET(1); 150 | } 151 | tr->tray_manager = egg_tray_manager_new (); 152 | if (!egg_tray_manager_manage_screen (tr->tray_manager, screen)) 153 | g_printerr("tray: can't get the system tray manager selection\n"); 154 | 155 | g_signal_connect(tr->tray_manager, "tray_icon_added", 156 | G_CALLBACK(tray_added), tr); 157 | g_signal_connect(tr->tray_manager, "tray_icon_removed", 158 | G_CALLBACK(tray_removed), tr); 159 | g_signal_connect(tr->tray_manager, "message_sent", 160 | G_CALLBACK(message_sent), tr); 161 | g_signal_connect(tr->tray_manager, "message_cancelled", 162 | G_CALLBACK(message_cancelled), tr); 163 | 164 | gtk_widget_show_all(tr->box); 165 | RET(1); 166 | 167 | } 168 | 169 | 170 | static plugin_class class = { 171 | .count = 0, 172 | .type = "tray", 173 | .name = "System tray", 174 | .version = "1.0", 175 | .description = "System tray aka Notification Area", 176 | .priv_size = sizeof(tray_priv), 177 | 178 | .constructor = tray_constructor, 179 | .destructor = tray_destructor, 180 | }; 181 | static plugin_class *class_ptr = (plugin_class *) &class; 182 | -------------------------------------------------------------------------------- /plugins/taskbar/.gitignore: -------------------------------------------------------------------------------- 1 | taskbar.o 2 | taskbar.d 3 | libtaskbar.so 4 | -------------------------------------------------------------------------------- /plugins/taskbar/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | taskbar_src = taskbar.c 6 | taskbar_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | taskbar_libs = $(GTK2_LIBS) 8 | taskbar_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/tclock/.gitignore: -------------------------------------------------------------------------------- 1 | tclock.o 2 | tclock.d 3 | libtclock.so 4 | -------------------------------------------------------------------------------- /plugins/tclock/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | tclock_src = tclock.c 6 | tclock_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | tclock_libs = $(GTK2_LIBS) 8 | tclock_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/unstable/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | SUBDIRS := test 6 | 7 | include $(TOPDIR)/.config/rules.mk 8 | -------------------------------------------------------------------------------- /plugins/unstable/test/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../../.. 4 | 5 | test_src = test.c 6 | test_cflags = $(GTK2_CFLAGS) 7 | test_libs = $(GTK2_LIBS) 8 | test_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/unstable/test/test.c: -------------------------------------------------------------------------------- 1 | 2 | /* 3 | * test - test module. its purpose to continuously change its size by 4 | * allocating and destroying widgets. It helps in debuging panels's 5 | * geometry engine (panel.c ) 6 | */ 7 | 8 | 9 | 10 | #include 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include 16 | 17 | 18 | #include "panel.h" 19 | #include "misc.h" 20 | #include "plugin.h" 21 | 22 | //#define DEBUGPRN 23 | #include "dbg.h" 24 | 25 | 26 | #define WID_NUM 80 27 | 28 | typedef struct { 29 | plugin_instance plugin; 30 | GtkWidget *main; 31 | int count; 32 | int delta; 33 | int timer; 34 | GtkWidget *wid[WID_NUM]; 35 | } test_priv; 36 | 37 | //static dclock me; 38 | 39 | static gint 40 | clock_update(gpointer data) 41 | { 42 | test_priv *dc = (test_priv *)data; 43 | 44 | ENTER; 45 | if (dc->count >= WID_NUM-1) 46 | dc->delta = -1; 47 | else if (dc->count <= 0) 48 | dc->delta = 1; 49 | if (dc->delta == 1) { 50 | dc->wid[dc->count] = gtk_button_new_with_label(" wwwww "); 51 | gtk_widget_show( dc->wid[dc->count] ); 52 | gtk_box_pack_start(GTK_BOX(dc->main), dc->wid[dc->count], TRUE, FALSE, 0); 53 | } else 54 | gtk_widget_destroy(dc->wid[dc->count]); 55 | dc->count += dc->delta; 56 | RET(TRUE); 57 | } 58 | 59 | 60 | static int 61 | test_constructor(plugin_instance *p) 62 | { 63 | test_priv *dc; 64 | line s; 65 | 66 | ENTER; 67 | dc = (test_priv *) p; 68 | dc->delta = 1; 69 | while (get_line(p->fp, &s) != LINE_BLOCK_END) { 70 | ERR( "test: illegal in this context %s\n", s.str); 71 | } 72 | dc->main = p->panel->my_box_new(TRUE, 1); 73 | gtk_widget_show(dc->main); 74 | gtk_container_add(GTK_CONTAINER(p->pwid), dc->main); 75 | dc->timer = g_timeout_add(200, clock_update, (gpointer)dc); 76 | RET(1); 77 | } 78 | 79 | 80 | static void 81 | test_destructor(plugin_instance *p) 82 | { 83 | test_priv *dc = (test_priv *) p; 84 | 85 | ENTER; 86 | if (dc->timer) 87 | g_source_remove(dc->timer); 88 | gtk_widget_destroy(dc->main); 89 | RET(); 90 | } 91 | 92 | static plugin_class class = { 93 | .count = 0, 94 | .type = "test", 95 | .name = "Test plugin", 96 | .version = "1.0", 97 | .description = "Creates and destroys widgets", 98 | .priv_size = sizeof(test_priv), 99 | 100 | .constructor = test_constructor, 101 | .destructor = test_destructor, 102 | }; 103 | static plugin_class *class_ptr = (plugin_class *) &class; 104 | -------------------------------------------------------------------------------- /plugins/user/.gitignore: -------------------------------------------------------------------------------- 1 | user.o 2 | user.d 3 | libuser.so 4 | -------------------------------------------------------------------------------- /plugins/user/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | user_src = user.c 6 | user_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | user_libs = $(GTK2_LIBS) 8 | user_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/user/user.c: -------------------------------------------------------------------------------- 1 | 2 | #include "misc.h" 3 | #include "run.h" 4 | #include "../menu/menu.h" 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | //#define DEBUGPRN 12 | #include "dbg.h" 13 | 14 | typedef struct { 15 | menu_priv chart; 16 | gint dummy; 17 | guint sid; 18 | GPid pid; 19 | } user_priv; 20 | 21 | static menu_class *k; 22 | 23 | 24 | static void user_destructor(plugin_instance *p); 25 | 26 | #define GRAVATAR_LEN 300 27 | 28 | static void 29 | fetch_gravatar_done(GPid pid, gint status, gpointer data) 30 | { 31 | user_priv *c G_GNUC_UNUSED = data; 32 | plugin_instance *p G_GNUC_UNUSED = data; 33 | gchar *image = NULL, *icon = NULL; 34 | 35 | ENTER; 36 | DBG("status %d\n", status); 37 | g_spawn_close_pid(c->pid); 38 | c->pid = 0; 39 | c->sid = 0; 40 | 41 | if (status) 42 | RET(); 43 | DBG("rebuild menu\n"); 44 | XCG(p->xc, "icon", &icon, strdup); 45 | XCG(p->xc, "image", &image, strdup); 46 | XCS(p->xc, "image", image, value); 47 | xconf_del(xconf_find(p->xc, "icon", 0), FALSE); 48 | PLUGIN_CLASS(k)->destructor(p); 49 | PLUGIN_CLASS(k)->constructor(p); 50 | if (image) { 51 | XCS(p->xc, "image", image, value); 52 | g_free(image); 53 | } 54 | if (icon) { 55 | XCS(p->xc, "icon", icon, value); 56 | g_free(icon); 57 | } 58 | RET(); 59 | } 60 | 61 | 62 | static gboolean 63 | fetch_gravatar(gpointer data) 64 | { 65 | user_priv *c G_GNUC_UNUSED = data; 66 | plugin_instance *p G_GNUC_UNUSED = data; 67 | GChecksum *cs; 68 | gchar *gravatar = NULL; 69 | gchar buf[GRAVATAR_LEN]; 70 | // FIXME: select more secure path 71 | gchar *image = "/tmp/gravatar"; 72 | gchar *argv[] = { "wget", "-q", "-O", image, buf, NULL }; 73 | 74 | ENTER; 75 | cs = g_checksum_new(G_CHECKSUM_MD5); 76 | XCG(p->xc, "gravataremail", &gravatar, str); 77 | g_checksum_update(cs, (guchar *) gravatar, -1); 78 | snprintf(buf, sizeof(buf), "http://www.gravatar.com/avatar/%s", 79 | g_checksum_get_string(cs)); 80 | g_checksum_free(cs); 81 | DBG("gravatar '%s'\n", buf); 82 | c->pid = run_app_argv(argv); 83 | c->sid = g_child_watch_add(c->pid, fetch_gravatar_done, data); 84 | RET(FALSE); 85 | } 86 | 87 | 88 | static int 89 | user_constructor(plugin_instance *p) 90 | { 91 | user_priv *c G_GNUC_UNUSED = (user_priv *) p; 92 | gchar *image = NULL; 93 | gchar *icon = NULL; 94 | gchar *gravatar = NULL; 95 | 96 | ENTER; 97 | if (!(k = class_get("menu"))) 98 | RET(0); 99 | XCG(p->xc, "image", &image, str); 100 | XCG(p->xc, "icon", &icon, str); 101 | if (!(image || icon)) 102 | XCS(p->xc, "icon", "avatar-default", value); 103 | if (!PLUGIN_CLASS(k)->constructor(p)) 104 | RET(0); 105 | XCG(p->xc, "gravataremail", &gravatar, str); 106 | DBG("gravatar email '%s'\n", gravatar); 107 | if (gravatar) 108 | g_timeout_add(300, fetch_gravatar, p); 109 | gtk_widget_set_tooltip_markup(p->pwid, "User"); 110 | RET(1); 111 | } 112 | 113 | 114 | static void 115 | user_destructor(plugin_instance *p) 116 | { 117 | user_priv *c G_GNUC_UNUSED = (user_priv *) p; 118 | 119 | ENTER; 120 | PLUGIN_CLASS(k)->destructor(p); 121 | if (c->pid) 122 | kill(c->pid, SIGKILL); 123 | if (c->sid) 124 | g_source_remove(c->sid); 125 | class_put("menu"); 126 | RET(); 127 | } 128 | 129 | 130 | static plugin_class class = { 131 | .count = 0, 132 | .type = "user", 133 | .name = "User menu", 134 | .version = "1.0", 135 | .description = "User photo and menu of user actions", 136 | .priv_size = sizeof(user_priv), 137 | 138 | .constructor = user_constructor, 139 | .destructor = user_destructor, 140 | }; 141 | static plugin_class *class_ptr = (plugin_class *) &class; 142 | -------------------------------------------------------------------------------- /plugins/volume/.gitignore: -------------------------------------------------------------------------------- 1 | volume.o 2 | volume.d 3 | libvolume.so 4 | -------------------------------------------------------------------------------- /plugins/volume/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | volume_src = volume.c 6 | volume_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | volume_libs = $(GTK2_LIBS) 8 | volume_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /plugins/wincmd/.gitignore: -------------------------------------------------------------------------------- 1 | wincmd.o 2 | wincmd.d 3 | libwincmd.so 4 | -------------------------------------------------------------------------------- /plugins/wincmd/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := ../.. 4 | 5 | wincmd_src = wincmd.c 6 | wincmd_cflags = -DPLUGIN $(GTK2_CFLAGS) 7 | wincmd_libs = $(GTK2_LIBS) 8 | wincmd_type = lib 9 | 10 | include $(TOPDIR)/.config/rules.mk 11 | -------------------------------------------------------------------------------- /po/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/po/.gitignore -------------------------------------------------------------------------------- /po/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := .. 4 | 5 | include $(TOPDIR)/.config/rules.mk 6 | -------------------------------------------------------------------------------- /po/fr_FR.UTF-8.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/po/fr_FR.UTF-8.mo -------------------------------------------------------------------------------- /po/fr_FR.UTF-8.po: -------------------------------------------------------------------------------- 1 | # French translations for fbpanel package. 2 | # Copyright (C) 2010 THE fbpanel'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fbpanel package. 4 | # Automatically generated, 2010. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: fbpanel 7.0\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2010-09-30 02:07+0200\n" 11 | "PO-Revision-Date: 2010-09-30 02:07+0200\n" 12 | "Last-Translator: Automaticaly generated\n" 13 | "Language-Team: none\n" 14 | "Language: fr\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=2; plural=(n > 1);\n" 19 | 20 | #: panel/gconf_panel.c:57 21 | msgid "Visual Effects" 22 | msgstr "Effets visuels" 23 | 24 | #: panel/gconf_panel.c:65 25 | msgid "Transparency" 26 | msgstr "Transparence" 27 | 28 | #: panel/gconf_panel.c:69 29 | msgid "Color settings" 30 | msgstr "Couleur" 31 | 32 | #: panel/gconf_panel.c:79 33 | msgid "Round corners" 34 | msgstr "Coins arrondis" 35 | 36 | #: panel/gconf_panel.c:83 37 | msgid "Radius is " 38 | msgstr "Rayon de " 39 | 40 | #: panel/gconf_panel.c:87 panel/gconf_panel.c:101 panel/misc.c:89 41 | msgid "pixels" 42 | msgstr "" 43 | 44 | #: panel/gconf_panel.c:93 45 | msgid "Autohide" 46 | msgstr "Masquer automatiquement" 47 | 48 | #: panel/gconf_panel.c:97 49 | msgid "Height when hidden is " 50 | msgstr "Hauteur quand masqué : " 51 | 52 | #: panel/gconf_panel.c:106 53 | msgid "Max Element Height" 54 | msgstr "Hauteur maxi élément" 55 | 56 | #: panel/gconf_panel.c:138 57 | msgid "Properties" 58 | msgstr "Propriétés" 59 | 60 | #: panel/gconf_panel.c:146 61 | msgid "Do not cover by maximized windows" 62 | msgstr "Non recouvert par les fenêtes maximisées" 63 | 64 | #: panel/gconf_panel.c:150 65 | msgid "Set 'Dock' type" 66 | msgstr "Type 'Dock'" 67 | 68 | #: panel/gconf_panel.c:155 69 | msgid "Set stacking layer" 70 | msgstr "Couche de recouvrement" 71 | 72 | #: panel/gconf_panel.c:159 73 | msgid "Panel is " 74 | msgstr "Le panel est " 75 | 76 | #: panel/gconf_panel.c:164 77 | msgid "all windows" 78 | msgstr "des fenêtres" 79 | 80 | #: panel/gconf_panel.c:209 81 | msgid "Geometry" 82 | msgstr "Géométrie" 83 | 84 | #: panel/gconf_panel.c:216 85 | msgid "Width" 86 | msgstr "Largeur" 87 | 88 | #: panel/gconf_panel.c:226 89 | msgid "Height" 90 | msgstr "Hauteur" 91 | 92 | #: panel/gconf_panel.c:231 93 | msgid "Edge" 94 | msgstr "Bord écran" 95 | 96 | #: panel/gconf_panel.c:236 97 | msgid "Allignment" 98 | msgstr "Alignement" 99 | 100 | #: panel/gconf_panel.c:241 101 | msgid "Margin" 102 | msgstr "Marge" 103 | 104 | #: panel/gconf_panel.c:285 105 | #, c-format 106 | msgid "" 107 | "You're using '%s' profile, stored at\n" 108 | "%s" 109 | msgstr "" 110 | "Vous utilisez le profil '%s', situé dans\n" 111 | "%s" 112 | 113 | #: panel/gconf_panel.c:388 114 | msgid "Panel" 115 | msgstr "" 116 | 117 | #: panel/gconf_panel.c:393 118 | msgid "Plugins" 119 | msgstr "" 120 | 121 | #: panel/gconf_panel.c:398 122 | msgid "Profile" 123 | msgstr "Profil" 124 | #: panel/misc.c:75 panel/misc.c:81 125 | msgid "left" 126 | msgstr "gauche" 127 | 128 | #: panel/misc.c:76 panel/misc.c:82 129 | msgid "right" 130 | msgstr "droite" 131 | 132 | #: panel/misc.c:77 133 | msgid "center" 134 | msgstr "centre" 135 | 136 | #: panel/misc.c:83 137 | msgid "top" 138 | msgstr "haut" 139 | 140 | #: panel/misc.c:84 141 | msgid "bottom" 142 | msgstr "bas" 143 | 144 | #: panel/misc.c:88 145 | msgid "dynamic" 146 | msgstr "dynamique" 147 | 148 | #: panel/misc.c:90 149 | #, c-format 150 | msgid "% of screen" 151 | msgstr "% de l'écran" 152 | 153 | #: panel/misc.c:94 154 | msgid "pixel" 155 | msgstr "" 156 | 157 | #: panel/misc.c:109 158 | msgid "above" 159 | msgstr "au-dessus" 160 | 161 | #: panel/misc.c:110 162 | msgid "below" 163 | msgstr "en-dessous" 164 | 165 | #: panel/panel.c:464 166 | msgid "translator-credits" 167 | msgstr "Calimero " 168 | 169 | #: plugins/menu/system_menu.c:24 170 | msgid "Audio & Video" 171 | msgstr "Audio & Vidéo" 172 | 173 | #: plugins/menu/system_menu.c:25 174 | msgid "Education" 175 | msgstr "Éducation" 176 | 177 | #: plugins/menu/system_menu.c:26 178 | msgid "Game" 179 | msgstr "Jeux" 180 | 181 | #: plugins/menu/system_menu.c:27 182 | msgid "Graphics" 183 | msgstr "Graphisme" 184 | 185 | #: plugins/menu/system_menu.c:28 186 | msgid "Network" 187 | msgstr "Réseau" 188 | 189 | #: plugins/menu/system_menu.c:29 190 | msgid "Office" 191 | msgstr "Bureautique" 192 | 193 | #: plugins/menu/system_menu.c:30 194 | msgid "Settings" 195 | msgstr "Paramètres" 196 | 197 | #: plugins/menu/system_menu.c:31 198 | msgid "System" 199 | msgstr "Système" 200 | 201 | #: plugins/menu/system_menu.c:32 202 | msgid "Utilities" 203 | msgstr "Utilitaires" 204 | 205 | #: plugins/menu/system_menu.c:33 206 | msgid "Development" 207 | msgstr "Développement" 208 | 209 | #: plugins/taskbar/taskbar.c:1267 210 | msgid "Raise" 211 | msgstr "Restaurer" 212 | 213 | #: plugins/taskbar/taskbar.c:1274 214 | msgid "Iconify" 215 | msgstr "Icônifier" 216 | 217 | -------------------------------------------------------------------------------- /po/ru_RU.UTF-8.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/po/ru_RU.UTF-8.mo -------------------------------------------------------------------------------- /po/ru_RU.UTF-8.po: -------------------------------------------------------------------------------- 1 | # Russian translations for fbpanel package. 2 | # Copyright (C) 2010 THE fbpanel'S COPYRIGHT HOLDER 3 | # This file is distributed under the same license as the fbpanel package. 4 | # Automatically generated, 2010. 5 | # 6 | msgid "" 7 | msgstr "" 8 | "Project-Id-Version: fbpanel 7.0\n" 9 | "Report-Msgid-Bugs-To: \n" 10 | "POT-Creation-Date: 2010-09-30 02:02+0200\n" 11 | "PO-Revision-Date: 2010-09-30 02:02+0200\n" 12 | "Last-Translator: Automaticaly generated\n" 13 | "Language-Team: none\n" 14 | "Language: ru\n" 15 | "MIME-Version: 1.0\n" 16 | "Content-Type: text/plain; charset=UTF-8\n" 17 | "Content-Transfer-Encoding: 8bit\n" 18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" 19 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" 20 | 21 | #: panel/gconf_panel.c:57 22 | msgid "Visual Effects" 23 | msgstr "Внешний вид" 24 | 25 | #: panel/gconf_panel.c:65 26 | msgid "Transparency" 27 | msgstr "Прозрачность" 28 | 29 | #: panel/gconf_panel.c:69 30 | msgid "Color settings" 31 | msgstr "Настройки цвета" 32 | 33 | #: panel/gconf_panel.c:79 34 | msgid "Round corners" 35 | msgstr "Закруглённые углы" 36 | 37 | #: panel/gconf_panel.c:83 38 | msgid "Radius is " 39 | msgstr "Радиус" 40 | 41 | #: panel/gconf_panel.c:87 panel/gconf_panel.c:101 panel/misc.c:89 42 | msgid "pixels" 43 | msgstr "точек" 44 | 45 | #: panel/gconf_panel.c:93 46 | msgid "Autohide" 47 | msgstr "Автоскрытие" 48 | 49 | #: panel/gconf_panel.c:97 50 | msgid "Height when hidden is " 51 | msgstr "" 52 | 53 | #: panel/gconf_panel.c:106 54 | msgid "Max Element Height" 55 | msgstr "Максимальная высота элементов" 56 | 57 | #: panel/gconf_panel.c:138 58 | msgid "Properties" 59 | msgstr "Свойства" 60 | 61 | #: panel/gconf_panel.c:146 62 | msgid "Do not cover by maximized windows" 63 | msgstr "Не закрывать другими окнами" 64 | 65 | #: panel/gconf_panel.c:150 66 | msgid "Set 'Dock' type" 67 | msgstr "Установить тип 'Dock' для окна панели" 68 | 69 | #: panel/gconf_panel.c:155 70 | msgid "Set stacking layer" 71 | msgstr "Установить уровень отображения" 72 | 73 | #: panel/gconf_panel.c:159 74 | msgid "Panel is " 75 | msgstr "Панель" 76 | 77 | #: panel/gconf_panel.c:164 78 | msgid "all windows" 79 | msgstr "другими окнами" 80 | 81 | #: panel/gconf_panel.c:209 82 | msgid "Geometry" 83 | msgstr "Размещение" 84 | 85 | #: panel/gconf_panel.c:216 86 | msgid "Width" 87 | msgstr "Ширина" 88 | 89 | #: panel/gconf_panel.c:226 90 | msgid "Height" 91 | msgstr "Высота" 92 | 93 | #: panel/gconf_panel.c:231 94 | msgid "Edge" 95 | msgstr "Расположение" 96 | 97 | #: panel/gconf_panel.c:236 98 | msgid "Allignment" 99 | msgstr "Выравнивание" 100 | 101 | #: panel/gconf_panel.c:241 102 | msgid "Margin" 103 | msgstr "Отступ" 104 | 105 | #: panel/gconf_panel.c:285 106 | #, c-format 107 | msgid "" 108 | "You're using '%s' profile, stored at\n" 109 | "%s" 110 | msgstr "" 111 | "Вы используете профиль '%s', храняшийся в \n" 112 | "%s" 113 | 114 | #: panel/gconf_panel.c:388 115 | msgid "Panel" 116 | msgstr "Панель" 117 | 118 | #: panel/gconf_panel.c:393 119 | msgid "Plugins" 120 | msgstr "Плагины" 121 | 122 | #: panel/gconf_panel.c:398 123 | msgid "Profile" 124 | msgstr "Профиль" 125 | 126 | #: panel/misc.c:75 panel/misc.c:81 127 | msgid "left" 128 | msgstr "слева" 129 | 130 | #: panel/misc.c:76 panel/misc.c:82 131 | msgid "right" 132 | msgstr "справа" 133 | 134 | #: panel/misc.c:77 135 | msgid "center" 136 | msgstr "по центру" 137 | 138 | #: panel/misc.c:83 139 | msgid "top" 140 | msgstr "вверху" 141 | 142 | #: panel/misc.c:84 143 | msgid "bottom" 144 | msgstr "внизу" 145 | 146 | #: panel/misc.c:88 147 | msgid "dynamic" 148 | msgstr "" 149 | 150 | #: panel/misc.c:90 151 | #, c-format 152 | msgid "% of screen" 153 | msgstr "% экрана" 154 | 155 | #: panel/misc.c:94 156 | msgid "pixel" 157 | msgstr "точка" 158 | 159 | #: panel/misc.c:109 160 | msgid "above" 161 | msgstr "над" 162 | 163 | #: panel/misc.c:110 164 | msgid "below" 165 | msgstr "под" 166 | 167 | #: panel/panel.c:464 168 | msgid "translator-credits" 169 | msgstr "" 170 | "Anatoly Asviyan " 171 | 172 | #: plugins/menu/system_menu.c:24 173 | msgid "Audio & Video" 174 | msgstr "Мультимедиа" 175 | 176 | #: plugins/menu/system_menu.c:25 177 | msgid "Education" 178 | msgstr "Образование" 179 | 180 | #: plugins/menu/system_menu.c:26 181 | msgid "Game" 182 | msgstr "Игры" 183 | 184 | #: plugins/menu/system_menu.c:27 185 | msgid "Graphics" 186 | msgstr "Графика" 187 | 188 | #: plugins/menu/system_menu.c:28 189 | msgid "Network" 190 | msgstr "Интернет" 191 | 192 | #: plugins/menu/system_menu.c:29 193 | msgid "Office" 194 | msgstr "Офис" 195 | 196 | #: plugins/menu/system_menu.c:30 197 | msgid "Settings" 198 | msgstr "Настройки" 199 | 200 | #: plugins/menu/system_menu.c:31 201 | msgid "System" 202 | msgstr "Система" 203 | 204 | #: plugins/menu/system_menu.c:32 205 | msgid "Utilities" 206 | msgstr "Утилиты" 207 | 208 | #: plugins/menu/system_menu.c:33 209 | msgid "Development" 210 | msgstr "Разработка" 211 | 212 | #: plugins/taskbar/taskbar.c:1267 213 | msgid "Raise" 214 | msgstr "Развернуть" 215 | 216 | #: plugins/taskbar/taskbar.c:1274 217 | msgid "Iconify" 218 | msgstr "Свернуть" 219 | -------------------------------------------------------------------------------- /scripts/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/scripts/.gitignore -------------------------------------------------------------------------------- /scripts/Makefile: -------------------------------------------------------------------------------- 1 | ## miniconf makefiles ## 1.1 ## 2 | 3 | TOPDIR := .. 4 | 5 | include $(TOPDIR)/.config/rules.mk 6 | -------------------------------------------------------------------------------- /scripts/create_po.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | 3 | function info() 4 | { 5 | cat < $list 43 | 44 | # Create POT file and set charset to be UTF-8 45 | 2>/dev/null xgettext --package-name=$package --package-version=$version \ 46 | --default-domain=$package --from-code=UTF-8 \ 47 | --force-po -k_ -kc_ -f $list -o - |\ 48 | sed '/^"Content-Type:/ s/CHARSET/UTF-8/' > $pot 49 | 50 | # create language translation files, POs 51 | if [ -n "$update" ]; then 52 | old=/tmp/old-$$ 53 | cp $po $old 54 | fi 55 | tr="${translator:-Automaticaly generated}" 56 | 2>/dev/null msginit --no-translator --locale=$locale --input=$pot -o - |\ 57 | sed "/\"Last-Translator:/ s/Auto.*\\\n/$tr\\\n/" > $po 58 | if [ -n "$update" ]; then 59 | scripts/update_po.sh --old=$old --new=$po 60 | rm $old 61 | fi 62 | echo Created $po 63 | rm $pot -------------------------------------------------------------------------------- /scripts/custom.sh: -------------------------------------------------------------------------------- 1 | 2 | 3 | ######################### 4 | ## Custom Settings ## 5 | ######################### 6 | 7 | # Note 1: PWD will be that of configure, not scripts directory, so to run script from 8 | # this directory refer it as 'scripts/name' 9 | 10 | # Note 2: values will be evaluated in the same order they were added, so 11 | # if you want libdir's default value to be '$eprefix/lib', add it after prefix 12 | 13 | add_var package "package name, e.g fbpanel or mplayer" fbpanel 14 | add_var version "package version, e.g 6.2 or 1.4.5-alpha2" 6.2 15 | 16 | # Custom 17 | add_feature dependency "disable dependency tracking" disabled 18 | 19 | add_var glib_cflags "glib cflags" '`RFS=$rfs scripts/rfs-pkg-config --cflags glib-2.0`' 20 | add_var gtk_cflags "gtk cflags" '`RFS=$rfs scripts/rfs-pkg-config --cflags gtk+-2.0`' 21 | 22 | add_var glib_libs "glib libs" '`RFS=$rfs scripts/rfs-pkg-config --libs glib-2.0`' 23 | add_var gtk_libs "gtk libs" '`RFS=$rfs scripts/rfs-pkg-config --libs gtk+-2.0`' 24 | 25 | add_var cflagsx "C flags" '-I$topdir/panel $glib_cflags $gtk_cflags -fPIC' 26 | add_var ldflagsx "linker flags" '$glib_libs $gtk_libs' 27 | 28 | add_var gmodule_libs "gmodule libs" '`scripts/rfs-pkg-config --libs gmodule-2.0`' 29 | 30 | add_feature static_build "build all pluginis into main binary" disabled 31 | -------------------------------------------------------------------------------- /scripts/endianess.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # When cross compiling, you may put cross compiler directory 4 | # in PATH before native gcc (aka spoofing), or you may set CC 5 | # to exact name of cross compiler: 6 | # CC=/opt/ppc_gcc/bin/gcc endianess 7 | 8 | # x86 and friends are considerd LITTLE endian, all others are BIG 9 | a=`${CC:-gcc} -v 2>&1 | grep Target` 10 | [ $? -ne 0 ] && exit 1 11 | #echo $a 12 | 13 | if [ "${a/86/}" != "$a" ]; then 14 | echo LITTLE 15 | else 16 | echo BIG 17 | fi 18 | 19 | -------------------------------------------------------------------------------- /scripts/funcs.sh: -------------------------------------------------------------------------------- 1 | 2 | function error () 3 | { 4 | echo "$@" 5 | exit 1 6 | } 7 | 8 | function print_var () 9 | { 10 | eval echo \"$1=\$$1\" 11 | } 12 | 13 | function check_var () 14 | { 15 | eval [ -n \"\$$1\" ] && return 16 | [ -z "$2" ] && error "Var $1 was not set" 17 | eval $1="$2" 18 | } 19 | 20 | function parse_argv () 21 | { 22 | while [ $# -gt 0 ]; do 23 | if [ "$1" == "--help" ]; then 24 | info 25 | help 26 | exit 0 27 | fi 28 | if [ "${1:0:2}" != "--" ]; then 29 | error "$1 - not a parameter" 30 | fi 31 | tmp="${1:2}" 32 | var=${tmp%%=*} 33 | val=${tmp#*=} 34 | if [ "$var" == "$val" ]; then 35 | let $var=x 36 | fi 37 | eval "$var=\"$val\"" 38 | shift 39 | done 40 | } -------------------------------------------------------------------------------- /scripts/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | usage () 4 | { 5 | echo "install.sh " 6 | } 7 | 8 | 9 | [ $# -eq 3 ] && exit 0 10 | [ $# -lt 4 ] && usage && exit 1 11 | 12 | idir=${DESTDIR}$2 13 | p1=$1 14 | p2=$3 15 | shift 3 16 | 17 | echo install -m $p1 -d "$idir" 18 | install -m $p1 -d "$idir" 19 | echo install -m $p2 "$@" "$idir" 20 | install -m $p2 "$@" "$idir" 21 | 22 | -------------------------------------------------------------------------------- /scripts/install_locale.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dir=/tmp/lo-$$ 4 | mkdir $dir 5 | cp $1.mo $dir 6 | cd $dir 7 | mv $1.mo fbpanel.mo 8 | 9 | # Create name for destination dir. 10 | # Locale has format LL_CC.ENC. (LL - language, CC - country, ENC - encoding) 11 | # Name is LL_CC. but if CC is equal to LL, then name is only LL. 12 | IFS="_" a=(${1%%.*}) 13 | lang=${a[0]} 14 | country=${a[1]} 15 | if [ "${lang^^}" == "$country" ]; then 16 | LC="${lang}" 17 | else 18 | LC="${lang}_${country}" 19 | fi 20 | 21 | install=/home/aanatoly/src/fbpanel/trunk/scripts/install.sh 22 | ${install} 755 /home/aanatoly/.local/share/locale/$LC/LC_MESSAGES 644 fbpanel.mo 23 | rm -rf $dir 24 | 25 | -------------------------------------------------------------------------------- /scripts/install_locale.sh.in: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | dir=/tmp/lo-$$ 4 | mkdir $dir 5 | cp $1.mo $dir 6 | cd $dir 7 | mv $1.mo %%package%%.mo 8 | 9 | # Create name for destination dir. 10 | # Locale has format LL_CC.ENC. (LL - language, CC - country, ENC - encoding) 11 | # Name is LL_CC. but if CC is equal to LL, then name is only LL. 12 | IFS="_" a=(${1%%.*}) 13 | lang=${a[0]} 14 | country=${a[1]} 15 | if [ "${lang^^}" == "$country" ]; then 16 | LC="${lang}" 17 | else 18 | LC="${lang}_${country}" 19 | fi 20 | 21 | install=%%topdir%%/scripts/install.sh 22 | ${install} 755 %%localedir%%/$LC/LC_MESSAGES 644 %%package%%.mo 23 | rm -rf $dir 24 | 25 | -------------------------------------------------------------------------------- /scripts/mk_tar: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | function info() 5 | { 6 | cat <" 7 | echo " tar - tar file with latest proj version" 8 | echo "Must be run from top directory" 9 | exit $1 10 | } 11 | 12 | [ $# -ne 1 ] && usage 1 13 | 14 | tar="$1" 15 | tar --strip-components=1 --exclude doc --exclude src \ 16 | --keep-newer-files -xvf "$tar" 17 | 18 | -------------------------------------------------------------------------------- /scripts/update_po.sh: -------------------------------------------------------------------------------- 1 | #/bin/bash 2 | 3 | function info() 4 | { 5 | cat < $tmp 57 | mv $tmp $new 58 | 59 | # code 60 | -------------------------------------------------------------------------------- /version: -------------------------------------------------------------------------------- 1 | 7.0 2 | -------------------------------------------------------------------------------- /www/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS = shots plugins 2 | TOPDIR = . 3 | include $(TOPDIR)/Makefile.common 4 | 5 | 6 | all: index.html docs.html 7 | -------------------------------------------------------------------------------- /www/Makefile.common: -------------------------------------------------------------------------------- 1 | # catch all goal 2 | all: 3 | 4 | 5 | TOP = $(TOPDIR)/top 6 | BT1 = $(TOPDIR)/bottom1 7 | BT2 = $(TOPDIR)/bottom2 8 | 9 | AUXSRC = $(TOP) $(BT1) $(BT2) 10 | 11 | %.html: %.thtml $(AUXSRC) 12 | @cat $(TOP) $< $(BT1) > $@ 13 | @echo "
$(shell date '+Updated on %d-%m-%Y')
" >> $@ 14 | @cat $(BT2) >> $@ 15 | @echo HTML $@ 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | .PHONY: $(SUBDIRS) all clean 25 | all: Makefile $(SUBDIRS) 26 | clean: $(SUBDIRS) 27 | 28 | $(SUBDIRS): 29 | $(MAKE) -C $@ $(MAKECMDGOALS) 30 | 31 | clean: 32 | $(RM) *.html *~ -------------------------------------------------------------------------------- /www/bottom1: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /www/bottom2: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /www/configs/bottom: -------------------------------------------------------------------------------- 1 | # fbpanel config file 2 | # see http://fbpanel.sf.net/docs.html for complete configuration guide 3 | 4 | 5 | Global { 6 | edge = bottom 7 | allign = center 8 | margin = 0 9 | widthtype = percent 10 | width = 80 11 | height = 26 12 | transparent = true 13 | tintcolor = #ffffff 14 | alpha = 25 15 | setdocktype = true 16 | setpartialstrut = true 17 | } 18 | 19 | Plugin { 20 | type = menu 21 | config { 22 | icon = star 23 | systemmenu { 24 | } 25 | separator { 26 | } 27 | item { 28 | icon = gnome-settings 29 | name = configure 30 | command = configure 31 | } 32 | } 33 | } 34 | 35 | 36 | Plugin { 37 | type = space 38 | config { 39 | size = 10 40 | } 41 | } 42 | 43 | 44 | Plugin { 45 | type = launchbar 46 | padding = 4 47 | config { 48 | button { 49 | icon = gnome-terminal 50 | image = ~/.fbpanel/images/GNOME-Terminal.png 51 | tooltip = urxvt 52 | action = myterm2 53 | } 54 | button { 55 | icon = gnome-fs-home 56 | image = /usr/lib/rox/ROX-Filer/.DirIcon 57 | tooltip = Rox File Manager 58 | action = rox 59 | } 60 | button { 61 | icon = mozilla-firefox 62 | tooltip = firefox 63 | action = firefox -P default 64 | } 65 | button { 66 | image = ~/.rox/Drawer/.DirIcon 67 | tooltip = drawer 68 | action = ~/.rox/Drawer/AppRun 69 | } 70 | button { 71 | icon = multimedia-player 72 | image = ~/.fbpanel/images/totem.svg 73 | tooltip = mplayer 74 | action = gmplayer-bin 75 | } 76 | } 77 | } 78 | 79 | 80 | Plugin { 81 | type = space 82 | config { 83 | size = 10 84 | } 85 | } 86 | 87 | 88 | Plugin { 89 | type = wincmd 90 | config { 91 | icon = gnome-fs-desktop 92 | image = ~/.fbpanel/images/gnome-fs-desktop.svg 93 | tooltip = Left click to iconify all windows. Middle click to shade them. 94 | } 95 | } 96 | 97 | 98 | Plugin { 99 | type = space 100 | config { 101 | size = 10 102 | } 103 | } 104 | 105 | 106 | Plugin { 107 | type = taskbar 108 | expand = true 109 | config { 110 | ShowIconified = true 111 | ShowMapped = true 112 | ShowAllDesks = false 113 | tooltips = true 114 | IconsOnly = false 115 | MaxTaskWidth = 150 116 | AcceptSkipPager = false 117 | spacing = 0 118 | } 119 | } 120 | 121 | 122 | Plugin { 123 | type = tray 124 | } 125 | 126 | 127 | Plugin { 128 | type = dclock 129 | config { 130 | ClockFmt = %R 131 | TooltipFmt = %A %x 132 | Action = xmessage Please define some command & 133 | } 134 | } 135 | 136 | 137 | Plugin { 138 | type = icons 139 | config { 140 | DefaultIcon = /usr/share/fbpanel/images/default.xpm 141 | application { 142 | icon = gnome-terminal 143 | image = /home/aanatoly/.fbpanel/images/GNOME-Terminal.png 144 | ClassName = XTerm 145 | } 146 | application { 147 | image = /home/aanatoly/.fbpanel/images/GNOME-Terminal.png 148 | icon = gnome-terminal 149 | ClassName = mlterm 150 | } 151 | application { 152 | icon = gnome-terminal 153 | image = /home/aanatoly/.fbpanel/images/GNOME-Terminal.png 154 | ClassName = URxvt 155 | } 156 | application { 157 | image = ~/.fbpanel/images/Emacs.png 158 | icon = gnome-emacs 159 | ClassName = Emacs 160 | } 161 | application { 162 | icon = mozilla-firefox 163 | ClassName = Firefox-bin 164 | } 165 | application { 166 | icon = mozilla-firefox 167 | ClassName = Firefox 168 | } 169 | application { 170 | icon = multimedia-player 171 | ClassName = MPlayer 172 | } 173 | } 174 | } 175 | 176 | 177 | -------------------------------------------------------------------------------- /www/configs/pager: -------------------------------------------------------------------------------- 1 | # fbpanel config file 2 | # see http://fbpanel.sf.net/docs.html for complete configuration guide 3 | 4 | 5 | Global { 6 | edge = right 7 | allign = right 8 | margin = 50 9 | widthtype = request 10 | height = 58 11 | transparent = false 12 | tintcolor = #ffffff 13 | alpha = 59 14 | setdocktype = false 15 | setpartialstrut = false 16 | } 17 | 18 | Plugin { 19 | type = pager 20 | config { 21 | ShowWallpaper = true 22 | } 23 | } 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/favicon.ico -------------------------------------------------------------------------------- /www/images/fbpanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/images/fbpanel.png -------------------------------------------------------------------------------- /www/images/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/images/space.png -------------------------------------------------------------------------------- /www/images/top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/images/top.png -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | fbpanel 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 44 | 45 | 46 | 105 | 106 | 107 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 39 | 40 | 41 |

fbpanel

 
About
Plugins
Screenshots
Docs
Download
Development
 
32 | 34 |
36 | 38 |
42 |
43 |
47 |
48 | 49 | 50 | fbpanel is a lightweight, NETWM compliant desktop panel. 51 | It works with any NETWM compliant window manager (eg 52 | xfwm4, 53 | sawfish, 54 | openbox, 55 | metacity, 56 | kde wm 57 | ) 58 |

59 |

60 | fbpanel image 61 |

62 |
63 | It provides 64 |
    65 |
  • variety of plugins: 66 |
      67 |
    • taskbar
    • 68 |
    • pager
    • 69 |
    • 'show desktop' button
    • 70 |
    • launchbar
    • 71 |
    • image viewer
    • 72 |
    • text clock
    • 73 |
    • digital clock
    • 74 |
    • tray (notification area)
    • 75 |
    • menu with support for freedesktop.org (as in GNOME/KDE) applications menu
    • 76 |
    • space filler
    • 77 |
    • cpu monitor
    • 78 |
    • network monitor
    • 79 |
    • memory monitor
    • 80 |
    • battery monitor
    • 81 |
    • volume regulator
    • 82 |
    • general monitor - puts output of configured command in a panel
    • 83 |
    84 |
  • 85 |
  • ability to replace windows' icons
  • 86 |
  • all icons follow your current GTK+ icon theme
  • 87 |
  • transparency support
  • 88 |
  • customizable size and screen position
  • 89 |
  • ability to run many instances each with its own configuration
  • 90 |
  • modest resource usage
  • 91 |
92 | 93 | It's written in C and uses the GTK+ library 94 | only.
95 | 96 |

Latest version is 97 | 98 | 6.0 99 |

100 | 101 | 102 | 103 |
104 |
108 |
Updated on 28-02-2014
109 | 110 | -------------------------------------------------------------------------------- /www/index.thtml: -------------------------------------------------------------------------------- 1 | fbpanel is a lightweight, NETWM compliant desktop panel. 2 | It works with any NETWM compliant window manager (eg 3 | xfwm4, 4 | sawfish, 5 | openbox, 6 | metacity, 7 | kde wm 8 | ) 9 |

10 |

11 | fbpanel image 12 |

13 |
14 | It provides 15 |
    16 |
  • variety of plugins: 17 |
      18 |
    • taskbar
    • 19 |
    • pager
    • 20 |
    • 'show desktop' button
    • 21 |
    • launchbar
    • 22 |
    • image viewer
    • 23 |
    • text clock
    • 24 |
    • digital clock
    • 25 |
    • tray (notification area)
    • 26 |
    • menu with support for freedesktop.org (as in GNOME/KDE) applications menu
    • 27 |
    • space filler
    • 28 |
    • cpu monitor
    • 29 |
    • network monitor
    • 30 |
    • memory monitor
    • 31 |
    • battery monitor
    • 32 |
    • volume regulator
    • 33 |
    • general monitor - puts output of configured command in a panel
    • 34 |
    35 |
  • 36 |
  • ability to replace windows' icons
  • 37 |
  • all icons follow your current GTK+ icon theme
  • 38 |
  • transparency support
  • 39 |
  • customizable size and screen position
  • 40 |
  • ability to run many instances each with its own configuration
  • 41 |
  • modest resource usage
  • 42 |
43 | 44 | It's written in C and uses the GTK+ library 45 | only.
46 | 47 |

Latest version is 48 | 49 | 6.0 50 |

51 | 52 | -------------------------------------------------------------------------------- /www/my.css: -------------------------------------------------------------------------------- 1 | BODY 2 | { 3 | BACKGROUND-COLOR: #dddddd; 4 | COLOR: #000000; 5 | FONT-FAMILY: verdana,arial,helvetica; 6 | FONT-SIZE: 12px; 7 | MARGIN: 0px 8 | } 9 | TD 10 | { 11 | FONT-FAMILY: verdana,arial,helvetica; 12 | FONT-SIZE: 12px 13 | } 14 | A:link 15 | { 16 | COLOR: #465ec9 17 | } 18 | A:visited 19 | { 20 | COLOR: #242f6d 21 | } 22 | A:hover 23 | { 24 | COLOR: #850000 25 | } 26 | 27 | /** my additions **/ 28 | h5 { 29 | font-size: 100%; 30 | } 31 | 32 | h2, h3, h4 { 33 | padding: 0em 0em; 34 | margin: 0em; 35 | } 36 | 37 | blockquote { 38 | margin: 1em; 39 | padding: 0.5em; 40 | border: 1px black solid; 41 | } 42 | 43 | pre { 44 | margin: 1em; 45 | padding: 0.5em; 46 | border: 1px black solid; 47 | font-size: 10px; 48 | } 49 | 50 | img { 51 | border: 0px; 52 | } 53 | 54 | img.logo { 55 | display: inline; 56 | padding: 0.1em; 57 | } -------------------------------------------------------------------------------- /www/plugins.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | fbpanel 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 44 | 45 | 46 | 55 | 56 | 57 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 39 | 40 | 41 |

fbpanel

 
About
Plugins
Screenshots
Docs
Download
Development
 
32 | 34 |
36 | 38 |
42 |
43 |
47 |
48 | 49 | 50 | coming soon... 51 | 52 | 53 |
54 |
58 |
Updated on 28-02-2014
59 | 60 | -------------------------------------------------------------------------------- /www/plugins.thtml: -------------------------------------------------------------------------------- 1 | coming soon... 2 | -------------------------------------------------------------------------------- /www/plugins/Makefile: -------------------------------------------------------------------------------- 1 | TOPDIR = .. 2 | include $(TOPDIR)/Makefile.common 3 | 4 | SRC = ../plugins 5 | 6 | all: $(SRC).html 7 | 8 | $(SRC).thtml: $(wildcard */* */) ./mk_gallery 9 | #./mk_gallery $@ 10 | @echo "coming soon..." > $@ 11 | 12 | clean: clean2 13 | 14 | clean2: 15 | $(RM) $(SRC).thtml 16 | -------------------------------------------------------------------------------- /www/plugins/mk_gallery: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | echo > "$1" 4 | #echo '' >> "$1" 5 | echo '
' >> "$1" 6 | 7 | ver=`find . -type d -name '?.?-??' | sed -e 's/-.*//' -e 's/.*\(.\..\)/\1/' | sort -ru` 8 | for i in $ver; do 9 | if [ "$i" = "2.x" ]; then 10 | echo '' >> "$1" 11 | else 12 | echo '' >> "$1" 13 | fi 14 | #echo "$i: " $i* 15 | br="x" 16 | for dir in $i*; do 17 | shot=shots/`ls -1 $dir/shot.*` 18 | thumb=shots/`ls -1 $dir/thumb.*` 19 | text=$dir/text.html 20 | #echo -e "$shot\n$thumb\n$text" 21 | if [ "$br" = "x" ]; then 22 | echo "" >> "$1" 23 | fi 24 | echo "" >> "$1" 27 | br="x$br" 28 | if [ "$br" = "xxxx" ]; then 29 | br="x" 30 | echo "" >> "$1" 31 | fi 32 | done 33 | echo '' >> "$1" 34 | done 35 | 36 | 37 | echo "
' "

Version $i (gtk1)

" '
' "

Version $i

" '
\ 25 |
\ 26 | `cat $text 2>/dev/null`
' "
" '
" >> "$1" 38 | -------------------------------------------------------------------------------- /www/shots.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | fbpanel 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 44 | 45 | 46 | 125 | 126 | 127 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 39 | 40 | 41 |

fbpanel

 
About
Plugins
Screenshots
Docs
Download
Development
 
32 | 34 |
36 | 38 |
42 |
43 |
47 |
48 | 49 | 50 | 51 | 52 | 53 | 57 | 58 | 59 | 60 | 64 | 67 | 68 | 69 | 70 | 73 | 74 | 75 | 76 | 81 | 85 | 86 | 87 | 88 | 91 | 94 | 97 | 98 | 99 | 100 | 103 | 106 | 107 | 108 | 109 | 112 | 115 | 118 | 119 | 120 |

Version 6.1

54 | shot
55 | 4 panel with different width on Gentoo. GNOME-Wise icons 56 |

Version 6.0

61 | shot
62 | default configuration on Ubuntu with Humanity icon set 63 |
65 | shot
66 |

Version 4.10

71 | shot
72 |

Version 4.8

77 | shot
78 | transparent panel at bottom
79 | panel with pager plugin at low-right corner 80 |
82 | shot
83 | default install with application menu 84 |

Version 4.3

89 | shot
90 |
92 | shot
93 |
95 | shot
96 |

Version 3.x

101 | shot
102 |
104 | shot
105 |

Version 2.x (gtk1)

110 | shot
111 |
113 | shot
114 |
116 | shot
117 |
121 | 122 | 123 |
124 |
128 |
Updated on 28-02-2014
129 | 130 | -------------------------------------------------------------------------------- /www/shots.thtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | 11 | 15 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 32 | 36 | 37 | 38 | 39 | 42 | 45 | 48 | 49 | 50 | 51 | 54 | 57 | 58 | 59 | 60 | 63 | 66 | 69 | 70 | 71 |

Version 6.1

5 | shot
6 | 4 panel with different width on Gentoo. GNOME-Wise icons 7 |

Version 6.0

12 | shot
13 | default configuration on Ubuntu with Humanity icon set 14 |
16 | shot
17 |

Version 4.10

22 | shot
23 |

Version 4.8

28 | shot
29 | transparent panel at bottom
30 | panel with pager plugin at low-right corner 31 |
33 | shot
34 | default install with application menu 35 |

Version 4.3

40 | shot
41 |
43 | shot
44 |
46 | shot
47 |

Version 3.x

52 | shot
53 |
55 | shot
56 |

Version 2.x (gtk1)

61 | shot
62 |
64 | shot
65 |
67 | shot
68 |
72 | -------------------------------------------------------------------------------- /www/shots/2.x-01/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/2.x-01/shot.png -------------------------------------------------------------------------------- /www/shots/2.x-01/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/2.x-01/thumb.png -------------------------------------------------------------------------------- /www/shots/2.x-02/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/2.x-02/shot.png -------------------------------------------------------------------------------- /www/shots/2.x-02/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/2.x-02/thumb.png -------------------------------------------------------------------------------- /www/shots/2.x-03/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/2.x-03/shot.png -------------------------------------------------------------------------------- /www/shots/2.x-03/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/2.x-03/thumb.png -------------------------------------------------------------------------------- /www/shots/3.x-01/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/3.x-01/shot.jpg -------------------------------------------------------------------------------- /www/shots/3.x-01/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/3.x-01/thumb.jpg -------------------------------------------------------------------------------- /www/shots/3.x-02/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/3.x-02/shot.jpg -------------------------------------------------------------------------------- /www/shots/3.x-02/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/3.x-02/thumb.jpg -------------------------------------------------------------------------------- /www/shots/4.10-01/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.10-01/shot.jpg -------------------------------------------------------------------------------- /www/shots/4.10-01/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.10-01/thumb.jpg -------------------------------------------------------------------------------- /www/shots/4.3-01/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.3-01/shot.png -------------------------------------------------------------------------------- /www/shots/4.3-01/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.3-01/thumb.png -------------------------------------------------------------------------------- /www/shots/4.3-02/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.3-02/shot.jpg -------------------------------------------------------------------------------- /www/shots/4.3-02/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.3-02/thumb.jpg -------------------------------------------------------------------------------- /www/shots/4.3-03/shot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.3-03/shot.png -------------------------------------------------------------------------------- /www/shots/4.3-03/thumb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.3-03/thumb.png -------------------------------------------------------------------------------- /www/shots/4.8-01/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.8-01/shot.jpg -------------------------------------------------------------------------------- /www/shots/4.8-01/text.html: -------------------------------------------------------------------------------- 1 | transparent panel at bottom
2 | panel with pager plugin at low-right corner 3 | -------------------------------------------------------------------------------- /www/shots/4.8-01/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.8-01/thumb.jpg -------------------------------------------------------------------------------- /www/shots/4.8-02/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.8-02/shot.jpg -------------------------------------------------------------------------------- /www/shots/4.8-02/text.html: -------------------------------------------------------------------------------- 1 | default install with application menu 2 | -------------------------------------------------------------------------------- /www/shots/4.8-02/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/4.8-02/thumb.jpg -------------------------------------------------------------------------------- /www/shots/6.0-01/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/6.0-01/shot.jpg -------------------------------------------------------------------------------- /www/shots/6.0-01/text.html: -------------------------------------------------------------------------------- 1 | default configuration on Ubuntu with Humanity icon set 2 | -------------------------------------------------------------------------------- /www/shots/6.0-01/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/6.0-01/thumb.jpg -------------------------------------------------------------------------------- /www/shots/6.0-02/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/6.0-02/shot.jpg -------------------------------------------------------------------------------- /www/shots/6.0-02/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/6.0-02/thumb.jpg -------------------------------------------------------------------------------- /www/shots/6.1-01/shot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/6.1-01/shot.jpg -------------------------------------------------------------------------------- /www/shots/6.1-01/text.html: -------------------------------------------------------------------------------- 1 | 4 panel with different width on Gentoo. GNOME-Wise icons 2 | -------------------------------------------------------------------------------- /www/shots/6.1-01/thumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aanatoly/fbpanel/478754b687e2b48b111507ea22e8e2a001be5199/www/shots/6.1-01/thumb.jpg -------------------------------------------------------------------------------- /www/shots/Makefile: -------------------------------------------------------------------------------- 1 | TOPDIR = .. 2 | include $(TOPDIR)/Makefile.common 3 | 4 | SRC = ../shots 5 | 6 | all: $(SRC).html 7 | 8 | $(SRC).thtml: $(wildcard */* */) ./mk_gallery 9 | ./mk_gallery $@ 10 | 11 | clean: clean2 12 | 13 | clean2: 14 | $(RM) $(SRC).thtml -------------------------------------------------------------------------------- /www/shots/mk_gallery: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | function help () 4 | { 5 | echo "Usage: mk_gallery " 6 | echo "Creates HTML for screen shot gallery nd saves it in " 7 | } 8 | 9 | if [ $# -ne 1 ]; then 10 | help 11 | exit 1 12 | fi 13 | 14 | # create table 15 | echo '' > "$1" 16 | 17 | major_vers=`find . -type d -name '*.*-*' | sed -e 's/..//' -e 's/\..*//' | sort -run` 18 | for v in $major_vers; do 19 | 20 | vers=`ls -d1 $v.* | sed -e 's/-..//' | sort -unr -k 1.3` 21 | for i in $vers; do 22 | if [ "$i" = "2.x" ]; then 23 | echo '' >> "$1" 24 | else 25 | echo '' >> "$1" 26 | fi 27 | echo "Ver $i" 28 | shot_dirs=`ls -1d $i-* | sort -n` 29 | # start from new row 30 | br="x" 31 | for dir in $shot_dirs; do 32 | echo " $dir" 33 | shot=shots/`ls -1 $dir/shot.*` 34 | thumb=shots/`ls -1 $dir/thumb.*` 35 | text=$dir/text.html 36 | if [ "$br" = "x" ]; then 37 | echo "" >> "$1" 38 | fi 39 | # make cell with thumbnail 40 | echo "" >> "$1" 45 | br="x$br" 46 | # if it's 3rd cell in a row, start new row 47 | if [ "$br" = "xxxx" ]; then 48 | br="x" 49 | echo "" >> "$1" 50 | fi 51 | done 52 | if [ "$br" != "x" ]; then 53 | echo "" >> "$1" 54 | fi 55 | 56 | done 57 | done 58 | echo "" >> "$1" 59 | echo "
' "

Version $i (gtk1)

" '
' "

Version $i

" '
" >> "$1" 41 | echo " \"shot\"/
" >> "$1" 43 | cat $text 2>/dev/null >> "$1" 44 | echo "
" >> "$1" 60 | -------------------------------------------------------------------------------- /www/top: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | 6 | 7 | fbpanel 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 44 | 45 | 46 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 35 | 39 | 40 | 41 |

fbpanel

 
About
Plugins
Screenshots
Docs
Download
Development
 
32 | 34 |
36 | 38 |
42 |
43 |
47 |
48 | 49 | 50 | --------------------------------------------------------------------------------