packages feed

bluetile 0.5.2 → 0.5.3

raw patch · 7 files changed

+86/−44 lines, 7 filesdep +X11-xft

Dependencies added: X11-xft

Files

+ NEWS view
@@ -0,0 +1,20 @@+Bluetile 0.5.3 (on 2010/08/10)		Jan Vornberger <jan.vornberger@informatik.uni-oldenburg.de>+  Bluetile's theme is now configurable, including the font that is used.+  I also switched back to the old, grey-ish theme. For reference, below+  is the blue-ish theme, which was used for a few releases in an attempt+  to make the focused window stand out more. However, it was not very+  well received, apparently. Everyone is welcome to choose their own+  color combinations now. :-)++    decoration_focused_color = #7ca3d3+    decoration_focused_text_color = white+    decoration_focused_border_color = white+    decoration_normal_color = #e3e2e1+    decoration_normal_text_color = black+    decoration_normal_border_color = black+    decoration_font = xft: Sans Bold:size=9+    window_border_focused_color = black+    window_border_normal_color = gray++  Bluetile should also now build on Ubuntu Maverick Meerkat thanks to a+  patch by Iain Lane.
bluetile.cabal view
@@ -1,15 +1,15 @@ Name:                bluetile-Version:             0.5.2+Version:             0.5.3 homepage:            http://www.bluetile.org/ synopsis:            full-featured tiling for the GNOME desktop environment description:-  Bluetile is a tiling window manager designed to integrate with the-  GNOME desktop environment. It provides both a traditional, stacking-  layout mode as well as tiling layouts where windows are arranged to-  use the entire screen without overlapping. Bluetile tries to make the-  tiling paradigm easily accessible to users coming from traditional-  window managers by drawing on known conventions and providing both-  mouse and keyboard access for all features.+  Bluetile is a tiling window manager for Linux, designed to integrate+  with the GNOME desktop environment. It provides both a traditional,+  stacking layout mode as well as tiling layouts where windows are+  arranged to use the entire screen without overlapping. Bluetile tries+  to make the tiling paradigm easily accessible to users coming from+  traditional window managers by drawing on known conventions and+  providing both mouse and keyboard access for all features. category:            System License:             BSD3 License-file:        LICENSE@@ -45,7 +45,8 @@                      misc/bluetile.desktop,                      misc/bluetile-session.desktop,                      misc/gnome-bluetile-session.desktop,-                     README+                     README,+		     NEWS data-files:          bluetiledock/bluetiledock.glade,                      bluetiledock/floating.svg,                      bluetiledock/tiled1.svg,@@ -64,7 +65,7 @@   Hs-Source-Dirs:    src   Build-Depends:     base>=3, base<5, containers, process, filepath,                      random, utf8-string, unix, regex-compat, mtl,-                     ConfigFile, directory,+                     ConfigFile, directory, X11-xft,                      xmonad>=0.9.1, xmonad-contrib>=0.9.1   if true     Ghc-Options:       -Wall@@ -86,6 +87,7 @@   Hs-Source-Dirs:    bluetiledock   Main-is:           BluetileDock.hs   Build-Depends:     base>=3, base<5, unix, glade, gtk, X11>=1.4+  pkgconfig-depends: gtk+-2.0   C-sources:         bluetiledock/gdk_property_change_wrapper.c   if true     Ghc-Options:       -Wall
etc/bluetilerc view
@@ -11,6 +11,17 @@ terminal: gnome-terminal start_dock: true +# theme+decoration_focused_color = #999999+decoration_focused_text_color = #FFFFFF+decoration_focused_border_color = #FFFFFF+decoration_normal_color = #666666+decoration_normal_text_color = #BFBFBF+decoration_normal_border_color = #BBBBBB+decoration_font = xft: Sans Bold:size=9+window_border_focused_color = black+window_border_normal_color = gray+ # launching and killing programs key_launch_terminal: DefaultMod+Return key_gnome_run: DefaultMod+p
etc/bluetilerc_user_template view
@@ -11,3 +11,14 @@ #terminal: xterm #default_modifier: Mod1 #key_launch_terminal: DefaultMod+Shift+Return++# blue-ish theme where the focused window stands out more+#decoration_focused_color = #7ca3d3+#decoration_focused_text_color = white+#decoration_focused_border_color = white+#decoration_normal_color = #e3e2e1+#decoration_normal_text_color = black+#decoration_normal_border_color = black+#decoration_font = xft: Sans Bold:size=9+#window_border_focused_color = black+#window_border_normal_color = gray
src/Config.hs view
@@ -165,12 +165,12 @@                 , isFullscreen --> doFullFloat                 , manageDocks] -bluetileLayoutHook = avoidStruts $ minimize $ boringWindows $ (-                        named "Floating" floating |||-                        named "Tiled1" tiled1 |||-                        named "Tiled2" tiled2 |||-                        named "Fullscreen" fullscreen-                        )+bluetileLayoutHook bluetileTheme = avoidStruts $ minimize $ boringWindows $ (+                                        named "Floating" floating |||+                                        named "Tiled1" tiled1 |||+                                        named "Tiled2" tiled2 |||+                                        named "Fullscreen" fullscreen+                                        )         where             floating = floatingDeco $ maximize $ borderResize $ positionStoreFloat             tiled1 = tilingDeco $ maximize $ mouseResizableTile { isMirrored = True }@@ -179,20 +179,13 @@              tilingDeco l = windowSwitcherDecorationWithButtons shrinkText bluetileTheme (draggingVisualizer l)             floatingDeco l = buttonDeco shrinkText bluetileTheme l-            bluetileTheme = defaultThemeWithButtons { activeColor = "#7ca3d3"-                                                    , activeTextColor = "white"-                                                    , activeBorderColor = "white"-                                                    , inactiveColor = "#e3e2e1"-                                                    , inactiveTextColor = "black"-                                                    , inactiveBorderColor = "black"-                                                    }  createXMonadConfig bluetilerc =     defaultConfig         { modMask = defaultModifierBRC bluetilerc,           startupHook = ewmhDesktopsStartup >> setWMName "LG3D",           manageHook = bluetileManageHook,-          layoutHook = bluetileLayoutHook,+          layoutHook = bluetileLayoutHook bluetileTheme,           logHook = currentWorkspaceOnTop >> ewmhDesktopsLogHook,           handleEventHook = ewmhDesktopsEventHook                                 `mappend` fullscreenEventHook@@ -203,10 +196,24 @@           keys = bluetileKeys bluetilerc,           mouseBindings = bluetileMouseBindings,           focusFollowsMouse = focusFollowsMouseBRC bluetilerc,-          normalBorderColor = "gray",-          focusedBorderColor = "black",+          normalBorderColor = getDecoConfig "window_border_normal_color" bluetilerc,+          focusedBorderColor = getDecoConfig "window_border_focused_color" bluetilerc,           terminal = terminalBRC bluetilerc         }+    where+        bluetileTheme = defaultThemeWithButtons { activeColor = getDecoConfig "decoration_focused_color" bluetilerc+                                                , activeTextColor = getDecoConfig "decoration_focused_text_color" bluetilerc+                                                , activeBorderColor = getDecoConfig "decoration_focused_border_color" bluetilerc+                                                , inactiveColor = getDecoConfig "decoration_normal_color" bluetilerc+                                                , inactiveTextColor = getDecoConfig "decoration_normal_text_color" bluetilerc+                                                , inactiveBorderColor = getDecoConfig "decoration_normal_border_color" bluetilerc+                                                , fontName = getDecoConfig "decoration_font" bluetilerc+                                                }++getDecoConfig :: String -> BluetileRC -> String+getDecoConfig desc bluetilerc = case (lookup desc (decorationBRC bluetilerc)) of+                                    (Just decoConfig) -> decoConfig+                                    (Nothing) -> error $ "Configuration does not include decoration config value for '" ++ desc ++ "'"  getKeyBinding :: String -> BluetileRC -> (KeyMask, KeySym) getKeyBinding desc bluetilerc = case (lookup desc (keysBRC bluetilerc)) of
src/ConfigParser.hs view
@@ -32,6 +32,7 @@                                 , terminalBRC :: String                                 , startDockBRC :: Bool                                 , keysBRC :: [(String, (KeyMask, KeySym))]+                                , decorationBRC :: [(String, String)]                             } deriving (Show)  maskKeywordsBRC :: [(String, KeyMask)]@@ -392,8 +393,12 @@             startDockCF <- CF.get cp "DEFAULT" "start_dock"             let maskKeywordsBRCwithDefault = maskKeywordsBRC' ++ [("defaultmod", defaultModifierCF)] -            -- keys+            -- theme             itemsCF <- CF.items cp "DEFAULT"+            let colorsCF = filter (\(k, _) -> isPrefixOf "decoration_" k) itemsCF+                            ++ filter (\(k, _) -> isPrefixOf "window_border_" k) itemsCF++            -- keys             let keyBindingsCFstr = filter (\(k, _) -> isPrefixOf "key_" k) itemsCF             keyBindingsCF <- mapM (parseKeyBinding maskKeywordsBRCwithDefault) keyBindingsCFstr @@ -401,7 +406,9 @@                                         , focusFollowsMouseBRC = focusFollowsMouseCF                                         , terminalBRC = terminalCF                                         , startDockBRC = startDockCF-                                        , keysBRC = keyBindingsCF }+                                        , keysBRC = keyBindingsCF+                                        , decorationBRC = colorsCF+                                        }             return bluetilerc     case rv of         (Left err) -> do
src/XMonad/Util/Font.hs view
@@ -38,11 +38,9 @@ import Control.Applicative import Data.Maybe -#ifdef XFT import Data.List import Graphics.X11.Xft import Graphics.X11.Xrender-#endif  import Codec.Binary.UTF8.String (encodeString, decodeString) @@ -50,9 +48,7 @@ -- Hide the Core Font/Xft switching here data XMonadFont = Core FontStruct                 | Utf8 FontSet-#ifdef XFT                 | Xft  XftFont-#endif  -- $usage -- See "Xmonad.Layout.Tabbed" or "XMonad.Prompt" for usage examples@@ -96,24 +92,18 @@ -- Example: 'xft: Sans-10' initXMF :: String -> X XMonadFont initXMF s =-#ifdef XFT   if xftPrefix `isPrefixOf` s then      do dpy <- asks display         xftdraw <- io $ xftFontOpen dpy (defaultScreenOfDisplay dpy) (drop (length xftPrefix) s)         return (Xft xftdraw)   else-#endif       fmap Utf8 $ initUtf8Font s-#ifdef XFT   where xftPrefix = "xft:"-#endif  releaseXMF :: XMonadFont -> X ()-#ifdef XFT releaseXMF (Xft xftfont) = do   dpy <- asks display   io $ xftFontClose dpy xftfont-#endif releaseXMF (Utf8 fs) = releaseUtf8Font fs releaseXMF (Core fs) = releaseCoreFont fs @@ -121,11 +111,9 @@ textWidthXMF :: MonadIO m => Display -> XMonadFont -> String -> m Int textWidthXMF _   (Utf8 fs) s = return $ fi $ wcTextEscapement fs s textWidthXMF _   (Core fs) s = return $ fi $ textWidth fs s-#ifdef XFT textWidthXMF dpy (Xft xftdraw) s = liftIO $ do     gi <- xftTextExtents dpy xftdraw s     return $ xglyphinfo_xOff gi-#endif  textExtentsXMF :: MonadIO m => XMonadFont -> String -> m (Int32,Int32) textExtentsXMF (Utf8 fs) s = do@@ -136,12 +124,10 @@ textExtentsXMF (Core fs) s = do   let (_,a,d,_) = textExtents fs s   return (a,d)-#ifdef XFT textExtentsXMF (Xft xftfont) _ = io $ do   ascent  <- fi `fmap` xftfont_ascent  xftfont   descent <- fi `fmap` xftfont_descent xftfont   return (ascent, descent)-#endif  -- | String position data Align = AlignCenter | AlignRight | AlignLeft | AlignRightOffset Int@@ -174,7 +160,6 @@     setForeground d gc fc'     setBackground d gc bc'     io $ wcDrawImageString d p fs gc x y s-#ifdef XFT printStringXMF dpy drw fs@(Xft font) gc fc bc x y s = do   let screen   = defaultScreenOfDisplay dpy       colormap = defaultColormapOfScreen screen@@ -190,7 +175,6 @@   io $ withXftDraw dpy drw visual colormap $          \draw -> withXftColorName dpy visual colormap fc $                    \color -> xftDrawString draw color font x y s-#endif  decodeInput :: String -> String decodeInput = decodeString