Created
December 15, 2017 11:52
-
-
Save nonamenix/162c3a5573696508ffca8ab2c5953984 to your computer and use it in GitHub Desktop.
xmonad.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import XMonad | |
import XMonad.Config.Gnome | |
import XMonad.Config.Desktop | |
import XMonad.Actions.WindowGo | |
import XMonad.Hooks.DynamicLog | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.ManageHelpers | |
import XMonad.Hooks.EwmhDesktops | |
import XMonad.Layout.Grid | |
import XMonad.Layout.Tabbed | |
import XMonad.Layout.NoBorders | |
import XMonad.Layout.PerWorkspace | |
import XMonad.Layout.ResizableTile -- Actions.WindowNavigation is nice too | |
import XMonad.Layout.IM | |
import XMonad.Layout.Spacing | |
import XMonad.Layout.Reflect | |
import XMonad.Layout.StackTile | |
import XMonad.Layout.ThreeColumns | |
import XMonad.Layout.ComboP | |
import XMonad.Layout.Combo | |
import XMonad.Prompt | |
import XMonad.Prompt.Shell | |
import XMonad.Util.EZConfig(additionalKeys) | |
import XMonad.Util.Run(spawnPipe, runInTerm) | |
import XMonad.Util.Themes | |
import System.IO | |
import qualified XMonad.StackSet as W | |
import Data.List | |
import Data.Monoid (All (All), mappend) | |
main = xmonad myConfig | |
myConfig = gnomeConfig | |
{ modMask = modm | |
, logHook = spawn "wmname LG3D" | |
, workspaces = ["1:ide", "2:web", "3:term", "4:personal", "5:virtual", "6:gimp", "7:additional", "8:mail", "9:im"] | |
, terminal = "terminator" | |
, borderWidth = 1 | |
, focusedBorderColor = myFocusedBorderColor | |
, normalBorderColor = myNormalBorderColor | |
, layoutHook = desktopLayoutModifiers $ myLayoutHook | |
, manageHook = myManageHook <+> manageHook gnomeConfig | |
, handleEventHook = fullscreenEventHook `mappend` handleEventHook gnomeConfig | |
, XMonad.focusFollowsMouse = True | |
, XMonad.clickJustFocuses = True | |
} `additionalKeys` myKeys | |
where | |
myFocusedBorderColor = "#990000" | |
myNormalBorderColor = "#888888" | |
modm = mod4Mask | |
myTabConfig = defaultTheme | |
{ inactiveBorderColor = "#242424" | |
, inactiveColor = "#242424" | |
, inactiveTextColor = "#ffffff" | |
, activeBorderColor = "#b22222" | |
, activeColor = "#242424" | |
, activeTextColor = "#ffffff" | |
} | |
myLayoutHook = onWorkspace "9:im" imLayout | |
$ onWorkspace "8:mail" mailLayout | |
$ onWorkspace "7:additional" additionalDisplayLayout | |
$ onWorkspace "1:ide" ideLayout | |
$ onWorkspace "6:gimp" gimpLayout | |
$ myFull ||| myTall ||| myGrid ||| Mirror myTall ||| myTabbed | |
where | |
additionalDisplayLayout = Mirror ( smartBorders (Tall nmaster delta 0.65) ) ||| Mirror ( ThreeColMid 1 (3/100) (1/2)) | |
imLayout = withIM (1/5) (skypeRoster) (withIM (1/4) (Role "buddy_list") Grid) | |
gridLayout = spacing 8 $ Grid | |
ideLayout = myFull ||| smartBorders (Tall nmaster delta 0.75) ||| myTall ||| Mirror ( smartBorders (Tall nmaster delta 0.75) ) | |
gimpLayout = myFull | |
mailLayout = myFull ||| myTall | |
myFull = noBorders Full | |
myTabbed = smartBorders (tabbed shrinkText myTabConfig) | |
myTall = smartBorders (Tall nmaster delta ratio) | |
myGrid = smartBorders Grid | |
skypeRoster = ClassName "Skype" `And` Not (Role "ConversationsWindow") | |
skyRoster = ClassName "Sky" | |
nmaster = 1 -- count of windows in master layout | |
delta = 0.03 | |
ratio = 0.5 | |
myManageHook = composeAll | |
[ className =? "Gimp" --> doShift "6:gimp" | |
, className =? "Thunderbird" --> doShift "8:mail" | |
, className =? "MPlayer" --> doFloat | |
, (className =? "Pidgin" <&&> role =? "conversation") --> doShift "7:additional" | |
, className =? "Pidgin" --> doShift "9:im" | |
, (className =? "Skype" <&&> role =? "ConversationsWindow") --> doShift "7:additional" | |
, className =? "Skype" --> doShift "9:im" | |
, className =? "Sky" --> doShift "9:im" | |
, className =? "jetbrains-pycharm" --> doShift "1:ide" | |
, resource =? "gpicview" --> doFloat | |
, title =? "VLC media player" --> doFloat | |
, title =? "VLC (XVideo output)" --> doFullFloat | |
, role =? "bubble" --> doFloat | |
, isFullscreen --> doFullFloat | |
, manageDocks | |
] where role = stringProperty "WM_WINDOW_ROLE" | |
myKeys = | |
[ -- System hotkeys | |
((modm .|. controlMask, xK_l), spawn "gnome-screensaver-command -l") | |
, ((modm .|. controlMask, xK_q), spawn "gnome-session-quit") | |
-- Application's hotkeys | |
, ((modm .|. controlMask, xK_e), spawn "caja --browser /home/d_ivanof/") | |
, ((modm .|. controlMask, xK_w), spawn "google-chrome") | |
, ((modm .|. controlMask, xK_m), spawn "thunderbird") | |
, ((modm .|. controlMask, xK_p), spawn "pidgin") | |
, ((modm .|. controlMask, xK_i), spawn "pycharm") | |
-- Another hotkeys | |
, ((modm, xK_p), shellPrompt defaultXPConfig) | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment