Skip to content

Commit

Permalink
fix to work with gnome-terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
mhansen committed Jul 24, 2010
1 parent c9a7cd0 commit 89801e2
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.o
*.hi
*.errors
*.swp
history
xmonad-i386-linux
14 changes: 14 additions & 0 deletions gnome-terminal-wrapper
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

terminal=${0%-wrapper}
terminal=${terminal##*/}
args=()
while (($#)); do
if [ "$1" = "-e" ]; then
shift
exec $terminal ${args[@]} -e "$*"
fi
args[${#args[@]}]=$1
shift
done
exec $terminal ${args[@]}
45 changes: 36 additions & 9 deletions xmonad.hs
Original file line number Diff line number Diff line change
@@ -1,20 +1,47 @@
import qualified Data.Map as M
import qualified XMonad.StackSet as W
import XMonad
import XMonad.Config.Desktop
import XMonad.Config.Gnome
import qualified XMonad.StackSet as W
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.NoBorders
import XMonad.Layout.Accordion
import XMonad.Layout.Column
import XMonad.Layout.Tabbed
import XMonad.Prompt
import XMonad.Prompt.AppendFile
import XMonad.Prompt.Man
import XMonad.Prompt.Shell
import XMonad.Util.EZConfig

myManageHook :: ManageHook
myManageHook = composeAll (
[ resource =? "Do" --> doIgnore
, isFullscreen --> doFullFloat
[ resource =? "Do" --> doFloat --gnome do
, isFullscreen --> doFullFloat --don't interfere with fullscreen video
])


fullscreenVideo :: [ManageHook]
fullscreenVideo = [ isFullscreen --> (doF W.focusDown <+> doFullFloat) ]

main = xmonad gnomeConfig
{ modMask = mod4Mask
, manageHook = manageHook gnomeConfig <+> myManageHook
}
main = xmonad $ gnomeConfig
{ modMask = mod4Mask -- Windows Key
, borderWidth = 1
, normalBorderColor = "#dddddd"
, focusedBorderColor = "#ff0000"
, layoutHook = desktopLayoutModifiers (myLayout)
, manageHook = myManageHook <+> manageHook gnomeConfig
, terminal = "~/.xmonad/gnome-terminal-wrapper"
}
`additionalKeysP`
[ ("M-c", spawn "google-chrome")
, ("M-n", appendFilePrompt defaultXPConfig "/home/moon/notes")
, ("M-m", manPrompt defaultXPConfig)
, ("M-s", shellPrompt defaultXPConfig)
]


myLayout = tiled ||| Mirror tiled ||| Full ||| simpleTabbed ||| Accordion
where
tiled = Tall nmaster delta ratio --partitions the screen into two panes
nmaster = 1 -- default numer of windows in the master pane
ratio = 1/2 -- default proportion of screen occupied by master pane
delta = 3/100 -- percent of screen to incrememnt by when resizing panes

0 comments on commit 89801e2

Please sign in to comment.