File xmonad/xmobar.conf deleted (index d939471..0000000) |
1 |
|
Config { |
|
2 |
|
|
|
3 |
|
-- appearance |
|
4 |
|
font = "xft:Bitstream Vera Sans Mono:size=12:bold:antialias=true" |
|
5 |
|
, bgColor = "black" |
|
6 |
|
, fgColor = "#646464" |
|
7 |
|
, position = Top |
|
8 |
|
, border = BottomB |
|
9 |
|
, borderColor = "#646464" |
|
10 |
|
|
|
11 |
|
-- layout |
|
12 |
|
, sepChar = "%" -- delineator between plugin names and straight text |
|
13 |
|
, alignSep = "}{" -- separator between left-right alignment |
|
14 |
|
, template = " %battery% | %multicpu% | %coretemp% | %memory% | %bits% | %dynnetwork% }{ %RJTT% | %date% || %kbd% " |
|
15 |
|
-- general behavior |
|
16 |
|
, lowerOnStart = True -- send to bottom of window stack on start |
|
17 |
|
, hideOnStart = False -- start with window unmapped (hidden) |
|
18 |
|
, allDesktops = True -- show on all desktops |
|
19 |
|
, overrideRedirect = True -- set the Override Redirect flag (Xlib) |
|
20 |
|
, pickBroadest = False -- choose widest display (multi-monitor) |
|
21 |
|
, persistent = True -- enable/disable hiding (True = disabled) |
|
22 |
|
|
|
23 |
|
-- plugins |
|
24 |
|
-- Numbers can be automatically colored according to their value. xmobar |
|
25 |
|
-- decides color based on a three-tier/two-cutoff system, controlled by |
|
26 |
|
-- command options: |
|
27 |
|
-- --Low sets the low cutoff |
|
28 |
|
-- --High sets the high cutoff |
|
29 |
|
-- |
|
30 |
|
-- --low sets the color below --Low cutoff |
|
31 |
|
-- --normal sets the color between --Low and --High cutoffs |
|
32 |
|
-- --High sets the color above --High cutoff |
|
33 |
|
-- |
|
34 |
|
-- The --template option controls how the plugin is displayed. Text |
|
35 |
|
-- color can be set by enclosing in <fc></fc> tags. For more details |
|
36 |
|
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins. |
|
37 |
|
, commands = |
|
38 |
|
|
|
39 |
|
-- weather monitor |
|
40 |
|
[ Run Weather "RJTT" [ "--template", "<skyCondition> | <fc=#4682B4><tempC></fc>°C | <fc=#4682B4><rh></fc>% | <fc=#4682B4><pressure></fc>hPa" |
|
41 |
|
] 36000 |
|
42 |
|
|
|
43 |
|
-- network activity monitor (dynamic interface resolution) |
|
44 |
|
, Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s" |
|
45 |
|
, "--Low" , "1000" -- units: B/s |
|
46 |
|
, "--High" , "5000" -- units: B/s |
|
47 |
|
, "--low" , "darkgreen" |
|
48 |
|
, "--normal" , "darkorange" |
|
49 |
|
, "--high" , "darkred" |
|
50 |
|
] 10 |
|
51 |
|
|
|
52 |
|
-- cpu activity monitor |
|
53 |
|
, Run MultiCpu [ "--template" , "Cpu: <total0>%|<total1>%" |
|
54 |
|
, "--Low" , "50" -- units: % |
|
55 |
|
, "--High" , "85" -- units: % |
|
56 |
|
, "--low" , "darkgreen" |
|
57 |
|
, "--normal" , "darkorange" |
|
58 |
|
, "--high" , "darkred" |
|
59 |
|
] 10 |
|
60 |
|
|
|
61 |
|
, Run Com "bitcoin.sh" [] "bits" 600 |
|
62 |
|
-- cpu core temperature monitor |
|
63 |
|
, Run CoreTemp [ "--template" , "Temp: <core0>°C|<core1>°C" |
|
64 |
|
, "--Low" , "70" -- units: °C |
|
65 |
|
, "--High" , "80" -- units: °C |
|
66 |
|
, "--low" , "darkgreen" |
|
67 |
|
, "--normal" , "darkorange" |
|
68 |
|
, "--high" , "darkred" |
|
69 |
|
] 50 |
|
70 |
|
|
|
71 |
|
-- memory usage monitor |
|
72 |
|
, Run Memory [ "--template" ,"Mem: <usedratio>%" |
|
73 |
|
, "--Low" , "20" -- units: % |
|
74 |
|
, "--High" , "90" -- units: % |
|
75 |
|
, "--low" , "darkgreen" |
|
76 |
|
, "--normal" , "darkorange" |
|
77 |
|
, "--high" , "darkred" |
|
78 |
|
] 10 |
|
79 |
|
|
|
80 |
|
-- battery monitor |
|
81 |
|
, Run Battery [ "--template" , "Batt: <acstatus>" |
|
82 |
|
, "--Low" , "10" -- units: % |
|
83 |
|
, "--High" , "80" -- units: % |
|
84 |
|
, "--low" , "darkred" |
|
85 |
|
, "--normal" , "darkorange" |
|
86 |
|
, "--high" , "darkgreen" |
|
87 |
|
|
|
88 |
|
, "--" -- battery specific options |
|
89 |
|
-- discharging status |
|
90 |
|
, "-o" , "<left>% (<timeleft>)" |
|
91 |
|
-- AC "on" status |
|
92 |
|
, "-O" , "<fc=#dAA520>Charging</fc>" |
|
93 |
|
-- charged status |
|
94 |
|
, "-i" , "<fc=#006000>Charged</fc>" |
|
95 |
|
] 50 |
|
96 |
|
|
|
97 |
|
-- time and date indicator |
|
98 |
|
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time) |
|
99 |
|
, Run Date "<fc=#ABABAB>%F (%a) %T</fc>" "date" 10 |
|
100 |
|
|
|
101 |
|
-- keyboard layout indicator |
|
102 |
|
, Run Kbd [ ("us(dvorak)" , "<fc=#00008B>DV</fc>") |
|
103 |
|
, ("us" , "<fc=#8B0000>US</fc>") |
|
104 |
|
] |
|
105 |
|
|
|
106 |
|
] |
|
107 |
|
} |
|
File xmonad/xmonad.hs deleted (index b05bfe2..0000000) |
1 |
|
-- |
|
2 |
|
-- |
|
3 |
|
-- |
|
4 |
|
-- |
|
5 |
|
|
|
6 |
|
import XMonad |
|
7 |
|
import Data.Monoid |
|
8 |
|
import System.Exit |
|
9 |
|
|
|
10 |
|
import XMonad.Hooks.ManageDocks |
|
11 |
|
import XMonad.Util.SpawnOnce |
|
12 |
|
import XMonad.Util.Run |
|
13 |
|
import qualified XMonad.StackSet as W |
|
14 |
|
import qualified Data.Map as M |
|
15 |
|
|
|
16 |
|
-- |
|
17 |
|
myTerminal = "alacritty" |
|
18 |
|
|
|
19 |
|
myFocusFollowsMouse :: Bool |
|
20 |
|
myFocusFollowsMouse = True |
|
21 |
|
|
|
22 |
|
myClickJustFocuses :: Bool |
|
23 |
|
myClickJustFocuses = False |
|
24 |
|
|
|
25 |
|
-- |
|
26 |
|
myBorderWidth = 1 |
|
27 |
|
|
|
28 |
|
-- |
|
29 |
|
myModMask = mod4Mask |
|
30 |
|
|
|
31 |
|
-- |
|
32 |
|
-- |
|
33 |
|
-- |
|
34 |
|
myWorkspaces = ["1","2","3","4","5","6","7","8","9"] |
|
35 |
|
|
|
36 |
|
-- |
|
37 |
|
myNormalBorderColor = "#dddddd" |
|
38 |
|
myFocusedBorderColor = "#ff0000" |
|
39 |
|
|
|
40 |
|
------------------------------------------------------------------------ |
|
41 |
|
-- |
|
42 |
|
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $ |
|
43 |
|
|
|
44 |
|
-- launch a terminal |
|
45 |
|
[ ((modm .|. shiftMask, xK_Return), spawn $ XMonad.terminal conf) |
|
46 |
|
|
|
47 |
|
-- launch dmenu |
|
48 |
|
, ((modm, xK_p ), spawn "dmenu_run") |
|
49 |
|
|
|
50 |
|
-- launch gmrun |
|
51 |
|
, ((modm .|. shiftMask, xK_p ), spawn "gmrun") |
|
52 |
|
|
|
53 |
|
-- close focused window |
|
54 |
|
, ((modm .|. shiftMask, xK_c ), kill) |
|
55 |
|
|
|
56 |
|
-- Rotate through the available layout algorithms |
|
57 |
|
, ((modm, xK_space ), sendMessage NextLayout) |
|
58 |
|
|
|
59 |
|
-- Reset the layouts on the current workspace to default |
|
60 |
|
, ((modm .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf) |
|
61 |
|
|
|
62 |
|
-- Resize viewed windows to the correct size |
|
63 |
|
, ((modm, xK_n ), refresh) |
|
64 |
|
|
|
65 |
|
-- Move focus to the next window |
|
66 |
|
, ((modm, xK_Tab ), windows W.focusDown) |
|
67 |
|
|
|
68 |
|
-- Move focus to the next window |
|
69 |
|
, ((modm, xK_j ), windows W.focusDown) |
|
70 |
|
|
|
71 |
|
-- Move focus to the previous window |
|
72 |
|
, ((modm, xK_k ), windows W.focusUp ) |
|
73 |
|
|
|
74 |
|
-- Move focus to the master window |
|
75 |
|
, ((modm, xK_m ), windows W.focusMaster ) |
|
76 |
|
|
|
77 |
|
-- Swap the focused window and the master window |
|
78 |
|
, ((modm, xK_Return), windows W.swapMaster) |
|
79 |
|
|
|
80 |
|
-- Swap the focused window with the next window |
|
81 |
|
, ((modm .|. shiftMask, xK_j ), windows W.swapDown ) |
|
82 |
|
|
|
83 |
|
-- Swap the focused window with the previous window |
|
84 |
|
, ((modm .|. shiftMask, xK_k ), windows W.swapUp ) |
|
85 |
|
|
|
86 |
|
-- Shrink the master area |
|
87 |
|
, ((modm, xK_h ), sendMessage Shrink) |
|
88 |
|
|
|
89 |
|
-- Expand the master area |
|
90 |
|
, ((modm, xK_l ), sendMessage Expand) |
|
91 |
|
|
|
92 |
|
-- Push window back into tiling |
|
93 |
|
, ((modm, xK_t ), withFocused $ windows . W.sink) |
|
94 |
|
|
|
95 |
|
-- Increment the number of windows in the master area |
|
96 |
|
, ((modm , xK_comma ), sendMessage (IncMasterN 1)) |
|
97 |
|
|
|
98 |
|
-- Deincrement the number of windows in the master area |
|
99 |
|
, ((modm , xK_period), sendMessage (IncMasterN (-1))) |
|
100 |
|
|
|
101 |
|
-- Toggle the status bar gap |
|
102 |
|
-- Use this binding with avoidStruts from Hooks.ManageDocks. |
|
103 |
|
-- See also the statusBar function from Hooks.DynamicLog. |
|
104 |
|
-- |
|
105 |
|
, ((modm , xK_b ), sendMessage ToggleStruts) |
|
106 |
|
|
|
107 |
|
-- Quit xmonad |
|
108 |
|
, ((modm .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) |
|
109 |
|
|
|
110 |
|
-- Restart xmonad |
|
111 |
|
, ((modm , xK_q ), spawn "xmonad --recompile; xmonad --restart") |
|
112 |
|
|
|
113 |
|
-- Run xmessage with a summary of the default keybindings (useful for beginners) |
|
114 |
|
, ((modm .|. shiftMask, xK_slash ), spawn ("echo \"" ++ help ++ "\" | xmessage -file -")) |
|
115 |
|
] |
|
116 |
|
++ |
|
117 |
|
|
|
118 |
|
-- |
|
119 |
|
-- mod-[1..9], Switch to workspace N |
|
120 |
|
-- mod-shift-[1..9], Move client to workspace N |
|
121 |
|
-- |
|
122 |
|
[((m .|. modm, k), windows $ f i) |
|
123 |
|
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9] |
|
124 |
|
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]] |
|
125 |
|
++ |
|
126 |
|
|
|
127 |
|
-- |
|
128 |
|
-- mod-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3 |
|
129 |
|
-- mod-shift-{w,e,r}, Move client to screen 1, 2, or 3 |
|
130 |
|
-- |
|
131 |
|
[((m .|. modm, key), screenWorkspace sc >>= flip whenJust (windows . f)) |
|
132 |
|
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..] |
|
133 |
|
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]] |
|
134 |
|
|
|
135 |
|
|
|
136 |
|
------------------------------------------------------------------------ |
|
137 |
|
-- |
|
138 |
|
myMouseBindings (XConfig {XMonad.modMask = modm}) = M.fromList $ |
|
139 |
|
|
|
140 |
|
-- mod-button1, Set the window to floating mode and move by dragging |
|
141 |
|
[ ((modm, button1), (\w -> focus w >> mouseMoveWindow w |
|
142 |
|
>> windows W.shiftMaster)) |
|
143 |
|
|
|
144 |
|
-- mod-button2, Raise the window to the top of the stack |
|
145 |
|
, ((modm, button2), (\w -> focus w >> windows W.shiftMaster)) |
|
146 |
|
|
|
147 |
|
-- mod-button3, Set the window to floating mode and resize by dragging |
|
148 |
|
, ((modm, button3), (\w -> focus w >> mouseResizeWindow w |
|
149 |
|
>> windows W.shiftMaster)) |
|
150 |
|
|
|
151 |
|
-- you may also bind events to the mouse scroll wheel (button4 and button5) |
|
152 |
|
] |
|
153 |
|
|
|
154 |
|
------------------------------------------------------------------------ |
|
155 |
|
|
|
156 |
|
-- |
|
157 |
|
-- |
|
158 |
|
myLayout = avoidStruts (tiled ||| Mirror tiled ||| Full) |
|
159 |
|
where |
|
160 |
|
-- default tiling algorithm partitions the screen into two panes |
|
161 |
|
tiled = Tall nmaster delta ratio |
|
162 |
|
|
|
163 |
|
-- The default number of windows in the master pane |
|
164 |
|
nmaster = 1 |
|
165 |
|
|
|
166 |
|
-- Default proportion of screen occupied by master pane |
|
167 |
|
ratio = 1/2 |
|
168 |
|
|
|
169 |
|
-- Percent of screen to increment by when resizing panes |
|
170 |
|
delta = 3/100 |
|
171 |
|
|
|
172 |
|
------------------------------------------------------------------------ |
|
173 |
|
|
|
174 |
|
-- |
|
175 |
|
-- |
|
176 |
|
-- |
|
177 |
|
myManageHook = composeAll |
|
178 |
|
[ className =? "MPlayer" --> doFloat |
|
179 |
|
, className =? "Gimp" --> doFloat |
|
180 |
|
, resource =? "desktop_window" --> doIgnore |
|
181 |
|
, resource =? "kdesktop" --> doIgnore ] |
|
182 |
|
|
|
183 |
|
------------------------------------------------------------------------ |
|
184 |
|
|
|
185 |
|
-- |
|
186 |
|
-- |
|
187 |
|
myEventHook = mempty |
|
188 |
|
|
|
189 |
|
------------------------------------------------------------------------ |
|
190 |
|
|
|
191 |
|
-- |
|
192 |
|
myLogHook = return () |
|
193 |
|
|
|
194 |
|
------------------------------------------------------------------------ |
|
195 |
|
|
|
196 |
|
-- |
|
197 |
|
myStartupHook = do |
|
198 |
|
spawnOnce "~/.local/bin/startup.sh" |
|
199 |
|
|
|
200 |
|
------------------------------------------------------------------------ |
|
201 |
|
|
|
202 |
|
-- |
|
203 |
|
main = do |
|
204 |
|
xmproc <- spawnPipe "xmobar -x 0 /home/kinslayer/.xmonad/xmobar.conf" |
|
205 |
|
xmonad $ docks defaults |
|
206 |
|
|
|
207 |
|
-- |
|
208 |
|
-- |
|
209 |
|
defaults = def { |
|
210 |
|
-- simple stuff |
|
211 |
|
terminal = myTerminal, |
|
212 |
|
focusFollowsMouse = myFocusFollowsMouse, |
|
213 |
|
clickJustFocuses = myClickJustFocuses, |
|
214 |
|
borderWidth = myBorderWidth, |
|
215 |
|
modMask = myModMask, |
|
216 |
|
workspaces = myWorkspaces, |
|
217 |
|
normalBorderColor = myNormalBorderColor, |
|
218 |
|
focusedBorderColor = myFocusedBorderColor, |
|
219 |
|
|
|
220 |
|
-- key bindings |
|
221 |
|
keys = myKeys, |
|
222 |
|
mouseBindings = myMouseBindings, |
|
223 |
|
|
|
224 |
|
-- hooks, layouts |
|
225 |
|
layoutHook = myLayout, |
|
226 |
|
manageHook = myManageHook, |
|
227 |
|
handleEventHook = myEventHook, |
|
228 |
|
logHook = myLogHook, |
|
229 |
|
startupHook = myStartupHook |
|
230 |
|
} |
|
231 |
|
|
|
232 |
|
help :: String |
|
233 |
|
help = unlines ["The default modifier key is 'alt'. Default keybindings:", |
|
234 |
|
"", |
|
235 |
|
"-- launching and killing programs", |
|
236 |
|
"mod-Shift-Enter Launch xterminal", |
|
237 |
|
"mod-p Launch dmenu", |
|
238 |
|
"mod-Shift-p Launch gmrun", |
|
239 |
|
"mod-Shift-c Close/kill the focused window", |
|
240 |
|
"mod-Space Rotate through the available layout algorithms", |
|
241 |
|
"mod-Shift-Space Reset the layouts on the current workSpace to default", |
|
242 |
|
"mod-n Resize/refresh viewed windows to the correct size", |
|
243 |
|
"", |
|
244 |
|
"-- move focus up or down the window stack", |
|
245 |
|
"mod-Tab Move focus to the next window", |
|
246 |
|
"mod-Shift-Tab Move focus to the previous window", |
|
247 |
|
"mod-j Move focus to the next window", |
|
248 |
|
"mod-k Move focus to the previous window", |
|
249 |
|
"mod-m Move focus to the master window", |
|
250 |
|
"", |
|
251 |
|
"-- modifying the window order", |
|
252 |
|
"mod-Return Swap the focused window and the master window", |
|
253 |
|
"mod-Shift-j Swap the focused window with the next window", |
|
254 |
|
"mod-Shift-k Swap the focused window with the previous window", |
|
255 |
|
"", |
|
256 |
|
"-- resizing the master/slave ratio", |
|
257 |
|
"mod-h Shrink the master area", |
|
258 |
|
"mod-l Expand the master area", |
|
259 |
|
"", |
|
260 |
|
"-- floating layer support", |
|
261 |
|
"mod-t Push window back into tiling; unfloat and re-tile it", |
|
262 |
|
"", |
|
263 |
|
"-- increase or decrease number of windows in the master area", |
|
264 |
|
"mod-comma (mod-,) Increment the number of windows in the master area", |
|
265 |
|
"mod-period (mod-.) Deincrement the number of windows in the master area", |
|
266 |
|
"", |
|
267 |
|
"-- quit, or restart", |
|
268 |
|
"mod-Shift-q Quit xmonad", |
|
269 |
|
"mod-q Restart xmonad", |
|
270 |
|
"mod-[1..9] Switch to workSpace N", |
|
271 |
|
"", |
|
272 |
|
"-- Workspaces & screens", |
|
273 |
|
"mod-Shift-[1..9] Move client to workspace N", |
|
274 |
|
"mod-{w,e,r} Switch to physical/Xinerama screens 1, 2, or 3", |
|
275 |
|
"mod-Shift-{w,e,r} Move client to screen 1, 2, or 3", |
|
276 |
|
"", |
|
277 |
|
"-- Mouse bindings: default actions bound to mouse events", |
|
278 |
|
"mod-button1 Set the window to floating mode and move by dragging", |
|
279 |
|
"mod-button2 Raise the window to the top of the stack", |
|
280 |
|
"mod-button3 Set the window to floating mode and resize by dragging"] |
|