Skip to content

Instantly share code, notes, and snippets.

@manzyuk
manzyuk / gist:753471
Created December 23, 2010 20:05
xmonad configuration
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Layout.NoBorders
import XMonad.Layout.ToggleLayouts
import XMonad.Util.Run (spawnPipe)
import XMonad.Util.EZConfig (additionalKeysP)
@manzyuk
manzyuk / gist:753475
Created December 23, 2010 20:08
top xmobar configuration
Config { font = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
, position = Top
, lowerOnStart = True
, commands = [ Run StdinReader ]
, sepChar = "%"
, alignSep = "}{"
, template = "%StdinReader%}{"
}
@manzyuk
manzyuk / gist:753477
Created December 23, 2010 20:12
bottom xmobar configuration
Config { font = "-*-terminus-medium-r-normal-*-14-*-*-*-*-*-*-*"
, bgColor = "black"
, fgColor = "grey"
, position = Bottom
, lowerOnStart = True
, commands = [ Run MultiCpu
[ "-a", "l"
, "-w", "4"
, "-t", "<fc=#8888FF>CPU0:</fc> <total0> <fc=#555555>|</fc> <fc=#8888FF>CPU1:</fc> <total1>"
, "-L", "50"
@manzyuk
manzyuk / gist:753481
Created December 23, 2010 20:12
format volume info for xmobar
#!/usr/bin/env bash
OUTPUT=`amixer sget Master | tail -1`
VOLUME=`echo $OUTPUT | sed -r 's/.*\[([0-9]*)%\].*/\1/' | awk '{printf "%3s",$1}'`
STATUS=`echo $OUTPUT | sed -r 's/.*\[(on|off)\].*/\1/'`
if [[ "$STATUS" == "off" ]]
then
echo "<fc=#8888FF>VOL:</fc> $VOLUME% <fc=red>Off</fc>"
else
@manzyuk
manzyuk / gist:753483
Created December 23, 2010 20:14
.xinitrc
#!/usr/bin/env bash
xsetroot -display $DISPLAY -cursor_name 'left_ptr'
synclient MaxTapTime=0 HorizEdgeScroll=1
amixer -q -c 0 sset Master 100%,100% unmute
xmobar $HOME/.bottom_xmobarrc &
xmodmap $HOME/.Xmodmap
exec xmonad
@manzyuk
manzyuk / gist:753484
Created December 23, 2010 20:15
/usr/share/xsessions/default.desktop
[Desktop Entry]
Encoding=UTF-8
Name=Run .xsession script
Comment=This session runs the .xsession script
Exec=default
Type=Application
@manzyuk
manzyuk / gist:753485
Created December 23, 2010 20:15
/etc/X11/Xsession.d/01x11-common_setup-vars
OPTIONFILE=${OPTIONFILE:-/etc/X11/Xsession.options}
SYSRESOURCES=${SYSRESOURCES:-/etc/X11/Xresources}
USRRESOURCES=${USRRESOURCES:-$HOME/.Xresources}
SYSSESSIONDIR=${SYSSESSIONDIR:-/etc/X11/Xsession.d}
USERXSESSION=${USERXSESSION:-$HOME/.xsession}
USERXSESSIONRC=${USERXSESSIONRC:-$HOME/.xsessionrc}
ALTUSERXSESSION=${ALTUSERXSESSION:-$HOME/.Xsession}
ERRFILE=${ERRFILE:-$HOME/.xsession-errors}
@manzyuk
manzyuk / gist:753487
Created December 23, 2010 20:16
xmonad+GNOME setup
import XMonad
import XMonad.Config.Gnome
import XMonad.Layout.NoBorders
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import Monad
@manzyuk
manzyuk / gist:768884
Created January 7, 2011 00:04
snow effect
// Set the number of snowflakes (more than 30 - 40 not recommended)
var snowmax=120
// Set the colors for the snow. Add as many colors as you like
var snowcolor=new Array("#b9dff5","#b9dff5","#b9dff5","#b9dff5","#b9dff5")
// Set the fonts, that create the snowflakes. Add as many fonts as you like
var snowtype=new Array("Times")
// Set the letter that creates your snowflake (recommended: * )
@manzyuk
manzyuk / gist:842655
Created February 24, 2011 18:56
Adam's XMonad setup
import Control.OldException(catchDyn,try)
import XMonad.Util.Run
import Control.Concurrent
import DBus
import DBus.Connection
import DBus.Message
import System.Cmd
import XMonad
import XMonad.Config.Gnome
import XMonad.Hooks.DynamicLog