Initial backup

This commit is contained in:
2020-04-27 15:28:35 +02:00
parent 9b8c235753
commit be88ded986
34 changed files with 2161 additions and 0 deletions

8
.xmonad/.conky_dzen Normal file
View File

@@ -0,0 +1,8 @@
background yes
out_to_console yes
out_to_x no
# Update interval in seconds
update_interval 1
TEXT
^i(/home/my_user/.xmonad/dzen2/cpu.xbm) ^fg(\#FFFFFF)${cpu}% ^i(/home/my_user/.xmonad/dzen2/mem.xbm) ^fg(\#FFFFFF)${memperc}% ^fg(\#ebac54) ${if_existing /proc/net/route eth1} ^i(/home/my_user/.xmonad/dzen2/net_wired.xbm) ^fg(\#00aa4a) ^i(/home/my_user/.xmonad/dzen2/net_down_03.xbm)${downspeed eth1} ^fg(\#ff3333) ^i(/home/my_user/.xmonad/dzen2/net_up_03.xbm)${upspeed eth1} ^fg(\#ebac54) ^i(/home/my_user/.xmonad/dzen2/mpd.xbm) ^fg(\#00ffff)${exec rhythmbox-client --print-playing-format "%aa-%at-%tt" | cut -c-70} ^fg(\#ebac54) ^i(/home/my_user/.xmonad/dzen2/volume.xbm) ^fg(\#00ffff)${exec amixer get Headphone | egrep -o "[0-9]+%" | head -1 | egrep -o "[0-9]*"}% ^fg(\#ebac54) ^i(/home/my_user/.xmonad/dzen2/clock.xbm) ^fg(\#FFFFFF) ${time %d %m %Y} ^fg(\#ebac54) ${time %R}

1
.xmonad/fix.sh Executable file
View File

@@ -0,0 +1 @@
ghc --make xmonad.hs -i -ilib -dynamic -fforce-recomp -main-is main -v -o xmonad-x86_64-linux

1
.xmonad/nano.save Normal file
View File

@@ -0,0 +1 @@
123

149
.xmonad/pkg_list.txt Normal file
View File

@@ -0,0 +1,149 @@
haskell-adjunctions
haskell-aeson
haskell-alsa-core
haskell-alsa-mixer
haskell-ansi-terminal
haskell-ansi-wl-pprint
haskell-asn1-encoding
haskell-asn1-parse
haskell-asn1-types
haskell-async
haskell-attoparsec
haskell-base-compat
haskell-base-orphans
haskell-base-prelude
haskell-base16-bytestring
haskell-base64-bytestring
haskell-basement
haskell-bifunctors
haskell-binary-conduit
haskell-blaze-builder
haskell-blaze-html
haskell-blaze-markup
haskell-byteable
haskell-bz2
haskell-bzlib
haskell-call-stack
haskell-case-insensitive
haskell-cereal
haskell-colour
haskell-comonad
haskell-conduit
haskell-conduit-extra
haskell-connection
haskell-contravariant
haskell-cookie
haskell-crypto-cipher-types
haskell-crypto-numbers
haskell-crypto-pubkey
haskell-crypto-pubkey-types
haskell-crypto-random
haskell-cryptohash
haskell-cryptonite
haskell-data-default
haskell-data-default-class
haskell-data-default-instances-containers
haskell-data-default-instances-dlist
haskell-data-default-instances-old-locale
haskell-dbus
haskell-distributive
haskell-dlist
haskell-errors
haskell-exceptions
haskell-extensible-exceptions
haskell-fgl
haskell-free
haskell-generic-data
haskell-graphviz
haskell-hashable
haskell-hinotify
haskell-hopenpgp
haskell-hourglass
haskell-http
haskell-http-client
haskell-http-client-tls
haskell-http-conduit
haskell-http-types
haskell-incremental-parser
haskell-integer-logarithms
haskell-invariant
haskell-iwlib
haskell-ixset-typed
haskell-kan-extensions
haskell-lens
haskell-libmpd
haskell-libyaml
haskell-memory
haskell-mime-types
haskell-monad-loops
haskell-mono-traversable
haskell-monoid-subclasses
haskell-nettle
haskell-network
haskell-network-uri
haskell-newtype
haskell-old-locale
haskell-old-time
haskell-openpgp-asciiarmor
haskell-optparse-applicative
haskell-parallel
haskell-parsec-numbers
haskell-pem
haskell-polyparse
haskell-prettyprinter
haskell-prettyprinter-ansi-terminal
haskell-prettyprinter-convert-ansi-wl-pprint
haskell-primes
haskell-primitive
haskell-profunctors
haskell-random
haskell-reflection
haskell-regex-base
haskell-regex-compat
haskell-regex-posix
haskell-resourcet
haskell-safe
haskell-safe-exceptions
haskell-safecopy
haskell-scientific
haskell-securemem
haskell-semigroupoids
haskell-setlocale
haskell-show-combinators
haskell-socks
haskell-split
haskell-statevar
haskell-streaming-commons
haskell-syb
haskell-tagged
haskell-temporary
haskell-th-abstraction
haskell-th-lift
haskell-time-compat
haskell-time-locale-compat
haskell-timezone-olson
haskell-timezone-series
haskell-tls
haskell-transformers-base
haskell-transformers-compat
haskell-type-equality
haskell-typed-process
haskell-unliftio-core
haskell-unordered-containers
haskell-utf8-string
haskell-uuid-types
haskell-vector
haskell-vector-algorithms
haskell-void
haskell-wl-pprint-extras
haskell-wl-pprint-text
haskell-x11
haskell-x11-xft
haskell-x509
haskell-x509-store
haskell-x509-system
haskell-x509-validation
haskell-xml-conduit
haskell-xml-types
haskell-yaml
haskell-zlib

1
.xmonad/prompt-history Normal file
View File

@@ -0,0 +1 @@
fromList [("Run: ",["firefox"])]

Binary file not shown.

3
.xmonad/scripts/getVolume.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
amixer get Master |grep % |awk '{print $5, $6}' | head -1

7
.xmonad/scripts/getdGPULoad.py Executable file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/python3
from pynvml import *
nvmlInit()
handle = nvmlDeviceGetHandleByIndex(0)
print(str(nvmlDeviceGetUtilizationRates(handle).gpu))

View File

@@ -0,0 +1,10 @@
#!/bin/bash
STATE="$(cat /proc/acpi/bbswitch | grep -o "ON\|OFF")"
if [ "$STATE" == "ON" ];
then
LOAD="$(~/.xmonad/scripts/getdGPULoad.py)"
echo "${STATE} (${LOAD}%)"
else
echo "OFF"
fi

3
.xmonad/scripts/wallpaper.sh Executable file
View File

@@ -0,0 +1,3 @@
#!/bin/bash
DISPLAY=:0 /usr/bin/feh --recursive --randomize --bg-fill /home/marius/ownCloud/Wallpaper

7
.xmonad/xmobar.errors Normal file
View File

@@ -0,0 +1,7 @@
xmobar.hs:1:1: error:
Parse error: module header, import declaration
or top-level declaration expected.
|
1 | Config {
| ^^^^^^^^^...

102
.xmonad/xmobar.hs Normal file
View File

@@ -0,0 +1,102 @@
Config {
-- appearance
font = "xft:Bitstream Vera Sans Mono:size=9:bold:antialias=true"
, bgColor = "black"
, fgColor = "#646464"
, position = TopW L 90
, border = BottomB
, borderColor = "#646464"
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "%StdinReader% }{ %battery% | %multicpu% | %coretemp% | %memory% | %dynnetwork% | Vol: %getVolume% | dGPU: %getdGPUStatus% | %date% "
-- general behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands =
-- network activity monitor (dynamic interface resolution)
[ Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s"
, "--Low" , "1000" -- units: B/s
, "--High" , "5000" -- units: B/s
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- cpu activity monitor
, Run MultiCpu [ "--template" , "CPU: <total>%"
, "--Low" , "50" -- units: %
, "--High" , "85" -- units: %
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- cpu core temperature monitor
, Run CoreTemp [ "--template" , "Temp: <core0>°C|<core1>°C|<core2>°C|<core3>°C"
, "--Low" , "70" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 50
-- memory usage monitor
, Run Memory [ "--template" ,"Mem: <usedratio>%"
, "--Low" , "45" -- units: %
, "--High" , "90" -- units: %
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- battery monitor
, Run Battery [ "--template" , "Batt: <acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "darkred"
, "--normal" , "darkorange"
, "--high" , "darkgreen"
, "--" -- battery specific options
-- discharging status
, "-o" , "<left>% (<timeleft>)"
-- AC "on" status
, "-O" , "<fc=#dAA520>Charging (<left>%)</fc>"
-- charged status
, "-i" , "<fc=#006000>Charged</fc>"
] 50
-- time and date indicator
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
, Run Date "<fc=#ABABAB>%F (%a) %T</fc>" "date" 10
, Run StdinReader
, Run Com "/home/marius/.xmonad/scripts/getVolume.sh" [] "getVolume" 10
, Run Com "/home/marius/.xmonad/scripts/getdGPUStatus.sh" [] "getdGPUStatus" 10
]
}

106
.xmonad/xmobar.hs.bak2 Normal file
View File

@@ -0,0 +1,106 @@
Config {
-- appearance
font = "xft:Bitstream Vera Sans Mono:size=9:bold:antialias=true"
, bgColor = "black"
, fgColor = "#646464"
, position = TopW L 90
, border = BottomB
, borderColor = "#646464"
-- layout
, sepChar = "%" -- delineator between plugin names and straight text
, alignSep = "}{" -- separator between left-right alignment
, template = "%StdinReader% }{ %battery% | %multicpu% | %coretemp% | %memory% | %dynnetwork% | Vol: %getVolume% | dGPU: %getdGPUStatus% | %date% "
-- general behavior
, lowerOnStart = True -- send to bottom of window stack on start
, hideOnStart = False -- start with window unmapped (hidden)
, allDesktops = True -- show on all desktops
, overrideRedirect = True -- set the Override Redirect flag (Xlib)
, pickBroadest = False -- choose widest display (multi-monitor)
, persistent = True -- enable/disable hiding (True = disabled)
-- plugins
-- Numbers can be automatically colored according to their value. xmobar
-- decides color based on a three-tier/two-cutoff system, controlled by
-- command options:
-- --Low sets the low cutoff
-- --High sets the high cutoff
--
-- --low sets the color below --Low cutoff
-- --normal sets the color between --Low and --High cutoffs
-- --High sets the color above --High cutoff
--
-- The --template option controls how the plugin is displayed. Text
-- color can be set by enclosing in <fc></fc> tags. For more details
-- see http://projects.haskell.org/xmobar/#system-monitor-plugins.
, commands =
-- weather monitor
[ Run Weather "EDDL" [ "--template", "<skyCondition> | <fc=#4682B4><tempC></fc>°C | <fc=#4682B4><rh></fc>% | <fc=#4682B4><pressure></fc>hPa"
] 36000
-- network activity monitor (dynamic interface resolution)
, Run DynNetwork [ "--template" , "<dev>: <tx>kB/s|<rx>kB/s"
, "--Low" , "1000" -- units: B/s
, "--High" , "5000" -- units: B/s
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- cpu activity monitor
, Run MultiCpu [ "--template" , "CPU: <total>%"
, "--Low" , "50" -- units: %
, "--High" , "85" -- units: %
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- cpu core temperature monitor
, Run CoreTemp [ "--template" , "Temp: <core0>°C|<core1>°C|<core2>°C|<core3>°C"
, "--Low" , "70" -- units: °C
, "--High" , "80" -- units: °C
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 50
-- memory usage monitor
, Run Memory [ "--template" ,"Mem: <usedratio>%"
, "--Low" , "45" -- units: %
, "--High" , "90" -- units: %
, "--low" , "darkgreen"
, "--normal" , "darkorange"
, "--high" , "darkred"
] 10
-- battery monitor
, Run Battery [ "--template" , "Batt: <acstatus>"
, "--Low" , "10" -- units: %
, "--High" , "80" -- units: %
, "--low" , "darkred"
, "--normal" , "darkorange"
, "--high" , "darkgreen"
, "--" -- battery specific options
-- discharging status
, "-o" , "<left>% (<timeleft>)"
-- AC "on" status
, "-O" , "<fc=#dAA520>Charging (<left>%)</fc>"
-- charged status
, "-i" , "<fc=#006000>Charged</fc>"
] 50
-- time and date indicator
-- (%F = y-m-d date, %a = day of week, %T = h:m:s time)
, Run Date "<fc=#ABABAB>%F (%a) %T</fc>" "date" 10
, Run StdinReader
, Run Com "/home/marius/.xmonad/scripts/getVolume.sh" [] "getVolume" 10
, Run Com "/home/marius/.xmonad/scripts/getdGPUStatus.sh" [] "getdGPUStatus" 10
]
}

34
.xmonad/xmonad-session-rc Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/sh
# Script to configure X, start common apps, and start xmonad.
# Author: Vic Fryzel
# http://github.com/vicfryzel/xmonad-config
# Configure PATH so that we can access our scripts below
PATH=$PATH:~/.cabal/bin:~/.xmonad/bin
# Configure X
xsetroot -cursor_name left_ptr &
xrdb -merge ~/.Xdefaults &
setxkbmap -option "ctrl:nocaps" &
# Start a window compositor. This ensures Google Chrome paints correctly.
xcompmgr -n &
# Start the system tray
tray &
# Start two terminals
gnome-terminal &
gnome-terminal &
# Start a browser
google-chrome &
# Start screensaver
gnome-screensaver &
# Start sound server
pulseaudio --start --log-target=syslog &
gnome-session &

BIN
.xmonad/xmonad-x86_64-linux Executable file

Binary file not shown.

BIN
.xmonad/xmonad-x86_64-linux.bak Executable file

Binary file not shown.

23
.xmonad/xmonad.errors Normal file
View File

@@ -0,0 +1,23 @@
xmonad.hs:27:1: warning: [-Wtabs]
Tab character found here, and in 130 further locations.
Please use spaces instead.
|
27 | manageDocks
| ^^^^^^^^
xmonad.hs:141:14: warning: [-Wdeprecations]
In the use of defaultConfig
(imported from XMonad, but defined in XMonad.Config):
Deprecated: "Use def (from Data.Default, and re-exported by XMonad and XMonad.Config) instead."
|
141 | xmonad $ defaultConfig
| ^^^^^^^^^^^^^
xmonad.hs:149:45: warning: [-Wdeprecations]
In the use of defaultConfig
(imported from XMonad, but defined in XMonad.Config):
Deprecated: "Use def (from Data.Default, and re-exported by XMonad and XMonad.Config) instead."
|
149 | , handleEventHook defaultConfig ]
| ^^^^^^^^^^^^^

BIN
.xmonad/xmonad.hi Normal file

Binary file not shown.

174
.xmonad/xmonad.hs Normal file
View File

@@ -0,0 +1,174 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Hooks.SetWMName
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad
import XMonad.Util.NamedScratchpad
import qualified XMonad.StackSet as W
-- import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook =
manageDocks
<+> manageSpawn
<+>
(composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Pinentry" --> doFloat
, className =? "GameClient.exe" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
])
<+> namedScratchpadManageHook myScratchPads
manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
where
h = 0.2 -- terminal height, 10%
w = 0.7 -- terminal width, 100%
t = 1 - h -- distance from top edge, 90%
l = (1 - w)/2 -- distance from left edge, 0%
myScratchPads = [ NS "mixer" spawnMixer findMixer manageMixer
, NS "terminal" spawnTerm findTerm manageTerm
, NS "bitwarden" spawnBitwarden findBitwarden manageBitwarden
, NS "quicknote" spawnQuicknote findQuicknote manageQuicknote
]
where
spawnMixer = "pavucontrol"
findMixer = className =? "Pavucontrol"
manageMixer = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- height, 60%
w = 0.6 -- width, 60%
t = (1 - h)/2 -- centered top/bottom
l = (1 - w)/2 -- centered left/right
spawnTerm = myTerminal ++ " -name scratchpad"
findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.4 -- terminal height, 20%
w = 0.7 -- terminal width, 70%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnQuicknote = myTerminal ++ " -name quicknote -e notology -q"
findQuicknote = resource =? "quicknote"
manageQuicknote = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- terminal height, 60%
w = 0.6 -- terminal width, 60%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnBitwarden = "bitwarden-bin"
findBitwarden = resource =? "bitwarden"
manageBitwarden = customFloating $ W.RationalRect l t w h
where
h = 0.8 -- terminal height, 80%
w = 0.5 -- terminal width, 50%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "urxvt"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, startupHook = setWMName "LG3D"
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminator -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask .|. shiftMask, xK_Return), spawn "terminator")
, ((mod4Mask .|. shiftMask, xK_t), namedScratchpadAction myScratchPads "terminal")
, ((mod4Mask .|. shiftMask, xK_m), namedScratchpadAction myScratchPads "mixer")
, ((mod4Mask .|. shiftMask, xK_n), namedScratchpadAction myScratchPads "quicknote")
, ((mod4Mask .|. shiftMask, xK_b), namedScratchpadAction myScratchPads "bitwarden")
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008ff4a), spawn "xset dpms force off")
, ((0 , 0x1008ffb2), spawn "amixer set Capture toggle")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

31
.xmonad/xmonad.hs.bak Normal file
View File

@@ -0,0 +1,31 @@
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
]
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
<+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, handleEventHook = mconcat
[ docksEventHook
, handleEventHook defaultConfig ]
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, modMask = mod4Mask -- Rebind Mod to the Windows key
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

85
.xmonad/xmonad.hs.bak2 Normal file
View File

@@ -0,0 +1,85 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook = manageDocks <+> manageSpawn <+> composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
]
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "terminology"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminology -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

99
.xmonad/xmonad.hs.bak3 Normal file
View File

@@ -0,0 +1,99 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad
import qualified XMonad.StackSet as W
-- import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook = manageDocks <+> manageSpawn <+> manageScratchPad <+> composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
]
manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
where
h = 0.1 -- terminal height, 10%
w = 1 -- terminal width, 100%
t = 1 - h -- distance from top edge, 90%
l = 1 - w -- distance from left edge, 0%
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "urxvt"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminology -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask .|. shiftMask, xK_Return), spawn "terminology")
, ((mod4Mask .|. shiftMask, xK_t), scratchpadSpawnActionTerminal myTerminal)
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

109
.xmonad/xmonad.hs.bak4 Normal file
View File

@@ -0,0 +1,109 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad
import qualified XMonad.StackSet as W
-- import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook =
manageDocks
<+> manageSpawn
<+>
(composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
])
<+> manageScratchPad
manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
where
h = 0.2 -- terminal height, 10%
w = 0.7 -- terminal width, 100%
t = 1 - h -- distance from top edge, 90%
l = (1 - w)/2 -- distance from left edge, 0%
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "urxvt"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminology -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask .|. shiftMask, xK_Return), spawn "terminology")
, ((mod4Mask .|. shiftMask, xK_t), scratchpadSpawnActionTerminal myTerminal)
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

155
.xmonad/xmonad.hs.bak5 Normal file
View File

@@ -0,0 +1,155 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad
import XMonad.Util.NamedScratchpad
import qualified XMonad.StackSet as W
-- import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook =
manageDocks
<+> manageSpawn
<+>
(composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
])
<+> namedScratchpadManageHook myScratchPads
manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
where
h = 0.2 -- terminal height, 10%
w = 0.7 -- terminal width, 100%
t = 1 - h -- distance from top edge, 90%
l = (1 - w)/2 -- distance from left edge, 0%
myScratchPads = [ NS "mixer" spawnMixer findMixer manageMixer
, NS "terminal" spawnTerm findTerm manageTerm
, NS "notebook" spawnNotebook findNotebook manageNotebook
]
where
spawnMixer = "pavucontrol"
findMixer = className =? "Pavucontrol"
manageMixer = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- height, 60%
w = 0.6 -- width, 60%
t = (1 - h)/2 -- centered top/bottom
l = (1 - w)/2 -- centered left/right
spawnTerm = myTerminal ++ " -name scratchpad"
findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.4 -- terminal height, 20%
w = 0.7 -- terminal width, 70%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnNotebook = myTerminal ++ " -name notebook -e notology -q"
findNotebook = resource =? "notebook"
manageNotebook = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- terminal height, 60%
w = 0.6 -- terminal width, 60%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "urxvt"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminology -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask .|. shiftMask, xK_Return), spawn "terminology")
, ((mod4Mask .|. shiftMask, xK_t), namedScratchpadAction myScratchPads "terminal")
, ((mod4Mask .|. shiftMask, xK_m), namedScratchpadAction myScratchPads "mixer")
, ((mod4Mask .|. shiftMask, xK_n), namedScratchpadAction myScratchPads "notebook")
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

170
.xmonad/xmonad.hs.bak6 Normal file
View File

@@ -0,0 +1,170 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad
import XMonad.Util.NamedScratchpad
import qualified XMonad.StackSet as W
-- import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook =
manageDocks
<+> manageSpawn
<+>
(composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Pinentry" --> doFloat
, className =? "GameClient.exe" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
])
<+> namedScratchpadManageHook myScratchPads
manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
where
h = 0.2 -- terminal height, 10%
w = 0.7 -- terminal width, 100%
t = 1 - h -- distance from top edge, 90%
l = (1 - w)/2 -- distance from left edge, 0%
myScratchPads = [ NS "mixer" spawnMixer findMixer manageMixer
, NS "terminal" spawnTerm findTerm manageTerm
, NS "notebook" spawnNotebook findNotebook manageNotebook
, NS "quicknote" spawnQuicknote findQuicknote manageQuicknote
]
where
spawnMixer = "pavucontrol"
findMixer = className =? "Pavucontrol"
manageMixer = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- height, 60%
w = 0.6 -- width, 60%
t = (1 - h)/2 -- centered top/bottom
l = (1 - w)/2 -- centered left/right
spawnTerm = myTerminal ++ " -name scratchpad"
findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.4 -- terminal height, 20%
w = 0.7 -- terminal width, 70%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnQuicknote = myTerminal ++ " -name quicknote -e notology -q"
findQuicknote = resource =? "quicknote"
manageQuicknote = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- terminal height, 60%
w = 0.6 -- terminal width, 60%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnNotebook = myTerminal ++ " -name notebook -e notology"
findNotebook = resource =? "notebook"
manageNotebook = customFloating $ W.RationalRect l t w h
where
h = 0.8 -- terminal height, 80%
w = 0.5 -- terminal width, 50%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "urxvt"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminology -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask .|. shiftMask, xK_Return), spawn "terminology")
, ((mod4Mask .|. shiftMask, xK_t), namedScratchpadAction myScratchPads "terminal")
, ((mod4Mask .|. shiftMask, xK_m), namedScratchpadAction myScratchPads "mixer")
, ((mod4Mask .|. shiftMask, xK_n), namedScratchpadAction myScratchPads "quicknote")
, ((mod4Mask .|. shiftMask, xK_b), namedScratchpadAction myScratchPads "notebook")
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

172
.xmonad/xmonad.hs.bak7 Normal file
View File

@@ -0,0 +1,172 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Hooks.SetWMName
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad
import XMonad.Util.NamedScratchpad
import qualified XMonad.StackSet as W
-- import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook =
manageDocks
<+> manageSpawn
<+>
(composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Pinentry" --> doFloat
, className =? "GameClient.exe" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
])
<+> namedScratchpadManageHook myScratchPads
manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
where
h = 0.2 -- terminal height, 10%
w = 0.7 -- terminal width, 100%
t = 1 - h -- distance from top edge, 90%
l = (1 - w)/2 -- distance from left edge, 0%
myScratchPads = [ NS "mixer" spawnMixer findMixer manageMixer
, NS "terminal" spawnTerm findTerm manageTerm
, NS "notebook" spawnNotebook findNotebook manageNotebook
, NS "quicknote" spawnQuicknote findQuicknote manageQuicknote
]
where
spawnMixer = "pavucontrol"
findMixer = className =? "Pavucontrol"
manageMixer = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- height, 60%
w = 0.6 -- width, 60%
t = (1 - h)/2 -- centered top/bottom
l = (1 - w)/2 -- centered left/right
spawnTerm = myTerminal ++ " -name scratchpad"
findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.4 -- terminal height, 20%
w = 0.7 -- terminal width, 70%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnQuicknote = myTerminal ++ " -name quicknote -e notology -q"
findQuicknote = resource =? "quicknote"
manageQuicknote = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- terminal height, 60%
w = 0.6 -- terminal width, 60%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnNotebook = myTerminal ++ " -name notebook -e notology"
findNotebook = resource =? "notebook"
manageNotebook = customFloating $ W.RationalRect l t w h
where
h = 0.8 -- terminal height, 80%
w = 0.5 -- terminal width, 50%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "urxvt"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, startupHook = setWMName "LG3D"
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminology -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask .|. shiftMask, xK_Return), spawn "terminology")
, ((mod4Mask .|. shiftMask, xK_t), namedScratchpadAction myScratchPads "terminal")
, ((mod4Mask .|. shiftMask, xK_m), namedScratchpadAction myScratchPads "mixer")
, ((mod4Mask .|. shiftMask, xK_n), namedScratchpadAction myScratchPads "quicknote")
, ((mod4Mask .|. shiftMask, xK_b), namedScratchpadAction myScratchPads "notebook")
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

173
.xmonad/xmonad.hs.bak8 Normal file
View File

@@ -0,0 +1,173 @@
import XMonad
import XMonad.Actions.SpawnOn
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageHelpers
import XMonad.Hooks.FadeInactive
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops(fullscreenEventHook,ewmh)
import XMonad.Hooks.SetWMName
import XMonad.Layout.Grid
import XMonad.Layout.ResizableTile
import XMonad.Layout.LayoutHints
import XMonad.Layout.Cross
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.WindowNavigation
import XMonad.Layout.NoBorders
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.Scratchpad
import XMonad.Util.NamedScratchpad
import qualified XMonad.StackSet as W
-- import qualified XMonad.StackSet as S
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
myManageHook =
manageDocks
<+> manageSpawn
<+>
(composeAll [ isFullscreen --> doFullFloat
, className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
, className =? "PrisonArchitect.x86_64" --> doFullFloat
, className =? "hl_linux" --> doFloat
, className =? "hl2_linux" --> doFloat
, className =? "chromium" --> doFloat
, className =? "Pinentry" --> doFloat
, className =? "GameClient.exe" --> doFloat
, className =? "Gajim" --> doShift "ι"
, className =? "Thunderbird" --> doShift "θ"
])
<+> namedScratchpadManageHook myScratchPads
manageScratchPad :: ManageHook
manageScratchPad = scratchpadManageHook (W.RationalRect l t w h)
where
h = 0.2 -- terminal height, 10%
w = 0.7 -- terminal width, 100%
t = 1 - h -- distance from top edge, 90%
l = (1 - w)/2 -- distance from left edge, 0%
myScratchPads = [ NS "mixer" spawnMixer findMixer manageMixer
, NS "terminal" spawnTerm findTerm manageTerm
, NS "notebook" spawnNotebook findNotebook manageNotebook
, NS "quicknote" spawnQuicknote findQuicknote manageQuicknote
]
where
spawnMixer = "pavucontrol"
findMixer = className =? "Pavucontrol"
manageMixer = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- height, 60%
w = 0.6 -- width, 60%
t = (1 - h)/2 -- centered top/bottom
l = (1 - w)/2 -- centered left/right
spawnTerm = myTerminal ++ " -name scratchpad"
findTerm = resource =? "scratchpad"
manageTerm = customFloating $ W.RationalRect l t w h
where
h = 0.4 -- terminal height, 20%
w = 0.7 -- terminal width, 70%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnQuicknote = myTerminal ++ " -name quicknote -e notology -q"
findQuicknote = resource =? "quicknote"
manageQuicknote = customFloating $ W.RationalRect l t w h
where
h = 0.6 -- terminal height, 60%
w = 0.6 -- terminal width, 60%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
spawnNotebook = myTerminal ++ " -name notebook -e notology"
findNotebook = resource =? "notebook"
manageNotebook = customFloating $ W.RationalRect l t w h
where
h = 0.8 -- terminal height, 80%
w = 0.5 -- terminal width, 50%
t = 1 - h -- distance from top edge
l = (1 - w)/2 -- distance from left edge
myWorkspaces = ["α","β","γ","δ","ε","ζ","η","θ","ι"]
myLogHook xmproc = do
fadeInactiveLogHook 0.8
<+> dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "#01b8e0" "" . shorten 50
}
myTerminal = "urxvt"
myLayout = tiled ||| Mirror tiled ||| Full ||| Grid where
-- default tiling algorithm partitions the screen into two panes
tiled = Tall nmaster delta ratio
-- The default number of windows in the master pane
nmaster = 1
-- Default proportion of screen occupied by master pane
ratio = 1/2
-- Percent of screen to increment by when resizing panes
delta = 2/100
main = do
xmproc <- spawnPipe "xmobar ~/.xmonad/xmobar.hs"
xmonad $ defaultConfig
{ manageHook = myManageHook -- make sure to include myManageHook definition from above
-- <+> manageHook defaultConfig
, layoutHook = avoidStruts $ smartBorders $ myLayout
, startupHook = setWMName "LG3D"
, handleEventHook = mconcat
[ docksEventHook
, fullscreenEventHook
, handleEventHook defaultConfig ]
, logHook = myLogHook xmproc
, modMask = mod4Mask -- Rebind Mod to the Windows key
, terminal = myTerminal
, workspaces = myWorkspaces
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_l), spawn "xscreensaver-command -lock")
, ((mod4Mask .|. shiftMask, xK_r), spawn "terminology -e ranger")
, ((mod4Mask .|. shiftMask, xK_f), spawn "firefox")
, ((mod4Mask .|. shiftMask, xK_Return), spawn "terminology")
, ((mod4Mask .|. shiftMask, xK_t), namedScratchpadAction myScratchPads "terminal")
, ((mod4Mask .|. shiftMask, xK_m), namedScratchpadAction myScratchPads "mixer")
, ((mod4Mask .|. shiftMask, xK_n), namedScratchpadAction myScratchPads "quicknote")
, ((mod4Mask .|. shiftMask, xK_b), namedScratchpadAction myScratchPads "notebook")
, ((mod4Mask , xK_q), spawn "killall xmobar; xmonad --recompile; xmonad --restart")
, ((0 , 0x1008FF11), spawn "amixer -q sset Master 2%-")
, ((0 , 0x1008FF13), spawn "amixer -q sset Master 2%+")
, ((0 , 0x1008ffb2), spawn "amixer set Capture toggle")
, ((0 , 0x1008FF12), spawn "amixer set Master toggle")
, ((0 , 0x1008FF03), spawn "xbacklight -dec 5")
, ((0 , 0x1008FF02), spawn "xbacklight -inc 5")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

56
.xmonad/xmonad.hs.test Normal file
View File

@@ -0,0 +1,56 @@
import XMonad
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
import System.IO
-- Font
myFont = "-*-terminus-*-*-*-*-12-*-*-*-*-*-iso8859-*"
-- Colors
myBgBgColor = "black"
myFgColor = "gray80"
myBgColor = "gray20"
-- Dzen2 stuff
-----------------
--
myDzenGenOpts = "-fg '" ++ myFgColor ++ "' -bg '" ++ myBgColor ++ "' -fn '" ++ myFont ++ "' -h '16'"
-- Status Bar
myStatusBar = "dzen2 -w 665 -ta l " ++ myDzenGenOpts
-- Conky Bar
myConkyBar = "conky -c ~/.conky_bar | dzen2 -x 660 -w 365 " ++ myDzenGenOpts
myManageHook = composeAll
[ className =? "Gimp" --> doFloat
, className =? "Vncviewer" --> doFloat
]
main = do
myStatusBarPipe <- spawnPipe myStatusBar
xmproc <- spawnPipe myConkyBar
xmonad $ defaultConfig
{ manageHook = manageDocks <+> myManageHook -- make sure to include myManageHook definition from above
<+> manageHook defaultConfig
, layoutHook = avoidStruts $ layoutHook defaultConfig
, handleEventHook = mconcat
[ docksEventHook
, handleEventHook defaultConfig ]
, logHook = dynamicLogWithPP xmobarPP
{ ppOutput = hPutStrLn xmproc
, ppTitle = xmobarColor "green" "" . shorten 50
}
, modMask = mod4Mask -- Rebind Mod to the Windows key
} `additionalKeys`
[ ((mod4Mask .|. shiftMask, xK_z), spawn "xscreensaver-command -lock")
, ((controlMask, xK_Print), spawn "sleep 0.2; scrot -s")
, ((0, xK_Print), spawn "scrot")
]

BIN
.xmonad/xmonad.o Normal file

Binary file not shown.

1
.xmonad/xmonad.state.bak Normal file
View File

@@ -0,0 +1 @@
StateFile {sfWins = StackSet {current = Screen {workspace = Workspace {tag = "1", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Just (Stack {focus = 29360144, up = [44040194,48234498,50331650,37748738], down = []})}, screen = S 1, screenDetail = SD {screenRect = Rectangle {rect_x = 0, rect_y = 0, rect_width = 1440, rect_height = 900}}}, visible = [Screen {workspace = Workspace {tag = "2", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Just (Stack {focus = 10485763, up = [], down = []})}, screen = S 0, screenDetail = SD {screenRect = Rectangle {rect_x = 1440, rect_y = 0, rect_width = 1920, rect_height = 1080}}}], hidden = [Workspace {tag = "3", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Just (Stack {focus = 39845890, up = [], down = []})},Workspace {tag = "4", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Just (Stack {focus = 41943042, up = [], down = []})},Workspace {tag = "5", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Just (Stack {focus = 12582928, up = [], down = [18874396]})},Workspace {tag = "6", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Nothing},Workspace {tag = "7", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Nothing},Workspace {tag = "8", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Nothing},Workspace {tag = "9", layout = "Choose L (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2}) (Choose L (Mirror (Tall {tallNMaster = 1, tallRatioIncrement = 3 % 100, tallRatio = 1 % 2})) Full)", stack = Nothing}], floating = fromList [(10485763,RationalRect (3 % 20) (0 % 1) (3 % 40) (1 % 72)),(29360144,RationalRect (0 % 1) (19 % 900) (1921 % 1440) (59 % 50))]}, sfExt = [("Urgents","Urgents {fromUrgents = []}"),("[Reminder]","[]")]}