change xmonad config name to main.hs
This commit is contained in:
parent
8b7a1cf657
commit
8900dac9ab
@ -17,7 +17,7 @@ source-dirs: src
|
|||||||
|
|
||||||
executables:
|
executables:
|
||||||
xmonad:
|
xmonad:
|
||||||
main: xmonad.hs
|
main: main.hs
|
||||||
dependencies:
|
dependencies:
|
||||||
- xmonad
|
- xmonad
|
||||||
- containers
|
- containers
|
||||||
|
515
configs/xmonad/src/main.hs
Normal file
515
configs/xmonad/src/main.hs
Normal file
@ -0,0 +1,515 @@
|
|||||||
|
{-# LANGUAGE
|
||||||
|
MultiWayIf -- Required for `toggleFull` in `myAdditionalKeys`
|
||||||
|
, LambdaCase -- Required for `(\case)` statement in `myXmobarPP`
|
||||||
|
, FlexibleContexts
|
||||||
|
, OverloadedStrings
|
||||||
|
#-}
|
||||||
|
{-# OPTIONS_GHC -Wno-missing-signatures
|
||||||
|
-Wno-orphans #-}
|
||||||
|
|
||||||
|
-- Data Imports
|
||||||
|
|
||||||
|
import Data.Functor
|
||||||
|
import qualified Data.Map as M
|
||||||
|
import Data.Monoid
|
||||||
|
-- Used in io exitSuccess
|
||||||
|
|
||||||
|
import System.Environment (getEnv)
|
||||||
|
import System.Exit
|
||||||
|
import System.IO.Unsafe (unsafeDupablePerformIO)
|
||||||
|
-- XMonad imports
|
||||||
|
import XMonad
|
||||||
|
import XMonad.Actions.NoBorders (toggleBorder)
|
||||||
|
import XMonad.Hooks.EwmhDesktops
|
||||||
|
import XMonad.Hooks.ManageDebug
|
||||||
|
import XMonad.Hooks.ManageDocks
|
||||||
|
import XMonad.Hooks.ManageHelpers
|
||||||
|
import XMonad.Hooks.SetWMName
|
||||||
|
import XMonad.Hooks.StatusBar
|
||||||
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
import XMonad.Hooks.WindowSwallowing
|
||||||
|
import XMonad.Layout.Fullscreen
|
||||||
|
import XMonad.Layout.NoBorders
|
||||||
|
import XMonad.Layout.SimpleFloat
|
||||||
|
import XMonad.Layout.Spacing
|
||||||
|
import qualified XMonad.StackSet as W
|
||||||
|
import XMonad.Util.ClickableWorkspaces
|
||||||
|
import XMonad.Util.Cursor
|
||||||
|
import XMonad.Util.EZConfig
|
||||||
|
import qualified XMonad.Util.Hacks as Hacks
|
||||||
|
import XMonad.Util.NamedScratchpad
|
||||||
|
import XMonad.Util.SpawnOnce
|
||||||
|
import XMonad.Util.Ungrab
|
||||||
|
|
||||||
|
-- import qualified DBus as D
|
||||||
|
-- import qualified DBus.Client as D
|
||||||
|
|
||||||
|
main :: IO ()
|
||||||
|
main =
|
||||||
|
do
|
||||||
|
xmonad
|
||||||
|
$ debugManageHookOn "M-S-d"
|
||||||
|
. docks
|
||||||
|
. ewmhFullscreen
|
||||||
|
. fullscreenSupport
|
||||||
|
. ewmh
|
||||||
|
. Hacks.javaHack
|
||||||
|
-- . withEasySB xmobar2 toggleSB
|
||||||
|
. withEasySB xmobar toggleSB
|
||||||
|
. withSB xmobar2
|
||||||
|
$ myConfig
|
||||||
|
where
|
||||||
|
toggleSB XConfig {modMask = modm} = (modm, xK_m)
|
||||||
|
|
||||||
|
-- Windows key/Super key
|
||||||
|
myModMask :: KeyMask
|
||||||
|
myModMask = mod4Mask
|
||||||
|
|
||||||
|
-- Default Terminal
|
||||||
|
myTerminal :: String
|
||||||
|
myTerminal = "kitty"
|
||||||
|
|
||||||
|
-- Default Launcher
|
||||||
|
myLauncher :: String
|
||||||
|
myLauncher = myHomeDir ++ "/.config/rofi/launchers/type-7/launcher.sh"
|
||||||
|
|
||||||
|
-- Default Launcher
|
||||||
|
myFileManager :: String
|
||||||
|
myFileManager = "thunar"
|
||||||
|
|
||||||
|
-- Default Browser
|
||||||
|
myBrowser :: String
|
||||||
|
myBrowser = "chromium"
|
||||||
|
|
||||||
|
myPowerMenu :: String
|
||||||
|
myPowerMenu = myHomeDir ++ "/.config/rofi/powermenu/type-6/powermenu.sh"
|
||||||
|
|
||||||
|
-- Workspaces
|
||||||
|
myWorkspaces :: [String]
|
||||||
|
myWorkspaces = ["dev", "web", "irc", "gfx", "vm", "msc", "eml", "stm"]
|
||||||
|
|
||||||
|
-- myWorkspaces = map show [1 .. 9]
|
||||||
|
|
||||||
|
-- Border Width
|
||||||
|
myBorderWidth :: Dimension
|
||||||
|
myBorderWidth = 1
|
||||||
|
|
||||||
|
-- Formal Unfocused Color
|
||||||
|
myNormColor :: String
|
||||||
|
myNormColor = "#383830"
|
||||||
|
|
||||||
|
-- Focused Color
|
||||||
|
myFocusColor :: String
|
||||||
|
myFocusColor = "#a2a2a2"
|
||||||
|
|
||||||
|
-- Home Directory
|
||||||
|
myHomeDir :: String
|
||||||
|
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
||||||
|
|
||||||
|
-- focus follows the mouse pointer
|
||||||
|
myFocusFollowsMouse :: Bool
|
||||||
|
myFocusFollowsMouse = True
|
||||||
|
|
||||||
|
myKeys conf@(XConfig {XMonad.modMask = modm}) =
|
||||||
|
M.fromList $
|
||||||
|
[ ((m .|. modm, k), windows $ f i)
|
||||||
|
| (i, k) <- zip (XMonad.workspaces conf) [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_9, xK_0],
|
||||||
|
(f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
|
||||||
|
]
|
||||||
|
++ [ ((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
|
||||||
|
| (key, sc) <- zip [xK_comma, xK_period, xK_z] [0 ..],
|
||||||
|
(f, m) <- [(W.view, 0), (W.shift, shiftMask)]
|
||||||
|
]
|
||||||
|
|
||||||
|
myAdditionalKeys :: [(String, X ())]
|
||||||
|
myAdditionalKeys =
|
||||||
|
base
|
||||||
|
++ window
|
||||||
|
++ applications
|
||||||
|
++ multimedia
|
||||||
|
where
|
||||||
|
-- Force killing a frozen window.
|
||||||
|
forceKillWindow :: Window -> X ()
|
||||||
|
forceKillWindow w = withDisplay $ \d ->
|
||||||
|
io $ void $ killClient d w
|
||||||
|
-- Making a window have a full float over a workspace.
|
||||||
|
toggleFull :: Window -> X ()
|
||||||
|
toggleFull w = windows $ \s ->
|
||||||
|
if
|
||||||
|
| M.lookup w (W.floating s) == Just fullscreen -> W.sink w s
|
||||||
|
| otherwise -> W.float w fullscreen s
|
||||||
|
where
|
||||||
|
fullscreen = W.RationalRect 0 0 1 1
|
||||||
|
-- Screenshots
|
||||||
|
screenShotSelection = myHomeDir ++ "/.local/bin/print-select" :: String
|
||||||
|
screenShotFullscreen = myHomeDir ++ "/.local/bin/print-fullscreen" :: String
|
||||||
|
screenShotTmp = myHomeDir ++ "/.local/bin/print-tmp" :: String
|
||||||
|
screenShotApp = myHomeDir ++ "/.local/bin/print-window.sh" :: String
|
||||||
|
-- XMonad base keybinds.
|
||||||
|
base =
|
||||||
|
[ ("M-g", withFocused toggleBorder),
|
||||||
|
("M-S-c", kill),
|
||||||
|
("M-S-x", withFocused forceKillWindow),
|
||||||
|
("M-<Space>", sendMessage NextLayout),
|
||||||
|
("M-n", refresh),
|
||||||
|
("M-S-q", io exitSuccess),
|
||||||
|
("C-S-r", spawn "xmonad --recompile && pkill xmobar2 && pkill xmobar && xmonad --restart"),
|
||||||
|
("C-S-q", spawn "pkill -KILL -u $USER")
|
||||||
|
]
|
||||||
|
-- Window management keybinds.
|
||||||
|
window =
|
||||||
|
[ ("M-<Tab>", windows W.focusDown),
|
||||||
|
("M-j", windows W.focusDown),
|
||||||
|
("M-k", windows W.focusUp),
|
||||||
|
("M-S-m", windows W.focusMaster),
|
||||||
|
("M-m", sendMessage ToggleStruts),
|
||||||
|
("M-p", windows W.swapMaster),
|
||||||
|
("M-S-j", windows W.swapDown),
|
||||||
|
("M-S-h", windows W.swapDown),
|
||||||
|
("M-S-k", windows W.swapUp),
|
||||||
|
("M-S-l", windows W.swapUp),
|
||||||
|
("M-h", sendMessage Shrink),
|
||||||
|
("M-l", sendMessage Expand),
|
||||||
|
("M-t", withFocused $ windows . W.sink),
|
||||||
|
("M-f", withFocused toggleFull)
|
||||||
|
]
|
||||||
|
-- Spawning applications.
|
||||||
|
applications =
|
||||||
|
[ ("M-<Return>", spawn myTerminal),
|
||||||
|
("M-S-m", namedScratchpadAction myScratchpads "ncmpcpp"),
|
||||||
|
("M-C-<Return>", namedScratchpadAction myScratchpads "terminal"),
|
||||||
|
("M-S-<Escape>", spawn myPowerMenu),
|
||||||
|
("M-b", spawn myBrowser),
|
||||||
|
("M-v", spawn "code"),
|
||||||
|
("M-S-s", spawn "~/steam/steam.sh"),
|
||||||
|
("S-<Print>", unGrab *> spawn screenShotSelection),
|
||||||
|
("C-S-<Print>", unGrab *> spawn screenShotTmp),
|
||||||
|
("C-<Print>", unGrab *> spawn screenShotApp),
|
||||||
|
("<Print>", spawn screenShotFullscreen),
|
||||||
|
("M-S-<Return>", spawn myLauncher),
|
||||||
|
("M-e", spawn myFileManager)
|
||||||
|
]
|
||||||
|
-- Multimedia keybinds.
|
||||||
|
multimedia =
|
||||||
|
[ ("<XF86AudioPlay>", spawn "playerctl play-pause"),
|
||||||
|
("<XF86AudioPrev>", spawn "playerctl previous"),
|
||||||
|
("<XF86AudioNext>", spawn "playerctl next"),
|
||||||
|
("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle"),
|
||||||
|
("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ -1.5%"),
|
||||||
|
("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1.5%"),
|
||||||
|
("<Pause>", spawn "amixer sset Capture toggle"),
|
||||||
|
("M-<Escape>", spawn "mpc toggle"),
|
||||||
|
("M-<F1>", spawn "mpc prev"),
|
||||||
|
("M-<F2>", spawn "mpc next")
|
||||||
|
]
|
||||||
|
|
||||||
|
myMouseBindings :: XConfig l -> M.Map (KeyMask, Button) (Window -> X ())
|
||||||
|
myMouseBindings XConfig {XMonad.modMask = modm} =
|
||||||
|
M.fromList
|
||||||
|
-- Set the window to floating mode and move by dragging.
|
||||||
|
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
|
||||||
|
-- Raise the window to the top of the stack.
|
||||||
|
((modm, button2), \w -> focus w >> windows W.shiftMaster),
|
||||||
|
-- Set the window to floating mode and resize by dragging.
|
||||||
|
((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
|
||||||
|
]
|
||||||
|
|
||||||
|
myStartupHook :: X ()
|
||||||
|
myStartupHook = do
|
||||||
|
_ <-
|
||||||
|
traverse
|
||||||
|
spawnOnce
|
||||||
|
[ "sh ~/scripts/screenlayout.sh",
|
||||||
|
"nitrogen --restore &",
|
||||||
|
"touch ~/tmp/touchy && rm -rf ~/tmp/*",
|
||||||
|
-- , myHomeDir ++ "/.local/bin/picom-jonaburg --glx-no-stencil --xrender-sync-fence -b &"
|
||||||
|
"picom",
|
||||||
|
"xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.1",
|
||||||
|
"setxkbmap -option ctrl:nocaps br abnt2",
|
||||||
|
"nm-applet",
|
||||||
|
"trayer-srg -l --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0xFF181814 --height 27 --transparent false --distance 2 --margin 1 --alpha 0 --monitor 0 &",
|
||||||
|
"mpd &",
|
||||||
|
"dunst &",
|
||||||
|
"lxqt-policykit-agent &",
|
||||||
|
"xrdb -load ~/.Xresources",
|
||||||
|
"redshift -t 5700:3600 -l -23.5475:-46.63611 -b 0.9:0.7"
|
||||||
|
]
|
||||||
|
setDefaultCursor xC_left_ptr
|
||||||
|
setWMName "zmonad"
|
||||||
|
|
||||||
|
isInstance (ClassApp c _) = className =? c
|
||||||
|
isInstance (TitleApp t _) = title =? t
|
||||||
|
isInstance (NameApp n _) = appName =? n
|
||||||
|
|
||||||
|
type AppName = String
|
||||||
|
|
||||||
|
type AppTitle = String
|
||||||
|
|
||||||
|
type AppClassName = String
|
||||||
|
|
||||||
|
type AppCommand = String
|
||||||
|
|
||||||
|
data App
|
||||||
|
= ClassApp AppClassName AppCommand
|
||||||
|
| TitleApp AppTitle AppCommand
|
||||||
|
| NameApp AppName AppCommand
|
||||||
|
deriving (Show)
|
||||||
|
|
||||||
|
gimp = ClassApp "Gimp" "gimp"
|
||||||
|
|
||||||
|
gimp2 = ClassApp "Gimp-2.99" "gimp-2.99"
|
||||||
|
|
||||||
|
multimc = ClassApp "MultiMC" "MultiMC"
|
||||||
|
|
||||||
|
about = TitleApp "About Mozilla Firefox" "About Mozilla Firefox"
|
||||||
|
|
||||||
|
message = ClassApp "Xmessage" "Xmessage"
|
||||||
|
|
||||||
|
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
||||||
|
myManageHook = manageRules
|
||||||
|
where
|
||||||
|
-- Hides windows without ignoring it, see doHideIgnore in XMonad contrib.
|
||||||
|
doHide = ask >>= doF . W.delete :: ManageHook
|
||||||
|
-- WM_WINDOW_ROLE will be parsed with the role variable.
|
||||||
|
isRole = stringProperty "WM_WINDOW_ROLE"
|
||||||
|
-- To match multiple properties with one operator.
|
||||||
|
anyOf = foldl (<||>) (pure False) :: [Query Bool] -> Query Bool
|
||||||
|
-- To match multiple classNames with one operator.
|
||||||
|
match = anyOf . fmap isInstance :: [App] -> Query Bool
|
||||||
|
-- Checking for splash dialogs.
|
||||||
|
isSplash = isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_SPLASH"
|
||||||
|
-- Checking for pop-ups.
|
||||||
|
isPopup = isRole =? "pop-up"
|
||||||
|
-- Checking for file chooser dialog.
|
||||||
|
isFileChooserDialog = isRole =? "GtkFileChooserDialog"
|
||||||
|
-- Managing rules for applications.
|
||||||
|
manageRules =
|
||||||
|
composeOne
|
||||||
|
[ transience,
|
||||||
|
isDialog -?> doCenterFloat,
|
||||||
|
isFullscreen -?> (doF W.focusDown <> doFullFloat),
|
||||||
|
match
|
||||||
|
[ gimp,
|
||||||
|
gimp2,
|
||||||
|
about,
|
||||||
|
message
|
||||||
|
]
|
||||||
|
-?> doFloat,
|
||||||
|
match
|
||||||
|
[ multimc
|
||||||
|
]
|
||||||
|
-?> doCenterFloat,
|
||||||
|
anyOf
|
||||||
|
[ isFileChooserDialog,
|
||||||
|
isDialog,
|
||||||
|
isPopup,
|
||||||
|
isSplash
|
||||||
|
]
|
||||||
|
-?> doCenterFloat
|
||||||
|
]
|
||||||
|
<> composeAll
|
||||||
|
[ manageDocks <> namedScratchpadManageHook myScratchpads,
|
||||||
|
className =? "firefox" <&&> title =? "File Upload" --> doFloat,
|
||||||
|
className =? "firefox" <&&> title =? "Library" --> doCenterFloat,
|
||||||
|
className =? "firefox" <&&> title ^? "Save" --> doFloat,
|
||||||
|
className =? "firefox" <&&> resource =? "Toolkit" --> doFloat,
|
||||||
|
className =? "firefox" <&&> title ^? "Sign in" --> doFloat,
|
||||||
|
className ^? "jetbrains-" <&&> title ^? "Welcome to " --> doCenterFloat,
|
||||||
|
className ^? "jetbrains-" <&&> title =? "splash" --> doFloat,
|
||||||
|
className ^? "Visual " <&&> isDialog --> doCenterFloat,
|
||||||
|
className =? "firefox-esr" --> doShift "web",
|
||||||
|
className =? "Chromium-browser-chromium" --> doShift "web",
|
||||||
|
className =? "Virt-manager" --> doShift "vm",
|
||||||
|
className =? "steam_app_1172620" --> doShift "gfx",
|
||||||
|
className =? "steam_app_960090" --> doShift "gfx",
|
||||||
|
className =? "steam_app_1063730" --> doShift "gfx",
|
||||||
|
className =? "steam_app_632360" --> doShift "gfx",
|
||||||
|
className =? "discord" --> doShift "irc",
|
||||||
|
className =? "discord-screenaudio" --> doShift "irc",
|
||||||
|
className =? "Spotify" --> doShift "msc",
|
||||||
|
className =? "thunderbird" --> doShift "eml",
|
||||||
|
className =? "Steam" --> doShift "stm",
|
||||||
|
className =? "Lutris" --> doShift "vm" <> doFloat,
|
||||||
|
className =? "leagueclientux.exe" --> doShift "gfx",
|
||||||
|
className =? "league of legends.exe" --> doShift "gfx",
|
||||||
|
className =? "leagueclient.exe" --> doShift "gfx",
|
||||||
|
className =? "explorer.exe" --> doShift "gfx",
|
||||||
|
className =? "riotclientux.exe" --> doShift "gfx",
|
||||||
|
className =? "dauntless-win64-shipping.exe" --> doShift "gfx",
|
||||||
|
className =? "battle.net.exe" --> doShift "gfx" <> doFloat,
|
||||||
|
className =? "Pcmanfm" --> doFloat,
|
||||||
|
className =? "Thunar" --> doFloat,
|
||||||
|
className =? "Pavucontrol" --> doFloat,
|
||||||
|
className =? "Nitrogen" --> doFloat,
|
||||||
|
className =? "Wrapper-2.0" --> doFloat,
|
||||||
|
className =? "TeamSpeak 3" --> doFloat <> doShift "irc",
|
||||||
|
className =? "easyeffects" --> doFloat <> doShift "vm",
|
||||||
|
className =? "Arandr" --> doFloat,
|
||||||
|
resource =? "desktop_window" --> doIgnore,
|
||||||
|
resource =? "kdesktop" --> doIgnore,
|
||||||
|
className =? "Conky" --> doIgnore,
|
||||||
|
isRole ^? "About" <||> isRole ^? "about" --> doFloat,
|
||||||
|
"_NET_WM_WINDOW_TYPE" `isInProperty` "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE" --> doIgnore <> doRaise,
|
||||||
|
-- Steam Game Fixes
|
||||||
|
className =? "steam_app_1551360" <&&> title /=? "Forza Horizon 5" --> doHide -- Prevents black screen when fullscreening.
|
||||||
|
-- , title =? "Wine System Tray" --> doHide -- Prevents Wine System Trays from taking input focus.
|
||||||
|
-- , title ^? "Steam - News" --> doHide -- I don't like the Steam news menu
|
||||||
|
]
|
||||||
|
|
||||||
|
{- May be useful one day
|
||||||
|
doClose = ask >>= liftX . killWindow >> mempty :: ManageHook
|
||||||
|
doForceKill = ask >>= liftX . forceKillWindow >> mempty :: ManageHook
|
||||||
|
-}
|
||||||
|
|
||||||
|
myEventHook :: Event -> X All
|
||||||
|
myEventHook _ = return (All True)
|
||||||
|
|
||||||
|
myLayoutHook =
|
||||||
|
avoidStruts $
|
||||||
|
lessBorders OnlyScreenFloat $
|
||||||
|
spacingRaw False (Border w w w w) True (Border w w w w) True $
|
||||||
|
tiled ||| simpleFloat ||| Mirror tiled ||| Full
|
||||||
|
where
|
||||||
|
tiled = Tall nmaster delta ratio
|
||||||
|
nmaster = 1 -- Default number of windows in the master pane.
|
||||||
|
ratio = 1 / 2 -- Default proportion of screen occupied by master panes.
|
||||||
|
delta = 3 / 100 -- Percent of screen increment by when resizing panes.
|
||||||
|
w = 5 -- Width of pixel size between windows while tiled.
|
||||||
|
|
||||||
|
myXmobarPP :: X PP
|
||||||
|
myXmobarPP =
|
||||||
|
clickablePP $
|
||||||
|
filterOutWsPP ["NSP"] $
|
||||||
|
def
|
||||||
|
{ ppCurrent = xmobarColor "#d5d5d5" "" . xmobarFont 5 . wrap "[" "]",
|
||||||
|
ppVisibleNoWindows = Just (xmobarColor "#71bec0" ""),
|
||||||
|
ppHidden = xmobarColor "#558c8e" "",
|
||||||
|
ppHiddenNoWindows = xmobarColor "#595959" "",
|
||||||
|
ppUrgent = xmobarColor "#F7768E" "" . wrap "!" "!",
|
||||||
|
ppTitle = xmobarColor "#d5d5d5" "" . shorten 49,
|
||||||
|
ppSep = wrapSep " ",
|
||||||
|
ppTitleSanitize = xmobarStrip,
|
||||||
|
ppWsSep = xmobarColor "" "#212121" " ",
|
||||||
|
ppLayout =
|
||||||
|
xmobarColor "#212121" ""
|
||||||
|
. ( \case
|
||||||
|
"Spacing Tall" -> "<icon=tiled.xpm/>"
|
||||||
|
"Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>"
|
||||||
|
"Spacing Full" -> "<icon=full.xpm/>"
|
||||||
|
"Spacing Simple Float" -> "<icon=floating.xpm/>"
|
||||||
|
"Simple Float" -> "<icon=floating.xpm/>"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
where
|
||||||
|
wrapSep :: String -> String
|
||||||
|
wrapSep =
|
||||||
|
wrap
|
||||||
|
(xmobarColor "#212121" "#212121:7" (xmobarFont 2 "\xe0b4"))
|
||||||
|
(xmobarColor "#212121" "#212121:7" (xmobarFont 2 "\xe0b6"))
|
||||||
|
|
||||||
|
myXmobar :: String
|
||||||
|
myXmobar = (myHomeDir ++ "/.local/bin/xmobar " ++ myHomeDir ++ "/.config/xmonad/src/xmobar.hs")
|
||||||
|
|
||||||
|
xmobar :: StatusBarConfig
|
||||||
|
xmobar = statusBarProp myXmobar myXmobarPP
|
||||||
|
|
||||||
|
myXmobar2 :: String
|
||||||
|
myXmobar2 = (myHomeDir ++ "/.local/bin/xmobar2 " ++ myHomeDir ++ "/.config/xmonad/src/xmobar.hs")
|
||||||
|
|
||||||
|
xmobar2 :: StatusBarConfig
|
||||||
|
xmobar2 = statusBarProp myXmobar2 myXmobarPP
|
||||||
|
|
||||||
|
myConfig =
|
||||||
|
def
|
||||||
|
{ modMask = myModMask,
|
||||||
|
focusFollowsMouse = myFocusFollowsMouse,
|
||||||
|
terminal = myTerminal,
|
||||||
|
mouseBindings = myMouseBindings,
|
||||||
|
borderWidth = myBorderWidth,
|
||||||
|
normalBorderColor = myNormColor,
|
||||||
|
focusedBorderColor = myFocusColor,
|
||||||
|
layoutHook = myLayoutHook,
|
||||||
|
startupHook = myStartupHook,
|
||||||
|
manageHook = myManageHook,
|
||||||
|
handleEventHook =
|
||||||
|
Hacks.windowedFullscreenFixEventHook
|
||||||
|
<> swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True)
|
||||||
|
<> Hacks.trayerPaddingXmobarEventHook
|
||||||
|
<> myEventHook,
|
||||||
|
workspaces = myWorkspaces,
|
||||||
|
keys = myKeys
|
||||||
|
}
|
||||||
|
`additionalKeysP` myAdditionalKeys
|
||||||
|
|
||||||
|
myScratchpads =
|
||||||
|
[ NS "terminal" spawnTerm findTerm manageTerm,
|
||||||
|
NS "ncmpcpp" spawnncmpcpp findncmpcpp managencmpcpp
|
||||||
|
]
|
||||||
|
where
|
||||||
|
spawnTerm = myTerminal ++ " --name scratchpad"
|
||||||
|
findTerm = resource =? "scratchpad"
|
||||||
|
manageTerm = customFloating $ W.RationalRect l t w h
|
||||||
|
where
|
||||||
|
h = 0.9
|
||||||
|
w = 0.9
|
||||||
|
t = 0.95 - h
|
||||||
|
l = 0.95 - w
|
||||||
|
spawnncmpcpp = myTerminal ++ " --name ncmpcpp -e ncmpcpp"
|
||||||
|
findncmpcpp = resource =? "ncmpcpp"
|
||||||
|
managencmpcpp = customFloating $ W.RationalRect l t w h
|
||||||
|
where
|
||||||
|
h = 0.9
|
||||||
|
w = 0.9
|
||||||
|
t = 0.95 - h
|
||||||
|
l = 0.95 - w
|
||||||
|
|
||||||
|
-- I GIVE UP ON DBUS.
|
||||||
|
|
||||||
|
-- logTitle :: D.Client -> X ()
|
||||||
|
-- logTitle ch = dynamicLogWithPP def
|
||||||
|
-- {ppCurrent = unPango
|
||||||
|
-- ,ppVisible = pangoInactive
|
||||||
|
-- ,ppHidden = const ""
|
||||||
|
-- ,ppHiddenNoWindows = const ""
|
||||||
|
-- ,ppUrgent = pangoBold
|
||||||
|
-- ,ppTitle = unPango
|
||||||
|
-- ,ppLayout = unPango
|
||||||
|
-- ,ppWsSep = " "
|
||||||
|
-- ,ppSep = "⋮"
|
||||||
|
-- ,ppOrder = swapIcons
|
||||||
|
-- ,ppSort = getSortByXineramaPhysicalRule horizontalScreenOrderer
|
||||||
|
-- ,ppOutput = dbusOutput ch
|
||||||
|
-- }
|
||||||
|
-- where swapIcons (ws:l:t:nsp:xs) = ws:l:nsp:t:xs
|
||||||
|
-- -- @@@ so why do the first 4 invocations *only* not match?!
|
||||||
|
-- swapIcons xs = xs
|
||||||
|
|
||||||
|
-- getWellKnownName :: D.Client -> IO ()
|
||||||
|
-- getWellKnownName ch = do
|
||||||
|
-- _ <- D.requestName ch
|
||||||
|
-- (D.busName_ "org.xmonad.Log")
|
||||||
|
-- [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
|
||||||
|
-- return ()
|
||||||
|
|
||||||
|
-- dbusOutput :: D.Client -> String -> IO ()
|
||||||
|
-- dbusOutput ch s = do
|
||||||
|
-- let sig = (D.signal "/org/xmonad/Log" "org.xmonad.Log" "Update")
|
||||||
|
-- {D.signalBody = [D.toVariant s]}
|
||||||
|
-- D.emit ch sig
|
||||||
|
|
||||||
|
-- -- quick and dirty escaping of HTMLish Pango markup
|
||||||
|
-- unPango :: String -> String
|
||||||
|
-- unPango [] = []
|
||||||
|
-- unPango ('<':xs) = "<" ++ unPango xs
|
||||||
|
-- unPango ('&':xs) = "&" ++ unPango xs
|
||||||
|
-- unPango ('>':xs) = ">" ++ unPango xs
|
||||||
|
-- unPango (x :xs) = x:unPango xs
|
||||||
|
|
||||||
|
-- -- show a string as inactive
|
||||||
|
-- -- @@@ should use gtk theme somehow...
|
||||||
|
-- pangoInactive :: String -> String
|
||||||
|
-- pangoInactive s = "<span foreground=\"#8f8f8f\">" ++ unPango s ++ "</span>"
|
||||||
|
|
||||||
|
-- -- show a string with highlight
|
||||||
|
-- pangoBold :: String -> String
|
||||||
|
-- pangoBold s = "<span weight=\"bold\" foreground=\"#ff2f2f\">" ++ unPango s ++ "</span>"
|
@ -1,352 +1,370 @@
|
|||||||
{-# LANGUAGE
|
{-# LANGUAGE
|
||||||
MultiWayIf -- Required for `toggleFull` in `myAdditionalKeys`
|
MultiWayIf -- Required for `toggleFull` in `myAdditionalKeys`
|
||||||
, LambdaCase -- Required for `(\case)` statement in `myXmobarPP`
|
, LambdaCase -- Required for `(\case)` statement in `myXmobarPP`
|
||||||
, FlexibleContexts
|
, FlexibleContexts
|
||||||
, OverloadedStrings
|
, OverloadedStrings
|
||||||
#-}
|
|
||||||
{-# OPTIONS_GHC
|
|
||||||
-Wno-missing-signatures
|
|
||||||
-Wno-orphans
|
|
||||||
#-}
|
#-}
|
||||||
|
{-# OPTIONS_GHC -Wno-missing-signatures
|
||||||
|
-Wno-orphans #-}
|
||||||
|
|
||||||
-- Data Imports
|
-- Data Imports
|
||||||
import qualified Data.Map as M
|
|
||||||
import Data.Functor
|
|
||||||
import Data.Monoid
|
|
||||||
|
|
||||||
-- Used in io exitSuccess
|
import Data.Functor
|
||||||
import System.Exit
|
import qualified Data.Map as M
|
||||||
import System.Environment (getEnv)
|
import Data.Monoid
|
||||||
import System.IO.Unsafe (unsafeDupablePerformIO)
|
-- Used in io exitSuccess
|
||||||
|
|
||||||
-- XMonad imports
|
import System.Environment (getEnv)
|
||||||
import XMonad
|
import System.Exit
|
||||||
import XMonad.Hooks.WindowSwallowing
|
import System.IO.Unsafe (unsafeDupablePerformIO)
|
||||||
|
-- XMonad imports
|
||||||
|
import XMonad
|
||||||
-- import XMonad.Config.Xfce
|
-- import XMonad.Config.Xfce
|
||||||
import XMonad.Actions.NoBorders (toggleBorder)
|
import XMonad.Actions.NoBorders (toggleBorder)
|
||||||
import XMonad.Util.Ungrab
|
|
||||||
import XMonad.Hooks.EwmhDesktops
|
|
||||||
import XMonad.Hooks.ManageDocks
|
|
||||||
import XMonad.Hooks.ManageHelpers
|
|
||||||
import XMonad.Hooks.SetWMName
|
|
||||||
import XMonad.Hooks.StatusBar
|
|
||||||
import XMonad.Hooks.StatusBar.PP
|
|
||||||
import XMonad.Layout.Fullscreen
|
|
||||||
-- import XMonad.Actions.PhysicalScreens
|
-- import XMonad.Actions.PhysicalScreens
|
||||||
import XMonad.Layout.SimpleFloat
|
|
||||||
import XMonad.Layout.NoBorders
|
|
||||||
import XMonad.Layout.Spacing
|
|
||||||
import qualified XMonad.StackSet as W
|
|
||||||
import XMonad.Util.ClickableWorkspaces
|
|
||||||
-- import XMonad.Util.WorkspaceCompare
|
-- import XMonad.Util.WorkspaceCompare
|
||||||
import XMonad.Util.Cursor
|
|
||||||
import XMonad.Util.EZConfig
|
import XMonad.Hooks.DynamicProperty
|
||||||
import qualified XMonad.Util.Hacks as Hacks
|
import XMonad.Hooks.EwmhDesktops
|
||||||
import XMonad.Util.SpawnOnce
|
import XMonad.Hooks.ManageDebug
|
||||||
import XMonad.Util.NamedScratchpad
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.DynamicProperty
|
import XMonad.Hooks.ManageHelpers
|
||||||
import XMonad.Layout.PerWorkspace
|
import XMonad.Hooks.SetWMName
|
||||||
import XMonad.Hooks.ManageDebug
|
import XMonad.Hooks.StatusBar
|
||||||
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
import XMonad.Hooks.WindowSwallowing
|
||||||
|
import XMonad.Layout.Fullscreen
|
||||||
|
import XMonad.Layout.NoBorders
|
||||||
|
import XMonad.Layout.PerWorkspace
|
||||||
|
import XMonad.Layout.SimpleFloat
|
||||||
|
import XMonad.Layout.Spacing
|
||||||
|
import qualified XMonad.StackSet as W
|
||||||
|
import XMonad.Util.ClickableWorkspaces
|
||||||
|
import XMonad.Util.Cursor
|
||||||
|
import XMonad.Util.EZConfig
|
||||||
|
import qualified XMonad.Util.Hacks as Hacks
|
||||||
|
import XMonad.Util.NamedScratchpad
|
||||||
|
import XMonad.Util.SpawnOnce
|
||||||
|
import XMonad.Util.Ungrab
|
||||||
|
|
||||||
-- import qualified DBus as D
|
-- import qualified DBus as D
|
||||||
-- import qualified DBus.Client as D
|
-- import qualified DBus.Client as D
|
||||||
|
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main =
|
||||||
|
do
|
||||||
-- dbus <- D.connectSession
|
-- dbus <- D.connectSession
|
||||||
-- getWellKnownName dbus
|
-- getWellKnownName dbus
|
||||||
xmonad
|
xmonad
|
||||||
$ debugManageHookOn "M-S-d"
|
$ debugManageHookOn "M-S-d"
|
||||||
. docks
|
. docks
|
||||||
. ewmhFullscreen
|
. ewmhFullscreen
|
||||||
. fullscreenSupport
|
. fullscreenSupport
|
||||||
. ewmh
|
. ewmh
|
||||||
. Hacks.javaHack
|
. Hacks.javaHack
|
||||||
-- . withEasySB xmobar toggleSB
|
-- . withEasySB xmobar toggleSB
|
||||||
-- . withSB xmobar2
|
-- . withSB xmobar2
|
||||||
$ myConfig
|
$ myConfig
|
||||||
-- where
|
|
||||||
-- toggleSB XConfig {modMask = modm} = (modm, xK_m)
|
|
||||||
|
|
||||||
-- Windows key/Super key
|
-- where
|
||||||
|
-- toggleSB XConfig {modMask = modm} = (modm, xK_m)
|
||||||
|
|
||||||
|
-- Windows key/Super key
|
||||||
myModMask :: KeyMask
|
myModMask :: KeyMask
|
||||||
myModMask = mod4Mask
|
myModMask = mod4Mask
|
||||||
|
|
||||||
-- Default Terminal
|
-- Default Terminal
|
||||||
myTerminal :: String
|
myTerminal :: String
|
||||||
myTerminal = "kitty"
|
myTerminal = "kitty"
|
||||||
|
|
||||||
-- Default Launcher
|
-- Default Launcher
|
||||||
myLauncher :: String
|
myLauncher :: String
|
||||||
myLauncher = myHomeDir ++ "/.config/rofi/launchers/type-7/launcher.sh"
|
myLauncher = myHomeDir ++ "/.config/rofi/launchers/type-7/launcher.sh"
|
||||||
|
|
||||||
-- Default Launcher
|
-- Default Launcher
|
||||||
myFileManager :: String
|
myFileManager :: String
|
||||||
myFileManager = "thunar"
|
myFileManager = "thunar"
|
||||||
|
|
||||||
-- Default Browser
|
-- Default Browser
|
||||||
myBrowser :: String
|
myBrowser :: String
|
||||||
myBrowser = "firefox"
|
myBrowser = "firefox"
|
||||||
|
|
||||||
myPowerMenu :: String
|
myPowerMenu :: String
|
||||||
myPowerMenu = myHomeDir ++ "/.config/rofi/powermenu/type-6/powermenu.sh"
|
myPowerMenu = myHomeDir ++ "/.config/rofi/powermenu/type-6/powermenu.sh"
|
||||||
|
|
||||||
-- Workspaces
|
-- Workspaces
|
||||||
myWorkspaces :: [String]
|
myWorkspaces :: [String]
|
||||||
-- myWorkspaces = map show [1 .. 9]
|
-- myWorkspaces = map show [1 .. 9]
|
||||||
myWorkspaces = ["dev", "web", "irc", "gfx", "vm", "music", "email", "x"]
|
myWorkspaces = ["dev", "web", "irc", "gfx", "vm", "music", "email", "x"]
|
||||||
|
|
||||||
-- Border Width
|
-- Border Width
|
||||||
myBorderWidth :: Dimension
|
myBorderWidth :: Dimension
|
||||||
myBorderWidth = 2
|
myBorderWidth = 2
|
||||||
|
|
||||||
-- Formal Unfocused Color
|
-- Formal Unfocused Color
|
||||||
myNormColor :: String
|
myNormColor :: String
|
||||||
myNormColor = "#5f819d"
|
myNormColor = "#5f819d"
|
||||||
|
|
||||||
-- Focused Color
|
-- Focused Color
|
||||||
myFocusColor :: String
|
myFocusColor :: String
|
||||||
myFocusColor = "#de935f"
|
myFocusColor = "#de935f"
|
||||||
|
|
||||||
-- Home Directory
|
-- Home Directory
|
||||||
myHomeDir :: String
|
myHomeDir :: String
|
||||||
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
||||||
|
|
||||||
-- focus follows the mouse pointer
|
-- focus follows the mouse pointer
|
||||||
myFocusFollowsMouse :: Bool
|
myFocusFollowsMouse :: Bool
|
||||||
myFocusFollowsMouse = True
|
myFocusFollowsMouse = True
|
||||||
|
|
||||||
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
myKeys conf@(XConfig {XMonad.modMask = modm}) =
|
||||||
|
M.fromList $
|
||||||
[ ((m .|. modm, k), windows $ f i)
|
[ ((m .|. modm, k), windows $ f i)
|
||||||
| (i, k) <- zip (XMonad.workspaces conf) [xK_1,xK_2,xK_3,xK_4,xK_5,xK_6,xK_7,xK_8,xK_9,xK_0]
|
| (i, k) <- zip (XMonad.workspaces conf) [xK_1, xK_2, xK_3, xK_4, xK_5, xK_6, xK_7, xK_8, xK_9, xK_0],
|
||||||
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
|
(f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]
|
||||||
]
|
]
|
||||||
++
|
++ [ ((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
|
||||||
[ ((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f))
|
| (key, sc) <- zip [xK_comma, xK_period, xK_z] [0 ..],
|
||||||
| (key, sc) <- zip [xK_comma, xK_period, xK_z] [0..]
|
(f, m) <- [(W.view, 0), (W.shift, shiftMask)]
|
||||||
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]
|
]
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
myAdditionalKeys :: [(String, X ())]
|
myAdditionalKeys :: [(String, X ())]
|
||||||
myAdditionalKeys =
|
myAdditionalKeys =
|
||||||
base
|
base
|
||||||
++ window
|
++ window
|
||||||
++ applications
|
++ applications
|
||||||
++ multimedia
|
++ multimedia
|
||||||
where
|
where
|
||||||
-- Force killing a frozen window.
|
-- Force killing a frozen window.
|
||||||
forceKillWindow :: Window -> X ()
|
forceKillWindow :: Window -> X ()
|
||||||
forceKillWindow w = withDisplay $ \d ->
|
forceKillWindow w = withDisplay $ \d ->
|
||||||
io $ void $ killClient d w
|
io $ void $ killClient d w
|
||||||
-- Making a window have a full float over a workspace.
|
-- Making a window have a full float over a workspace.
|
||||||
toggleFull :: Window -> X ()
|
toggleFull :: Window -> X ()
|
||||||
toggleFull w = windows $ \s -> if
|
toggleFull w = windows $ \s ->
|
||||||
| M.lookup w (W.floating s) == Just fullscreen -> W.sink w s
|
if
|
||||||
| otherwise -> W.float w fullscreen s
|
| M.lookup w (W.floating s) == Just fullscreen -> W.sink w s
|
||||||
where
|
| otherwise -> W.float w fullscreen s
|
||||||
fullscreen = W.RationalRect 0 0 1 1
|
where
|
||||||
|
fullscreen = W.RationalRect 0 0 1 1
|
||||||
-- Screenshots
|
-- Screenshots
|
||||||
screenShotSelection = myHomeDir ++ "/.local/bin/print-select" :: String
|
screenShotSelection = myHomeDir ++ "/.local/bin/print-select" :: String
|
||||||
screenShotFullscreen = myHomeDir ++ "/.local/bin/print-fullscreen" :: String
|
screenShotFullscreen = myHomeDir ++ "/.local/bin/print-fullscreen" :: String
|
||||||
screenShotTmp = myHomeDir ++ "/.local/bin/print-tmp" :: String
|
screenShotTmp = myHomeDir ++ "/.local/bin/print-tmp" :: String
|
||||||
screenShotApp = myHomeDir ++ "/.local/bin/print-select-fr" :: String
|
screenShotApp = myHomeDir ++ "/.local/bin/print-select-fr" :: String
|
||||||
-- XMonad base keybinds.
|
-- XMonad base keybinds.
|
||||||
base =
|
base =
|
||||||
[ ("M-g", withFocused toggleBorder)
|
[ ("M-g", withFocused toggleBorder),
|
||||||
, ("M-S-c", kill)
|
("M-S-c", kill),
|
||||||
, ("M-S-x", withFocused forceKillWindow)
|
("M-S-x", withFocused forceKillWindow),
|
||||||
, ("M-<Space>", sendMessage NextLayout)
|
("M-<Space>", sendMessage NextLayout),
|
||||||
, ("M-n", refresh)
|
("M-n", refresh),
|
||||||
, ("M-S-q", io exitSuccess)
|
("M-S-q", io exitSuccess),
|
||||||
, ("C-S-r", spawn "xmonad --recompile; killall xmobar; xmonad --restart")
|
("C-S-r", spawn "xmonad --recompile; killall xmobar; xmonad --restart"),
|
||||||
, ("C-S-q", spawn "pkill -KILL -u $USER")
|
("C-S-q", spawn "pkill -KILL -u $USER")
|
||||||
]
|
]
|
||||||
-- Window management keybinds.
|
-- Window management keybinds.
|
||||||
window =
|
window =
|
||||||
[ ("M-<Tab>", windows W.focusDown)
|
[ ("M-<Tab>", windows W.focusDown),
|
||||||
, ("M-j", windows W.focusDown)
|
("M-j", windows W.focusDown),
|
||||||
, ("M-k", windows W.focusUp)
|
("M-k", windows W.focusUp),
|
||||||
, ("M-S-m", windows W.focusMaster)
|
("M-S-m", windows W.focusMaster),
|
||||||
, ("M-m", sendMessage ToggleStruts)
|
("M-m", sendMessage ToggleStruts),
|
||||||
, ("M-p", windows W.swapMaster)
|
("M-p", windows W.swapMaster),
|
||||||
, ("M-S-j", windows W.swapDown)
|
("M-S-j", windows W.swapDown),
|
||||||
, ("M-S-h", windows W.swapDown)
|
("M-S-h", windows W.swapDown),
|
||||||
, ("M-S-k", windows W.swapUp)
|
("M-S-k", windows W.swapUp),
|
||||||
, ("M-S-l", windows W.swapUp)
|
("M-S-l", windows W.swapUp),
|
||||||
, ("M-h", sendMessage Shrink)
|
("M-h", sendMessage Shrink),
|
||||||
, ("M-l", sendMessage Expand)
|
("M-l", sendMessage Expand),
|
||||||
, ("M-t", withFocused $ windows . W.sink)
|
("M-t", withFocused $ windows . W.sink),
|
||||||
, ("M-f", withFocused toggleFull)
|
("M-f", withFocused toggleFull)
|
||||||
]
|
]
|
||||||
-- Spawning applications.
|
-- Spawning applications.
|
||||||
applications =
|
applications =
|
||||||
[ ("M-<Return>", spawn myTerminal)
|
[ ("M-<Return>", spawn myTerminal),
|
||||||
, ("M-S-m", namedScratchpadAction myScratchpads "ncmpcpp")
|
("M-S-m", namedScratchpadAction myScratchpads "ncmpcpp"),
|
||||||
, ("M-C-<Return>", namedScratchpadAction myScratchpads "terminal")
|
("M-C-<Return>", namedScratchpadAction myScratchpads "terminal"),
|
||||||
, ("M-S-<Escape>", spawn myPowerMenu)
|
("M-S-<Escape>", spawn myPowerMenu),
|
||||||
, ("M-b", spawn myBrowser)
|
("M-b", spawn myBrowser),
|
||||||
, ("M-v", spawn "vscodium")
|
("M-v", spawn "vscodium"),
|
||||||
, ("S-<Print>", unGrab *> spawn screenShotSelection)
|
("S-<Print>", unGrab *> spawn screenShotSelection),
|
||||||
, ("C-<Print>", unGrab *> spawn screenShotTmp)
|
("C-<Print>", unGrab *> spawn screenShotTmp),
|
||||||
, ("C-S-<Print>", unGrab *> spawn screenShotApp)
|
("C-S-<Print>", unGrab *> spawn screenShotApp),
|
||||||
, ("<Print>", spawn screenShotFullscreen)
|
("<Print>", spawn screenShotFullscreen),
|
||||||
, ("M-S-<Return>", spawn myLauncher)
|
("M-S-<Return>", spawn myLauncher),
|
||||||
, ("M-e", spawn myFileManager)
|
("M-e", spawn myFileManager)
|
||||||
]
|
]
|
||||||
-- Multimedia keybinds.
|
-- Multimedia keybinds.
|
||||||
multimedia =
|
multimedia =
|
||||||
[ ("<XF86AudioPlay>", spawn "playerctl play-pause")
|
[ ("<XF86AudioPlay>", spawn "playerctl play-pause"),
|
||||||
, ("<XF86AudioPrev>", spawn "playerctl previous")
|
("<XF86AudioPrev>", spawn "playerctl previous"),
|
||||||
, ("<XF86AudioNext>", spawn "playerctl next")
|
("<XF86AudioNext>", spawn "playerctl next"),
|
||||||
, ("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
("<XF86AudioMute>", spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle"),
|
||||||
, ("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ -1.5%")
|
("<XF86AudioLowerVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ -1.5%"),
|
||||||
, ("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1.5%")
|
("<XF86AudioRaiseVolume>", spawn "pactl set-sink-volume @DEFAULT_SINK@ +1.5%"),
|
||||||
, ("<Pause>", spawn "amixer sset Capture toggle")
|
("<Pause>", spawn "amixer sset Capture toggle"),
|
||||||
, ("M-<Escape>", spawn "mpc toggle")
|
("M-<Escape>", spawn "mpc toggle"),
|
||||||
, ("M-<F1>", spawn "mpc prev")
|
("M-<F1>", spawn "mpc prev"),
|
||||||
, ("M-<F2>", spawn "mpc next")
|
("M-<F2>", spawn "mpc next")
|
||||||
]
|
]
|
||||||
|
|
||||||
myMouseBindings :: XConfig l -> M.Map (KeyMask, Button) (Window -> X ())
|
myMouseBindings :: XConfig l -> M.Map (KeyMask, Button) (Window -> X ())
|
||||||
myMouseBindings XConfig {XMonad.modMask = modm} = M.fromList
|
myMouseBindings XConfig {XMonad.modMask = modm} =
|
||||||
-- Set the window to floating mode and move by dragging.
|
M.fromList
|
||||||
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster)
|
-- Set the window to floating mode and move by dragging.
|
||||||
-- Raise the window to the top of the stack.
|
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
|
||||||
, ((modm, button2), \w -> focus w >> windows W.shiftMaster)
|
-- Raise the window to the top of the stack.
|
||||||
-- Set the window to floating mode and resize by dragging.
|
((modm, button2), \w -> focus w >> windows W.shiftMaster),
|
||||||
, ((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
|
-- Set the window to floating mode and resize by dragging.
|
||||||
|
((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
|
||||||
]
|
]
|
||||||
|
|
||||||
myStartupHook :: X ()
|
myStartupHook :: X ()
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
traverse spawnOnce
|
traverse
|
||||||
[ "echo launched"
|
spawnOnce
|
||||||
-- , "sh ~/scripts/screenlayout.sh"
|
[ "echo launched",
|
||||||
, "nitrogen --restore &"
|
-- , "sh ~/scripts/screenlayout.sh"
|
||||||
, "touch ~/tmp/touchy && rm -rf ~/tmp/*"
|
"nitrogen --restore &",
|
||||||
, "lxqt-policykit-agent &"
|
"touch ~/tmp/touchy && rm -rf ~/tmp/*",
|
||||||
, myHomeDir ++ "/.local/bin/picom-jonaburg --glx-no-stencil --xrender-sync-fence -b &"
|
"lxqt-policykit-agent &",
|
||||||
, "xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.1"
|
myHomeDir ++ "/.local/bin/picom-jonaburg --glx-no-stencil --xrender-sync-fence -b &",
|
||||||
, "setxkbmap br abnt2"
|
"xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.1",
|
||||||
, "nm-applet"
|
"setxkbmap br abnt2",
|
||||||
, "trayer-srg -l --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0xFF181814 --height 27 --transparent false --distance 2 --margin 1 --alpha 0 --monitor 0 &"
|
"nm-applet",
|
||||||
, "nvidia-settings --load-config-only"
|
"trayer-srg -l --edge top --align right --SetDockType true --SetPartialStrut true --expand true --widthtype request --tint 0xFF181814 --height 27 --transparent false --distance 2 --margin 1 --alpha 0 --monitor 0 &",
|
||||||
, "mpd &"
|
"nvidia-settings --load-config-only",
|
||||||
, "dunst -config $HOME/.config/dunst/base16-nord.dunstrc &"
|
"mpd &",
|
||||||
, "lxqt-policykit-agent &"
|
"dunst -config $HOME/.config/dunst/base16-nord.dunstrc &",
|
||||||
, "/usr/bin/emacs --daemon &"
|
"lxqt-policykit-agent &",
|
||||||
-- , "redshift -l -23.591672:-46.561005 -t 5700:3600 &"
|
"/usr/bin/emacs --daemon &"
|
||||||
]
|
-- , "redshift -l -23.591672:-46.561005 -t 5700:3600 &"
|
||||||
setDefaultCursor xC_left_ptr
|
]
|
||||||
setWMName "jabuxas' bane"
|
setDefaultCursor xC_left_ptr
|
||||||
|
setWMName "jabuxas' bane"
|
||||||
|
|
||||||
isInstance (ClassApp c _) = className =? c
|
isInstance (ClassApp c _) = className =? c
|
||||||
isInstance (TitleApp t _) = title =? t
|
isInstance (TitleApp t _) = title =? t
|
||||||
isInstance (NameApp n _) = appName =? n
|
isInstance (NameApp n _) = appName =? n
|
||||||
|
|
||||||
|
type AppName = String
|
||||||
|
|
||||||
|
type AppTitle = String
|
||||||
|
|
||||||
type AppName = String
|
|
||||||
type AppTitle = String
|
|
||||||
type AppClassName = String
|
type AppClassName = String
|
||||||
type AppCommand = String
|
|
||||||
|
type AppCommand = String
|
||||||
|
|
||||||
data App
|
data App
|
||||||
= ClassApp AppClassName AppCommand
|
= ClassApp AppClassName AppCommand
|
||||||
| TitleApp AppTitle AppCommand
|
| TitleApp AppTitle AppCommand
|
||||||
| NameApp AppName AppCommand
|
| NameApp AppName AppCommand
|
||||||
deriving Show
|
deriving (Show)
|
||||||
|
|
||||||
gimp = ClassApp "Gimp" "gimp"
|
gimp = ClassApp "Gimp" "gimp"
|
||||||
gimp2 = ClassApp "Gimp-2.99" "gimp-2.99"
|
|
||||||
multimc = ClassApp "MultiMC" "MultiMC"
|
gimp2 = ClassApp "Gimp-2.99" "gimp-2.99"
|
||||||
about = TitleApp "About Mozilla Firefox" "About Mozilla Firefox"
|
|
||||||
message = ClassApp "Xmessage" "Xmessage"
|
multimc = ClassApp "MultiMC" "MultiMC"
|
||||||
|
|
||||||
|
about = TitleApp "About Mozilla Firefox" "About Mozilla Firefox"
|
||||||
|
|
||||||
|
message = ClassApp "Xmessage" "Xmessage"
|
||||||
|
|
||||||
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
||||||
myManageHook = manageRules
|
myManageHook = manageRules
|
||||||
where
|
where
|
||||||
-- Hides windows without ignoring it, see doHideIgnore in XMonad contrib.
|
-- Hides windows without ignoring it, see doHideIgnore in XMonad contrib.
|
||||||
doHide = ask >>= doF . W.delete :: ManageHook
|
doHide = ask >>= doF . W.delete :: ManageHook
|
||||||
-- WM_WINDOW_ROLE will be parsed with the role variable.
|
-- WM_WINDOW_ROLE will be parsed with the role variable.
|
||||||
isRole = stringProperty "WM_WINDOW_ROLE"
|
isRole = stringProperty "WM_WINDOW_ROLE"
|
||||||
-- To match multiple properties with one operator.
|
-- To match multiple properties with one operator.
|
||||||
anyOf = foldl (<||>) (pure False) :: [Query Bool] -> Query Bool
|
anyOf = foldl (<||>) (pure False) :: [Query Bool] -> Query Bool
|
||||||
-- To match multiple classNames with one operator.
|
-- To match multiple classNames with one operator.
|
||||||
match = anyOf . fmap isInstance :: [App] -> Query Bool
|
match = anyOf . fmap isInstance :: [App] -> Query Bool
|
||||||
-- Checking for splash dialogs.
|
-- Checking for splash dialogs.
|
||||||
isSplash = isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_SPLASH"
|
isSplash = isInProperty "_NET_WM_WINDOW_TYPE" "_NET_WM_WINDOW_TYPE_SPLASH"
|
||||||
-- Checking for pop-ups.
|
-- Checking for pop-ups.
|
||||||
isPopup = isRole =? "pop-up"
|
isPopup = isRole =? "pop-up"
|
||||||
-- Checking for file chooser dialog.
|
-- Checking for file chooser dialog.
|
||||||
isFileChooserDialog = isRole =? "GtkFileChooserDialog"
|
isFileChooserDialog = isRole =? "GtkFileChooserDialog"
|
||||||
-- Managing rules for applications.
|
-- Managing rules for applications.
|
||||||
manageRules = composeOne
|
manageRules =
|
||||||
[ transience
|
composeOne
|
||||||
, isDialog -?> doCenterFloat
|
[ transience,
|
||||||
, isFullscreen -?> (doF W.focusDown <> doFullFloat)
|
isDialog -?> doCenterFloat,
|
||||||
, match [ gimp
|
isFullscreen -?> (doF W.focusDown <> doFullFloat),
|
||||||
, gimp2
|
match
|
||||||
, about
|
[ gimp,
|
||||||
, message
|
gimp2,
|
||||||
] -?> doFloat
|
about,
|
||||||
, match [
|
message
|
||||||
multimc
|
|
||||||
] -?> doCenterFloat
|
|
||||||
, anyOf [ isFileChooserDialog
|
|
||||||
, isDialog
|
|
||||||
, isPopup
|
|
||||||
, isSplash
|
|
||||||
] -?> doCenterFloat
|
|
||||||
] <> composeAll
|
|
||||||
[ manageDocks <> namedScratchpadManageHook myScratchpads
|
|
||||||
, className =? "firefox" <&&> title =? "File Upload" --> doFloat
|
|
||||||
, className =? "firefox" <&&> title =? "Library" --> doCenterFloat
|
|
||||||
, className =? "firefox" <&&> title ^? "Save" --> doFloat
|
|
||||||
, className =? "firefox" <&&> resource =? "Toolkit" --> doFloat
|
|
||||||
, className =? "firefox" <&&> title ^? "Sign in" --> doFloat
|
|
||||||
, className ^? "jetbrains-" <&&> title ^? "Welcome to " --> doCenterFloat
|
|
||||||
, className ^? "jetbrains-" <&&> title =? "splash" --> doFloat
|
|
||||||
, className ^? "Visual " <&&> isDialog --> doCenterFloat
|
|
||||||
, className =? "firefox-esr" --> doShift "web"
|
|
||||||
, className =? "steam_app_1172620" --> doShift "gfx"
|
|
||||||
, className =? "discord" --> doShift "irc"
|
|
||||||
, className =? "discord-screenaudio" --> doShift "irc"
|
|
||||||
, className =? "Spotify" --> doShift "music"
|
|
||||||
, className =? "thunderbird" --> doShift "email"
|
|
||||||
, className =? "Steam" --> doShift "x"
|
|
||||||
, className =? "Lutris" --> doShift "gfx" <> doFloat
|
|
||||||
, className =? "leagueclientux.exe" --> doShift "gfx"
|
|
||||||
, className =? "league of legends.exe" --> doShift "gfx"
|
|
||||||
, className =? "leagueclient.exe" --> doShift "gfx"
|
|
||||||
, className =? "riotclientux.exe" --> doShift "gfx"
|
|
||||||
, className =? "dauntless-win64-shipping.exe" --> doShift "gfx"
|
|
||||||
, className =? "battle.net.exe" --> doShift "gfx" <> doFloat
|
|
||||||
, className =? "Pcmanfm" --> doFloat
|
|
||||||
, className =? "Thunar" --> doFloat
|
|
||||||
, className =? "Pavucontrol" --> doFloat
|
|
||||||
, className =? "Nitrogen" --> doFloat
|
|
||||||
, className =? "Wrapper-2.0" --> doFloat
|
|
||||||
, className =? "TeamSpeak 3" --> doFloat
|
|
||||||
, className =? "easyeffects" --> doFloat
|
|
||||||
, className =? "Arandr" --> doFloat
|
|
||||||
, resource =? "desktop_window" --> doIgnore
|
|
||||||
, resource =? "kdesktop" --> doIgnore
|
|
||||||
, className =? "Conky" --> doIgnore
|
|
||||||
, isRole ^? "About" <||> isRole ^? "about" --> doFloat
|
|
||||||
, "_NET_WM_WINDOW_TYPE" `isInProperty` "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE" --> doIgnore <> doRaise
|
|
||||||
-- Steam Game Fixes
|
|
||||||
, className =? "steam_app_1551360" <&&> title /=? "Forza Horizon 5" --> doHide -- Prevents black screen when fullscreening.
|
|
||||||
-- , title =? "Wine System Tray" --> doHide -- Prevents Wine System Trays from taking input focus.
|
|
||||||
-- , title ^? "Steam - News" --> doHide -- I don't like the Steam news menu
|
|
||||||
]
|
]
|
||||||
|
-?> doFloat,
|
||||||
|
match
|
||||||
|
[ multimc
|
||||||
|
]
|
||||||
|
-?> doCenterFloat,
|
||||||
|
anyOf
|
||||||
|
[ isFileChooserDialog,
|
||||||
|
isDialog,
|
||||||
|
isPopup,
|
||||||
|
isSplash
|
||||||
|
]
|
||||||
|
-?> doCenterFloat
|
||||||
|
]
|
||||||
|
<> composeAll
|
||||||
|
[ manageDocks <> namedScratchpadManageHook myScratchpads,
|
||||||
|
className =? "firefox" <&&> title =? "File Upload" --> doFloat,
|
||||||
|
className =? "firefox" <&&> title =? "Library" --> doCenterFloat,
|
||||||
|
className =? "firefox" <&&> title ^? "Save" --> doFloat,
|
||||||
|
className =? "firefox" <&&> resource =? "Toolkit" --> doFloat,
|
||||||
|
className =? "firefox" <&&> title ^? "Sign in" --> doFloat,
|
||||||
|
className ^? "jetbrains-" <&&> title ^? "Welcome to " --> doCenterFloat,
|
||||||
|
className ^? "jetbrains-" <&&> title =? "splash" --> doFloat,
|
||||||
|
className ^? "Visual " <&&> isDialog --> doCenterFloat,
|
||||||
|
className =? "firefox-esr" --> doShift "web",
|
||||||
|
className =? "steam_app_1172620" --> doShift "gfx",
|
||||||
|
className =? "discord" --> doShift "irc",
|
||||||
|
className =? "discord-screenaudio" --> doShift "irc",
|
||||||
|
className =? "Spotify" --> doShift "music",
|
||||||
|
className =? "thunderbird" --> doShift "email",
|
||||||
|
className =? "Steam" --> doShift "x",
|
||||||
|
className =? "Lutris" --> doShift "gfx" <> doFloat,
|
||||||
|
className =? "leagueclientux.exe" --> doShift "gfx",
|
||||||
|
className =? "league of legends.exe" --> doShift "gfx",
|
||||||
|
className =? "leagueclient.exe" --> doShift "gfx",
|
||||||
|
className =? "riotclientux.exe" --> doShift "gfx",
|
||||||
|
className =? "dauntless-win64-shipping.exe" --> doShift "gfx",
|
||||||
|
className =? "battle.net.exe" --> doShift "gfx" <> doFloat,
|
||||||
|
className =? "Pcmanfm" --> doFloat,
|
||||||
|
className =? "Thunar" --> doFloat,
|
||||||
|
className =? "Pavucontrol" --> doFloat,
|
||||||
|
className =? "Nitrogen" --> doFloat,
|
||||||
|
className =? "Wrapper-2.0" --> doFloat,
|
||||||
|
className =? "TeamSpeak 3" --> doFloat,
|
||||||
|
className =? "easyeffects" --> doFloat,
|
||||||
|
className =? "Arandr" --> doFloat,
|
||||||
|
resource =? "desktop_window" --> doIgnore,
|
||||||
|
resource =? "kdesktop" --> doIgnore,
|
||||||
|
className =? "Conky" --> doIgnore,
|
||||||
|
isRole ^? "About" <||> isRole ^? "about" --> doFloat,
|
||||||
|
"_NET_WM_WINDOW_TYPE" `isInProperty` "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE" --> doIgnore <> doRaise,
|
||||||
|
-- Steam Game Fixes
|
||||||
|
className =? "steam_app_1551360" <&&> title /=? "Forza Horizon 5" --> doHide -- Prevents black screen when fullscreening.
|
||||||
|
-- , title =? "Wine System Tray" --> doHide -- Prevents Wine System Trays from taking input focus.
|
||||||
|
-- , title ^? "Steam - News" --> doHide -- I don't like the Steam news menu
|
||||||
|
]
|
||||||
|
|
||||||
myDynHook :: ManageHook
|
myDynHook :: ManageHook
|
||||||
myDynHook =
|
myDynHook =
|
||||||
composeAll
|
composeAll
|
||||||
[ title=? "Riot Client Main" --> doFloat
|
[ title =? "Riot Client Main" --> doFloat
|
||||||
]
|
]
|
||||||
|
|
||||||
{- May be useful one day
|
{- May be useful one day
|
||||||
doClose = ask >>= liftX . killWindow >> mempty :: ManageHook
|
doClose = ask >>= liftX . killWindow >> mempty :: ManageHook
|
||||||
doForceKill = ask >>= liftX . forceKillWindow >> mempty :: ManageHook
|
doForceKill = ask >>= liftX . forceKillWindow >> mempty :: ManageHook
|
||||||
-}
|
-}
|
||||||
@ -355,45 +373,49 @@ myEventHook :: Event -> X All
|
|||||||
myEventHook _ = return (All True)
|
myEventHook _ = return (All True)
|
||||||
|
|
||||||
myLayoutHook =
|
myLayoutHook =
|
||||||
avoidStruts
|
avoidStruts
|
||||||
-- $ onWorkspace "gfx" simpleFloat
|
-- \$ onWorkspace "gfx" simpleFloat
|
||||||
$ lessBorders OnlyScreenFloat
|
$
|
||||||
$ spacingRaw False(Border w w w w) True(Border w w w w) True
|
lessBorders OnlyScreenFloat $
|
||||||
$ tiled ||| simpleFloat ||| Mirror tiled ||| Full
|
spacingRaw False (Border w w w w) True (Border w w w w) True $
|
||||||
where
|
tiled ||| simpleFloat ||| Mirror tiled ||| Full
|
||||||
tiled = Tall nmaster delta ratio
|
where
|
||||||
nmaster = 1 -- Default number of windows in the master pane.
|
tiled = Tall nmaster delta ratio
|
||||||
ratio = 1 / 2 -- Default proportion of screen occupied by master panes.
|
nmaster = 1 -- Default number of windows in the master pane.
|
||||||
delta = 3 / 100 -- Percent of screen increment by when resizing panes.
|
ratio = 1 / 2 -- Default proportion of screen occupied by master panes.
|
||||||
w = 5 -- Width of pixel size between windows while tiled.
|
delta = 3 / 100 -- Percent of screen increment by when resizing panes.
|
||||||
|
w = 5 -- Width of pixel size between windows while tiled.
|
||||||
|
|
||||||
myXmobarPP :: X PP
|
myXmobarPP :: X PP
|
||||||
myXmobarPP =
|
myXmobarPP =
|
||||||
clickablePP $ filterOutWsPP ["NSP"] $ def
|
clickablePP $
|
||||||
{ ppCurrent = xmobarColor "#98c379" "" . xmobarFont 5 . wrap "[" "]"
|
filterOutWsPP ["NSP"] $
|
||||||
, ppVisibleNoWindows = Just (xmobarColor "#cc6666" "")
|
def
|
||||||
, ppHidden = xmobarColor "#d2ba8b" ""
|
{ ppCurrent = xmobarColor "#98c379" "" . xmobarFont 5 . wrap "[" "]",
|
||||||
, ppHiddenNoWindows = xmobarColor "#a3846e" ""
|
ppVisibleNoWindows = Just (xmobarColor "#cc6666" ""),
|
||||||
, ppUrgent = xmobarColor "#F7768E" "" . wrap "!" "!"
|
ppHidden = xmobarColor "#d2ba8b" "",
|
||||||
, ppTitle = xmobarColor "#98C379" "" . shorten 49
|
ppHiddenNoWindows = xmobarColor "#a3846e" "",
|
||||||
, ppSep = wrapSep " "
|
ppUrgent = xmobarColor "#F7768E" "" . wrap "!" "!",
|
||||||
, ppTitleSanitize = xmobarStrip
|
ppTitle = xmobarColor "#98C379" "" . shorten 49,
|
||||||
, ppWsSep = xmobarColor "" "#212121" " "
|
ppSep = wrapSep " ",
|
||||||
, ppLayout = xmobarColor "#212121" ""
|
ppTitleSanitize = xmobarStrip,
|
||||||
. (\case
|
ppWsSep = xmobarColor "" "#212121" " ",
|
||||||
"Spacing Tall" -> "<icon=tiled.xpm/>"
|
ppLayout =
|
||||||
"Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>"
|
xmobarColor "#212121" ""
|
||||||
"Spacing Full" -> "<icon=full.xpm/>"
|
. ( \case
|
||||||
"Spacing Simple Float"-> "<icon=floating.xpm/>"
|
"Spacing Tall" -> "<icon=tiled.xpm/>"
|
||||||
"Simple Float" -> "<icon=floating.xpm/>"
|
"Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>"
|
||||||
)
|
"Spacing Full" -> "<icon=full.xpm/>"
|
||||||
|
"Spacing Simple Float" -> "<icon=floating.xpm/>"
|
||||||
|
"Simple Float" -> "<icon=floating.xpm/>"
|
||||||
|
)
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
wrapSep :: String -> String
|
wrapSep :: String -> String
|
||||||
wrapSep =
|
wrapSep =
|
||||||
wrap
|
wrap
|
||||||
(xmobarColor "#212121" "#212121:7" (xmobarFont 2 "\xe0b4"))
|
(xmobarColor "#212121" "#212121:7" (xmobarFont 2 "\xe0b4"))
|
||||||
(xmobarColor "#212121" "#212121:7" (xmobarFont 2 "\xe0b6"))
|
(xmobarColor "#212121" "#212121:7" (xmobarFont 2 "\xe0b6"))
|
||||||
|
|
||||||
xmobar :: StatusBarConfig
|
xmobar :: StatusBarConfig
|
||||||
xmobar = statusBarProp myXmobar myXmobarPP
|
xmobar = statusBarProp myXmobar myXmobarPP
|
||||||
@ -407,51 +429,52 @@ xmobar2 = statusBarProp myXmobar2 myXmobarPP
|
|||||||
myXmobar2 :: String
|
myXmobar2 :: String
|
||||||
myXmobar2 = ("xmobar-2nd ")
|
myXmobar2 = ("xmobar-2nd ")
|
||||||
|
|
||||||
myConfig =
|
myConfig =
|
||||||
def
|
def
|
||||||
{ modMask = myModMask
|
{ modMask = myModMask,
|
||||||
, focusFollowsMouse = myFocusFollowsMouse
|
focusFollowsMouse = myFocusFollowsMouse,
|
||||||
, terminal = myTerminal
|
terminal = myTerminal,
|
||||||
, mouseBindings = myMouseBindings
|
mouseBindings = myMouseBindings,
|
||||||
, borderWidth = myBorderWidth
|
borderWidth = myBorderWidth,
|
||||||
, normalBorderColor = myNormColor
|
normalBorderColor = myNormColor,
|
||||||
-- , logHook = logTitle dbus
|
-- , logHook = logTitle dbus
|
||||||
, focusedBorderColor = myFocusColor
|
focusedBorderColor = myFocusColor,
|
||||||
, layoutHook = myLayoutHook
|
layoutHook = myLayoutHook,
|
||||||
-- <> onWorkspace "gfx" h8league
|
-- <> onWorkspace "gfx" h8league
|
||||||
, startupHook = myStartupHook
|
startupHook = myStartupHook,
|
||||||
, manageHook = myManageHook
|
manageHook = myManageHook,
|
||||||
, handleEventHook = Hacks.windowedFullscreenFixEventHook
|
handleEventHook =
|
||||||
<> swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True)
|
Hacks.windowedFullscreenFixEventHook
|
||||||
<> Hacks.trayerPaddingXmobarEventHook
|
<> swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True)
|
||||||
<> dynamicPropertyChange "WM_CLASS" myDynHook
|
<> Hacks.trayerPaddingXmobarEventHook
|
||||||
<> myEventHook
|
<> dynamicPropertyChange "WM_CLASS" myDynHook
|
||||||
, workspaces = myWorkspaces
|
<> myEventHook,
|
||||||
, keys = myKeys
|
workspaces = myWorkspaces,
|
||||||
}
|
keys = myKeys
|
||||||
`additionalKeysP` myAdditionalKeys
|
}
|
||||||
|
`additionalKeysP` myAdditionalKeys
|
||||||
|
|
||||||
|
myScratchpads =
|
||||||
myScratchpads = [ NS "terminal" spawnTerm findTerm manageTerm
|
[ NS "terminal" spawnTerm findTerm manageTerm,
|
||||||
, NS "ncmpcpp" spawnncmpcpp findncmpcpp managencmpcpp
|
NS "ncmpcpp" spawnncmpcpp findncmpcpp managencmpcpp
|
||||||
]
|
]
|
||||||
|
where
|
||||||
|
spawnTerm = myTerminal ++ " --name scratchpad"
|
||||||
|
findTerm = resource =? "scratchpad"
|
||||||
|
manageTerm = customFloating $ W.RationalRect l t w h
|
||||||
where
|
where
|
||||||
spawnTerm = myTerminal ++ " --name scratchpad"
|
h = 0.9
|
||||||
findTerm = resource =? "scratchpad"
|
w = 0.9
|
||||||
manageTerm = customFloating $ W.RationalRect l t w h
|
t = 0.95 - h
|
||||||
where
|
l = 0.95 - w
|
||||||
h = 0.9
|
spawnncmpcpp = myTerminal ++ " --name ncmpcpp -e ncmpcpp"
|
||||||
w = 0.9
|
findncmpcpp = resource =? "ncmpcpp"
|
||||||
t = 0.95 -h
|
managencmpcpp = customFloating $ W.RationalRect l t w h
|
||||||
l = 0.95 -w
|
where
|
||||||
spawnncmpcpp = myTerminal ++ " --name ncmpcpp -e ncmpcpp"
|
h = 0.9
|
||||||
findncmpcpp = resource =? "ncmpcpp"
|
w = 0.9
|
||||||
managencmpcpp = customFloating $ W.RationalRect l t w h
|
t = 0.95 - h
|
||||||
where
|
l = 0.95 - w
|
||||||
h = 0.9
|
|
||||||
w = 0.9
|
|
||||||
t = 0.95 -h
|
|
||||||
l = 0.95 -w
|
|
||||||
|
|
||||||
-- I GIVE UP ON DBUS.
|
-- I GIVE UP ON DBUS.
|
||||||
|
|
||||||
@ -503,4 +526,3 @@ myScratchpads = [ NS "terminal" spawnTerm findTerm manageTerm
|
|||||||
-- -- show a string with highlight
|
-- -- show a string with highlight
|
||||||
-- pangoBold :: String -> String
|
-- pangoBold :: String -> String
|
||||||
-- pangoBold s = "<span weight=\"bold\" foreground=\"#ff2f2f\">" ++ unPango s ++ "</span>"
|
-- pangoBold s = "<span weight=\"bold\" foreground=\"#ff2f2f\">" ++ unPango s ++ "</span>"
|
||||||
|
|
||||||
|
@ -1,100 +1,96 @@
|
|||||||
import System.Environment
|
import System.Environment
|
||||||
import System.IO.Unsafe (unsafeDupablePerformIO)
|
import System.IO.Unsafe (unsafeDupablePerformIO)
|
||||||
|
|
||||||
import Xmobar
|
import Xmobar
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = xmobar =<< configFromArgs =<< myConfig
|
main = xmobar =<< configFromArgs =<< myConfig
|
||||||
|
|
||||||
-- main = xmobar =<< myConfig
|
-- main = xmobar =<< myConfig
|
||||||
|
|
||||||
myHomeDir :: String
|
myHomeDir :: String
|
||||||
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
||||||
|
|
||||||
myConfig :: IO Config
|
myConfig :: IO Config
|
||||||
myConfig =
|
myConfig =
|
||||||
do
|
do
|
||||||
pure baseConfig
|
pure
|
||||||
{ template = concat $
|
baseConfig
|
||||||
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
{ template =
|
||||||
\<fn=4><fc=#a54242,#212121:5>\xf30d </fc></fn>\
|
concat $
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
]
|
\<fn=4><fc=#558c8e,#212121:5>\xf30d </fc></fn>\
|
||||||
<>
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
[ "<fn=5>@UnsafeXMonadLog@</fn>}{" ]
|
]
|
||||||
<>
|
<> ["<fn=5>@UnsafeXMonadLog@</fn>}{"]
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
\<fn=4><fc=#E06C75,#212121:5>@music@</fc></fn>\
|
\<fn=4><fc=#E06C75,#212121:5>@music@</fc></fn>\
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
]
|
]
|
||||||
<>
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
\<fn=4><fc=#56B6C2,#212121:5>CPU: @cpu@%</fc></fn>\
|
||||||
\<fn=4><fc=#56B6C2,#212121:5>CPU: @cpu@%</fc></fn>\
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
]
|
||||||
]
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
<>
|
\<fn=4><fc=#C678DD,#212121:5>Mem: @memory@% </fc></fn>\
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
\<fn=4><fc=#C678DD,#212121:5>Mem: @memory@% </fc></fn>\
|
]
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
]
|
\<fn=4><fc=#98C379,#212121:5>@vol@</fc></fn>\
|
||||||
<>
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
]
|
||||||
\<fn=4><fc=#98C379,#212121:5>@vol@</fc></fn>\
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
\<fn=4><fc=#61AFEF,#212121:5>@date@</fc></fn>\
|
||||||
]
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
<>
|
]
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
<> ["@trayer@"],
|
||||||
\<fn=4><fc=#61AFEF,#212121:5>@date@</fc></fn>\
|
commands = myCommands
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
}
|
||||||
]
|
|
||||||
<>
|
|
||||||
[ "@trayer@"]
|
|
||||||
, commands = myCommands
|
|
||||||
}
|
|
||||||
|
|
||||||
myCommands :: [Runnable]
|
myCommands :: [Runnable]
|
||||||
myCommands =
|
myCommands =
|
||||||
[ Run UnsafeXMonadLog
|
[ Run UnsafeXMonadLog,
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh" ) ["vol"] "vol" 20
|
Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh") ["vol"] "vol" 100,
|
||||||
, Run $ Date "\xf017 %-l:%M %p" "date" 600
|
Run $ Date "\xf017 %-l:%M %p" "date" 600,
|
||||||
, Run $ Cpu [ "-t", "<fc=#8c7f80><total></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#56B6C2", "-n", "#4797a1", "-l", "#3a7b83" ] 50
|
Run $ Cpu ["-t", "<fc=#8c7f80><total></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#56B6C2", "-n", "#4797a1", "-l", "#3a7b83"] 100,
|
||||||
, Run $ Memory [ "-t", "<fc=#8c7f80><usedratio></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#c678dd", "-n", "#9f60b1", "-l", "#855094" ] 50
|
Run $ Memory ["-t", "<fc=#8c7f80><usedratio></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#c678dd", "-n", "#9f60b1", "-l", "#855094"] 100,
|
||||||
-- , Run $ Com (myHomeDir <> "/.config/xmonad/scripts/gputemp.sh") ["gpu"] "gpu" 5
|
-- , Run $ Com (myHomeDir <> "/.config/xmonad/scripts/gputemp.sh") ["gpu"] "gpu" 5
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/trayer-padding.sh") ["trayer"] "trayer" 100
|
Run $ Com (myHomeDir <> "/.config/xmonad/scripts/trayer-padding.sh") ["trayer"] "trayer" 1000,
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["music"] "music" 20
|
Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["music"] "music" 100
|
||||||
-- , Run $ Com (myHomeDir <> "/.config/xmonad/src/trayer-padding.sh") ["trayer"] "trayer" 50
|
-- , Run $ Com (myHomeDir <> "/.config/xmonad/src/trayer-padding.sh") ["trayer"] "trayer" 50
|
||||||
-- , Run $ MPD ["-h", "127.0.0.1", "-p", "6600", "-t", "<composer> <title> <track>/<plength> <statei>", "--", "-P", ">>", "-Z", "|", "-S", "><"] 10
|
-- , Run $ MPD ["-h", "127.0.0.1", "-p", "6600", "-t", "<composer> <title> <track>/<plength> <statei>", "--", "-P", ">>", "-Z", "|", "-S", "><"] 10
|
||||||
]
|
]
|
||||||
|
|
||||||
baseConfig :: Config
|
baseConfig :: Config
|
||||||
baseConfig =
|
baseConfig =
|
||||||
defaultConfig
|
defaultConfig
|
||||||
{ font = "xft:UbuntuMono Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
{ font = "xft:UbuntuMono Nerd Font:pixelsize=12:antialias=true:hinting=true",
|
||||||
, additionalFonts = [ "xft:UbuntuMono Nerd Font:pixelsize=10:antialias=true:hinting=true"
|
additionalFonts =
|
||||||
, "xft:UbuntuMono Nerd Font:size=13:antialias=true:hinting=true"
|
[ "xft:UbuntuMono Nerd Font:pixelsize=10:antialias=true:hinting=true",
|
||||||
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
"xft:UbuntuMono Nerd Font:size=13:antialias=true:hinting=true",
|
||||||
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
"xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true",
|
||||||
, "xft:UbuntuMono Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
"xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true",
|
||||||
]
|
"xft:UbuntuMono Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
||||||
, textOffsets = [20, 22, 21, 21, 20]
|
],
|
||||||
, bgColor = "#212121"
|
textOffsets = [20, 22, 21, 21, 20],
|
||||||
, fgColor = "#c8b6b8"
|
bgColor = "#212121",
|
||||||
, borderColor = "#272727"
|
fgColor = "#c8b6b8",
|
||||||
, border = FullB
|
borderColor = "#272727",
|
||||||
, borderWidth = 0
|
border = FullB,
|
||||||
{-
|
borderWidth = 0,
|
||||||
, position = Static { xpos = 13, ypos = 1034, width = 1893, height = 32 } Bottom Padded
|
{-
|
||||||
, position = Static { xpos = 0, ypos = 1048, width = 1920, height = 32 } Bottom Flat
|
, position = Static { xpos = 13, ypos = 1034, width = 1893, height = 32 } Bottom Padded
|
||||||
, position = Static { xpos = 0, ypos = 0, width = 1920, height = 32 } Top Flat
|
, position = Static { xpos = 0, ypos = 1048, width = 1920, height = 32 } Bottom Flat
|
||||||
-}
|
, position = Static { xpos = 0, ypos = 0, width = 1920, height = 32 } Top Flat
|
||||||
, position = Static { xpos = 0, ypos = 0, width = 1920, height = 30 }
|
-}
|
||||||
, alpha = 255
|
position = Static {xpos = 0, ypos = 0, width = 1920, height = 30},
|
||||||
, overrideRedirect = True
|
alpha = 255,
|
||||||
, lowerOnStart = True
|
overrideRedirect = True,
|
||||||
, hideOnStart = False
|
lowerOnStart = True,
|
||||||
, allDesktops = True
|
hideOnStart = False,
|
||||||
, persistent = True
|
allDesktops = True,
|
||||||
, iconRoot = myHomeDir ++ "/.config/xmonad/icons"
|
persistent = True,
|
||||||
, iconOffset = -1
|
iconRoot = myHomeDir ++ "/.config/xmonad/icons",
|
||||||
, sepChar = "@"
|
iconOffset = -1,
|
||||||
, alignSep = "}{"
|
sepChar = "@",
|
||||||
}
|
alignSep = "}{"
|
||||||
|
}
|
||||||
|
@ -1,98 +1,95 @@
|
|||||||
import System.Environment
|
import System.Environment
|
||||||
import System.IO.Unsafe (unsafeDupablePerformIO)
|
import System.IO.Unsafe (unsafeDupablePerformIO)
|
||||||
|
|
||||||
import Xmobar
|
import Xmobar
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = xmobar =<< configFromArgs =<< myConfig
|
main = xmobar =<< configFromArgs =<< myConfig
|
||||||
|
|
||||||
-- main = xmobar =<< myConfig
|
-- main = xmobar =<< myConfig
|
||||||
|
|
||||||
myHomeDir :: String
|
myHomeDir :: String
|
||||||
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
||||||
|
|
||||||
myConfig :: IO Config
|
myConfig :: IO Config
|
||||||
myConfig =
|
myConfig =
|
||||||
do
|
do
|
||||||
pure baseConfig
|
pure
|
||||||
{ template = concat $
|
baseConfig
|
||||||
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
{ template =
|
||||||
\<fn=4><fc=#a54242,#212121:5>\xf30d </fc></fn>\
|
concat $
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
]
|
\<fn=4><fc=#558c8e,#212121:5>\xf30d </fc></fn>\
|
||||||
<>
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
[ "<fn=5>@UnsafeXMonadLog@</fn>}{" ]
|
]
|
||||||
<>
|
<> ["<fn=5>@UnsafeXMonadLog@</fn>}{"]
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
\<fn=4><fc=#E06C75,#212121:5>@music@</fc></fn>\
|
\<fn=4><fc=#E06C75,#212121:5>@music@</fc></fn>\
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
]
|
]
|
||||||
<>
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
\<fn=4><fc=#56B6C2,#212121:5>CPU: @cpu@%</fc></fn>\
|
||||||
\<fn=4><fc=#56B6C2,#212121:5>CPU: @cpu@%</fc></fn>\
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
]
|
||||||
]
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
<>
|
\<fn=4><fc=#C678DD,#212121:5>Mem: @memory@% </fc></fn>\
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
\<fn=4><fc=#C678DD,#212121:5>Mem: @memory@% </fc></fn>\
|
]
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
]
|
\<fn=4><fc=#98C379,#212121:5>@vol@</fc></fn>\
|
||||||
<>
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
]
|
||||||
\<fn=4><fc=#98C379,#212121:5>@vol@</fc></fn>\
|
<> [ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
\<fn=4><fc=#61AFEF,#212121:5>@date@</fc></fn>\
|
||||||
]
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
<>
|
],
|
||||||
[ "<fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
commands = myCommands
|
||||||
\<fn=4><fc=#61AFEF,#212121:5>@date@</fc></fn>\
|
}
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
|
||||||
]
|
|
||||||
, commands = myCommands
|
|
||||||
}
|
|
||||||
|
|
||||||
myCommands :: [Runnable]
|
myCommands :: [Runnable]
|
||||||
myCommands =
|
myCommands =
|
||||||
[ Run UnsafeXMonadLog
|
[ Run UnsafeXMonadLog,
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh" ) ["vol"] "vol" 20
|
Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh") ["vol"] "vol" 100,
|
||||||
, Run $ Date "\xf017 %-l:%M %p" "date" 600
|
Run $ Date "\xf017 %-l:%M %p" "date" 600,
|
||||||
, Run $ Cpu [ "-t", "<fc=#8c7f80><total></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#56B6C2", "-n", "#4797a1", "-l", "#3a7b83" ] 50
|
Run $ Cpu ["-t", "<fc=#8c7f80><total></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#56B6C2", "-n", "#4797a1", "-l", "#3a7b83"] 100,
|
||||||
, Run $ Memory [ "-t", "<fc=#8c7f80><usedratio></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#c678dd", "-n", "#9f60b1", "-l", "#855094" ] 50
|
Run $ Memory ["-t", "<fc=#8c7f80><usedratio></fc>", "-f", ":", "-H", "75", "-L", "25", "-h", "#c678dd", "-n", "#9f60b1", "-l", "#855094"] 100,
|
||||||
-- , Run $ Com (myHomeDir <> "/.config/xmonad/scripts/gputemp.sh") ["gpu"] "gpu" 5
|
-- , Run $ Com (myHomeDir <> "/.config/xmonad/scripts/gputemp.sh") ["gpu"] "gpu" 5
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/trayer-padding.sh") ["trayer"] "trayer" 100
|
Run $ Com (myHomeDir <> "/.config/xmonad/scripts/trayer-padding.sh") ["trayer"] "trayer" 1000,
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["music"] "music" 20
|
Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["music"] "music" 100
|
||||||
-- , Run $ Com (myHomeDir <> "/.config/xmonad/src/trayer-padding.sh") ["trayer"] "trayer" 50
|
-- , Run $ Com (myHomeDir <> "/.config/xmonad/src/trayer-padding.sh") ["trayer"] "trayer" 50
|
||||||
-- , Run $ MPD ["-h", "127.0.0.1", "-p", "6600", "-t", "<composer> <title> <track>/<plength> <statei>", "--", "-P", ">>", "-Z", "|", "-S", "><"] 10
|
-- , Run $ MPD ["-h", "127.0.0.1", "-p", "6600", "-t", "<composer> <title> <track>/<plength> <statei>", "--", "-P", ">>", "-Z", "|", "-S", "><"] 10
|
||||||
]
|
]
|
||||||
|
|
||||||
baseConfig :: Config
|
baseConfig :: Config
|
||||||
baseConfig =
|
baseConfig =
|
||||||
defaultConfig
|
defaultConfig
|
||||||
{ font = "xft:UbuntuMono Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
{ font = "xft:UbuntuMono Nerd Font:pixelsize=12:antialias=true:hinting=true",
|
||||||
, additionalFonts = [ "xft:UbuntuMono Nerd Font:pixelsize=10:antialias=true:hinting=true"
|
additionalFonts =
|
||||||
, "xft:UbuntuMono Nerd Font:size=13:antialias=true:hinting=true"
|
[ "xft:UbuntuMono Nerd Font:pixelsize=10:antialias=true:hinting=true",
|
||||||
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
"xft:UbuntuMono Nerd Font:size=13:antialias=true:hinting=true",
|
||||||
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
"xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true",
|
||||||
, "xft:UbuntuMono Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
"xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true",
|
||||||
]
|
"xft:UbuntuMono Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
||||||
, textOffsets = [20, 22, 21, 21, 20]
|
],
|
||||||
, bgColor = "#212121"
|
textOffsets = [20, 22, 21, 21, 20],
|
||||||
, fgColor = "#c8b6b8"
|
bgColor = "#212121",
|
||||||
, borderColor = "#272727"
|
fgColor = "#c8b6b8",
|
||||||
, border = FullB
|
borderColor = "#272727",
|
||||||
, borderWidth = 0
|
border = FullB,
|
||||||
{-
|
borderWidth = 0,
|
||||||
, position = Static { xpos = 13, ypos = 1034, width = 1893, height = 32 } Bottom Padded
|
{-
|
||||||
, position = Static { xpos = 0, ypos = 1048, width = 1920, height = 32 } Bottom Flat
|
, position = Static { xpos = 13, ypos = 1034, width = 1893, height = 32 } Bottom Padded
|
||||||
, position = Static { xpos = 0, ypos = 0, width = 1920, height = 32 } Top Flat
|
, position = Static { xpos = 0, ypos = 1048, width = 1920, height = 32 } Bottom Flat
|
||||||
-}
|
, position = Static { xpos = 0, ypos = 0, width = 1920, height = 32 } Top Flat
|
||||||
, position = Static { xpos = 1920, ypos = 148, width = 1920, height = 30 }
|
-}
|
||||||
, alpha = 255
|
position = Static {xpos = 1920, ypos = 148, width = 1920, height = 30},
|
||||||
, overrideRedirect = True
|
alpha = 255,
|
||||||
, lowerOnStart = True
|
overrideRedirect = True,
|
||||||
, hideOnStart = False
|
lowerOnStart = True,
|
||||||
, allDesktops = True
|
hideOnStart = False,
|
||||||
, persistent = True
|
allDesktops = True,
|
||||||
, iconRoot = myHomeDir ++ "/.config/xmonad/icons"
|
persistent = True,
|
||||||
, iconOffset = -1
|
iconRoot = myHomeDir ++ "/.config/xmonad/icons",
|
||||||
, sepChar = "@"
|
iconOffset = -1,
|
||||||
, alignSep = "}{"
|
sepChar = "@",
|
||||||
}
|
alignSep = "}{"
|
||||||
|
}
|
||||||
|
@ -40,7 +40,7 @@ executable xmobar2
|
|||||||
default-language: Haskell2010
|
default-language: Haskell2010
|
||||||
|
|
||||||
executable xmonad
|
executable xmonad
|
||||||
main-is: xmonad.hs
|
main-is: main.hs
|
||||||
other-modules:
|
other-modules:
|
||||||
Paths_zmonad
|
Paths_zmonad
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
|
Loading…
Reference in New Issue
Block a user