mirror of
https://github.com/elkowar/dots-of-war.git
synced 2024-12-24 13:22:23 +00:00
a bit of restyling and a IMPORTANT fix to how tabs work interact with FULLscreen mode
This commit is contained in:
parent
cb450a7c5b
commit
67cdad051e
6 changed files with 95 additions and 53 deletions
|
@ -18,10 +18,14 @@ shadow = true;
|
|||
#shadow-offset-x = -20;
|
||||
#shadow-offset-y = -20;
|
||||
|
||||
shadow-radius = 3;
|
||||
shadow-offset-x = 3;
|
||||
shadow-offset-y = 3;
|
||||
shadow-opacity = 0.6;
|
||||
#hadow-radius = 3;
|
||||
#shadow-offset-x = 3;
|
||||
#shadow-offset-y = 3;
|
||||
#shadow-opacity = 0.6;
|
||||
shadow-radius = 12;
|
||||
shadow-offset-x = -10;
|
||||
shadow-offset-y = -10;
|
||||
shadow-opacity = 0.8;
|
||||
# shadow-red = 0.0;
|
||||
# shadow-green = 0.0;
|
||||
# shadow-blue = 0.0;
|
||||
|
@ -29,6 +33,7 @@ shadow-opacity = 0.6;
|
|||
shadow-exclude = [
|
||||
"! name~=''",
|
||||
#"!focused && ! class_g ?='xfce4-notifyd'",
|
||||
#"name *= 'polybar'",
|
||||
"name = 'Notification'",
|
||||
"name = 'Plank'",
|
||||
"name = 'Docky'",
|
||||
|
|
|
@ -45,11 +45,15 @@ monitor = ${env:MONITOR:}
|
|||
override-redirect = true
|
||||
wm-restack = xmonad
|
||||
|
||||
width = 100%:-28
|
||||
height = 30
|
||||
;width = 100%:-28
|
||||
;height = 30
|
||||
;offset-x = 14
|
||||
;offset-y = 7
|
||||
|
||||
offset-x = 14
|
||||
offset-y = 7
|
||||
width = 100%
|
||||
height = 30
|
||||
offset-x = 0
|
||||
offset-y = 0
|
||||
|
||||
radius = 0
|
||||
|
||||
|
@ -77,15 +81,17 @@ padding-left = 0
|
|||
padding-right = 2
|
||||
|
||||
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-2 = siji:pixelsize=10;1
|
||||
;font-7 = NotoEmoji:size=7;
|
||||
;font-7 = "JetBrainsMono Nerd Font:size=7"
|
||||
;font-0 = "JetBrainsMono Nerd Font:fontformat=truetype:size=10;2"
|
||||
;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-2 = "FontAwesome5Free:style=Solid:size=8;2"
|
||||
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-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
|
||||
|
||||
tray-position = right
|
||||
|
@ -159,20 +165,33 @@ label = %percentage_used%%
|
|||
[module/date]
|
||||
type = internal/date
|
||||
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-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 = "%{F#444} %{F-}%{B#444} %time% | %date% %{B-}%{F#444} %{F-}"
|
||||
label = "%time%"
|
||||
|
||||
[module/xmonad]
|
||||
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
|
||||
;interval = 1
|
||||
;exec = "xmonad-log"
|
||||
|
||||
|
||||
[module/timerDisplay]
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ "$MONITOR" = "HDMI-A-0" ]; then
|
||||
while true; do
|
||||
tail -F /tmp/xmonad-state-bar0
|
||||
done
|
||||
#while true; do
|
||||
tail -f /tmp/xmonad-state-bar0
|
||||
#done
|
||||
else
|
||||
while true; do
|
||||
tail -F /tmp/xmonad-state-bar1
|
||||
done
|
||||
#while true; do
|
||||
tail -f /tmp/xmonad-state-bar1
|
||||
#done
|
||||
fi
|
||||
|
||||
#while true; do
|
||||
|
|
Binary file not shown.
|
@ -50,6 +50,9 @@ import XMonad.Util.EZConfig ( additionalKeysP
|
|||
, checkKeymap
|
||||
)
|
||||
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.SpawnOnce (spawnOnce)
|
||||
import XMonad.Layout.Tabbed
|
||||
|
@ -62,6 +65,10 @@ import XMonad.Layout.SubLayouts
|
|||
import qualified XMonad.StackSet as W
|
||||
import qualified XMonad.Util.XSelection as XSel
|
||||
import XMonad.Layout.WindowNavigation ( windowNavigation )
|
||||
import GHC.IO.Encoding ( setLocaleEncoding
|
||||
, utf8
|
||||
, setFileSystemEncoding
|
||||
)
|
||||
|
||||
{-# ANN module "HLint: ignore Redundant $" #-}
|
||||
{-# ANN module "HLint: ignore Redundant bracket" #-}
|
||||
|
@ -101,7 +108,7 @@ scratchpads =
|
|||
-- Colors ------ {{{
|
||||
fg = "#ebdbb2"
|
||||
bg = "#282828"
|
||||
gray = "#a89984"
|
||||
gray = "#888974"
|
||||
bg1 = "#3c3836"
|
||||
bg2 = "#504945"
|
||||
bg3 = "#665c54"
|
||||
|
@ -135,7 +142,12 @@ myTabTheme = def
|
|||
|
||||
-- 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
|
||||
layouts =((rename "Tall" $ onlySpacing $ mouseResizableTile {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) []
|
||||
|
||||
gap = 7
|
||||
gap = 10
|
||||
onlySpacing = gaps [ (dir, (gap*2)) | dir <- [L, R, D, U] ] -- gaps are included in mouseResizableTile
|
||||
dragger = let x = fromIntegral gap * 2
|
||||
in FixedDragger x x
|
||||
|
@ -217,7 +229,8 @@ myKeys =
|
|||
, ("M-S-t", toggleTabbedLayout)
|
||||
|
||||
|
||||
, ("M-f", toggleFullscreen)
|
||||
--, ("M-f", toggleFullscreen)
|
||||
, ("M-f", sendMessage $ MTog.Toggle MTog.FULL)
|
||||
|
||||
|
||||
, ("M-S-C-c", kill1)
|
||||
|
@ -369,6 +382,8 @@ myManageHook = composeAll
|
|||
-- Main ------------------------------------ {{{
|
||||
main :: IO ()
|
||||
main = do
|
||||
setLocaleEncoding utf8
|
||||
|
||||
currentScreenCount :: Int <- countScreens
|
||||
let monitorIndices = [0..currentScreenCount - 1]
|
||||
|
||||
|
@ -417,20 +432,22 @@ polybarLogHook monitor = do
|
|||
-- | create a polybar Pretty printer, marshalled for given monitor.
|
||||
polybarPP :: Int -> PP
|
||||
polybarPP monitor = namedScratchpadFilterOutWorkspacePP $ marshallPP (fromIntegral monitor) $ def
|
||||
{ ppCurrent = withBG bg2
|
||||
, ppVisible = withBG bg2
|
||||
, ppUrgent = withFG red
|
||||
, ppLayout = removeWord "Minimize" . removeWord "Hinted" . removeWord "Spacing" . withFG purple
|
||||
, ppHidden = wrap " " " " . unwords . map wrapOpenWorkspaceCmd . words
|
||||
{ ppCurrent = withFG aqua . withMargin
|
||||
--ppCurrent = withBG bg2
|
||||
, ppVisible = withFG aqua . withMargin
|
||||
, ppUrgent = withFG red . withMargin
|
||||
, ppLayout = removeWord "Minimize" . removeWord "Hinted" . removeWord "Spacing" . withFG purple . withMargin
|
||||
, ppHidden = withMargin . withFG gray . unwords . map wrapOpenWorkspaceCmd . words
|
||||
, ppWsSep = ""
|
||||
, ppSep = " | "
|
||||
, ppExtras = []
|
||||
, ppTitle = withFG aqua . (shorten 40)
|
||||
, ppTitle = const "" -- withFG aqua . (shorten 40)
|
||||
}
|
||||
where
|
||||
withMargin = wrap " " " "
|
||||
removeWord substr = unwords . filter (/= substr) . words
|
||||
withBG col = wrap ("%{B" ++ col ++ "} ") " %{B-}"
|
||||
withFG col = wrap ("%{F" ++ col ++ "} ") " %{F-}"
|
||||
withBG col = wrap ("%{B" ++ col ++ "}") "%{B-}"
|
||||
withFG col = wrap ("%{F" ++ col ++ "}") "%{F-}"
|
||||
wrapOpenWorkspaceCmd wsp
|
||||
| all isDigit wsp = wrapOnClickCmd ("xdotool key super+" ++ wsp) wsp
|
||||
| otherwise = wsp
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
name: my-xmonad
|
||||
version: 0.1.0.0
|
||||
build-type: Simple
|
||||
cabal-version: >=1.10
|
||||
cabal-version: >=1.10
|
||||
name: my-xmonad
|
||||
version: 0.1.0.0
|
||||
build-type: Simple
|
||||
|
||||
executable my-xmonad
|
||||
main-is: ../xmonad.hs
|
||||
-- other-modules lists custom modules in my ~/.xmonad/lib/ directory
|
||||
other-modules: Config
|
||||
, Rofi
|
||||
build-depends: base
|
||||
, xmonad >= 0.13
|
||||
, xmonad-contrib >= 0.13
|
||||
, dbus >= 1.2.12
|
||||
, iwlib >= 0.1.0
|
||||
, netlink >= 1.1.1.0
|
||||
, containers >= 0.6.2.1
|
||||
, utf8-string >= 1.0.1.1
|
||||
, text >= 1.2.4.0
|
||||
hs-source-dirs: lib
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -threaded -fno-warn-missing-signatures
|
||||
-- -Werror -fno-warn-missing-signatures -threaded
|
||||
main-is: ../xmonad.hs
|
||||
hs-source-dirs: lib
|
||||
other-modules:
|
||||
Config
|
||||
Rofi
|
||||
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall -threaded -fno-warn-missing-signatures
|
||||
build-depends:
|
||||
base -any,
|
||||
xmonad >=0.13,
|
||||
xmonad-contrib >=0.13,
|
||||
dbus >=1.2.12,
|
||||
iwlib >=0.1.0,
|
||||
netlink >=1.1.1.0,
|
||||
containers >=0.6.2.1,
|
||||
utf8-string >=1.0.1.1,
|
||||
text >=1.2.4.0
|
||||
|
|
Loading…
Reference in a new issue