xmonad: use new image-generator version with shortcut

This commit is contained in:
Ingolf Wagner 2020-02-06 23:04:40 +13:00
parent bbddf12787
commit 71428a519a
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
2 changed files with 34 additions and 36 deletions

View file

@ -6,8 +6,8 @@ mkDerivation {
version = "0.1.1.0"; version = "0.1.1.0";
src = fetchgit { src = fetchgit {
url = "https://git.ingolf-wagner.de/palo/image-generator.git"; url = "https://git.ingolf-wagner.de/palo/image-generator.git";
sha256 = "19f6zj06avcqk711yx88z9ymyibci4qcb4r7fjpjxqvi702kvc1f"; sha256 = "0hgbp0sxy7vjgx2zv1r05gvry0k6r2cldjmj5q75d9c8gp6n5cc1";
rev = "a4d68ceca2e8e72cf75055b3796dd57b19265226"; rev = "ef68d8bd027b69fc96f821849c695a2b3e5c9e49";
fetchSubmodules = true; fetchSubmodules = true;
}; };
isLibrary = true; isLibrary = true;

View file

@ -2,7 +2,6 @@
module Main where module Main where
import BoringWindows (BoringMessage (..), import BoringWindows (BoringMessage (..),
boringWindows, clearBoring, boringWindows, clearBoring,
focusDown, focusUp) focusDown, focusUp)
@ -48,21 +47,20 @@ import XMonad.Util.Scratchpad (scratchpadManageHook,
scratchpadSpawnAction) scratchpadSpawnAction)
import XMonad.Util.SpawnOnce (spawnOnce) import XMonad.Util.SpawnOnce (spawnOnce)
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- --
-- Layouts -- Layouts
-- --
------------------------------------------------------------------------ ------------------------------------------------------------------------
selectionColor :: String selectionColor :: String
selectionColor = Solarized.magenta selectionColor = Solarized.magenta
nonSelectionColor :: String nonSelectionColor :: String
nonSelectionColor = Solarized.base02 nonSelectionColor = Solarized.base02
myLayout = (windowConfiguration $ smartBorders $ boringWindows resizeableTall) ||| noBorders Full myLayout =
(windowConfiguration $ smartBorders $ boringWindows resizeableTall) |||
noBorders Full
where where
resizeableTall = ResizableTall nmaster delta ratio [] resizeableTall = ResizableTall nmaster delta ratio []
-- The default number of windows in the master pane -- The default number of windows in the master pane
@ -71,10 +69,8 @@ myLayout = (windowConfiguration $ smartBorders $ boringWindows resizeableTall)
ratio = 1 / 2 ratio = 1 / 2
-- Percent of screen to increment by when resizing panes -- Percent of screen to increment by when resizing panes
delta = 3 / 100 delta = 3 / 100
windowConfiguration = configurableNavigation noNavigateBorders windowConfiguration = configurableNavigation noNavigateBorders
-- ------------------------------------------------------------ -- ------------------------------------------------------------
-- --
-- predefined workspaces -- predefined workspaces
@ -86,12 +82,12 @@ myWorkspaces :: [String]
myWorkspaces = ["1", "2", "3", "4"] myWorkspaces = ["1", "2", "3", "4"]
-- workspaces names to be used only by one program, partly spawning on startup. -- workspaces names to be used only by one program, partly spawning on startup.
autoSpawnWorkspaces :: [ String ] autoSpawnWorkspaces :: [String]
autoSpawnWorkspaces = [ "-copyq" ] autoSpawnWorkspaces = ["-copyq"]
-- theses workspaces should not be removed by the workspace -- theses workspaces should not be removed by the workspace
-- switch commands -- switch commands
nonRemovableWorkspaces :: [ String ] nonRemovableWorkspaces :: [String]
nonRemovableWorkspaces = myWorkspaces ++ autoSpawnWorkspaces nonRemovableWorkspaces = myWorkspaces ++ autoSpawnWorkspaces
-- projects -- projects
@ -137,16 +133,15 @@ myKeys XConfig {modMask = modm} =
-- mod-[1..9], Switch to workspace N -- mod-[1..9], Switch to workspace N
[ ( (m .|. modm, k) [ ( (m .|. modm, k)
, do removeEmptyWorkspaceAfterExcept nonRemovableWorkspaces $ windows $ f i , do removeEmptyWorkspaceAfterExcept nonRemovableWorkspaces $ windows $ f i
updateBoring updateBoring)
)
| (i, k) <- zip myWorkspaces [xK_1 .. xK_9] | (i, k) <- zip myWorkspaces [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0)] , (f, m) <- [(W.greedyView, 0)]
] ++ ] ++
-- mod-<shift>-[1..9] move window to workspace N -- mod-<shift>-[1..9] move window to workspace N
-- mod-<control>-[1..9] copy window to workspace N -- mod-<control>-[1..9] copy window to workspace N
[ ((m .|. modm, k), [ ( (m .|. modm, k)
do windows $ f i , do windows $ f i
updateBoring) updateBoring)
| (i, k) <- zip myWorkspaces [xK_1 .. xK_9] | (i, k) <- zip myWorkspaces [xK_1 .. xK_9]
, (f, m) <- [(W.shift, shiftMask), (copy, controlMask)] , (f, m) <- [(W.shift, shiftMask), (copy, controlMask)]
] ]
@ -301,15 +296,15 @@ myAdditionaKeys
(do sendMessage MirrorShrink (do sendMessage MirrorShrink
sendMessage Reset)) sendMessage Reset))
-- Toggle window tiling/floating -- Toggle window tiling/floating
, ("t", do , ( "t"
next <- nextRectangle , do next <- nextRectangle
withFocused $ toggleFloating next) withFocused $ toggleFloating next)
, ("n", withFocused $ floatTileCommand , ( "n"
(do , withFocused $
position <- nextRectangle floatTileCommand
withFocused (windows . (`W.float` position))) (do position <- nextRectangle
(return ()) withFocused (windows . (`W.float` position)))
) (return ()))
-- Increment the number of windows in the master area -- Increment the number of windows in the master area
, (",", sendMessage (IncMasterN 1)) , (",", sendMessage (IncMasterN 1))
-- Deincrement the number of windows in the master area -- Deincrement the number of windows in the master area
@ -344,7 +339,13 @@ myAdditionaKeys
-- Redshift -- Redshift
-- --
-- ------------------------------------------------------------ -- ------------------------------------------------------------
[("M4-<F9>", spawn nixStartRedshift), ("M4-<F10>", spawn nixResetRedshift)] [("M4-<F9>", spawn nixStartRedshift), ("M4-<F10>", spawn nixResetRedshift)] ++
-- ------------------------------------------------------------
--
-- programs
--
-- ------------------------------------------------------------
[("M4-b", spawn nixSetBackground)]
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Mouse bindings: default actions bound to mouse events -- Mouse bindings: default actions bound to mouse events
@ -373,8 +374,6 @@ mouse XConfig {XMonad.modMask = modm} =
-- you may also bind events to the mouse scroll wheel (button4 and button5) -- you may also bind events to the mouse scroll wheel (button4 and button5)
] ]
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Window rules: -- Window rules:
-- Execute arbitrary actions and WindowSet manipulations when managing -- Execute arbitrary actions and WindowSet manipulations when managing
@ -446,14 +445,14 @@ startUp
spawn nixStartAlbert spawn nixStartAlbert
spawnOnce nixStartCopyq spawnOnce nixStartCopyq
------------------------------------------------------------------------ ------------------------------------------------------------------------
-- Now run xmonad with all the defaults we set up. -- Now run xmonad with all the defaults we set up.
-- Run xmonad with the settings you specify. No need to modify this. -- Run xmonad with the settings you specify. No need to modify this.
-- --
main :: IO () main :: IO ()
main = do main = do
xmonad $ withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ") $ xmonad $
withUrgencyHook (SpawnUrgencyHook "echo emit Urgency ") $
dynamicProjects projects $ dynamicProjects projects $
-- debugManageHook $ -- debugManageHook $
defaults defaults
@ -463,10 +462,10 @@ myTerm = nixStartTerminal
-- make sure we never select a boring window -- make sure we never select a boring window
-- when we select another workspace. -- when we select another workspace.
updateBoring :: X() updateBoring :: X ()
updateBoring = do focusUp updateBoring = do
focusDown focusUp
focusDown
-- A structure containing your configuration settings, overriding -- A structure containing your configuration settings, overriding
-- fields in the default config. Any you don't override, will -- fields in the default config. Any you don't override, will
@ -508,7 +507,6 @@ defaults =
} `additionalKeysP` } `additionalKeysP`
myAdditionaKeys myAdditionaKeys
autoXPConfig :: XPConfig autoXPConfig :: XPConfig
autoXPConfig = myXPConfig {autoComplete = Just 5000} autoXPConfig = myXPConfig {autoComplete = Just 5000}