a bit of restyling and a IMPORTANT fix to how tabs work interact with FULLscreen mode

This commit is contained in:
Leon Kowarschick 2020-05-12 14:53:22 +02:00
parent cb450a7c5b
commit 67cdad051e
6 changed files with 95 additions and 53 deletions

View file

@ -18,10 +18,14 @@ shadow = true;
#shadow-offset-x = -20; #shadow-offset-x = -20;
#shadow-offset-y = -20; #shadow-offset-y = -20;
shadow-radius = 3; #hadow-radius = 3;
shadow-offset-x = 3; #shadow-offset-x = 3;
shadow-offset-y = 3; #shadow-offset-y = 3;
shadow-opacity = 0.6; #shadow-opacity = 0.6;
shadow-radius = 12;
shadow-offset-x = -10;
shadow-offset-y = -10;
shadow-opacity = 0.8;
# shadow-red = 0.0; # shadow-red = 0.0;
# shadow-green = 0.0; # shadow-green = 0.0;
# shadow-blue = 0.0; # shadow-blue = 0.0;
@ -29,6 +33,7 @@ shadow-opacity = 0.6;
shadow-exclude = [ shadow-exclude = [
"! name~=''", "! name~=''",
#"!focused && ! class_g ?='xfce4-notifyd'", #"!focused && ! class_g ?='xfce4-notifyd'",
#"name *= 'polybar'",
"name = 'Notification'", "name = 'Notification'",
"name = 'Plank'", "name = 'Plank'",
"name = 'Docky'", "name = 'Docky'",

View file

@ -45,11 +45,15 @@ monitor = ${env:MONITOR:}
override-redirect = true override-redirect = true
wm-restack = xmonad wm-restack = xmonad
width = 100%:-28 ;width = 100%:-28
height = 30 ;height = 30
;offset-x = 14
;offset-y = 7
offset-x = 14 width = 100%
offset-y = 7 height = 30
offset-x = 0
offset-y = 0
radius = 0 radius = 0
@ -77,15 +81,17 @@ padding-left = 0
padding-right = 2 padding-right = 2
module-margin-left = 1 module-margin-left = 1
module-margin-right = 2 module-margin-right = 1
font-0 = fixed:pixelsize=10;2 ;font-0 = fixed:pixelsize=10;2
;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0 ;font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
;font-2 = siji:pixelsize=10;1 ;font-2 = siji:pixelsize=10;1
;font-7 = NotoEmoji:size=7; ;font-7 = NotoEmoji:size=7;
;font-7 = "JetBrainsMono Nerd Font:size=7" ;font-7 = "JetBrainsMono Nerd Font:size=7"
;font-0 = "JetBrainsMono Nerd Font:fontformat=truetype:size=10;2" ;font-0 = "JetBrainsMono Nerd Font:fontformat=truetype:size=10;2"
;font-1 = "NotoEmoji:scale=10;1" ;font-1 = "NotoEmoji:scale=10;1"
;font-0 = "JetbrainsMono Bold:size=10;2"
font-0 = "JetbrainsMono:weight=medium:size=10;2"
font-1 = "Symbola:size=8;1" font-1 = "Symbola:size=8;1"
font-2 = "FontAwesome5Free:style=Solid:size=8;2" font-2 = "FontAwesome5Free:style=Solid:size=8;2"
font-3 = "Iosevka Nerd Font:size=17;4" font-3 = "Iosevka Nerd Font:size=17;4"
@ -94,7 +100,7 @@ font-3 = "Iosevka Nerd Font:size=17;4"
modules-left = xmonad bspwm modules-left = xmonad bspwm
modules-center = timerDisplay spotify mpd gitlab-pipeline player-mpv-tail date modules-center = timerDisplay spotify mpd gitlab-pipeline player-mpv-tail date
modules-right = pulseaudio-control updates-arch pulseaudio filesystem memory cpu modules-right = pulseaudio-control updates-arch pulseaudio filesystem memory cpu time
; network-traffic ; network-traffic
tray-position = right tray-position = right
@ -159,20 +165,33 @@ label = %percentage_used%%
[module/date] [module/date]
type = internal/date type = internal/date
interval = 20 interval = 20
date = %A, %d %m %y
date-alt = %d-%m-%Y
time = %H:%M
time-alt = %H:%M:%S
;format-prefix = "%{F#fbff8c}  %{F-}"
;format-prefix-foreground = ${colors.foreground-alt}
;label = "%{F#444} %{F-}%{B#444} %time% | %date% %{B-}%{F#444} %{F-}"
label = "%date%"
[module/time]
type = internal/date
interval = 20
date = %a, %d %m %y date = %a, %d %m %y
date-alt = %d-%m-%Y date-alt = %d-%m-%Y
time = %H:%M time = %H:%M
time-alt = %H:%M:%S time-alt = %H:%M:%S
;format-prefix = "%{F#fbff8c}  %{F-}" ;format-prefix = "%{F#fbff8c}  %{F-}"
;format-prefix-foreground = ${colors.foreground-alt} ;format-prefix-foreground = ${colors.foreground-alt}
label = "%{F#444} %{F-}%{B#444} %time% | %date% %{B-}%{F#444} %{F-}" ;label = "%{F#444} %{F-}%{B#444} %time% | %date% %{B-}%{F#444} %{F-}"
label = "%time%"
[module/xmonad] [module/xmonad]
type = custom/script type = custom/script
;exec = "xmonad-log" exec = "/home/leon/.config/polybar/polybar-scripts/xmonad-status.sh"
exec = '/home/leon/.config/polybar/polybar-scripts/xmonad-status.sh'
tail = true tail = true
;interval = 1 ;interval = 1
;exec = "xmonad-log"
[module/timerDisplay] [module/timerDisplay]

View file

@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
if [ "$MONITOR" = "HDMI-A-0" ]; then if [ "$MONITOR" = "HDMI-A-0" ]; then
while true; do #while true; do
tail -F /tmp/xmonad-state-bar0 tail -f /tmp/xmonad-state-bar0
done #done
else else
while true; do #while true; do
tail -F /tmp/xmonad-state-bar1 tail -f /tmp/xmonad-state-bar1
done #done
fi fi
#while true; do #while true; do

View file

@ -50,6 +50,9 @@ import XMonad.Util.EZConfig ( additionalKeysP
, checkKeymap , checkKeymap
) )
import XMonad.Util.NamedScratchpad import XMonad.Util.NamedScratchpad
import qualified XMonad.Layout.MultiToggle as MTog
import qualified XMonad.Layout.MultiToggle.Instances as MTog
import XMonad.Util.Run import XMonad.Util.Run
import XMonad.Util.SpawnOnce (spawnOnce) import XMonad.Util.SpawnOnce (spawnOnce)
import XMonad.Layout.Tabbed import XMonad.Layout.Tabbed
@ -62,6 +65,10 @@ import XMonad.Layout.SubLayouts
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
import qualified XMonad.Util.XSelection as XSel import qualified XMonad.Util.XSelection as XSel
import XMonad.Layout.WindowNavigation ( windowNavigation ) import XMonad.Layout.WindowNavigation ( windowNavigation )
import GHC.IO.Encoding ( setLocaleEncoding
, utf8
, setFileSystemEncoding
)
{-# ANN module "HLint: ignore Redundant $" #-} {-# ANN module "HLint: ignore Redundant $" #-}
{-# ANN module "HLint: ignore Redundant bracket" #-} {-# ANN module "HLint: ignore Redundant bracket" #-}
@ -101,7 +108,7 @@ scratchpads =
-- Colors ------ {{{ -- Colors ------ {{{
fg = "#ebdbb2" fg = "#ebdbb2"
bg = "#282828" bg = "#282828"
gray = "#a89984" gray = "#888974"
bg1 = "#3c3836" bg1 = "#3c3836"
bg2 = "#504945" bg2 = "#504945"
bg3 = "#665c54" bg3 = "#665c54"
@ -135,7 +142,12 @@ myTabTheme = def
-- layoutHints . -- layoutHints .
myLayout = avoidStruts . smartBorders . ToggleLayouts.toggleLayouts resizableTabbedLayout . ToggleLayouts.toggleLayouts Full . layoutHintsToCenter $ layouts myLayout = avoidStruts
$ smartBorders
$ MTog.mkToggle1 MTog.FULL
$ ToggleLayouts.toggleLayouts resizableTabbedLayout
$ layoutHintsToCenter
$ layouts
where where
layouts =((rename "Tall" $ onlySpacing $ mouseResizableTile {draggerType = dragger}) layouts =((rename "Tall" $ onlySpacing $ mouseResizableTile {draggerType = dragger})
||| (rename "Horizon" $ onlySpacing $ mouseResizableTileMirrored {draggerType = dragger}) ||| (rename "Horizon" $ onlySpacing $ mouseResizableTileMirrored {draggerType = dragger})
@ -149,7 +161,7 @@ myLayout = avoidStruts . smartBorders . ToggleLayouts.toggleLayouts resizableTa
resizableTabbedLayout = rename "Tabbed" . BoringWindows.boringWindows . makeTabbed . spacingAndGaps $ ResizableTall 1 (3/100) (1/2) [] resizableTabbedLayout = rename "Tabbed" . BoringWindows.boringWindows . makeTabbed . spacingAndGaps $ ResizableTall 1 (3/100) (1/2) []
gap = 7 gap = 10
onlySpacing = gaps [ (dir, (gap*2)) | dir <- [L, R, D, U] ] -- gaps are included in mouseResizableTile onlySpacing = gaps [ (dir, (gap*2)) | dir <- [L, R, D, U] ] -- gaps are included in mouseResizableTile
dragger = let x = fromIntegral gap * 2 dragger = let x = fromIntegral gap * 2
in FixedDragger x x in FixedDragger x x
@ -217,7 +229,8 @@ myKeys =
, ("M-S-t", toggleTabbedLayout) , ("M-S-t", toggleTabbedLayout)
, ("M-f", toggleFullscreen) --, ("M-f", toggleFullscreen)
, ("M-f", sendMessage $ MTog.Toggle MTog.FULL)
, ("M-S-C-c", kill1) , ("M-S-C-c", kill1)
@ -369,6 +382,8 @@ myManageHook = composeAll
-- Main ------------------------------------ {{{ -- Main ------------------------------------ {{{
main :: IO () main :: IO ()
main = do main = do
setLocaleEncoding utf8
currentScreenCount :: Int <- countScreens currentScreenCount :: Int <- countScreens
let monitorIndices = [0..currentScreenCount - 1] let monitorIndices = [0..currentScreenCount - 1]
@ -417,20 +432,22 @@ polybarLogHook monitor = do
-- | create a polybar Pretty printer, marshalled for given monitor. -- | create a polybar Pretty printer, marshalled for given monitor.
polybarPP :: Int -> PP polybarPP :: Int -> PP
polybarPP monitor = namedScratchpadFilterOutWorkspacePP $ marshallPP (fromIntegral monitor) $ def polybarPP monitor = namedScratchpadFilterOutWorkspacePP $ marshallPP (fromIntegral monitor) $ def
{ ppCurrent = withBG bg2 { ppCurrent = withFG aqua . withMargin
, ppVisible = withBG bg2 --ppCurrent = withBG bg2
, ppUrgent = withFG red , ppVisible = withFG aqua . withMargin
, ppLayout = removeWord "Minimize" . removeWord "Hinted" . removeWord "Spacing" . withFG purple , ppUrgent = withFG red . withMargin
, ppHidden = wrap " " " " . unwords . map wrapOpenWorkspaceCmd . words , ppLayout = removeWord "Minimize" . removeWord "Hinted" . removeWord "Spacing" . withFG purple . withMargin
, ppHidden = withMargin . withFG gray . unwords . map wrapOpenWorkspaceCmd . words
, ppWsSep = "" , ppWsSep = ""
, ppSep = " | " , ppSep = " | "
, ppExtras = [] , ppExtras = []
, ppTitle = withFG aqua . (shorten 40) , ppTitle = const "" -- withFG aqua . (shorten 40)
} }
where where
withMargin = wrap " " " "
removeWord substr = unwords . filter (/= substr) . words removeWord substr = unwords . filter (/= substr) . words
withBG col = wrap ("%{B" ++ col ++ "} ") " %{B-}" withBG col = wrap ("%{B" ++ col ++ "}") "%{B-}"
withFG col = wrap ("%{F" ++ col ++ "} ") " %{F-}" withFG col = wrap ("%{F" ++ col ++ "}") "%{F-}"
wrapOpenWorkspaceCmd wsp wrapOpenWorkspaceCmd wsp
| all isDigit wsp = wrapOnClickCmd ("xdotool key super+" ++ wsp) wsp | all isDigit wsp = wrapOnClickCmd ("xdotool key super+" ++ wsp) wsp
| otherwise = wsp | otherwise = wsp

View file

@ -1,23 +1,24 @@
name: my-xmonad cabal-version: >=1.10
version: 0.1.0.0 name: my-xmonad
build-type: Simple version: 0.1.0.0
cabal-version: >=1.10 build-type: Simple
executable my-xmonad executable my-xmonad
main-is: ../xmonad.hs main-is: ../xmonad.hs
-- other-modules lists custom modules in my ~/.xmonad/lib/ directory hs-source-dirs: lib
other-modules: Config other-modules:
, Rofi Config
build-depends: base Rofi
, xmonad >= 0.13
, xmonad-contrib >= 0.13 default-language: Haskell2010
, dbus >= 1.2.12 ghc-options: -Wall -threaded -fno-warn-missing-signatures
, iwlib >= 0.1.0 build-depends:
, netlink >= 1.1.1.0 base -any,
, containers >= 0.6.2.1 xmonad >=0.13,
, utf8-string >= 1.0.1.1 xmonad-contrib >=0.13,
, text >= 1.2.4.0 dbus >=1.2.12,
hs-source-dirs: lib iwlib >=0.1.0,
default-language: Haskell2010 netlink >=1.1.1.0,
ghc-options: -Wall -threaded -fno-warn-missing-signatures containers >=0.6.2.1,
-- -Werror -fno-warn-missing-signatures -threaded utf8-string >=1.0.1.1,
text >=1.2.4.0