45 lines
1.6 KiB
Ruby
45 lines
1.6 KiB
Ruby
class Dwm < Formula
|
|
desc "Dynamic window manager"
|
|
homepage "https://dwm.suckless.org/"
|
|
url "https://dl.suckless.org/dwm/dwm-6.2.tar.gz"
|
|
sha256 "97902e2e007aaeaa3c6e3bed1f81785b817b7413947f1db1d3b62b8da4cd110e"
|
|
revision 1
|
|
head "https://git.suckless.org/dwm", :using => :git
|
|
|
|
bottle do
|
|
cellar :any_skip_relocation
|
|
sha256 "e418a6853e7a7c270ccf6eb2d80c46986404acbd1b0d5a7fca008f111b6aab42" => :catalina
|
|
sha256 "a749a913684983c05a9998ca73d55bd8f05197fcf6d7573336eacf7e168a5120" => :mojave
|
|
sha256 "0c5e0fd48f4d52ab748d5301add02b7ca39d773c604e108d2eb81705cf80c315" => :high_sierra
|
|
sha256 "20707f7d694eef615c63c98c055db728a6922e68ccf287ca63933715781311e6" => :sierra
|
|
end
|
|
|
|
depends_on "dmenu"
|
|
depends_on :x11
|
|
|
|
def install
|
|
# The dwm default quit keybinding Mod1-Shift-q collides with
|
|
# 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; <<~EOS
|
|
In order to use the Mac OS X command key for dwm commands,
|
|
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'&
|
|
|
|
See also https://gist.github.com/311377 for a handful of tips and tricks
|
|
for running dwm on Mac OS X.
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
assert_match /#{version}/, shell_output("#{bin}/dwm -v 2>&1", 1)
|
|
end
|
|
end
|