general update

This commit is contained in:
Luddifee 2021-07-27 17:20:10 +02:00
parent 39a11abbeb
commit d11298e386
No known key found for this signature in database
GPG Key ID: 21AC8D2CC02D7CCC
5 changed files with 52 additions and 53 deletions

View File

@ -1,28 +1,24 @@
Config { font = "xft:monospace" Config { font = "xft:monospace"
, additionalFonts = []
, borderColor = "black"
, border = TopB
, bgColor = "#303030" , bgColor = "#303030"
, fgColor = "grey" , fgColor = "grey"
, alpha = 255
, position = Static { xpos = 0 , ypos = 0, width = 2560, height = 30 } , position = Static { xpos = 0 , ypos = 0, width = 2560, height = 30 }
, textOffset = -1
, iconOffset = -1
, lowerOnStart = True , lowerOnStart = True
, pickBroadest = False
, persistent = False
, hideOnStart = False , hideOnStart = False
, iconRoot = "."
, allDesktops = True , allDesktops = True
, overrideRedirect = True , persistent = True
, iconRoot = "."
, commands = [ , commands = [
Run Cpu ["-L","3","-H","50", "--normal","green","--high","red"] 10 Run Cpu ["-L","3","-H","50"] 5
, Run Memory ["-t","Mem: <usedratio>%"] 10 , Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Com "uname" ["-s","-r"] "" 36000 , Run Com "uname" ["-s","-r"] "" 36000
, Run Weather "EDDN" [ "-t","<station>: <tempC> °C" ] 3600
, Run Date "%H:%M - %d.%m.%Y" "date" 10 , Run Date "%H:%M - %d.%m.%Y" "date" 10
, Run DynNetwork [ "-S","True","-t", "<dev>: <rx>, <tx>" ] 10
, Run Volume "default" "Master" [] 2
] 10
] ]
, sepChar = "%" , sepChar = "%"
, alignSep = "}{" , alignSep = "}{"
, template = " %cpu% | %memory%}\ , template = " <fc=#ffff0a>%cpu%</fc> | <fc=#ffaf30>%memory%</fc> | %default:Master% }\
\{ <fc=#ffd700>%date%</fc> | <fc=#0fb471>%uname%</fc> " \{ <fc=#ff55cc>%dynnetwork%</fc> | <fc=#ff711f>%EDDN%</fc> | <fc=#ffd700>%date%</fc> | <fc=#0fb471>%uname%</fc> "
} }

View File

@ -0,0 +1,24 @@
Config { font = "xft:monospace"
, bgColor = "#303030"
, fgColor = "grey"
, position = Static { xpos = 2560 , ypos = 0, width = 2560, height = 30 }
, lowerOnStart = True
, hideOnStart = False
, allDesktops = True
, persistent = True
, iconRoot = "."
, commands = [
Run Cpu ["-L","3","-H","50"] 5
, Run Memory ["-t","Mem: <usedratio>%"] 10
, Run Com "uname" ["-s","-r"] "" 36000
, Run Weather "EDDN" [ "-t","<station>: <tempC> °C" ] 3600
, Run Date "%H:%M - %d.%m.%Y" "date" 10
, Run DynNetwork [ "-S","True","-t", "<dev>: <rx>, <tx>" ] 10
, Run Volume "default" "Master" [] 2
] 10
]
, sepChar = "%"
, alignSep = "}{"
, template = " <fc=#ffff0a>%cpu%</fc> | <fc=#ffaf30>%memory%</fc> | %default:Master% }\
\{ <fc=#ff55cc>%dynnetwork%</fc> | <fc=#ff711f>%EDDN%</fc> | <fc=#ffd700>%date%</fc> | <fc=#0fb471>%uname%</fc> "
}

View File

@ -87,26 +87,14 @@ myKeys = [
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events -- Mouse bindings: default actions bound to mouse events
-- --
myMouseBindings (XConfig {XMonad.modMask = modm}) = myMouseBindings XConfig {XMonad.modMask = modm} =
M.fromList $ M.fromList
-- mod-button1, Set the window to floating mode and move by dragging -- mod-button1, Set the window to floating mode and move by dragging
[ ( (modm, button1), [ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
( \w ->
focus w >> mouseMoveWindow w
>> windows W.shiftMaster
)
),
-- mod-button2, Raise the window to the top of the stack -- mod-button2, 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),
-- mod-button3, Set the window to floating mode and resize by dragging -- mod-button3, Set the window to floating mode and resize by dragging
( (modm, button3), ((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster) ]
( \w ->
focus w >> mouseResizeWindow w
>> windows W.shiftMaster
)
)
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]

View File

@ -9,6 +9,8 @@ import XMonad.Util.SpawnOnce
import XMonad.Util.EZConfig import XMonad.Util.EZConfig
import XMonad.Layout.Spacing import XMonad.Layout.Spacing
import XMonad.Hooks.DynamicBars
import XMonad.Hooks.ManageDocks import XMonad.Hooks.ManageDocks
import qualified XMonad.StackSet as W import qualified XMonad.StackSet as W
@ -51,10 +53,10 @@ myKeys = [
("M-S-d" , spawn myAppMenuThemes), ("M-S-d" , spawn myAppMenuThemes),
("M-i" , spawn myBrowser), ("M-i" , spawn myBrowser),
("M-S-i" , spawn myAltBrowser), ("M-S-i" , spawn myAltBrowser),
-- killing, exiting and suspending keybindings -- killing, exiting and suspending keybindings
("M-q" , kill), ("M-q" , kill),
("M-S-q" , io (exitWith ExitSuccess)), ("M-S-q" , io exitSuccess),
("M-S-s" , spawn "systemctl suspend"), ("M-S-s" , spawn "systemctl suspend"),
-- restarting and recompiling keybindings -- restarting and recompiling keybindings
@ -83,26 +85,14 @@ clipBoardScreenshotCommand = "bash -c \"gnome-screenshot -af /tmp/screenshot &&
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events -- Mouse bindings: default actions bound to mouse events
-- --
myMouseBindings (XConfig {XMonad.modMask = modm}) = myMouseBindings XConfig {XMonad.modMask = modm} =
M.fromList $ M.fromList
-- mod-button1, Set the window to floating mode and move by dragging -- mod-button1, Set the window to floating mode and move by dragging
[ ( (modm, button1), [ ((modm, button1), \w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster),
( \w ->
focus w >> mouseMoveWindow w
>> windows W.shiftMaster
)
),
-- mod-button2, Raise the window to the top of the stack -- mod-button2, 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),
-- mod-button3, Set the window to floating mode and resize by dragging -- mod-button3, Set the window to floating mode and resize by dragging
( (modm, button3), ((modm, button3), \w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster) ]
( \w ->
focus w >> mouseResizeWindow w
>> windows W.shiftMaster
)
)
-- you may also bind events to the mouse scroll wheel (button4 and button5)
]
@ -128,7 +118,7 @@ myStartupHook = do
main = do main = do
xmproc0 <- spawnPipe "nitrogen --restore" xmproc0 <- spawnPipe "nitrogen --restore"
xmproc1 <- spawnPipe "killall picom; picom &" xmproc1 <- spawnPipe "killall picom; picom &"
xmproc2 <- spawnPipe "killall xmobar; xmobar ~/.config/xmobar/xmobar.config" xmproc2 <- spawnPipe "killall xmobar; xmobar ~/.config/xmobar/xmobar0.config; xmobar ~/.config/xmobar/xmobar1.config"
xmonad $ docks defaults xmonad $ docks defaults
defaults = def { defaults = def {
@ -140,10 +130,10 @@ defaults = def {
workspaces = myWorkspaces, workspaces = myWorkspaces,
normalBorderColor = myNormalBorderColor, normalBorderColor = myNormalBorderColor,
focusedBorderColor = myFocusedBorderColor, focusedBorderColor = myFocusedBorderColor,
-- bindings -- bindings
mouseBindings = myMouseBindings, mouseBindings = myMouseBindings,
-- hooks -- hooks
layoutHook = myLayoutHook, layoutHook = myLayoutHook,
manageHook = myManageHook, manageHook = myManageHook,

View File

@ -6,7 +6,8 @@ source $BASEDIR/basic-setup
mkdir -p ~/.xmonad mkdir -p ~/.xmonad
mkdir -p ~/.config/xmobar mkdir -p ~/.config/xmobar
cp $FILEDIR/.xmonad/xmonad-pc.hs ~/.xmonad/xmonad.hs cp $FILEDIR/.xmonad/xmonad-pc.hs ~/.xmonad/xmonad.hs
cp $FILEDIR/.config/xmobar/xmobar-pc.config ~/.config/xmobar/xmobar.config cp $FILEDIR/.config/xmobar/xmobar-pc-0.config ~/.config/xmobar/xmobar0.config
cp $FILEDIR/.config/xmobar/xmobar-pc-1.config ~/.config/xmobar/xmobar0.config
# download nvidia driver # download nvidia driver
mkdir -p ~/Downloads mkdir -p ~/Downloads