Compare commits
10 Commits
views
..
e80b309569
| Author | SHA1 | Date | |
|---|---|---|---|
| e80b309569 | |||
| d15ae94ba5 | |||
| a69b41e652 | |||
| 321ed016a0 | |||
| 6e2a821531 | |||
| 059635057b | |||
| 8e1f9908c9 | |||
| c6406cc2dd | |||
| 2f2593eabc | |||
| 892c6c3b72 |
+3
-3
@@ -10,10 +10,10 @@ before_script:
|
||||
matrix:
|
||||
include:
|
||||
- env:
|
||||
- NIXPKGS=https://github.com/NixOS/nixpkgs-channels/archive/nixos-19.03.tar.gz
|
||||
- VERSION=19.09
|
||||
- env:
|
||||
- NIXPKGS=https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz
|
||||
- VERSION=unstable
|
||||
|
||||
script:
|
||||
- nix run nixpkgs.haskellPackages.hlint -c hlint src
|
||||
- nix build -I nixpkgs=$NIXPKGS -f ./release.nix xmonad-masser
|
||||
- nix build -I nixpkgs=https://github.com/NixOS/nixpkgs-channels/archive/nixos-$VERSION.tar.gz -f ./release.nix xmonad-masser
|
||||
|
||||
+25
-22
@@ -1,6 +1,7 @@
|
||||
{-# LANGUAGE DataKinds #-}
|
||||
{-# LANGUAGE OverloadedStrings #-}
|
||||
{-# LANGUAGE RecordWildCards #-}
|
||||
{-# LANGUAGE ScopedTypeVariables #-}
|
||||
{-# LANGUAGE TypeApplications #-}
|
||||
module XMonad.Config.MasseR where
|
||||
|
||||
@@ -11,7 +12,6 @@ import qualified Data.List as List
|
||||
import XMonad
|
||||
import XMonad.Actions.CycleWS (swapNextScreen)
|
||||
import XMonad.Actions.Search
|
||||
import XMonad.CustomPrompt
|
||||
import XMonad.Hooks.EwmhDesktops (ewmh, ewmhDesktopsStartup)
|
||||
import XMonad.Hooks.SetWMName (setWMName)
|
||||
import XMonad.Hooks.UrgencyHook (args, dzenUrgencyHook,
|
||||
@@ -23,7 +23,7 @@ import XMonad.Layout.Decoration (Decoration,
|
||||
import XMonad.Layout.DwmStyle
|
||||
import XMonad.Layout.LayoutModifier (ModifiedLayout)
|
||||
import XMonad.Layout.Master
|
||||
import XMonad.Layout.NoBorders (smartBorders)
|
||||
import XMonad.Layout.NoBorders (noBorders, smartBorders)
|
||||
import XMonad.Layout.PerWorkspace (onWorkspace)
|
||||
import XMonad.Layout.Renamed
|
||||
import XMonad.Layout.Simplest (Simplest)
|
||||
@@ -31,9 +31,11 @@ import XMonad.Layout.Spiral
|
||||
import XMonad.Layout.Tabbed (TabbedDecoration,
|
||||
Theme (..), shrinkText,
|
||||
tabbed)
|
||||
import XMonad.Layout.ToggleLayouts (ToggleLayout (..))
|
||||
import XMonad.Layout.ToggleLayouts (ToggleLayout (..),
|
||||
toggleLayouts)
|
||||
import XMonad.Password
|
||||
import XMonad.Prompt.RunOrRaise (runOrRaisePrompt)
|
||||
import XMonad.Prompt.Shell (shellPrompt)
|
||||
import qualified XMonad.StackSet as W
|
||||
import XMonad.TopicSpace
|
||||
import XMonad.Util.EZConfig
|
||||
@@ -47,6 +49,7 @@ import XMonad.Util.SpawnOnce
|
||||
|
||||
import System.IO (hClose, hPutStr)
|
||||
import XMonad.Actions.Navigation2D
|
||||
import XMonad.Actions.UpdatePointer (updatePointer)
|
||||
import XMonad.Util.NamedActions
|
||||
import XMonad.Util.Run (spawnPipe)
|
||||
|
||||
@@ -78,13 +81,10 @@ scratchSubmaps conf = submapName . mkNamedKeymap conf $ [
|
||||
searchSubmaps :: ExtraConfig -> XConfig l -> NamedAction
|
||||
searchSubmaps extraConfig conf =
|
||||
let mkBrowser = promptSearchBrowser def (extraConfig ^. field @"applications" . field @"browser")
|
||||
_googleP = addName "Search google" $ mkBrowser google
|
||||
ddgP = addName "Search duckduckgo" $ mkBrowser (searchEngine "duckduckgo" "http://duckduckgo.com/?q=")
|
||||
googleP = addName "Search google" $ mkBrowser google
|
||||
extras = [(key, addName name $ mkBrowser (searchEngine name url)) | Search{..} <- searchEndpoints extraConfig]
|
||||
in submapName . mkNamedKeymap conf $
|
||||
[ ("d", ddgP) -- Training to use ddg again
|
||||
, ("g", ddgP) -- training to use ddg again
|
||||
] ++ extras
|
||||
("g", googleP) : extras
|
||||
|
||||
|
||||
myNav2d :: Navigation2DConfig
|
||||
@@ -123,14 +123,10 @@ myManageHook = composeAll $ concat [
|
||||
, documentHooks
|
||||
, floatHooks
|
||||
, debuggerHooks
|
||||
, ideHooks
|
||||
, flowHook
|
||||
]
|
||||
where
|
||||
classHook y = map (\x -> className =? x --> y)
|
||||
ideHooks = classHook (doShift "eclipse") [
|
||||
"Anypoint Studio"
|
||||
]
|
||||
webHooks = classHook (doShift "web") [
|
||||
"Firefox"
|
||||
, "qutebrowser"
|
||||
@@ -150,7 +146,7 @@ myManageHook = composeAll $ concat [
|
||||
"libreoffice"
|
||||
, "libreoffice-calc"
|
||||
, "Assistant"
|
||||
, "Bouml"
|
||||
, "Bouml" -- Oh wow, didn't even remember this existed
|
||||
]
|
||||
floatHooks = classHook doFloat [
|
||||
"SMplayer"
|
||||
@@ -158,11 +154,11 @@ myManageHook = composeAll $ concat [
|
||||
, "MPlayer"
|
||||
, "Kaffeine"
|
||||
, "Xmessage"
|
||||
, "Wfica_Seamless"
|
||||
, "Wfica_Seamless" -- I think this is citrix
|
||||
, "mpv"
|
||||
]
|
||||
debuggerHooks = classHook (doShift "debugger") [
|
||||
"JSwat Debugger",
|
||||
"JSwat Debugger", -- Haven't used this in years. A good thing?
|
||||
"DBeaver"
|
||||
]
|
||||
dynamicsHook = [title =~? "Dynamics" --> doShift "dynamics"]
|
||||
@@ -184,13 +180,12 @@ myKeys extraConfig conf =
|
||||
, ("M-<Backspace>", addName "Kill window" kill)
|
||||
-- scrot requires `unGrab`
|
||||
, ("M-<Print>", addName "Take screenshot" $ spawn (screenshot . applications $ extraConfig))] ^++^
|
||||
subKeys "Launchers" [ ("M-S-y", addName "Open youtube" $ spawn "mpv $(clip -o)")
|
||||
, ("M-S-<Return>", addName "Open terminal" $ spawn $ XMonad.terminal conf)
|
||||
subKeys "Launchers" [ ("M-S-<Return>", addName "Open terminal" $ spawn $ XMonad.terminal conf)
|
||||
, ("M-n", scratchSubmaps conf)
|
||||
, ("M-s", searchSubmaps extraConfig conf)
|
||||
, ("M-p", addName "Retrieve password" $ passPrompt def)
|
||||
, ("M-S-e", addName "Open with app" xdgOpen)
|
||||
, ("M-e", addName "Run app" $ runOrRaisePrompt def)] ^++^
|
||||
, ("M-e", addName "Run app" $ runOrRaisePrompt def)
|
||||
, ("M-S-e", addName "Run shell command" $ shellPrompt def)] ^++^
|
||||
subKeys "Windows" [ ("M-j", addName "Go down" $ windowGo D False)
|
||||
, ("M-k", addName "Go up" $ windowGo U False)
|
||||
, ("M-h", addName "Go left" $ windowGo L False)
|
||||
@@ -205,10 +200,11 @@ myKeys extraConfig conf =
|
||||
] ^++^
|
||||
subKeys "Projects & Workspaces" (topicKeys' extraConfig conf) ^++^
|
||||
subKeys "Layout management" [ ("M-C-<Space>", addName "Toggle layout" $ sendMessage ToggleLayout)
|
||||
, ("M-z", addName "Toggle zoom" $ sendMessage (Toggle "Zoom"))
|
||||
, ("M-<Space>", addName "Next layout" $ sendMessage NextLayout)] ^++^
|
||||
subKeys "Resize" []
|
||||
where
|
||||
locker = "sh ~/scripts/lock.sh"
|
||||
locker = "xset s activate"
|
||||
|
||||
|
||||
|
||||
@@ -238,15 +234,22 @@ masser extraConfig = xmonad =<< statusBar (bar extraConfig) zenburnPP toggleStru
|
||||
, normalBorderColor = "#262626"
|
||||
, focusedBorderColor = "#7F9F7F"
|
||||
, manageHook = myManageHook
|
||||
-- The focus follows mouse is a bad idea for me because
|
||||
-- it misbehaves with accordion. If I accidentally hover
|
||||
-- my mouse at the lower edge of the accordion, it will
|
||||
-- just cycle through to the last accordion
|
||||
, focusFollowsMouse = False
|
||||
, logHook = updatePointer (0.25, 0.25) (0.25, 0.25)
|
||||
}
|
||||
myLayout = onWorkspace "web" webLayout $
|
||||
myLayout = toggleLayouts zoom workspaceLayouts
|
||||
where
|
||||
zoom = renamed [Replace "Zoom"] (noBorders Full)
|
||||
workspaceLayouts = onWorkspace "web" webLayout $
|
||||
onWorkspace "dynamics" webLayout $
|
||||
onWorkspace "pdf" pdfLayout $
|
||||
onWorkspace "documents" documentLayout $
|
||||
onWorkspace "mail" mailLayout
|
||||
defLayout
|
||||
where
|
||||
-- Default layout
|
||||
defLayout = tiled ||| tabLayout ||| readLayout ||| bspLayout ||| vimLayout ||| spiral (6/7) ||| Full
|
||||
-- Pdfs are restricted to tabs
|
||||
|
||||
@@ -54,4 +54,4 @@ mkPassPrompt label f conf = do
|
||||
|
||||
|
||||
selectPassword :: String -> X ()
|
||||
selectPassword pass = spawn $ "pass --clip " ++ pass
|
||||
selectPassword pass = spawn $ "PASSWORD_STORE_CLIP_TIME=10 pass --clip " ++ pass
|
||||
|
||||
Reference in New Issue
Block a user