diff options
| author | Josh Rahm <rahm@google.com> | 2020-02-03 15:00:23 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2020-02-03 15:00:23 -0700 |
| commit | e3b47c680b20aab1e703ce0525364244422c27e8 (patch) | |
| tree | e5739ea41f403e48d4d47860f1efb337b4dfc3d0 | |
| parent | a153456b06a06db97735284a0d7496017799807a (diff) | |
| download | rde-e3b47c680b20aab1e703ce0525364244422c27e8.tar.gz rde-e3b47c680b20aab1e703ce0525364244422c27e8.tar.bz2 rde-e3b47c680b20aab1e703ce0525364244422c27e8.zip | |
More minor aesthetic changes to XMobar
| -rw-r--r-- | assets/wallpaper.jpg | bin | 7936023 -> 767997 bytes | |||
| -rw-r--r-- | compton.conf | 8 | ||||
| -rw-r--r-- | src/Internal/Keys.hs | 3 | ||||
| -rw-r--r-- | src/Internal/Marking.hs | 30 | ||||
| -rw-r--r-- | src/Main.hs | 5 | ||||
| -rw-r--r-- | xmobarrc | 9 |
6 files changed, 31 insertions, 24 deletions
diff --git a/assets/wallpaper.jpg b/assets/wallpaper.jpg Binary files differindex 8a1744d..4976715 100644 --- a/assets/wallpaper.jpg +++ b/assets/wallpaper.jpg diff --git a/compton.conf b/compton.conf index aff1471..90be41d 100644 --- a/compton.conf +++ b/compton.conf @@ -3,12 +3,12 @@ backend = "glx"; ### Shadow shadow = true; no-dnd-shadow = true; -no-dock-shadow = true; +# no-dock-shadow = true; # clear-shadow = true; -shadow-radius = 10; -shadow-offset-x = -8; +shadow-radius = 7; +shadow-offset-x = -10; shadow-offset-y = -5; -shadow-opacity = 1; +shadow-opacity = 0.8; shadow-red = 0.0; shadow-green = 0.0; shadow-blue = 0.0; diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 8ec06b6..3d0df0c 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -27,7 +27,8 @@ newKeys = zip ['1'..] (XMonad.workspaces config) gotoWorkspace :: Char -> X () - gotoWorkspace ch = + gotoWorkspace ch = do + saveLastMark markContext mapM_ (windows . W.greedyView) (Map.lookup ch workspacesByInt) in diff --git a/src/Internal/Marking.hs b/src/Internal/Marking.hs index 352131b..e5cf696 100644 --- a/src/Internal/Marking.hs +++ b/src/Internal/Marking.hs @@ -54,24 +54,26 @@ markCurrentWindow (MarkContext ioref) mark = do saveMarkState =<< liftIO (readIORef ioref) -jumpToLast :: MarkContext -> X () -jumpToLast (MarkContext ioref) = do +saveLastMark :: MarkContext -> X () +saveLastMark (MarkContext ioref) = withFocused $ \win -> do - m <- markLast <$> (liftIO $ readIORef ioref) - liftIO $ modifyIORef ioref (\state -> state { markLast = Just win }) - mapM_ focus m + liftIO $ modifyIORef ioref (\state -> state { markLast = Just win }) + +jumpToLast :: MarkContext -> X () +jumpToLast ctx@(MarkContext ioref) = do + m <- markLast <$> (liftIO $ readIORef ioref) + saveLastMark ctx + mapM_ focus m saveMarkState =<< liftIO (readIORef ioref) jumpToMark :: MarkContext -> Mark -> X () -jumpToMark (MarkContext ioref) mark = do - withFocused $ \win -> do - MarkState {markStateMap = m} <- liftIO $ readIORef ioref - case Map.lookup mark m of - Nothing -> return () - Just w -> do - liftIO $ modifyIORef ioref $ \state -> - state { markLast = Just win } - focus w +jumpToMark ctx@(MarkContext ioref) mark = do + MarkState {markStateMap = m} <- liftIO $ readIORef ioref + case Map.lookup mark m of + Nothing -> return () + Just w -> do + saveLastMark ctx + focus w saveMarkState =<< liftIO (readIORef ioref) diff --git a/src/Main.hs b/src/Main.hs index 6989d60..98fb384 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -11,6 +11,8 @@ import XMonad.Hooks.ManageHelpers import Text.Printf import Internal.Keys +import Internal.LayoutDraw + main = do -- Execute some commands. @@ -34,6 +36,7 @@ main = do , className =? "Tilda" --> doFloat , className =? "MPlayer" --> doFloat , className =? "mpv" --> doFloat + , className =? "gnubby_ssh_prompt" --> doFloat ] } let toggleStructsKey XConfig {XMonad.modMask = modMask} = (modMask, xK_b) @@ -45,7 +48,7 @@ main = do ppCurrent = xmobarColor "#ffffff" "red" . printf "%s" , ppVisible = xmobarColor "#8888ff" "" . printf "%s" , ppHidden = xmobarColor "#888888" "" . printf "%s" - , ppWsSep = " · " + , ppWsSep = "<fn=1><fc=#808080> · </fc></fn>" , ppTitle = xmobarColor "#8888ff" "" . printf "%s" . (printf "<fn=1>%s</fn>" :: String -> String) @@ -1,11 +1,12 @@ Config { font = "xft:Ubuntu Mono:size=14" , additionalFonts = ["xft:Lato:style=bold"] -- default: [] - , borderColor = "white" - , border = NoBorder + , borderColor = "#000000" + , border = BottomB + , borderWidth = 2 , bgColor = "black" , fgColor = "white" - , alpha = 230 -- default: 255 + , alpha = 210 -- default: 255 , position = TopSize C 100 50 , textOffset = -1 -- default: -1 , iconOffset = -1 -- default: -1 @@ -18,5 +19,5 @@ Config , overrideRedirect = False -- default: True , sepChar = "%" , alignSep = "}{" - , template = " %StdinReader% }{ <fc=#8888ff>%date%</fc> " + , template = " %StdinReader% }{<fc=#404040> ──── </fc><fc=#8888ff>%date%</fc> " } |