summaryrefslogtreecommitdiff
path: root/desktop/spectrwm/examples
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/spectrwm/examples')
-rw-r--r--desktop/spectrwm/examples/README5
-rw-r--r--desktop/spectrwm/examples/spectrwm.conf1
-rw-r--r--desktop/spectrwm/examples/spectrwm_screenshot.sh32
3 files changed, 21 insertions, 17 deletions
diff --git a/desktop/spectrwm/examples/README b/desktop/spectrwm/examples/README
index 378ecae0af..f908cfb187 100644
--- a/desktop/spectrwm/examples/README
+++ b/desktop/spectrwm/examples/README
@@ -19,8 +19,9 @@ o wifi_link_quality.sh - optional
spectrwm_screenshot.sh:
-This makes a screenshot of the actual X11 screen or optionally just a window.
-It needs the graphics/scrot package from the SBo repository.
+This makes a screenshot of the whole X11 screen or optionally just a window.
+It needs the ImageMagick (included in Slackware) or GraphicsMagick (available
+from the SBo repository) package's `import` utility.
You can configure it in your spectrwm.conf like this:
program[capture] = spectrwm_screenshot.sh full
bind[capture] = MOD+c
diff --git a/desktop/spectrwm/examples/spectrwm.conf b/desktop/spectrwm/examples/spectrwm.conf
index d4c4734480..a88cd19992 100644
--- a/desktop/spectrwm/examples/spectrwm.conf
+++ b/desktop/spectrwm/examples/spectrwm.conf
@@ -17,6 +17,7 @@ title_name_enabled = 1 # current window's title
title_class_enabled = 1 # current window's class name
window_name_enabled = 1 # current window's name
urgent_enabled = 1 # information about the workspace's urgency hints
+iconic_enabled = 1 # show the number of iconified windows on the workspace
verbose_layout = 0 # workspace's master and stack values
focus_mode = default # default, follow, manual
diff --git a/desktop/spectrwm/examples/spectrwm_screenshot.sh b/desktop/spectrwm/examples/spectrwm_screenshot.sh
index 6a01fd67a6..c169a1dec6 100644
--- a/desktop/spectrwm/examples/spectrwm_screenshot.sh
+++ b/desktop/spectrwm/examples/spectrwm_screenshot.sh
@@ -1,21 +1,23 @@
#!/bin/sh
-SCROT=$(which scrot)
-[ -x "${SCROT}" ] || exit 1
+CAPTURE_TOOL=/usr/bin/import
+if [ ! -x "${CAPTURE_TOOL}" ];then
+ echo "$0: couldn't run ${CAPTURE_TOOL}" >&2
+ exit 1
+fi
-screenshot() {
- case $1 in
- full)
- "${SCROT}" --multidisp
- ;;
- window)
+CAPTURE_PATH="${HOME}/spectrwm_capture_$(date +%FT%T).png"
+
+case "$1" in
+ 'full')
+ "${CAPTURE_TOOL}" -window root png:"${CAPTURE_PATH}"
+ ;;
+ 'window')
sleep 0.5
- "${SCROT}" --select
- ;;
+ "${CAPTURE_TOOL}" png:"${CAPTURE_PATH}"
+ ;;
*)
- ;;
- esac;
-}
-
-screenshot $1
+ echo "$0: $0 <-full | -window>" >&2
+ ;;
+esac