Skip to content

Commit 7d1ee6b

Browse files
committed
added LFSTray
1 parent 11c58b3 commit 7d1ee6b

33 files changed

+6335
-21
lines changed

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -69,3 +69,8 @@ ltmain.sh
6969
*.html
7070
.nfs*
7171
devtests
72+
73+
# Output artifacts
74+
LFSTray/src/lfstray
75+
LFSTray/lfstray.1
76+
LFSTray/lfstray.sample

Diff for: LFSDock/LFSDock/src/taskBar.cpp

+16-15
Original file line numberDiff line numberDiff line change
@@ -253,35 +253,36 @@ void updateTaskBar(bool force)//TODO//
253253
doTreeWalkForTasks(apc->rootWindow);
254254
std::sort(tasks.begin(),tasks.end(),compareTaskClass);
255255

256-
if(force==false)
257-
{
258-
if(tasks.size()==holdtasks.size())
256+
if(force==false)
259257
{
260-
for(int j=0;j<holdtasks.size();j++)
258+
if(tasks.size()==holdtasks.size())
261259
{
262-
if((holdtasks.at(j).winid!=tasks.at(j).winid) || (holdtasks.at(j).taskName!=tasks.at(j).taskName))
260+
for(int j=0;j<holdtasks.size();j++)
263261
{
264-
unequal=true;
265-
goto skiplabel;
262+
if((holdtasks.at(j).winid!=tasks.at(j).winid) || (holdtasks.at(j).taskName!=tasks.at(j).taskName))
263+
{
264+
unequal=true;
265+
goto skiplabel;
266+
}
266267
}
267268
}
269+
else
270+
unequal=true;
268271
}
269272
else
270-
unequal=true;
271-
}
272-
else
273-
{
274-
unequal=true;
275-
oldwidth=1;
276-
}
273+
{
274+
unequal=true;
275+
oldwidth=1;
276+
}
277+
277278
skiplabel:
278279
if((unequal==false) && (force==false))
279280
return;
281+
280282
if(tasks.size()==0)
281283
{
282284
if(oldwidth==0)
283285
return;
284-
fprintf(stderr,"here\n");
285286
oldwidth=0;
286287
moveDock(0);
287288
resizeDock(windowWidth,iconWidth+extraSpace);

Diff for: LFSTray/ChangeLog

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
1.0.0
2+
Added to LFSDesktopProject
3+
4+
0.9.0
5+
Removed uneeded/unwanted settings.
6+
Fixed seg fault with --pixmap-bg cli arg.
7+
Removed scrollbars.
8+
Renamed to LFSTray.
9+
Removed remote control.
10+
Renamed.
11+
Removed KDE Icons,Debug and Logging code.
12+
added autogen.sh.
13+
Forked from Stalonetray.

Diff for: LFSTray/Makefile.am

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
SUBDIRS=src
2+
3+
man_MANS=lfstray.1
4+
5+
doc_DIST=lfstray.sample
6+
dist_hook: lfstray.1
7+
all-local: $(doc_DIST)
8+
clean-local:
9+
rm -f $(doc_DIST)
10+
11+
lfstray.sample:
12+
VERSION_STR=`echo @VERSION@|sed 's/\([^\.]*\.[^\.]*\)\..*/\1/'`;cat lfstray.sample.in|sed "s/@VERSION_STR@/$$VERSION_STR/g" > lfstray.sample

Diff for: LFSTray/README

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
README.md

Diff for: LFSTray/README.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# LFSTray
2+
This ia a simple standalone systray.
3+
4+
5+
Forked from stalonetray ( big thanks )
6+
7+
Original Code here:
8+
9+
https://github.com/kolbusa/stalonetray
10+
11+
12+
13+
**To build/install:**
14+
```console
15+
./autogen.sh --prefix=/usr
16+
make
17+
make install
18+
```
19+
20+
21+
**QUICK USE:**
22+
lfstray -h
23+
24+
lfstray -t --tint-level 130 --tint-color "#ffffff"

Diff for: LFSTray/autogen.sh

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash -e
2+
3+
aclocal
4+
autoheader
5+
autoconf
6+
automake --add-missing
7+
./configure $@

Diff for: LFSTray/configure.ac

+73
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# $Id$
2+
# vim:ft=m4
3+
4+
AC_INIT([lfstray],[1.0.0])
5+
AC_CONFIG_SRCDIR(src/main.c)
6+
AC_CONFIG_HEADERS(src/config.h)
7+
AM_INIT_AUTOMAKE([foreign])
8+
9+
dnl ============ General =============
10+
11+
AC_PROG_CC
12+
AC_USE_SYSTEM_EXTENSIONS
13+
14+
AC_CHECK_HEADERS([ctype.h],,[AC_MSG_FAILURE([ctype.h is not found.])])
15+
AC_CHECK_HEADERS([errno.h],,[AC_MSG_FAILURE([errno.h is not found.])])
16+
AC_CHECK_HEADERS([signal.h],,[AC_MSG_FAILURE([signal.h is not found.])])
17+
AC_CHECK_HEADERS([stdio.h],,[AC_MSG_FAILURE([stdio.h is not found.])])
18+
AC_CHECK_HEADERS([stdlib.h],,[AC_MSG_FAILURE([stdlib.h is not found.])])
19+
AC_CHECK_HEADERS([string.h],,[AC_MSG_FAILURE([string.h is not found.])])
20+
AC_CHECK_HEADERS([time.h],,[AC_MSG_FAILURE([time.h is not found.])])
21+
AC_CHECK_HEADERS([unistd.h],,[AC_MSG_FAILURE([unistd.h is not found.])])
22+
AC_CHECK_HEADERS([libgen.h])
23+
24+
dnl ============= X11 ================
25+
26+
no_x=""
27+
AC_PATH_XTRA
28+
if test "x$no_x" = "xyes"; then
29+
echo "X11 libraries/headers could not be found."
30+
echo "If they are definetly installed,use"
31+
echo " --x-includes and --x-libraries to set the paths."
32+
echo
33+
echo "Aborting"
34+
echo
35+
exit 1
36+
fi
37+
38+
dnl AC_SUBST(x_includes)
39+
dnl AC_SUBST(x_libraries)
40+
41+
dnl ============= X11 ================
42+
43+
44+
dnl ========= libxpm presence
45+
46+
ac_cv_xpm_supported=yes
47+
AC_CHECK_LIB(Xpm,
48+
XpmReadFileToPixmap,,
49+
[ac_cv_xpm_supported=no],
50+
[$X_LIBS])
51+
52+
case "$ac_cv_xpm_supported" in
53+
yes)
54+
AC_DEFINE(XPM_SUPPORTED,1,[enable XPM background support])
55+
;;
56+
*)
57+
;;
58+
esac
59+
feature_list="XPM:$ac_cv_xpm_supported"
60+
61+
CPPFLAGS="$CPPFLAGS -DFEATURE_LIST='\"$feature_list\"'"
62+
63+
dnl ============ Features ============
64+
65+
AC_CONFIG_FILES([
66+
Makefile
67+
src/Makefile
68+
])
69+
AC_OUTPUT
70+
71+
echo "*"
72+
echo "* XPM background support : $ac_cv_xpm_supported"
73+

Diff for: LFSTray/lfstray.sample.in

+108
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
#
2+
# This is sample ~/.simpletrayrc, resembling default configuration.
3+
# Remember: command line parameters take precedence.
4+
#
5+
# Directives introduced in @VERSION_STR@ are marked with "NEW in @VERSION_STR@"
6+
#
7+
####################################################################
8+
#
9+
# simpletray understands following directives
10+
#
11+
####################################################################
12+
13+
# background <color> # color can be specified as an HTML hex triplet or
14+
# as a name from rgb.txt, note that '#' must be quoted
15+
background "#777777"
16+
17+
# display <display name> # as usual
18+
19+
# geometry <geometry> # tray's geometry in standard X notation; width and
20+
# height are specified in slot_size multiples
21+
geometry 1x1+0+0
22+
23+
# grow_gravity <gravity> # one of N, S, E, W, NW, NE, SW, SE; tray will grow
24+
# in the direction opposite to one specified by
25+
# grow_gravity; if horizontal or vertical
26+
# direction is not specified, tray will not grow in
27+
# that direction
28+
grow_gravity NW
29+
30+
# icon_gravity <gravity> # icon placement gravity, one of NW, NE, SW, SE
31+
icon_gravity NW
32+
33+
# icon_size <int> # specifies dimensions of an icon
34+
icon_size 24
35+
36+
# slot_size <w>[x<h>] # specifies width and hight of an icon slot that
37+
# contains icon; must be larger than icon size;
38+
# height is set to width if it is omitted;
39+
# defaults to icon size
40+
slot_size 32x64
41+
42+
# kludges kludge[,kludge] # enable specific kludges to work around
43+
# non-conforming WMs and/or simpletray bugs.
44+
# NEW in @VERSION_STR@. Argument is a
45+
# comma-separated list of
46+
# * fix_window_pos - fix tray window position on
47+
# erroneous moves by WM
48+
# * force_icons_size - ignore resize events on all
49+
# icons; force their size to be equal to
50+
# icon_size
51+
# * use_icon_hints - use icon window hints to
52+
# dtermine icon size
53+
54+
# max_geometry <geometry> # maximal tray dimensions; 0 in width/height means
55+
# no limit
56+
max_geometry 0x0
57+
58+
# no_shrink [<bool>] # disables shrink-back mode
59+
no_shrink false
60+
61+
# parent_bg [<bool>] # whether to use pseudo-transparency
62+
# (looks better when reparented into smth like FvwmButtons)
63+
parent_bg false
64+
65+
# pixmap_bg <path_to_xpm> # use pixmap from specified xpm file for (tiled) background
66+
# pixmap_bg /home/user/.simpletraybg.xpm
67+
68+
69+
# slot_size <int> # specifies size of icon slot, defaults to
70+
# icon_size NEW in @VERSION_STR@.
71+
72+
# skip_taskbar [<bool>] # hide tray`s window from the taskbar
73+
skip_taskbar true
74+
75+
# sticky [<bool>] # make a tray`s window sticky across the
76+
# desktops/pages
77+
sticky true
78+
79+
# tint_color <color> # set tinting color
80+
tint_color white
81+
82+
# tint_level <level> # set tinting level; level ranges from 0 (disabled)
83+
# to 255
84+
tint_level 0
85+
86+
# transparent [<bool>] # whether to use root-transparency (background
87+
# image must be set with Esetroot or compatible utility)
88+
transparent false
89+
90+
# vertical [<bool>] # whether to use vertical layout (horisontal layout
91+
# is used by default)
92+
vertical false
93+
94+
# window_layer <layer> # set the EWMH-compatible window layer; one of:
95+
# bottom, normal, top
96+
window_layer normal
97+
98+
# window_strut <mode> # enable/disable window struts for tray window (to
99+
# avoid converting of tray window by maximized
100+
# windows); mode defines to which screen border tray
101+
# will be attached; it can be either top, bottom,
102+
# left, right, none or auto (default)
103+
window_strut auto
104+
105+
106+
# xsync [<bool>] # whether to operate on X server synchronously (SLOOOOW)
107+
xsync false
108+

Diff for: LFSTray/src/Makefile.am

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
bin_PROGRAMS = lfstray
2+
lfstray_SOURCES = main.c icons.c icons.h xembed.c xembed.h layout.c layout.h embed.c embed.h \
3+
settings.c settings.h xutils.c xutils.h tray.c tray.h list.h \
4+
wmh.c wmh.h common.h image.c image.h
5+
6+
AM_CFLAGS = @X_CFLAGS@
7+
lfstray_LDADD = @X_LIBS@ @X_PRE_LIBS@ -lX11 @X_EXTRA_LIBS@

0 commit comments

Comments
 (0)