some small changes, mostly org tangle with xmonad.hs

This commit is contained in:
Tyler Starr 2020-12-19 15:53:37 -08:00
parent 64ee89dcff
commit eb7c0c0241
4 changed files with 31 additions and 19 deletions

12
.bashrc
View File

@ -8,13 +8,21 @@ alias update-grub="sudo grub-mkconfig -o /boot/grub/grub.cfg"
alias update-xmonad="yay -S xmonad-git xmonad-contrib-git xmobar-git"
alias git-python='/usr/bin/git --git-dir=$HOME/devel/python/python-bits-and-bobs --work-tree=$HOME/devel/python'
alias rm='echo "This is not the command you are looking for."; false'
alias tp='trash-put'
alias te='trash-empty'
alias tl='trash-list'
alias tre='trash-restore'
alias tpm='trash-rm'
alias mpv='mpv --title="mpv"'
alias dot='/usr/bin/git --git-dir=$HOME/.dots --work-tree=$HOME'
dot config --local status.showUntrackedFiles no
export PATH="$PATH:$(ruby -e 'print Gem.user_dir')/bin"
export GEM_HOME=$(ruby -e 'print Gem.user_dir')
#export PATH="$PATH:$(ruby -e 'print Gem.user_dir')/bin"
#export GEM_HOME=$(ruby -e 'print Gem.user_dir')

View File

@ -1,5 +1,5 @@
# Speed up scrolling for the document viewer
"^brave-browser$"
"^firefox$"
None, Up, Button4, 4
None, Down, Button5, 4

View File

@ -1,3 +1 @@
imwheel -b 45
mpd
exec xmonad

View File

@ -24,6 +24,8 @@ import XMonad.Util.Run (runProcessWithInput, safeSpawn, spawnPipe)
import XMonad.Util.SpawnOnce
import XMonad.Util.EZConfig
import XMonad.Util.NamedScratchpad
import XMonad.Actions.CopyWindow
-- Actions
import XMonad.Actions.DynamicProjects
import XMonad.Actions.DynamicWorkspaces
@ -87,11 +89,22 @@ myStartupHook = do
------------------------------------------------------------------------
-- KEYBINDS
------------------------------------------------------------------------
-- Toggle global window
toggleGlobal :: X ()
toggleGlobal = do
ws <- wsContainingCopies
if null ws
then windows copyToAll
else killAllOtherCopies
myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- launch a terminal
[ ((modm, xK_Return), spawn $ XMonad.terminal conf)
-- Launch emacs
, ((modm, xK_e), spawn "emacsclient -c")
-- Make focused window always visible
, ((modm, xK_a ), toggleGlobal)
-- Launch emacs
, ((modm .|. shiftMask, xK_e), spawn "emacsclient -e '(save-buffers-kill-emacs)'")
-- Launch emacs
@ -119,9 +132,9 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- move window to project prompt
, ((modm .|. shiftMask, xK_BackSpace), removeWorkspace)
-- terminal scratchpad
, ((modm, xK_n), namedScratchpadAction myScratchPads "newsboat")
, ((modm, xK_n), namedScratchpadAction myScratchPads "scr-mpv")
-- discord scrathpad
, ((modm, xK_d), namedScratchpadAction myScratchPads "discord-canary")
, ((modm, xK_d), namedScratchpadAction myScratchPads "discord")
-- terminal scrathpad
, ((modm .|. shiftMask, xK_d), namedScratchpadAction myScratchPads "terminal")
-- start gamemode
@ -129,7 +142,7 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) = M.fromList $
-- start gamemode
, ((modm .|. shiftMask, xK_g), spawn "killall gamemoded")
-- launch firefox
, ((modm, xK_F1), spawn "brave")
, ((modm, xK_F1), spawn "firefox")
-- launch discord
, ((modm, xK_F2), spawn "discord")
-- launch lutris
@ -218,8 +231,8 @@ myLayout = spacing 2 $ smartBorders (tiled ||| Mirror tiled ||| Full ||| ThreeCo
------------------------------------------------------------------------
myScratchPads :: [NamedScratchpad]
myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
, NS "newsboat" spawnNews findNews manageNews
, NS "discord-canary" spawnDiscord findDiscord manageDiscord ]
, NS "scr-mpv" findMpv
, NS "discord" spawnDiscord findDiscord manageDiscord ]
where
spawnTerm = myTerminal ++ " -t terminal"
findTerm = title =? "terminal"
@ -230,16 +243,9 @@ myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm
t = 0.95 -h
l = 0.95 -w
spawnNews = myTerminal ++ " -t ncmpcpp -e ncmpcpp"
findNews = title =? "ncmpcpp"
manageNews = customFloating $ W.RationalRect l t w h
where
h = 0.5
w = 0.5
t = 0.25
l = 0.25
findMpv = title =? "scr-mpv"
spawnDiscord = "discord-canary"
spawnDiscord = "discord"
findDiscord = appName =? "discord"
manageDiscord = customFloating $ W.RationalRect l t w h
where