upgrade to zmonad lmao
This commit is contained in:
parent
526ecddefa
commit
f9fa2b97cd
@ -1,7 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Recompile
|
# Recompile
|
||||||
cd "$XMONAD_CONFIG_DIR" && stack install || exit
|
cd "$XMONAD_CONFIG_DIR" && stack-bin install || exit
|
||||||
|
|
||||||
# Create a hard link at the requested destination, replacing any existing one.
|
# Create a hard link at the requested destination, replacing any existing one.
|
||||||
ln -f -T "$(stack exec -- which xmonad)" "$1"
|
ln -f -T "$(stack-bin exec -- which xmonad)" "$1"
|
||||||
|
6
configs/xmonad/install.sh
Executable file
6
configs/xmonad/install.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
cd ~/.config/xmonad
|
||||||
|
./update
|
||||||
|
stack-bin setup
|
||||||
|
stack-bin install
|
||||||
|
./build
|
@ -1,16 +1,17 @@
|
|||||||
name: xmonad-scherso
|
# heavily copied from github.com/scherso, all rights to him
|
||||||
version: 0.1.0
|
|
||||||
synopsis: My XMonad configuration.
|
|
||||||
license: DBAD
|
|
||||||
author: Scherso
|
|
||||||
homepage: https://github.com/Scherso/Dotfiles
|
|
||||||
|
|
||||||
|
name: zmonad
|
||||||
|
version: 0.1.0
|
||||||
|
synopsis: xmonad but z
|
||||||
|
homepage: https://github.com/jabuxas/config-notes
|
||||||
|
author: jabuxas
|
||||||
|
maintainer: jabuxas
|
||||||
|
license: BSD4
|
||||||
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic
|
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic
|
||||||
|
|
||||||
dependencies:
|
dependencies:
|
||||||
- base
|
- base
|
||||||
- xmonad-contrib >= 0.16
|
- xmonad-contrib >= 0.16
|
||||||
- dbus
|
|
||||||
|
|
||||||
source-dirs: src
|
source-dirs: src
|
||||||
|
|
||||||
@ -26,3 +27,8 @@ executables:
|
|||||||
dependencies:
|
dependencies:
|
||||||
- xmobar
|
- xmobar
|
||||||
ghc-options: -rtsopts -threaded -with-rtsopts=-N
|
ghc-options: -rtsopts -threaded -with-rtsopts=-N
|
||||||
|
xmobar2:
|
||||||
|
main: xmobar2.hs
|
||||||
|
dependencies:
|
||||||
|
- xmobar
|
||||||
|
ghc-options: -rtsopts -threaded -with-rtsopts=-N
|
||||||
|
@ -1,273 +0,0 @@
|
|||||||
-- ## Modules ## -------------------------------------------------------------------
|
|
||||||
{-# LANGUAGE MultiWayIf #-}
|
|
||||||
import XMonad
|
|
||||||
import XMonad.Util.SpawnOnce
|
|
||||||
import XMonad.Hooks.EwmhDesktops
|
|
||||||
import XMonad.Hooks.ManageDocks
|
|
||||||
import XMonad.Hooks.ManageHelpers
|
|
||||||
import XMonad.ManageHook
|
|
||||||
import XMonad.Util.Ungrab
|
|
||||||
import XMonad.Util.Hacks as Hacks
|
|
||||||
import XMonad.Hooks.WindowSwallowing
|
|
||||||
import XMonad.Layout.Fullscreen
|
|
||||||
import XMonad.Layout.NoBorders
|
|
||||||
import XMonad.Layout.Spacing
|
|
||||||
import XMonad.Layout.Gaps
|
|
||||||
import XMonad.Hooks.StatusBar
|
|
||||||
import XMonad.Hooks.StatusBar.PP
|
|
||||||
import System.Exit
|
|
||||||
import Control.Monad
|
|
||||||
import Data.Monoid
|
|
||||||
import Data.Maybe
|
|
||||||
import XMonad.Util.Cursor
|
|
||||||
import Graphics.X11.ExtraTypes.XF86
|
|
||||||
import XMonad.Util.ClickableWorkspaces
|
|
||||||
|
|
||||||
import qualified XMonad.StackSet as W
|
|
||||||
import qualified Data.Map as M
|
|
||||||
|
|
||||||
-- focus follows the mouse pointer
|
|
||||||
myFocusFollowsMouse :: Bool
|
|
||||||
myFocusFollowsMouse = True
|
|
||||||
|
|
||||||
-- clicking on a window to focus
|
|
||||||
myClickJustFocuses :: Bool
|
|
||||||
myClickJustFocuses = True
|
|
||||||
|
|
||||||
-- Width of the window border in pixels
|
|
||||||
myBorderWidth = 2
|
|
||||||
|
|
||||||
-- Border colors for focused & unfocused windows
|
|
||||||
myFocusedBorderColor = "#de935f"
|
|
||||||
myNormalBorderColor = "#5f819d"
|
|
||||||
|
|
||||||
-- modMask : modkey you want to use
|
|
||||||
-- mod1Mask : left alt Key
|
|
||||||
-- mod4Mask : Windows or Super Key
|
|
||||||
myModMask = mod4Mask
|
|
||||||
myTerminal = "kitty"
|
|
||||||
-- Workspaces (ewmh)
|
|
||||||
myWorkspaces = ["dev", "web", "irc", "gfx", "vm", "music", "email", "x"]
|
|
||||||
|
|
||||||
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
|
|
||||||
-- Close focused window
|
|
||||||
[ ((modm .|. shiftMask, xK_c), kill)
|
|
||||||
, ((modm, xK_Escape), spawn "mpc toggle")
|
|
||||||
, ((modm .|. shiftMask, xK_m), spawn "kitty -e ncmpcpp")
|
|
||||||
, ((modm, xK_e), spawn "pcmanfm")
|
|
||||||
, ((modm, xK_v), spawn "vscodium")
|
|
||||||
, ((modm, xK_Return), spawn myTerminal)
|
|
||||||
, ((modm .|. shiftMask, xK_Escape), spawn "/home/klein/.config/rofi/powermenu/type-6/powermenu.sh")
|
|
||||||
, ((modm .|. shiftMask, xK_Return), spawn "/home/klein/.config/rofi/launchers/type-7/launcher.sh")
|
|
||||||
, ((0 .|. shiftMask, xK_Print), unGrab >> spawn "/home/klein/.local/bin/print-select")
|
|
||||||
, ((0, xK_Print), spawn "/home/klein/.local/bin/print-fullscreen")
|
|
||||||
-- Change gaps on the fly
|
|
||||||
, ((modm .|. controlMask, xK_o), sendMessage $ IncGap 10 L) -- increment the left-hand gap
|
|
||||||
, ((modm .|. shiftMask, xK_o), sendMessage $ DecGap 10 L) -- decrement the left-hand gap
|
|
||||||
, ((modm .|. controlMask, xK_y), sendMessage $ IncGap 10 U) -- increment the top gap
|
|
||||||
, ((modm .|. shiftMask, xK_y), sendMessage $ DecGap 10 U) -- decrement the top gap
|
|
||||||
, ((modm .|. controlMask, xK_u), sendMessage $ IncGap 10 D) -- increment the bottom gap
|
|
||||||
, ((modm .|. shiftMask, xK_u), sendMessage $ DecGap 10 D) -- decrement the bottom gap
|
|
||||||
, ((modm .|. controlMask, xK_i), sendMessage $ IncGap 10 R) -- increment the right-hand gap
|
|
||||||
, ((modm .|. shiftMask, xK_i), sendMessage $ DecGap 10 R) -- decrement the right-hand gap
|
|
||||||
-- Resize viewed windows to the correct size
|
|
||||||
, ((modm, xK_r), refresh)
|
|
||||||
-- Move focus to the master window
|
|
||||||
, ((modm, xK_m), windows W.focusMaster)
|
|
||||||
-- Push window back into tiling
|
|
||||||
, ((modm, xK_t), withFocused $ windows . W.sink)
|
|
||||||
-- Rotate through the available layout algorithms
|
|
||||||
, ((modm, xK_space), sendMessage NextLayout)
|
|
||||||
-- Reset the layouts on the current workspace to default
|
|
||||||
, ((modm .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf)
|
|
||||||
-- Move focus to the next window
|
|
||||||
, ((modm, xK_Tab), windows W.focusDown)
|
|
||||||
-- Move focus to the next window
|
|
||||||
, ((modm, xK_j), windows W.focusDown)
|
|
||||||
, ((modm, xK_Left), windows W.focusDown)
|
|
||||||
-- Move focus to the previous window
|
|
||||||
, ((modm, xK_k), windows W.focusUp)
|
|
||||||
, ((modm, xK_Right), windows W.focusUp)
|
|
||||||
-- Swap the focused window with the next window
|
|
||||||
, ((modm .|. shiftMask, xK_j), windows W.swapDown)
|
|
||||||
, ((modm .|. shiftMask, xK_h), windows W.swapDown)
|
|
||||||
-- Swap the focused window with the previous window
|
|
||||||
, ((modm .|. shiftMask, xK_k), windows W.swapUp)
|
|
||||||
, ((modm .|. shiftMask, xK_l), windows W.swapUp)
|
|
||||||
-- Shrink the master area
|
|
||||||
, ((modm, xK_h), sendMessage Shrink)
|
|
||||||
, ((modm .|. controlMask, xK_Left), sendMessage Shrink)
|
|
||||||
-- Expand the master area
|
|
||||||
, ((modm, xK_l), sendMessage Expand)
|
|
||||||
, ((modm .|. controlMask, xK_Right), sendMessage Expand)
|
|
||||||
-- Increment the number of windows in the master area
|
|
||||||
, ((modm, xK_comma), sendMessage (IncMasterN 1))
|
|
||||||
-- Deincrement the number of windows in the master area
|
|
||||||
, ((modm, xK_period), sendMessage (IncMasterN (-1)))
|
|
||||||
-- volume
|
|
||||||
, ((0,xF86XK_AudioMute), spawn "pactl set-sink-mute @DEFAULT_SINK@ toggle")
|
|
||||||
, ((0,xF86XK_AudioLowerVolume), spawn "pactl set-sink-volume @DEFAULT_SINK@ -5%")
|
|
||||||
, ((0,xF86XK_AudioRaiseVolume), spawn "pactl set-sink-volume @DEFAULT_SINK@ +5%")
|
|
||||||
-- Restart xmonad
|
|
||||||
, ((controlMask .|. shiftMask, xK_r), spawn "xmonad --recompile; xmonad --restart")
|
|
||||||
-- Quit xmonad
|
|
||||||
, ((controlMask .|. shiftMask, xK_q), spawn "pkill -KILL -u $USER")
|
|
||||||
-- programs
|
|
||||||
, ((modm, xK_d), spawn "cd ~/.config && ./webcordx")
|
|
||||||
, ((modm, xK_s), spawn "spotify")
|
|
||||||
, ((modm , xK_y ), sendMessage ToggleStruts)
|
|
||||||
, ((modm .|. shiftMask, xK_b), spawn "firefox")
|
|
||||||
-- , ((modm, xK_F1), spawn "dmenu_run")
|
|
||||||
-- spotify controls, handy af
|
|
||||||
, ((modm, xK_F9), spawn "playerctl play-pause")
|
|
||||||
, ((modm, xK_F11), spawn "playerctl previous")
|
|
||||||
, ((modm, xK_F12), spawn "playerctl next")
|
|
||||||
, ((modm, xK_p), spawn "flameshot")
|
|
||||||
, ((modm, xK_F4), withFocused toggleFull)
|
|
||||||
]
|
|
||||||
++
|
|
||||||
-- mod-[1..9], Switch to workspace N
|
|
||||||
-- mod-shift-[1..9], Move client to workspace N
|
|
||||||
[ ((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)]
|
|
||||||
]
|
|
||||||
++
|
|
||||||
-- mod-{q,a,z}, Switch to physical/Xinerama screens 1, 2, or 3
|
|
||||||
-- mod-shift-{q,a,z}, Move client to screen 1, 2, or 3
|
|
||||||
[ ((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)]
|
|
||||||
]
|
|
||||||
|
|
||||||
-- ## Mouse Bindings ## ------------------------------------------------------------------
|
|
||||||
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)
|
|
||||||
]
|
|
||||||
|
|
||||||
myLayout =
|
|
||||||
avoidStruts
|
|
||||||
$ lessBorders OnlyScreenFloat
|
|
||||||
$ gaps [(L,5), (R,5), (U,5), (D,5)]
|
|
||||||
$ spacingRaw False (Border 10 0 10 0) True (Border 0 10 0 10) True
|
|
||||||
$ tiled ||| 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.
|
|
||||||
|
|
||||||
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
|
||||||
myManageHook = manageRules
|
|
||||||
where
|
|
||||||
viewShift = doF . liftM2 (.) W.greedyView W.shift
|
|
||||||
manageRules = composeAll . concat $
|
|
||||||
[ [ isDialog --> doCenterFloat ]
|
|
||||||
, [ className =? c --> doCenterFloat | c <- myCFloats ]
|
|
||||||
, [ title =? t --> doCenterFloat | t <- myTFloats ]
|
|
||||||
, [ resource =? r --> doFloat | r <- myRFloats ]
|
|
||||||
, [ resource =? i --> doIgnore | i <- myIgnores ]
|
|
||||||
, [ className =? "firefox" --> viewShift "web" ]
|
|
||||||
, [ className =? "firefox-esr" --> doShift "web" ]
|
|
||||||
, [ className =? "discord" --> doShift "irc" ]
|
|
||||||
, [ className =? "Spotify" --> doShift "music" ]
|
|
||||||
, [ className =? "thunderbird" --> doShift "email" ]
|
|
||||||
, [ className =? "Steam" --> doShift "x" ]
|
|
||||||
, [ className =? "leagueclientux.exe" --> doShift "gfx" <> doFloat ]
|
|
||||||
, [ className =? "Lutris" --> doShift "gfx" <> doFloat]
|
|
||||||
, [ className =? "league of legends.exe" --> doShift "gfx" <> doFloat ]
|
|
||||||
, [ className =? "riotclientux.exe" --> doShift "gfx" <> doFloat ]
|
|
||||||
, [ className =? "dauntless-win64-shipping.exe" --> doShift "gfx" ]
|
|
||||||
, [ className =? "leagueclient.exe" --> doShift "gfx" <> doFloat ]
|
|
||||||
, [ className =? "battle.net.exe" --> doShift "gfx" <> doFloat ]
|
|
||||||
, [ className =? "Pcmanfm" --> doFloat ]
|
|
||||||
, [ className =? "Pavucontrol" --> doFloat ]
|
|
||||||
, [ className =? "Nitrogen" --> doFloat ]
|
|
||||||
|
|
||||||
]
|
|
||||||
where
|
|
||||||
myCFloats = ["Viewnior", "Alafloat"]
|
|
||||||
myTFloats = ["Downloads", "Save As...", "Getting Started"]
|
|
||||||
myRFloats = []
|
|
||||||
myIgnores = ["desktop_window"]
|
|
||||||
|
|
||||||
-- , [className =? "Alacritty" --> viewShift "1"]
|
|
||||||
-- , [className =? "Thunar" --> viewShift "3"]
|
|
||||||
-- , [className =? "Geany" --> viewShift "4"]
|
|
||||||
-- , [className =? "Inkscape" --> viewShift "5"]
|
|
||||||
-- , [className =? "vlc" --> viewShift "6"]
|
|
||||||
-- , [className =? "Xfce4-settings-manager" --> viewShift "7"]
|
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
myEventHook :: Event -> X All
|
|
||||||
myEventHook = mempty $ swallowEventHook (className =? "Alacritty" <||> className =? "kitty") (return True) -- ewmh
|
|
||||||
|
|
||||||
myStartupHook :: X ()
|
|
||||||
myStartupHook = do
|
|
||||||
setDefaultCursor xC_left_ptr
|
|
||||||
spawnOnce "nitrogen --restore &"
|
|
||||||
spawnOnce "/home/klein/scripts/xmonad.sh &"
|
|
||||||
-- spawnOnce "/home/klein/.local/bin/xmobar ~/.config/xmonad/src/xmobar.hs &"
|
|
||||||
-- spawnOnce "/home/klein/.local/bin/xmobar-2nd &"
|
|
||||||
-- spawnOnce "picom --daemon --experimental-backends --backend glx --blur-method dual_kawase --transparent-clipping"
|
|
||||||
-- spawnOnce "killall trayer; trayer --edge top --align right --widthtype request --padding 2 --SetDockType true --SetPartialStrut true --expand true --transparent true --alpha 0 --tint 0x161814 --height 25 --distance 3 &"
|
|
||||||
-- spawnOnce "dunst"
|
|
||||||
|
|
||||||
myLogHook = return ()
|
|
||||||
|
|
||||||
myXmobarPP :: PP
|
|
||||||
myXmobarPP =
|
|
||||||
def
|
|
||||||
{ ppCurrent = xmobarColor "#de935f" "" . wrap "[" "]",
|
|
||||||
ppHidden = xmobarColor "#d2ba8b" "",
|
|
||||||
ppHiddenNoWindows = xmobarColor "#a3846e" "",
|
|
||||||
ppSep = " > ",
|
|
||||||
ppOrder = \(ws : l : t : ex) -> [ws] ++ map (xmobarColor "#E06C75" "") ex ++ [xmobarColor "#ABB2BF" "" t],
|
|
||||||
ppExtras = []
|
|
||||||
}
|
|
||||||
|
|
||||||
myConfig =
|
|
||||||
def
|
|
||||||
{ focusFollowsMouse = myFocusFollowsMouse
|
|
||||||
, clickJustFocuses = myClickJustFocuses
|
|
||||||
, borderWidth = myBorderWidth
|
|
||||||
, modMask = myModMask
|
|
||||||
, workspaces = myWorkspaces
|
|
||||||
, normalBorderColor = myNormalBorderColor
|
|
||||||
, focusedBorderColor = myFocusedBorderColor
|
|
||||||
, terminal = myTerminal
|
|
||||||
-- Keybindings
|
|
||||||
, keys = myKeys
|
|
||||||
, mouseBindings = myMouseBindings
|
|
||||||
-- Hooks and layouts
|
|
||||||
, manageHook = myManageHook
|
|
||||||
, layoutHook = myLayout
|
|
||||||
, handleEventHook = myEventHook
|
|
||||||
<> Hacks.trayerAboveXmobarEventHook
|
|
||||||
, logHook = myLogHook
|
|
||||||
, startupHook = myStartupHook
|
|
||||||
}
|
|
||||||
|
|
||||||
main :: IO ()
|
|
||||||
main =
|
|
||||||
do
|
|
||||||
xmonad
|
|
||||||
. ewmhFullscreen
|
|
||||||
. docks
|
|
||||||
. ewmh
|
|
||||||
. fullscreenSupport
|
|
||||||
. withEasySB (statusBarProp "xmobar" (pure myXmobarPP)) defToggleStrutsKey
|
|
||||||
. withEasySB (statusBarProp "xmobar-2nd" (pure myXmobarPP)) defToggleStrutsKey
|
|
||||||
$ myConfig
|
|
@ -16,7 +16,7 @@ myConfig =
|
|||||||
pure baseConfig
|
pure baseConfig
|
||||||
{ template = concat $
|
{ template = concat $
|
||||||
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
\<fn=4><fc=#C678DD,#212121:5>\xf30d </fc></fn>\
|
\<fn=4><fc=#a54242,#212121:5>\xf30d </fc></fn>\
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
\<fn=2><fc=#212121,#212121:7>\xe0b4</fc></fn> "
|
||||||
]
|
]
|
||||||
<>
|
<>
|
||||||
@ -57,7 +57,7 @@ myCommands =
|
|||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh" ) ["vol"] "vol" 20
|
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh" ) ["vol"] "vol" 20
|
||||||
, 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" ] 50
|
||||||
, Run $ Memory [ "-t", "<fc=#8c7f80><freeratio></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" ] 50
|
||||||
-- , 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" 100
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["music"] "music" 20
|
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["music"] "music" 20
|
||||||
@ -68,19 +68,19 @@ myCommands =
|
|||||||
baseConfig :: Config
|
baseConfig :: Config
|
||||||
baseConfig =
|
baseConfig =
|
||||||
defaultConfig
|
defaultConfig
|
||||||
{ font = "xft:mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
{ font = "xft:UbuntuMono Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
||||||
, additionalFonts = [ "xft:mononoki Nerd Font:pixelsize=10:antialias=true:hinting=true"
|
, additionalFonts = [ "xft:UbuntuMono Nerd Font:pixelsize=10:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:size=13:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:size=13:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:size=11:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:size=11:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
||||||
]
|
]
|
||||||
, textOffsets = [20, 22, 21, 21, 20]
|
, textOffsets = [20, 22, 21, 21, 20]
|
||||||
, bgColor = "#212121"
|
, bgColor = "#212121"
|
||||||
, fgColor = "#c8b6b8"
|
, fgColor = "#c8b6b8"
|
||||||
, borderColor = "#a6e22e"
|
, borderColor = "#272727"
|
||||||
, border = FullB
|
, border = FullB
|
||||||
, borderWidth = 1
|
, borderWidth = 0
|
||||||
{-
|
{-
|
||||||
, position = Static { xpos = 13, ypos = 1034, width = 1893, height = 32 } Bottom Padded
|
, 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 = 0, ypos = 1048, width = 1920, height = 32 } Bottom Flat
|
||||||
|
@ -16,14 +16,14 @@ myConfig =
|
|||||||
pure baseConfig
|
pure baseConfig
|
||||||
{ template = concat $
|
{ template = concat $
|
||||||
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
[ " <fn=2><fc=#212121,#212121:7>\xe0b6</fc></fn>\
|
||||||
\<fn=4><fc=#C678DD,#212121:5>\xf30d </fc></fn>\
|
\<fn=4><fc=#a54242,#212121:5>\xf30d </fc></fn>\
|
||||||
\<fn=2><fc=#212121,#212121:7>\xe0b4</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>@mpc@</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> "
|
||||||
]
|
]
|
||||||
<>
|
<>
|
||||||
@ -46,8 +46,6 @@ myConfig =
|
|||||||
\<fn=4><fc=#61AFEF,#212121:5>@date@</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>\xe0b4</fc></fn> "
|
||||||
]
|
]
|
||||||
-- <>
|
|
||||||
-- [ "@trayer@"]
|
|
||||||
, commands = myCommands
|
, commands = myCommands
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,10 +55,10 @@ myCommands =
|
|||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh" ) ["vol"] "vol" 20
|
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/volume.sh" ) ["vol"] "vol" 20
|
||||||
, 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" ] 50
|
||||||
, Run $ Memory [ "-t", "<fc=#8c7f80><freeratio></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" ] 50
|
||||||
-- , 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" 100
|
||||||
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["mpc"] "mpc" 20
|
, Run $ Com (myHomeDir <> "/.config/xmonad/scripts/mpd.sh") ["music"] "music" 20
|
||||||
-- , 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
|
||||||
]
|
]
|
||||||
@ -68,19 +66,19 @@ myCommands =
|
|||||||
baseConfig :: Config
|
baseConfig :: Config
|
||||||
baseConfig =
|
baseConfig =
|
||||||
defaultConfig
|
defaultConfig
|
||||||
{ font = "xft:mononoki Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
{ font = "xft:UbuntuMono Nerd Font:pixelsize=12:antialias=true:hinting=true"
|
||||||
, additionalFonts = [ "xft:mononoki Nerd Font:pixelsize=10:antialias=true:hinting=true"
|
, additionalFonts = [ "xft:UbuntuMono Nerd Font:pixelsize=10:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:size=13:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:size=13:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:size=11:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:size=11:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:size=11:antialias=true:hinting=true"
|
||||||
, "xft:mononoki Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
, "xft:UbuntuMono Nerd Font:pixelsize=13:antialias=true:hinting=true"
|
||||||
]
|
]
|
||||||
, textOffsets = [20, 22, 21, 21, 20]
|
, textOffsets = [20, 22, 21, 21, 20]
|
||||||
, bgColor = "#212121"
|
, bgColor = "#212121"
|
||||||
, fgColor = "#c8b6b8"
|
, fgColor = "#c8b6b8"
|
||||||
, borderColor = "#a6e22e"
|
, borderColor = "#272727"
|
||||||
, border = FullB
|
, border = FullB
|
||||||
, borderWidth = 1
|
, borderWidth = 0
|
||||||
{-
|
{-
|
||||||
, position = Static { xpos = 13, ypos = 1034, width = 1893, height = 32 } Bottom Padded
|
, 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 = 0, ypos = 1048, width = 1920, height = 32 } Bottom Flat
|
@ -4,52 +4,49 @@
|
|||||||
, FlexibleContexts
|
, FlexibleContexts
|
||||||
, OverloadedStrings
|
, OverloadedStrings
|
||||||
#-}
|
#-}
|
||||||
{-# OPTIONS_GHC
|
{-# OPTIONS_GHC -Wno-missing-signatures
|
||||||
-Wno-missing-signatures
|
-Wno-orphans #-}
|
||||||
-Wno-orphans
|
|
||||||
#-}
|
|
||||||
|
|
||||||
-- Data Imports
|
-- Data Imports
|
||||||
import qualified Data.Map as M
|
|
||||||
import Data.Functor
|
import Data.Functor
|
||||||
|
import qualified Data.Map as M
|
||||||
import Data.Monoid
|
import Data.Monoid
|
||||||
|
|
||||||
-- Used in io exitSuccess
|
-- Used in io exitSuccess
|
||||||
import System.Exit
|
|
||||||
import System.Environment (getEnv)
|
|
||||||
import System.IO.Unsafe (unsafeDupablePerformIO)
|
|
||||||
|
|
||||||
|
import System.Environment (getEnv)
|
||||||
|
import System.Exit
|
||||||
|
import System.IO.Unsafe (unsafeDupablePerformIO)
|
||||||
-- XMonad imports
|
-- XMonad imports
|
||||||
import XMonad
|
import XMonad
|
||||||
import XMonad.Hooks.WindowSwallowing
|
|
||||||
import XMonad.Actions.NoBorders (toggleBorder)
|
import XMonad.Actions.NoBorders (toggleBorder)
|
||||||
import XMonad.Util.Ungrab
|
|
||||||
import XMonad.Hooks.EwmhDesktops
|
import XMonad.Hooks.EwmhDesktops
|
||||||
|
import XMonad.Hooks.ManageDebug
|
||||||
import XMonad.Hooks.ManageDocks
|
import XMonad.Hooks.ManageDocks
|
||||||
import XMonad.Hooks.ManageHelpers
|
import XMonad.Hooks.ManageHelpers
|
||||||
import XMonad.Hooks.SetWMName
|
import XMonad.Hooks.SetWMName
|
||||||
import XMonad.Hooks.StatusBar
|
import XMonad.Hooks.StatusBar
|
||||||
import XMonad.Hooks.StatusBar.PP
|
import XMonad.Hooks.StatusBar.PP
|
||||||
|
import XMonad.Hooks.WindowSwallowing
|
||||||
import XMonad.Layout.Fullscreen
|
import XMonad.Layout.Fullscreen
|
||||||
import XMonad.Layout.SimpleFloat
|
|
||||||
import XMonad.Layout.NoBorders
|
import XMonad.Layout.NoBorders
|
||||||
|
import XMonad.Layout.SimpleFloat
|
||||||
import XMonad.Layout.Spacing
|
import XMonad.Layout.Spacing
|
||||||
import qualified XMonad.StackSet as W
|
import qualified XMonad.StackSet as W
|
||||||
import XMonad.Util.ClickableWorkspaces
|
import XMonad.Util.ClickableWorkspaces
|
||||||
import XMonad.Util.Cursor
|
import XMonad.Util.Cursor
|
||||||
import XMonad.Util.EZConfig
|
import XMonad.Util.EZConfig
|
||||||
import qualified XMonad.Util.Hacks as Hacks
|
import qualified XMonad.Util.Hacks as Hacks
|
||||||
import XMonad.Util.SpawnOnce
|
|
||||||
import XMonad.Util.NamedScratchpad
|
import XMonad.Util.NamedScratchpad
|
||||||
import XMonad.Hooks.DynamicProperty
|
import XMonad.Util.SpawnOnce
|
||||||
import XMonad.Layout.PerWorkspace
|
import XMonad.Util.Ungrab
|
||||||
import XMonad.Hooks.ManageDebug
|
|
||||||
-- 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
|
||||||
xmonad
|
xmonad
|
||||||
$ debugManageHookOn "M-S-d"
|
$ debugManageHookOn "M-S-d"
|
||||||
. docks
|
. docks
|
||||||
@ -63,47 +60,48 @@ main = do
|
|||||||
where
|
where
|
||||||
toggleSB XConfig {modMask = modm} = (modm, xK_m)
|
toggleSB XConfig {modMask = modm} = (modm, xK_m)
|
||||||
|
|
||||||
-- Windows key/Super key
|
-- Windows key/Super key
|
||||||
myModMask :: KeyMask
|
myModMask :: KeyMask
|
||||||
myModMask = mod4Mask
|
myModMask = mod4Mask
|
||||||
|
|
||||||
-- Default Terminal
|
-- Default Terminal
|
||||||
myTerminal :: String
|
myTerminal :: String
|
||||||
myTerminal = "urxvtc"
|
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 = ["dev", "web", "irc", "gfx", "vm", "msc", "eml", "stm"]
|
||||||
|
|
||||||
-- myWorkspaces = map show [1 .. 9]
|
-- myWorkspaces = map show [1 .. 9]
|
||||||
myWorkspaces = ["dev", "web", "irc", "gfx", "vm", "music", "email", "x"]
|
|
||||||
|
|
||||||
-- Border Width
|
-- Border Width
|
||||||
myBorderWidth :: Dimension
|
myBorderWidth :: Dimension
|
||||||
myBorderWidth = 2
|
myBorderWidth = 1
|
||||||
|
|
||||||
-- Formal Unfocused Color
|
-- Formal Unfocused Color
|
||||||
myNormColor :: String
|
myNormColor :: String
|
||||||
myNormColor = "#383830"
|
myNormColor = "#383830"
|
||||||
|
|
||||||
-- Focused Color
|
-- Focused Color
|
||||||
myFocusColor :: String
|
myFocusColor :: String
|
||||||
myFocusColor = "#a6e22e"
|
myFocusColor = "#a2a2a2"
|
||||||
|
|
||||||
-- Home Directory
|
-- Home Directory
|
||||||
myHomeDir :: String
|
myHomeDir :: String
|
||||||
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
||||||
|
|
||||||
@ -111,18 +109,17 @@ myHomeDir = unsafeDupablePerformIO (getEnv "HOME")
|
|||||||
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
|
||||||
@ -136,7 +133,8 @@ myAdditionalKeys =
|
|||||||
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 ->
|
||||||
|
if
|
||||||
| M.lookup w (W.floating s) == Just fullscreen -> W.sink w s
|
| M.lookup w (W.floating s) == Just fullscreen -> W.sink w s
|
||||||
| otherwise -> W.float w fullscreen s
|
| otherwise -> W.float w fullscreen s
|
||||||
where
|
where
|
||||||
@ -148,115 +146,121 @@ myAdditionalKeys =
|
|||||||
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; 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 "code"),
|
||||||
, ("S-<Print>", unGrab *> spawn screenShotSelection)
|
("M-S-s", spawn "~/steam/steam.sh"),
|
||||||
, ("C-<Print>", unGrab *> spawn screenShotTmp)
|
("S-<Print>", unGrab *> spawn screenShotSelection),
|
||||||
, ("C-S-<Print>", unGrab *> spawn screenShotApp)
|
("C-<Print>", unGrab *> spawn screenShotTmp),
|
||||||
, ("<Print>", spawn screenShotFullscreen)
|
("C-S-<Print>", unGrab *> spawn screenShotApp),
|
||||||
, ("M-S-<Return>", spawn myLauncher)
|
("<Print>", spawn screenShotFullscreen),
|
||||||
, ("M-e", spawn myFileManager)
|
("M-S-<Return>", spawn myLauncher),
|
||||||
|
("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} =
|
||||||
|
M.fromList
|
||||||
-- Set the window to floating mode and move by dragging.
|
-- Set the window to floating mode and move by dragging.
|
||||||
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster)
|
[ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
|
||||||
-- Raise the window to the top of the stack.
|
-- Raise the window to the top of the stack.
|
||||||
, ((modm, button2), \w -> focus w >> windows W.shiftMaster)
|
((modm, button2), \w -> focus w >> windows W.shiftMaster),
|
||||||
-- Set the window to floating mode and resize by dragging.
|
-- Set the window to floating mode and resize by dragging.
|
||||||
, ((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
|
((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster)
|
||||||
]
|
]
|
||||||
|
|
||||||
myStartupHook :: X ()
|
myStartupHook :: X ()
|
||||||
myStartupHook = do
|
myStartupHook = do
|
||||||
traverse spawnOnce
|
_ <- traverse
|
||||||
[ "sh ~/.config/conky/Regulus/start.sh"
|
spawnOnce
|
||||||
, "sh ~/scripts/screenlayout.sh"
|
[ "sh ~/scripts/screenlayout.sh",
|
||||||
, "nitrogen --restore &"
|
"nitrogen --restore &",
|
||||||
, "touch ~/tmp/touchy && rm -rf ~/tmp/*"
|
"touch ~/tmp/touchy && rm -rf ~/tmp/*",
|
||||||
, "lxqt-policykit-agent &"
|
-- , myHomeDir ++ "/.local/bin/picom-jonaburg --glx-no-stencil --xrender-sync-fence -b &"
|
||||||
, myHomeDir ++ "/.local/bin/picom-jonaburg --glx-no-stencil --xrender-sync-fence -b &"
|
"picom --config ~/.config/picom/vander.conf",
|
||||||
, "xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.1"
|
"xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Profile Enabled' 0, 1 && xinput --set-prop 'pointer:''Gaming Mouse' 'libinput Accel Speed' 0.1",
|
||||||
, "setxkbmap br abnt2"
|
"setxkbmap br abnt2",
|
||||||
, "nm-applet"
|
"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 &"
|
"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 &",
|
||||||
, "nvidia-settings --load-config-only"
|
"mpd &",
|
||||||
, "mpd &"
|
"dunst &",
|
||||||
, "dunst -config $HOME/.config/dunst/base16-nord.dunstrc &"
|
"lxqt-policykit-agent &",
|
||||||
, "lxqt-policykit-agent &"
|
"xrdb -load ~/.Xresources",
|
||||||
, "xrdb -load ~/.Xresources"
|
"redshift -t 5700:3600 -l -23.5475:-46.63611 -b 0.9:0.5"
|
||||||
, "urxvtd --opendisplay --quiet --fork"
|
|
||||||
, "/usr/bin/emacs --daemon &"
|
|
||||||
-- , "redshift -l -23.591672:-46.561005 -t 5700:3600 &"
|
|
||||||
]
|
]
|
||||||
setDefaultCursor xC_left_ptr
|
setDefaultCursor xC_left_ptr
|
||||||
setWMName "jay's sin"
|
setWMName "zmonad"
|
||||||
|
|
||||||
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 AppName = String
|
||||||
|
|
||||||
type AppTitle = 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"
|
gimp2 = ClassApp "Gimp-2.99" "gimp-2.99"
|
||||||
|
|
||||||
multimc = ClassApp "MultiMC" "MultiMC"
|
multimc = ClassApp "MultiMC" "MultiMC"
|
||||||
|
|
||||||
about = TitleApp "About Mozilla Firefox" "About Mozilla Firefox"
|
about = TitleApp "About Mozilla Firefox" "About Mozilla Firefox"
|
||||||
|
|
||||||
message = ClassApp "Xmessage" "Xmessage"
|
message = ClassApp "Xmessage" "Xmessage"
|
||||||
|
|
||||||
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
myManageHook :: XMonad.Query (Data.Monoid.Endo WindowSet)
|
||||||
@ -277,73 +281,77 @@ myManageHook = manageRules
|
|||||||
-- 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
|
-?> doFloat,
|
||||||
, anyOf [ isFileChooserDialog
|
match
|
||||||
, isDialog
|
[ multimc
|
||||||
, isPopup
|
]
|
||||||
, isSplash
|
-?> doCenterFloat,
|
||||||
] -?> doCenterFloat
|
anyOf
|
||||||
] <> composeAll
|
[ isFileChooserDialog,
|
||||||
[ manageDocks <> namedScratchpadManageHook myScratchpads
|
isDialog,
|
||||||
, className =? "firefox" <&&> title =? "File Upload" --> doFloat
|
isPopup,
|
||||||
, className =? "firefox" <&&> title =? "Library" --> doCenterFloat
|
isSplash
|
||||||
, className =? "firefox" <&&> title ^? "Save" --> doFloat
|
]
|
||||||
, className =? "firefox" <&&> resource =? "Toolkit" --> doFloat
|
-?> doCenterFloat
|
||||||
, className =? "firefox" <&&> title ^? "Sign in" --> doFloat
|
]
|
||||||
, className ^? "jetbrains-" <&&> title ^? "Welcome to " --> doCenterFloat
|
<> composeAll
|
||||||
, className ^? "jetbrains-" <&&> title =? "splash" --> doFloat
|
[ manageDocks <> namedScratchpadManageHook myScratchpads,
|
||||||
, className ^? "Visual " <&&> isDialog --> doCenterFloat
|
className =? "firefox" <&&> title =? "File Upload" --> doFloat,
|
||||||
, className =? "firefox-esr" --> doShift "web"
|
className =? "firefox" <&&> title =? "Library" --> doCenterFloat,
|
||||||
, className =? "Virt-manager" --> doShift "vm"
|
className =? "firefox" <&&> title ^? "Save" --> doFloat,
|
||||||
, className =? "steam_app_1172620" --> doShift "gfx"
|
className =? "firefox" <&&> resource =? "Toolkit" --> doFloat,
|
||||||
, className =? "discord" --> doShift "irc"
|
className =? "firefox" <&&> title ^? "Sign in" --> doFloat,
|
||||||
, className =? "discord-screenaudio" --> doShift "irc"
|
className ^? "jetbrains-" <&&> title ^? "Welcome to " --> doCenterFloat,
|
||||||
, className =? "Spotify" --> doShift "music"
|
className ^? "jetbrains-" <&&> title =? "splash" --> doFloat,
|
||||||
, className =? "thunderbird" --> doShift "email"
|
className ^? "Visual " <&&> isDialog --> doCenterFloat,
|
||||||
, className =? "Steam" --> doShift "x"
|
className =? "firefox-esr" --> doShift "web",
|
||||||
, className =? "Lutris" --> doShift "gfx" <> doFloat
|
className =? "Virt-manager" --> doShift "vm",
|
||||||
, className =? "leagueclientux.exe" --> doShift "gfx"
|
className =? "steam_app_1172620" --> doShift "gfx",
|
||||||
, className =? "league of legends.exe" --> doShift "gfx"
|
className =? "steam_app_1063730" --> doShift "gfx",
|
||||||
, className =? "leagueclient.exe" --> doShift "gfx"
|
className =? "steam_app_632360" --> doShift "gfx",
|
||||||
, className =? "riotclientux.exe" --> doShift "gfx"
|
className =? "discord" --> doShift "irc",
|
||||||
, className =? "dauntless-win64-shipping.exe" --> doShift "gfx"
|
className =? "discord-screenaudio" --> doShift "irc",
|
||||||
, className =? "battle.net.exe" --> doShift "gfx" <> doFloat
|
className =? "Spotify" --> doShift "msc",
|
||||||
, className =? "Pcmanfm" --> doFloat
|
className =? "thunderbird" --> doShift "eml",
|
||||||
, className =? "Thunar" --> doFloat
|
className =? "Steam" --> doShift "stm",
|
||||||
, className =? "Pavucontrol" --> doFloat
|
className =? "Lutris" --> doShift "vm" <> doFloat,
|
||||||
, className =? "Nitrogen" --> doFloat
|
className =? "leagueclientux.exe" --> doShift "gfx",
|
||||||
, className =? "Wrapper-2.0" --> doFloat
|
className =? "league of legends.exe" --> doShift "gfx",
|
||||||
, className =? "TeamSpeak 3" --> doFloat <> doShift "irc"
|
className =? "leagueclient.exe" --> doShift "gfx",
|
||||||
, className =? "easyeffects" --> doFloat <> doShift "vm"
|
className =? "explorer.exe" --> doShift "gfx",
|
||||||
, className =? "Arandr" --> doFloat
|
className =? "riotclientux.exe" --> doShift "gfx",
|
||||||
, resource =? "desktop_window" --> doIgnore
|
className =? "dauntless-win64-shipping.exe" --> doShift "gfx",
|
||||||
, resource =? "kdesktop" --> doIgnore
|
className =? "battle.net.exe" --> doShift "gfx" <> doFloat,
|
||||||
, className =? "Conky" --> doIgnore
|
className =? "Pcmanfm" --> doFloat,
|
||||||
, isRole ^? "About" <||> isRole ^? "about" --> doFloat
|
className =? "Thunar" --> doFloat,
|
||||||
, "_NET_WM_WINDOW_TYPE" `isInProperty` "_KDE_NET_WM_WINDOW_TYPE_OVERRIDE" --> doIgnore <> doRaise
|
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
|
-- Steam Game Fixes
|
||||||
, className =? "steam_app_1551360" <&&> title /=? "Forza Horizon 5" --> doHide -- Prevents black screen when fullscreening.
|
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 =? "Wine System Tray" --> doHide -- Prevents Wine System Trays from taking input focus.
|
||||||
-- , title ^? "Steam - News" --> doHide -- I don't like the Steam news menu
|
-- , title ^? "Steam - News" --> doHide -- I don't like the Steam news menu
|
||||||
]
|
]
|
||||||
|
|
||||||
myDynHook :: ManageHook
|
|
||||||
myDynHook =
|
|
||||||
composeAll
|
|
||||||
[ 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
|
||||||
@ -353,11 +361,10 @@ myEventHook :: Event -> X All
|
|||||||
myEventHook _ = return (All True)
|
myEventHook _ = return (All True)
|
||||||
|
|
||||||
myLayoutHook =
|
myLayoutHook =
|
||||||
avoidStruts
|
avoidStruts $
|
||||||
-- $ onWorkspace "gfx" simpleFloat
|
lessBorders OnlyScreenFloat $
|
||||||
$ lessBorders OnlyScreenFloat
|
spacingRaw False (Border w w w w) True (Border w w w w) True $
|
||||||
$ spacingRaw False(Border w w w w) True(Border w w w w) True
|
tiled ||| simpleFloat ||| Mirror tiled ||| Full
|
||||||
$ tiled ||| simpleFloat ||| Mirror tiled ||| Full
|
|
||||||
where
|
where
|
||||||
tiled = Tall nmaster delta ratio
|
tiled = Tall nmaster delta ratio
|
||||||
nmaster = 1 -- Default number of windows in the master pane.
|
nmaster = 1 -- Default number of windows in the master pane.
|
||||||
@ -367,22 +374,25 @@ myLayoutHook =
|
|||||||
|
|
||||||
myXmobarPP :: X PP
|
myXmobarPP :: X PP
|
||||||
myXmobarPP =
|
myXmobarPP =
|
||||||
clickablePP $ filterOutWsPP ["NSP"] $ def
|
clickablePP $
|
||||||
{ ppCurrent = xmobarColor "#a6e22e" "" . xmobarFont 5 . wrap "[" "]"
|
filterOutWsPP ["NSP"] $
|
||||||
, ppVisibleNoWindows = Just (xmobarColor "#cc6666" "")
|
def
|
||||||
, ppHidden = xmobarColor "#a1efe4" ""
|
{ ppCurrent = xmobarColor "#d5d5d5" "" . xmobarFont 5 . wrap "[" "]",
|
||||||
, ppHiddenNoWindows = xmobarColor "#ae81ff" ""
|
ppVisibleNoWindows = Just (xmobarColor "#ff5151" ""),
|
||||||
, ppUrgent = xmobarColor "#F7768E" "" . wrap "!" "!"
|
ppHidden = xmobarColor "#ac5858" "",
|
||||||
, ppTitle = xmobarColor "#a6e22e" "" . shorten 49
|
ppHiddenNoWindows = xmobarColor "#595959" "",
|
||||||
, ppSep = wrapSep " "
|
ppUrgent = xmobarColor "#F7768E" "" . wrap "!" "!",
|
||||||
, ppTitleSanitize = xmobarStrip
|
ppTitle = xmobarColor "#d5d5d5" "" . shorten 49,
|
||||||
, ppWsSep = xmobarColor "" "#212121" " "
|
ppSep = wrapSep " ",
|
||||||
, ppLayout = xmobarColor "#212121" ""
|
ppTitleSanitize = xmobarStrip,
|
||||||
. (\case
|
ppWsSep = xmobarColor "" "#212121" " ",
|
||||||
|
ppLayout =
|
||||||
|
xmobarColor "#212121" ""
|
||||||
|
. ( \case
|
||||||
"Spacing Tall" -> "<icon=tiled.xpm/>"
|
"Spacing Tall" -> "<icon=tiled.xpm/>"
|
||||||
"Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>"
|
"Spacing Mirror Tall" -> "<icon=mirrortiled.xpm/>"
|
||||||
"Spacing Full" -> "<icon=full.xpm/>"
|
"Spacing Full" -> "<icon=full.xpm/>"
|
||||||
"Spacing Simple Float"-> "<icon=floating.xpm/>"
|
"Spacing Simple Float" -> "<icon=floating.xpm/>"
|
||||||
"Simple Float" -> "<icon=floating.xpm/>"
|
"Simple Float" -> "<icon=floating.xpm/>"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -393,43 +403,43 @@ myXmobarPP =
|
|||||||
(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"))
|
||||||
|
|
||||||
|
myXmobar :: String
|
||||||
|
myXmobar = (myHomeDir ++ "/.local/bin/xmobar " ++ myHomeDir ++ "/.config/xmonad/src/xmobar.hs")
|
||||||
|
|
||||||
xmobar :: StatusBarConfig
|
xmobar :: StatusBarConfig
|
||||||
xmobar = statusBarProp myXmobar myXmobarPP
|
xmobar = statusBarProp myXmobar myXmobarPP
|
||||||
|
|
||||||
myXmobar :: String
|
myXmobar2 :: String
|
||||||
myXmobar = (myHomeDir ++ "/.local/bin/xmobar " ++ myHomeDir ++ "/.config/xmonad/src/xmobar.hs")
|
myXmobar2 = (myHomeDir ++ "/.local/bin/xmobar2 " ++ myHomeDir ++ "/.config/xmonad/src/xmobar.hs")
|
||||||
|
|
||||||
xmobar2 :: StatusBarConfig
|
xmobar2 :: StatusBarConfig
|
||||||
xmobar2 = statusBarProp myXmobar2 myXmobarPP
|
xmobar2 = statusBarProp myXmobar2 myXmobarPP
|
||||||
|
|
||||||
myXmobar2 :: String
|
|
||||||
myXmobar2 = (myHomeDir ++ "/.local/bin/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,
|
||||||
, focusedBorderColor = myFocusColor
|
focusedBorderColor = myFocusColor,
|
||||||
, layoutHook = myLayoutHook
|
layoutHook = myLayoutHook,
|
||||||
, startupHook = myStartupHook
|
startupHook = myStartupHook,
|
||||||
, manageHook = myManageHook
|
manageHook = myManageHook,
|
||||||
, handleEventHook = Hacks.windowedFullscreenFixEventHook
|
handleEventHook =
|
||||||
|
Hacks.windowedFullscreenFixEventHook
|
||||||
<> swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True)
|
<> swallowEventHook (className =? "Alacritty" <||> className =? "kitty" <||> className =? "XTerm") (return True)
|
||||||
<> Hacks.trayerPaddingXmobarEventHook
|
<> Hacks.trayerPaddingXmobarEventHook
|
||||||
<> dynamicPropertyChange "WM_CLASS" myDynHook
|
<> myEventHook,
|
||||||
<> myEventHook
|
workspaces = myWorkspaces,
|
||||||
, workspaces = myWorkspaces
|
keys = myKeys
|
||||||
, 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
|
where
|
||||||
spawnTerm = myTerminal ++ " --name scratchpad"
|
spawnTerm = myTerminal ++ " --name scratchpad"
|
||||||
@ -438,16 +448,16 @@ myScratchpads = [ NS "terminal" spawnTerm findTerm manageTerm
|
|||||||
where
|
where
|
||||||
h = 0.9
|
h = 0.9
|
||||||
w = 0.9
|
w = 0.9
|
||||||
t = 0.95 -h
|
t = 0.95 - h
|
||||||
l = 0.95 -w
|
l = 0.95 - w
|
||||||
spawnncmpcpp = myTerminal ++ " --name ncmpcpp -e ncmpcpp"
|
spawnncmpcpp = myTerminal ++ " --name ncmpcpp -e ncmpcpp"
|
||||||
findncmpcpp = resource =? "ncmpcpp"
|
findncmpcpp = resource =? "ncmpcpp"
|
||||||
managencmpcpp = customFloating $ W.RationalRect l t w h
|
managencmpcpp = customFloating $ W.RationalRect l t w h
|
||||||
where
|
where
|
||||||
h = 0.9
|
h = 0.9
|
||||||
w = 0.9
|
w = 0.9
|
||||||
t = 0.95 -h
|
t = 0.95 - h
|
||||||
l = 0.95 -w
|
l = 0.95 - w
|
||||||
|
|
||||||
-- I GIVE UP ON DBUS.
|
-- I GIVE UP ON DBUS.
|
||||||
|
|
||||||
@ -499,4 +509,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>"
|
||||||
|
|
||||||
|
@ -5,13 +5,12 @@ packages:
|
|||||||
|
|
||||||
extra-deps:
|
extra-deps:
|
||||||
- github: xmonad/x11
|
- github: xmonad/x11
|
||||||
commit: d91b15fd8bfe78fe2865976bd357d70381fd85ab
|
commit: 8a33c4ebe7d0a1be96073d8c019f1f3901bbf344
|
||||||
- github: xmonad/xmonad
|
- github: xmonad/xmonad
|
||||||
commit: cf4d6f31b1751318309ddcc1c5fd8aa71a6a453a
|
commit: 57c3a131253720e542fb399b229b697614642b53
|
||||||
- github: xmonad/xmonad-contrib
|
- github: xmonad/xmonad-contrib
|
||||||
commit: 6373dc41fa4dfb2a12c20e431976ceee6fd03837
|
commit: 6117a867d984f97fb689eca986eff2989b2fe069
|
||||||
- xmobar-0.44.2
|
- xmobar-0.44.2
|
||||||
- dbus-1.2.22
|
|
||||||
|
|
||||||
flags:
|
flags:
|
||||||
xmobar:
|
xmobar:
|
||||||
@ -19,7 +18,6 @@ flags:
|
|||||||
with_threaded: true
|
with_threaded: true
|
||||||
with_xft: true
|
with_xft: true
|
||||||
with_rtsopts: true
|
with_rtsopts: true
|
||||||
with_dbus: true
|
|
||||||
with_mpd: true
|
with_mpd: true
|
||||||
|
|
||||||
arch: x86_64
|
arch: x86_64
|
||||||
|
52
configs/xmonad/stack.yaml.lock
Normal file
52
configs/xmonad/stack.yaml.lock
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
# This file was autogenerated by Stack.
|
||||||
|
# You should not edit this file by hand.
|
||||||
|
# For more information, please see the documentation at:
|
||||||
|
# https://docs.haskellstack.org/en/stable/lock_files
|
||||||
|
|
||||||
|
packages:
|
||||||
|
- completed:
|
||||||
|
size: 163242
|
||||||
|
url: https://github.com/xmonad/x11/archive/8a33c4ebe7d0a1be96073d8c019f1f3901bbf344.tar.gz
|
||||||
|
name: X11
|
||||||
|
version: 1.10.3.9
|
||||||
|
sha256: a2dd0ebb6fb469f1cfc0c3dfbbeeb38061b2d7cdcef21245ee9f6f555bbb3163
|
||||||
|
pantry-tree:
|
||||||
|
size: 3651
|
||||||
|
sha256: 3ad2be290f2328541a46748dd3332aec04d9b5d089ac13d7eed9cb6e514d013d
|
||||||
|
original:
|
||||||
|
url: https://github.com/xmonad/x11/archive/8a33c4ebe7d0a1be96073d8c019f1f3901bbf344.tar.gz
|
||||||
|
- completed:
|
||||||
|
size: 107338
|
||||||
|
url: https://github.com/xmonad/xmonad/archive/57c3a131253720e542fb399b229b697614642b53.tar.gz
|
||||||
|
name: xmonad
|
||||||
|
version: 0.17.1.9
|
||||||
|
sha256: 3ad4fa2e31e227284d3bd5d20786cd3c960e5e56de716e9a3e8b5efa1c23a2e7
|
||||||
|
pantry-tree:
|
||||||
|
size: 3917
|
||||||
|
sha256: 56c75bff3591f9f448c730d109f16002d2b91c60a695ef3783415a1f7dc60602
|
||||||
|
original:
|
||||||
|
url: https://github.com/xmonad/xmonad/archive/57c3a131253720e542fb399b229b697614642b53.tar.gz
|
||||||
|
- completed:
|
||||||
|
size: 668025
|
||||||
|
url: https://github.com/xmonad/xmonad-contrib/archive/6117a867d984f97fb689eca986eff2989b2fe069.tar.gz
|
||||||
|
name: xmonad-contrib
|
||||||
|
version: 0.17.1.9
|
||||||
|
sha256: f6ab8b33c936175f164cbe4add5c20e975e292a9d8f89e7d300f856eea157e05
|
||||||
|
pantry-tree:
|
||||||
|
size: 24163
|
||||||
|
sha256: adcdf6221b8e60f8b3138f0e88da01a4434ae923c9f9be35d3a1b4aa53d67fd7
|
||||||
|
original:
|
||||||
|
url: https://github.com/xmonad/xmonad-contrib/archive/6117a867d984f97fb689eca986eff2989b2fe069.tar.gz
|
||||||
|
- completed:
|
||||||
|
hackage: xmobar-0.44.2@sha256:a2eed5f8833194babd60e45520023cd5698ccb8d40976d1f41a9b53b350297d0,14895
|
||||||
|
pantry-tree:
|
||||||
|
size: 9498
|
||||||
|
sha256: c7714be550d267369496c484ba727847f50e941d66009d2f8a8268629fe953f8
|
||||||
|
original:
|
||||||
|
hackage: xmobar-0.44.2
|
||||||
|
snapshots:
|
||||||
|
- completed:
|
||||||
|
size: 619399
|
||||||
|
url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/19/23.yaml
|
||||||
|
sha256: f5d9002479d87103fd070f17cfe71fcd2147676f1e47a2dabca5ab91a42b846d
|
||||||
|
original: lts-19.23
|
@ -1,5 +0,0 @@
|
|||||||
cd ~/.config/xmonad
|
|
||||||
|
|
||||||
stack setup
|
|
||||||
stack install
|
|
||||||
./build
|
|
@ -1,22 +1,34 @@
|
|||||||
|
-- heavily copied from github.com/scherso, all rights to him
|
||||||
|
|
||||||
cabal-version: 1.12
|
cabal-version: 1.12
|
||||||
|
|
||||||
-- This file has been generated from package.yaml by hpack version 0.35.0.
|
name: zmonad
|
||||||
--
|
|
||||||
-- see: https://github.com/sol/hpack
|
|
||||||
|
|
||||||
name: xmonad-scherso
|
|
||||||
version: 0.1.0
|
version: 0.1.0
|
||||||
synopsis: My XMonad configuration.
|
synopsis: xmonad but z
|
||||||
homepage: https://github.com/Scherso/Dotfiles
|
homepage: https://github.com/jabuxas/config-notes
|
||||||
author: Scherso
|
author: jabuxas
|
||||||
maintainer: Scherso
|
maintainer: jabuxas
|
||||||
license: DBAD
|
license: BSD4
|
||||||
build-type: Simple
|
build-type: Simple
|
||||||
|
|
||||||
executable xmobar
|
executable xmobar
|
||||||
main-is: xmobar.hs
|
main-is: xmobar.hs
|
||||||
other-modules:
|
other-modules:
|
||||||
Paths_xmonad_scherso
|
Paths_zmonad
|
||||||
|
hs-source-dirs:
|
||||||
|
src
|
||||||
|
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic -rtsopts -threaded -with-rtsopts=-N
|
||||||
|
build-depends:
|
||||||
|
base
|
||||||
|
, dbus
|
||||||
|
, xmobar
|
||||||
|
, xmonad-contrib >=0.16
|
||||||
|
default-language: Haskell2010
|
||||||
|
|
||||||
|
executable xmobar2
|
||||||
|
main-is: xmobar2.hs
|
||||||
|
other-modules:
|
||||||
|
Paths_zmonad
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
src
|
src
|
||||||
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic -rtsopts -threaded -with-rtsopts=-N
|
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic -rtsopts -threaded -with-rtsopts=-N
|
||||||
@ -30,7 +42,7 @@ executable xmobar
|
|||||||
executable xmonad
|
executable xmonad
|
||||||
main-is: xmonad.hs
|
main-is: xmonad.hs
|
||||||
other-modules:
|
other-modules:
|
||||||
Paths_xmonad_scherso
|
Paths_zmonad
|
||||||
hs-source-dirs:
|
hs-source-dirs:
|
||||||
src
|
src
|
||||||
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic
|
ghc-options: -Wall -Wcompat -Wincomplete-record-updates -Wincomplete-uni-patterns -Wredundant-constraints -O2 -j -dynamic
|
Loading…
Reference in New Issue
Block a user