Created
November 24, 2013 20:19
-
-
Save nonamenix/7631965 to your computer and use it in GitHub Desktop.
Desktop environment
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
Config { | |
font = "xft:DejaVu Sans Mono:size=10:bold:antialias=true" | |
, bgColor = "#balck" | |
, fgColor = "grey" | |
, border = NoBorder | |
, borderColor = "black" | |
, lowerOnStart = True | |
-- , position = Static { xpos = 1280, ypos = 0, width = 230, height = 20 } | |
, position = TopW R 15 | |
, commands = [ | |
Run Date "%a %b %_d %Y %H:%M:%S" "date" 10 | |
, Run Kbd [("us", "US"), ("ru", "RU")] | |
, Run Cpu ["-L","3","-H","50","--normal","green","--high","red"] 10 | |
] | |
, template = "<fc=green>%kbd%</fc> %date%" | |
, sepChar = "%" | |
, alignSep = "}{" | |
} |
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
#!/bin/bash | |
# | |
# Start a composition manager. | |
# (xcompmgr in this case) | |
function comphelp () { | |
echo "Composition Manager:" | |
echo " (re)start: COMP" | |
echo " stop: COMP -s" | |
echo " query: COMP -q" | |
echo " returns 1 if composition manager is running, else 0" | |
exit | |
} | |
function checkcomp () { | |
( ps nc -C xcompmgr &>/dev/null ) && exit 1 | |
exit 0 | |
} | |
function stopcomp () { | |
( ps nc -C xcompmgr &>/dev/null ) && killall xcompmgr | |
} | |
function startcomp () { | |
stopcomp | |
xcompmgr -f -D5 -n | |
exit | |
} | |
case "$1x" in | |
"x") startcomp;; | |
"-qx") checkcomp;; | |
"-sx") stopcomp; exit;; | |
*) comphelp;; | |
esac |
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.IM | |
import XMonad.Layout.Spacing | |
import XMonad.Layout.Reflect | |
import XMonad.Layout.StackTile | |
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 | |
modm = mod4Mask | |
myConfig = gnomeConfig | |
{ modMask = modm | |
, logHook = spawn "wmname LG3D" | |
, workspaces = ["1:ide", "2:web", "3:term", "4:personal", "5", "6", "7:music", "8:skype", "9:im"] | |
, terminal = "terminator" | |
, borderWidth = 1 | |
, focusedBorderColor = myFocusedBorderColor | |
, normalBorderColor = myNormalBorderColor | |
, layoutHook = desktopLayoutModifiers $ myLayoutHook | |
, manageHook = myManageHook <+> manageHook gnomeConfig | |
, handleEventHook = fullscreenEventHook `mappend` handleEventHook gnomeConfig | |
} `additionalKeys` myKeys | |
where | |
myFocusedBorderColor = "#990000" | |
myNormalBorderColor = "#888888" | |
myLayoutHook = onWorkspace "9:im" pidginLayout | |
$ onWorkspace "8:skype" skypeLayout | |
$ onWorkspace "1:ide" ideLayout | |
$ myTall ||| myGrid ||| myFull ||| Mirror myTall ||| myTabbed | |
where | |
-- Special Layouts | |
pidginLayout = withIM (18/100) (Role "buddy_list") Grid | |
skypeLayout = withIM (18/100) (skypeRoster) Grid | |
gridLayout = spacing 8 $ Grid | |
ideLayout = smartBorders (Tall nmaster delta 0.75) ||| myTall ||| myFull | |
-- Base layouts | |
myFull = noBorders Full | |
myTabbed = smartBorders (tabbed shrinkText myTabConfig) | |
myTall = smartBorders (Tall nmaster delta ratio) | |
myGrid = smartBorders Grid | |
-- Roasters | |
skypeRoster = ClassName "Skype" `And` Not (Role "ConversationsWindow") | |
-- Parameters | |
nmaster = 1 -- count of windows in master layout | |
delta = 0.03 | |
ratio = 0.5 | |
-- Tab config | |
myTabConfig = defaultTheme | |
{ inactiveBorderColor = "#242424" | |
, inactiveColor = "#242424" | |
, inactiveTextColor = "#ffffff" | |
, activeBorderColor = "#b22222" | |
, activeColor = "#242424" | |
, activeTextColor = "#ffffff" | |
} | |
myManageHook = composeAll | |
[ -- doShift | |
className =? "Pidgin" --> doShift "9:im" | |
, className =? "Skype" --> doShift "8:skype" | |
, className =? "jetbrains-pycharm" --> doShift "1:ide" | |
-- doFloat | |
, className =? "Gimp" --> doFloat | |
, className =? "MPlayer" --> doFloat | |
, resource =? "gpicview" --> doFloat | |
, isFullscreen --> doFullFloat | |
-- doCenterFloat | |
, (className =? "Gnome-panel" <&&> title =? "Run Application") --> doCenterFloat | |
-- Default | |
, manageDocks | |
] | |
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 "nemo") | |
, ((modm .|. controlMask, xK_w), spawn "chromium-browser") | |
, ((modm .|. controlMask, xK_m), spawn "thunderbird") | |
, ((modm .|. controlMask, xK_p), spawn "pidgin") | |
, ((modm .|. controlMask, xK_i), spawn "pycharm") | |
-- Compizit manager: xcompmgr | |
, ((modm .|. controlMask, xK_y), spawn "~/.xmonad/comp") | |
, ((modm .|. controlMask, xK_u), spawn "~/.xmonad/comp -s") | |
-- Another hotkeys | |
] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment