2009-12-27 11:34:58 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Dwm < Formula
|
2011-12-23 11:29:51 +00:00
|
|
|
url 'http://dl.suckless.org/dwm/dwm-6.0.tar.gz'
|
2009-12-27 11:34:58 +00:00
|
|
|
homepage 'http://dwm.suckless.org/'
|
2011-12-23 11:29:51 +00:00
|
|
|
md5 '8bb00d4142259beb11e13473b81c0857'
|
2009-12-27 11:34:58 +00:00
|
|
|
head 'http://hg.suckless.org/dwm'
|
|
|
|
|
|
|
|
def install
|
2010-06-05 01:17:57 +00:00
|
|
|
# The dwm default quit keybinding Mod1-Shift-q collides with
|
2009-12-27 11:34:58 +00:00
|
|
|
# the Mac OS X Log Out shortcut in the Apple menu.
|
|
|
|
inreplace 'config.def.h',
|
|
|
|
'{ MODKEY|ShiftMask, XK_q, quit, {0} },',
|
|
|
|
'{ MODKEY|ControlMask, XK_q, quit, {0} },'
|
|
|
|
inreplace 'dwm.1', '.B Mod1\-Shift\-q', '.B Mod1\-Control\-q'
|
|
|
|
system "make PREFIX=#{prefix} install"
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
2010-03-05 22:53:42 +00:00
|
|
|
<<-EOS
|
|
|
|
In order to use the Mac OS X command key for dwm commands,
|
2009-12-27 11:34:58 +00:00
|
|
|
change the X11 keyboard modifier map using xmodmap (1).
|
|
|
|
|
|
|
|
e.g. by running the following command from $HOME/.xinitrc
|
|
|
|
xmodmap -e 'remove Mod2 = Meta_L' -e 'add Mod1 = Meta_L'&
|
2010-06-05 01:17:57 +00:00
|
|
|
|
2010-11-10 18:16:28 +00:00
|
|
|
See also https://gist.github.com/311377 for a handful of tips and tricks
|
2010-06-05 01:17:57 +00:00
|
|
|
for running dwm on Mac OS X.
|
2010-03-05 22:53:42 +00:00
|
|
|
EOS
|
2009-12-27 11:34:58 +00:00
|
|
|
end
|
|
|
|
end
|