From e4c8351e9bfba121bdd44b41684f02ed914906b3 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Tue, 27 Jan 2009 16:18:10 +0000 Subject: [PATCH] Add screenshot_app to conf --- scrotwm.1 | 17 ++++++++++------- scrotwm.c | 7 +++++-- scrotwm.conf | 3 +++ 3 files changed, 18 insertions(+), 9 deletions(-) diff --git a/scrotwm.1 b/scrotwm.1 index 50c7d7d..2d17462 100644 --- a/scrotwm.1 +++ b/scrotwm.1 @@ -123,6 +123,8 @@ If that file is unavailable it tries to open the global file next. The format of the file is = . E.g. color_focus = red. .Pp +Enabling or disabling an option is done by using 1 or 0 respectively. +.Pp The file supports the following keywords: .Bl -tag -width "C-M-EscapeXXX" -offset indent -compact .It Ic color_focus @@ -140,10 +142,10 @@ Color of the font in status bar in screen x. .It Ic bar_font Status bar font. .It Ic bar_action -External script to populate additional information in the status bar such as +External script that populates additional information in the status bar such as battery life etc. .It Ic bar_delay -Update frequency of external script on the status bar. +Update frequency, in seconds, of external script that populates the status bar. .It Ic spawn_term External application that gets spawned when M-S-[Return] is used. .It Ic dialog_ratio @@ -151,7 +153,12 @@ Some applications have dialog windows that are too small to be useful. This ratio is the screen size as to what they will be resized. E.g 0.6 is 60% of the physical screen size. .It Ic screenshot_enabled -Set to 1 to enable screen-shotting capability. +Enable or disable screenshot capability. +.It Ic screenshot_app +Set to the script that will take screenshots. +It will be called with "full" or "window" as parameter 1 to indicate what +screenshot action is expected. +The script shall handle those cases accordingly. .El .Pp Colors need to be specified per the @@ -172,7 +179,3 @@ and .Sh HISTORY .Nm was inspired by xmonad & dwm. -.Pp -.Nm -first appeared in -.Ox 4.5 . diff --git a/scrotwm.c b/scrotwm.c index bc149b3..b44e116 100644 --- a/scrotwm.c +++ b/scrotwm.c @@ -175,7 +175,7 @@ char *bar_fonts[] = { /* terminal + args */ char *spawn_term[] = { "xterm", NULL }; -char *spawn_screenshot[] = { "screenshot.sh", NULL, NULL }; /* XXX get from conf */ +char *spawn_screenshot[] = { "screenshot.sh", NULL, NULL }; char *spawn_menu[] = { "dmenu_run", "-fn", NULL, "-nb", NULL, "-nf", NULL, "-sb", NULL, "-sf", NULL, NULL }; @@ -457,10 +457,13 @@ conf_load(char *filename) case 's': if (!strncmp(var, "spawn_term", strlen("spawn_term"))) - asprintf(&spawn_term[0], "%s", val); /* XXX args? */ + asprintf(&spawn_term[0], "%s", val); if (!strncmp(var, "screenshot_enabled", strlen("screenshot_enabled"))) ss_enabled = atoi(val); + if (!strncmp(var, "screenshot_app", + strlen("screenshot_app"))) + asprintf(&spawn_screenshot[0], "%s", val); break; default: goto bad; diff --git a/scrotwm.conf b/scrotwm.conf index bc3350c..5dd4057 100644 --- a/scrotwm.conf +++ b/scrotwm.conf @@ -1,3 +1,5 @@ +# $scrotwm$ +# # colors for focussed and unfocussed window borders color_focus = red color_unfocus = rgb:88/88/88 @@ -19,3 +21,4 @@ dialog_ratio = 0.6 # screen shots # screenshot_enabled = 1 +# screenshot_app = screenshot.sh -- 1.7.10.4