Permalink
Browse files

Xmonad does dzen2 on the rightmost screen properly now, also new colo…

…rs for the bashrc prompt
  • Loading branch information...
1 parent efdf71e commit c784f606f2e99bf43c4fb3313e291215a43b0eca @pharaun committed Mar 27, 2012
Showing with 27 additions and 99 deletions.
  1. +3 −0 Xresources
  2. +0 −86 Xresources-imaskar
  3. +14 −4 bashrc/bashrc-common-prompt
  4. +1 −1 xinitrc
  5. +9 −8 xmonad/xmonad.hs
View
@@ -81,3 +81,6 @@ URxvt*color13: #cf9ebe
URxvt*color14: #71bebe
!XTerm*color15: white
URxvt*color15: #ffffff
+
+! xdpi settings
+Xft.dpi: 100.0
View
@@ -1,86 +0,0 @@
-! Fonts
-URxvt.font: xft:Bitstream Vera Sans Mono:size=9
-URxvt.boldFont: xft:Bitstream Vera Sans Mono:bold:size=9
-URxvt.italicFont: xft:Bitstream Vera Sans Mono:italic:size=9
-URxvt.boldItalicFont: xft:Bitstream Vera Sans Mono:bold:italic:size=9
-
-! Misc
-URxvt*loginShell: true
-URxvt*saveLines: 10000
-URxvt*meta8: false
-URxvt*tripleclickwords: false
-! Remove if distracting - blinking cursor
-URxvt*cursorBlink: true
-
-! Input Options
-URxvt*preeditType: Root
-
-! Scrolling
-URxvt*jumpScroll: true
-URxvt*skipScroll: true
-URxvt*buffered: true
-
-! Scrollbar
-URxvt*scrollBar: true
-URxvt*scrollstyle: plain
-URxvt*scrollBar_right: true
-
-! Scrolling action
-URxvt*scrollTtyOutput: true
-URxvt*scrollWithBuffer: true
-URxvt*scrollTtyKeypress: true
-
-! Secondary Screen (VIM, etc)
-URxvt*secondaryScreen: true
-URxvt*secondaryScroll: false
-
-! Transparency
-URxvt*transparent: true
-URxvt*shading: 10
-
-! Urgency/Bell
-URxvt*urgentOnBell: true
-URxvt*visualBell: false
-
-! Termname
-!URxvt*termName: rxvt-256color
-
-! Url clickers
-URxvt.perl-ext-common: default,matcher
-URxvt.urlLauncher: /usr/bin/firefox
-URxvt.matcher.button: 3
-URxvt.matcher.rend.0: -Uline
-
-! Coloring
-!XTerm*background: black
-URxvt*background: #000000
-!XTerm*foreground: gray
-URxvt*foreground: #bebebe
-!XTerm*cursorColor: yellow
-URxvt*cursorColor: #ffff00
-
-!XTerm*color0: black
-URxvt*color0: #000000
-!XTerm*color1: #40e0d0 - orginal
-URxvt*color1: #a80000
-!XTerm*color2: #87cefa - orginal
-URxvt*color2: #96bd84
-URxvt*color3: #ffff00
-URxvt*color4: #414171
-URxvt*color5: #eed8ae
-URxvt*color6: #b4eeb4
-!XTerm*color7: gray
-URxvt*color7: #bebebe
-!XTerm*color8: gray40
-URxvt*color8: #666666
-URxvt*color9: #ee6363
-URxvt*color10: #c5f779
-URxvt*color11: #fff796
-URxvt*color12: #00b2ee
-URxvt*color13: #cf9ebe
-URxvt*color14: #71bebe
-!XTerm*color15: white
-URxvt*color15: #ffffff
-
-! xdpi settings
-Xft.dpi: 100.0
@@ -21,24 +21,34 @@ _update_prompt () {
local red="31";
local green="32";
local yellow="33";
+ local blue="34";
local purple="35";
local cyan="36";
local white="37";
local pre="\[\e[";
local suf="\]";
+ local e_red="${pre}0;${red}m$suf";
local e_green="${pre}0;${green}m$suf";
+ local e_yellow="${pre}0;${yellow}m$suf";
+ local e_blue="${pre}0;${blue}m$suf";
local e_purple="${pre}0;${purple}m$suf";
local e_cyan="${pre}0;${cyan}m$suf";
local e_white="${pre}0;${white}m$suf";
+
local e_bred="$pre$red;1m$suf";
+ local e_bgreen="$pre$green;1m$suf";
local e_byellow="$pre$yellow;1m$suf";
+ local e_bblue="$pre$blue;1m$suf";
+ local e_bpurple="$pre$purple;1m$suf";
+ local e_bcyan="$pre$cyan;1m$suf";
+ local e_bwhite="$pre$white;1m$suf";
local e_normal="\[\e[0;0m\]"
## Initial prompt
- local host_directory="$e_white\h$e_normal:$e_cyan\w$e_normal";
+ local host_directory="$e_bpurple\h$e_normal:$e_cyan\w$e_normal";
## Color based on exit code
local bul="\342\200\242" # bullet character
@@ -67,9 +77,9 @@ _update_prompt () {
## True for all git versions I could find
git status --porcelain | perl -ne 'exit(1) if /^ /; exit(2) if /^[?]/'
case "$?" in
- "0" ) branch="$e_green$branch$e_normal" ;;
- "1" ) branch="$e_bred$branch$e_normal" ;;
- "2" ) branch="$e_byellow$branch$e_normal" ;;
+ "0" ) branch="$e_green$branch$e_normal" ;;
+ "1" ) branch="$e_red$branch$e_normal" ;;
+ "2" ) branch="$e_yellow$branch$e_normal" ;;
"130") git config bash.big-repo 1 ;;
esac
fi
View
@@ -13,7 +13,7 @@ export GTK_IM_MODULE="ibus"
export QT_IM_MODULE="xim"
# Background loading
-feh --bg-center ~/.config/background/background.jpg &
+nitrogen --restore
xcalib ~/.config/icm/n20wmgx2.icm
#xmodmap .Xmodmap &
View
@@ -75,7 +75,7 @@ import XMonad.Actions.GridSelect
import XMonad.Hooks.DynamicLog hiding (dzen)
import System.IO (hPutStrLn)
import qualified Dzen as Dzen
---import XMonad.Util.WorkspaceCompare(getSortByXineramaRule)
+import XMonad.Layout.IndependentScreens(countScreens)
-- Submenu support
import XMonad.Actions.Submap
@@ -119,19 +119,19 @@ myXPConfig = defaultXPConfig {
}
-- Dzen config
-myDzenConfig :: Dzen.DzenConf
-myDzenConfig = Dzen.defaultDzen {
+myDzenConfig :: Int -> Dzen.DzenConf
+myDzenConfig screen = Dzen.defaultDzen {
Dzen.font = Just myDzenFont
, Dzen.bgColor = Just myBgColor
, Dzen.fgColor = Just myFgColor
, Dzen.width = Just $ Dzen.Percent 28.75
, Dzen.xPosition = Just $ Dzen.Percent 11.75 -- Pixels 188
, Dzen.alignment = Just Dzen.LeftAlign
, Dzen.height = Just 30
- , Dzen.screen = Just 0 -- Falls back to 0 if it can't find
+ , Dzen.screen = Just (screen - 1) -- Falls back to 0 if it can't find
}
-myConkyDzenConfig :: Dzen.DzenConf
-myConkyDzenConfig = myDzenConfig {
+myConkyDzenConfig :: Int -> Dzen.DzenConf
+myConkyDzenConfig screen = (myDzenConfig screen) {
Dzen.width = Just $ Dzen.Percent 40.29
, Dzen.xPosition = Just $ Dzen.Percent 40.5
, Dzen.alignment = Nothing
@@ -185,8 +185,9 @@ a_browser = "xdg-open"
main :: IO ()
main = do
host <- getHost
- d <- Dzen.spawnDzen myDzenConfig
- Dzen.spawnToDzen a_conky myConkyDzenConfig
+ count <- countScreens
+ d <- Dzen.spawnDzen $ myDzenConfig count
+ Dzen.spawnToDzen a_conky $ myConkyDzenConfig count
xmonad $ gnomeConfig
{ terminal = a_terminal host
, modMask = myModMask host

0 comments on commit c784f60

Please sign in to comment.