Skip to content

Commit

Permalink
Code cleanup, removed unused code parts.
Browse files Browse the repository at this point in the history
Added wmdia.doxyfile to distribution.
Tooltip font can be configured by a command line argument.
  • Loading branch information
Johns-Q committed May 23, 2010
1 parent c2aaa26 commit 09d15e8
Show file tree
Hide file tree
Showing 6 changed files with 171 additions and 230 deletions.
7 changes: 7 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
User johns
Sun May 23 16:16:32 CEST 2010

Code cleanup, removed unused code parts.
Added wmdia.doxyfile to distribution.
Tooltip font can be configured by a command line argument.
New example script: show a single picture in wmdia.

Mon Jun 22 13:11:17 CEST 2009

Added commandline argument for window name, to support multiple wmdias.
Expand Down
19 changes: 10 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# @file Makefile DIA Dockapp
# @file Makefile @brief DIA Dockapp
#
# Copyright (c) 2009 by Lutz Sammer. All Rights Reserved.
# Copyright (c) 2009, 2010 by Lutz Sammer. All Rights Reserved.
#
# Contributor(s):
#
Expand All @@ -20,21 +20,20 @@
# $Id$
#----------------------------------------------------------------------------

VERSION = "1.02"
VERSION = "1.03"
GIT_REV = $(shell git describe --always 2>/dev/null)

CC= gcc
#OPTIM= -march=native -O2 -fomit-frame-pointer
OPTIM= -O2 -fomit-frame-pointer
OPTIM= -march=native -O2 -fomit-frame-pointer
CFLAGS= $(OPTIM) -W -Wall -W -g -pipe \
-DVERSION='$(VERSION)' $(if $(GIT_REV), -DGIT_REV='"$(GIT_REV)"')
#STATIC= --static
LIBS= $(STATIC) `pkg-config --libs $(STATIC) \
xcb-icccm xcb-shape xcb-image xcb-aux xcb` -lpthread

OBJS= wmdia.o
FILES= Makefile README Changelog AGPL-3.0.txt wmdia.xpm \
diashow.sh playvideo.sh set-command.sh set-tooltip.sh
FILES= Makefile README Changelog AGPL-3.0.txt wmdia.doxyfile wmdia.xpm \
diashow.sh playvideo.sh set-command.sh set-tooltip.sh showpicture.sh

all: wmdia

Expand All @@ -60,13 +59,15 @@ clean:
-rm *.o *~

clobber: clean
-rm wmdia
-rm -rf wmdia www/html

dist:
tar cjCf .. www/wmdia-`date +%F-%H`.tar.bz2 \
$(addprefix wmdia/, $(FILES) $(HDRS) $(OBJS:.o=.c))

install:
install: all
mkdir -p /usr/local/bin
strip --strip-unneeded -R .comment wmdia
install -s wmdia /usr/local/bin/

help:
Expand Down
17 changes: 15 additions & 2 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@file README dia dockapp.
@file README @brief DIA dockapp.

Copyright (c) 2009 by Lutz Sammer. All Rights Reserved.
Copyright (c) 2009, 2010 by Lutz Sammer. All Rights Reserved.

Contributor(s):

Expand Down Expand Up @@ -37,6 +37,8 @@ xwininfo can be used to find the window id.

Just make make and play.

Use wmdia -h to see the command-line options.

Requires:

x11-libs/libxcb and x11-libs/xcb-util
Expand All @@ -49,13 +51,24 @@ Requires:

GNU Make 3.xx

Suggested for scripts:

media-gfx/imagemagick
A collection of tools and libraries for many image formats
http:https://www.imagemagick.org/

media-video/mplayer
Media Player for Linux
http:https://www.mplayerhq.hu/

Example scripts:

- diashow.sh
Show pictures in wmdia.
- playvideo.sh
Play a video in wmdia.
- showpicture.sh
Show picture in wmdia.
- set-command.sh
How to change the command executed by wmdia.
- set-tooltop.sh
Expand Down
7 changes: 3 additions & 4 deletions diashow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
##

## delay between pictures
delay=30
delay=60
## name of our dia window
name="wmdia"
## picture viewer
Expand All @@ -16,21 +16,20 @@ viewer="/usr/bin/feh"
## Set the tooltip of wmdia
##
settooltip() {
xprop -name $name -format TOOLTIP 8s -set TOOLTIP "$1"
xprop -name $name -format TOOLTIP 8s -set TOOLTIP "$1" || exit -1
}

##
## Set the command of wmdia
##
setcommand() {
xprop -name $name -format COMMAND 8s -set COMMAND "$1"
xprop -name $name -format COMMAND 8s -set COMMAND "$1" || exit -1
}

##
## Show picture in wmdia and update tooltip/command
##
showdia() {
#/usr/bin/display -backdrop -background darkgrey -gravity center -size 62x62
/usr/bin/display -resize 62x62 -bordercolor darkgray -border 31 \
-gravity center -crop 62x62+0+0 -window $name "$1"
settooltip "$1"
Expand Down
Loading

0 comments on commit 09d15e8

Please sign in to comment.