]> code.delx.au - spectrwm/commitdiff
Add screenshot_app to conf
authorMarco Peereboom <marco@conformal.com>
Tue, 27 Jan 2009 16:18:10 +0000 (16:18 +0000)
committerMarco Peereboom <marco@conformal.com>
Tue, 27 Jan 2009 16:18:10 +0000 (16:18 +0000)
scrotwm.1
scrotwm.c
scrotwm.conf

index 50c7d7d88f981027c94faff03bbd1d64f1818a0e..2d1746271a71013b42adedef0f4c0a60456a08c5 100644 (file)
--- 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 <keyword> = <setting>.
 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 .
index bc149b348b720829f5df7e6b62696f2711e88742..b44e1169b0bbe1d597014a687c1e41721b8c844b 100644 (file)
--- 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;
index bc3350c3cc23fa22cda99521828f48abc0cdc91c..5dd4057d3cab2dfef2e20191af1f2905e899fcd4 100644 (file)
@@ -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