Move .config content to the root and rename doom folder

This commit is contained in:
reo6 2023-04-13 13:21:15 +03:00
parent 741b493376
commit f5b39a03dd
13 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,17 @@
module NaturalGreenTheme (naturalGreenTheme) where
import Theme (Theme(..))
import XMonad.Hooks.StatusBar.PP
naturalGreenXmobarPP :: PP
naturalGreenXmobarPP = def
{ ppSep = ""
}
naturalGreenTheme :: Theme
naturalGreenTheme = Theme { themeName = "Natural Green"
, themeBarConfig = "~/.config/xmobar/natural-green-xmobarrc"
, themeBorderColor = "#425F57"
, themeFocusedBorderColor = "#749F82"
, themeWallpaper = "/usr/share/backgrounds/gnome/brush-strokes-d.jpg"
, themeXmobarPP = naturalGreenXmobarPP
}

10
xmonad/lib/Theme.hs Normal file
View file

@ -0,0 +1,10 @@
module Theme ( Theme(..) ) where
import XMonad.Hooks.StatusBar.PP
data Theme = Theme { themeName :: String
, themeBarConfig :: String
, themeBorderColor :: String
, themeFocusedBorderColor :: String
, themeWallpaper :: String
, themeXmobarPP :: PP
}

61
xmonad/xmonad.hs Normal file
View file

@ -0,0 +1,61 @@
import XMonad
import XMonad.Util.EZConfig (additionalKeysP)
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.StatusBar
import XMonad.Hooks.StatusBar.PP
import XMonad.Hooks.EwmhDesktops
import XMonad.Util.SpawnOnce (spawnOnce)
import XMonad.Layout.Spacing
import Theme
import NaturalGreenTheme
main = do
xmonad . ewmhFullscreen . ewmh . withEasySB (statusBarProp ("xmobar " ++ themeWallpaper myTheme) (pure $ themeXmobarPP myTheme)) defToggleStrutsKey $ myConfig
myConfig = def { terminal = myTerminal
, modMask = myModMask
, borderWidth = myBorderWidth
, focusedBorderColor = themeFocusedBorderColor myTheme
, normalBorderColor = themeBorderColor myTheme
, startupHook = myStartupHook
, layoutHook = spacingWithEdge myGapSize $ myLayoutHook
}
`additionalKeysP` myKeybindings
myTerminal = "alacritty"
myModMask = mod4Mask
myBorderWidth = 5
myEmacs = "emacsclient -c -a 'emacs' "
myBrowser = "firefox"
myTheme = naturalGreenTheme
myLauncher = "rofi -show drun"
myGapSize = 13
myStartupHook :: X ()
myStartupHook = do
spawn $ "/usr/bin/xmobar " ++ themeBarConfig myTheme
spawn $ "feh --bg-scale " ++ themeWallpaper myTheme
spawn "xscreensaver -no-splash"
spawnOnce "trayer --edge top --align right --SetDockType true --SetPartialStrut true --expand true --width 10 --transparent true --tint 0x5f5f5f --height 31"
spawn "emacs --daemon"
myKeybindings :: [(String, X())]
myKeybindings = [ ("M-e", spawn myEmacs)
, ("M-f", spawn myBrowser)
, ("<XF86MonBrightnessUp>", spawn "brightnessctl s +4%")
, ("<XF86MonBrightnessDown>", spawn "brightnessctl s 4%-")
, ("<XF86AudioRaiseVolume>", spawn "amixer -q sset Master 3%+")
, ("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 3%-")
, ("M-<Return>", spawn myTerminal)
, ("M-q", spawn "xmonad --recompile; killall xmobar; xmonad --restart")
, ("M-d", spawn myLauncher)
]
myLayoutHook = tiled ||| Mirror tiled ||| Full
where
tiled = Tall nmaster delta ratio
nmaster = 1
ratio = 1/2
delta = 3/100