aboutsummaryrefslogtreecommitdiffstats
path: root/examples/dzen-status
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-06-09 08:14:50 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-06-09 08:14:50 +0200
commitc39701cba088968695d996afb457164396eb3e0a (patch)
treed0af32b8cb94524bd43c6ec4d336daff26ccb2a5 /examples/dzen-status
parent5309cd40cb1384cb9de4ca114b06fbb2d3d5d45f (diff)
downloadXMonadContrib-c39701cba088968695d996afb457164396eb3e0a.tar.gz
XMonadContrib-c39701cba088968695d996afb457164396eb3e0a.tar.xz
XMonadContrib-c39701cba088968695d996afb457164396eb3e0a.zip
remove obsolete 'examples' dir
darcs-hash:20070609061450-9c5c1-a535ebe42423f82ebdf254a77f12353c667f92bb.gz
Diffstat (limited to 'examples/dzen-status')
-rw-r--r--examples/dzen-status/Config.hs154
-rw-r--r--examples/dzen-status/readme15
-rwxr-xr-xexamples/dzen-status/status9
3 files changed, 0 insertions, 178 deletions
diff --git a/examples/dzen-status/Config.hs b/examples/dzen-status/Config.hs
deleted file mode 100644
index 2e6cec4..0000000
--- a/examples/dzen-status/Config.hs
+++ /dev/null
@@ -1,154 +0,0 @@
------------------------------------------------------------------------------
--- |
--- Module : Config.hs
--- Copyright : (c) Spencer Janssen 2007
--- License : BSD3-style (see LICENSE)
---
--- Maintainer : dons@cse.unsw.edu.au
--- Stability : stable
--- Portability : portable
---
------------------------------------------------------------------------------
-
-module Config where
-
---
--- xmonad bindings follow mostly the dwm/wmii conventions:
---
--- key combination action
---
--- mod-shift-return new xterm
--- mod-p launch dmenu
--- mod-shift-p launch gmrun
---
--- mod-space switch tiling mode
---
--- mod-tab raise next window in stack
--- mod-j
--- mod-k
---
--- mod-h decrease the size of the master area
--- mod-l increase the size of the master area
---
--- mod-shift-c kill client
--- mod-shift-q exit window manager
--- mod-shift-ctrl-q restart window manager ('xmonad' must be in $PATH)
---
--- mod-return cycle the current tiling order
---
--- mod-1..9 switch to workspace N
--- mod-shift-1..9 move client to workspace N
---
--- mod-w,e,r switch to physical/Xinerama screen 1, 2 or 3.
---
--- xmonad places each window into a "workspace." Each workspace can have
--- any number of windows, which you can cycle though with mod-j and mod-k.
--- Windows are either displayed full screen, tiled horizontally, or tiled
--- vertically. You can toggle the layout mode with mod-space, which will
--- cycle through the available modes.
---
--- You can switch to workspace N with mod-N. For example, to switch to
--- workspace 5, you would press mod-5. Similarly, you can move the current
--- window to another workspace with mod-shift-N.
---
--- When running with multiple monitors (Xinerama), each screen has exactly
--- 1 workspace visible. When xmonad starts, workspace 1 is on screen 1,
--- workspace 2 is on screen 2, etc. If you switch to a workspace which is
--- currently visible on another screen, xmonad simply switches focus to
--- that screen. If you switch to a workspace which is *not* visible, xmonad
--- replaces the workspace on the *current* screen with the workspace you
--- selected.
---
--- For example, if you have the following configuration:
---
--- Screen 1: Workspace 2
--- Screen 2: Workspace 5 (current workspace)
---
--- and you wanted to view workspace 7 on screen 1, you would press:
---
--- mod-2 (to select workspace 2, and make screen 1 the current screen)
--- mod-7 (to select workspace 7)
---
--- Since switching to the workspace currently visible on a given screen is
--- such a common operation, shortcuts are provided: mod-{w,e,r} switch to
--- the workspace currently visible on screens 1, 2, and 3 respectively.
--- Likewise, shift-mod-{w,e,r} moves the current window to the workspace on
--- that screen. Using these keys, the above example would become mod-w
--- mod-7.
---
-
-import Data.Ratio
-import Data.Bits
-import qualified Data.Map as M
-import System.Exit
-import Graphics.X11.Xlib
-import XMonad
-import Operations
-
--- The number of workspaces:
-workspaces :: Int
-workspaces = 9
-
--- modMask lets you easily change which modkey you use. The default is mod1Mask
--- ("left alt"). You may also consider using mod3Mask ("right alt"), which
--- does not conflict with emacs keybindings. The "windows key" is usually
--- mod4Mask.
-modMask :: KeyMask
-modMask = mod1Mask
-
--- How much to change the horizontal/vertical split bar by defalut.
-defaultDelta :: Rational
-defaultDelta = 3%100
-
--- The mask for the numlock key. You may need to change this on some systems.
--- You can find the numlock modifier by running "xmodmap" and looking for a
--- modifier with Num_Lock bound to it.
-numlockMask :: KeyMask
-numlockMask = mod2Mask
-
--- What layout to start in, and what the default proportion for the
--- left pane should be in the tiled layout. See LayoutDesc and
--- friends in XMonad.hs for options.
-startingLayoutDesc :: LayoutDesc
-startingLayoutDesc =
- LayoutDesc { layoutType = Full
- , tileFraction = 1%2 }
-
--- The keys list.
-keys :: M.Map (KeyMask, KeySym) (X ())
-keys = M.fromList $
- [ ((modMask .|. shiftMask, xK_Return), spawn "xterm")
- , ((modMask, xK_p ), spawn "exe=`dmenu_path | dmenu` && exec $exe")
- , ((modMask .|. shiftMask, xK_p ), spawn "gmrun")
- , ((modMask, xK_space ), switchLayout)
-
- , ((modMask, xK_Tab ), raise GT)
- , ((modMask, xK_j ), raise GT)
- , ((modMask, xK_k ), raise LT)
-
- , ((modMask, xK_h ), changeSplit (negate defaultDelta))
- , ((modMask, xK_l ), changeSplit defaultDelta)
-
- , ((modMask .|. shiftMask, xK_c ), kill)
-
- , ((modMask .|. shiftMask, xK_q ), io $ exitWith ExitSuccess)
- , ((modMask .|. shiftMask .|. controlMask, xK_q ), io restart)
-
- -- Cycle the current tiling order
- , ((modMask, xK_Return), promote)
-
- , ((modMask, xK_s ), spawn "/home/dons/bin/status")
-
- ] ++
- -- Keybindings to get to each workspace:
- [((m .|. modMask, k), f i)
- | (i, k) <- zip [0 .. fromIntegral workspaces - 1] [xK_1 ..]
- , (f, m) <- [(view, 0), (tag, shiftMask)]]
-
- -- Keybindings to each screen :
- -- mod-wer (underneath 123) switches to physical/Xinerama screens 1 2 and 3
- ++
- [((m .|. modMask, key), screenWorkspace sc >>= f)
- | (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
- , (f, m) <- [(view, 0), (tag, shiftMask)]]
-
diff --git a/examples/dzen-status/readme b/examples/dzen-status/readme
deleted file mode 100644
index aa8c4fd..0000000
--- a/examples/dzen-status/readme
+++ /dev/null
@@ -1,15 +0,0 @@
-Use dzen2 for an external pop-up status bar.
-
-status
- A shell script printing some strings into dzen2. In this case, it
- extracts some openbsd settings.
-
-Config.hs
- , ((modMask, xK_s ), spawn "/home/dons/bin/status")
-
- mod-s pops up a 10 second status bar. mouse button 3 closes it
- explicitly.
-
-dzen2 is available from:
- http://gotmor.googlepages.com/dzen
-
diff --git a/examples/dzen-status/status b/examples/dzen-status/status
deleted file mode 100755
index 6ffe04a..0000000
--- a/examples/dzen-status/status
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-au=`date +"%H.%M %a %b %d"`
-uk=`TZ=GMT date +"UK %H.%M"`
-us=`TZ=America/New_York date +"NY %H.%M"`
-ca=`TZ=America/Los_Angeles date +"SF %H.%M"`
-hw=`/sbin/sysctl hw.setperf | sed "s/.*=//" | perl -anle 'print (0.6 + ($F[0]) / 100)'`
-ut=`uptime | sed 's/.*://; s/,//g'`
-bt=`/usr/sbin/apm | sed -n 's/.*: \([^ ]*\).*$/\1/;2p;4p' | xargs printf "apm %s%%, AC %s\n"`
-(printf "%s : %s : %s : %s : %s Ghz : %s :%s\n" "$au" "$uk" "$us" "$ca" "$hw" "$bt" "$ut"; sleep 10) | dzen2