AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / unix / 问题 / 697441
Accepted
techsk8
techsk8
Asked: 2022-03-31 21:49:32 +0800 CST2022-03-31 21:49:32 +0800 CST 2022-03-31 21:49:32 +0800 CST

如何从 XMonad 中的所有全屏浮动窗口中删除边框

  • 772

一段时间以来,我一直在努力实现这一目标。但无法弄清楚我该怎么做。在这个主题上,我发现这个视频很好地解释了我想要实现的目标,但我无法理解它,因为我的配置文件的编写方式与他在视频中的不同。一样东西。我有两个显示器设置。

有人能帮忙吗?非常感谢任何解释或帮助。

xmonad.hs这是我的配置文件中的相关部分

import System.IO
import System.Exit

import XMonad
import XMonad.Hooks.SetWMName
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.EwmhDesktops
import XMonad.Hooks.ManageHelpers(doFullFloat, doCenterFloat, isFullscreen, isDialog)
import XMonad.Config.Desktop
import XMonad.Config.Azerty
import XMonad.Util.Run(spawnPipe)
import XMonad.Actions.SpawnOn
import XMonad.Util.EZConfig (additionalKeys, additionalMouseBindings)
import XMonad.Actions.CycleWS
import XMonad.Hooks.UrgencyHook
import qualified Codec.Binary.UTF8.String as UTF8

import XMonad.Layout.Spacing
import XMonad.Layout.Gaps
import XMonad.Layout.ResizableTile
import XMonad.Layout.NoBorders
import XMonad.Layout.Fullscreen (fullscreenFull)
import XMonad.Layout.Cross(simpleCross)
import XMonad.Layout.Spiral(spiral)
import XMonad.Layout.ThreeColumns
import XMonad.Layout.MultiToggle
import XMonad.Layout.MultiToggle.Instances
import XMonad.Layout.IndependentScreens


import XMonad.Layout.CenteredMaster(centerMaster)

import Graphics.X11.ExtraTypes.XF86
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import qualified Data.ByteString as B
import Control.Monad (liftM2)
import qualified DBus as D
import qualified DBus.Client as D


myStartupHook = do
    spawn "$HOME/.xmonad/scripts/autostart.sh"
    setWMName "LG3D"

-- colours
normBord = "#4c566a"
focdBord = "#5e81ac"
fore     = "#DEE3E0"
back     = "#282c34"
winType  = "#c678dd"

--mod4Mask= super key
--mod1Mask= alt key
--controlMask= ctrl key
--shiftMask= shift key

myModMask = mod4Mask
encodeCChar = map fromIntegral . B.unpack
myFocusFollowsMouse = True
myBorderWidth = 2
myWorkspaces    = ["\61612","\61899","\61947","\61635","\61502","\61501","\61705","\61564","\62150","\61872"]
--myWorkspaces    = ["1","2","3","4","5","6","7","8","9","10"]
--myWorkspaces    = ["I","II","III","IV","V","VI","VII","VIII","IX","X"]

myBaseConfig = desktopConfig

-- window manipulations
myManageHook = composeAll . concat $
    [ [isDialog --> doCenterFloat]
    , [className =? c --> doCenterFloat | c <- myCFloats]
    , [title =? t --> doFloat | t <- myTFloats]
    , [resource =? r --> doFloat | r <- myRFloats]
    , [resource =? i --> doIgnore | i <- myIgnores]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61612" | x <- my1Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61899" | x <- my2Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61947" | x <- my3Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61635" | x <- my4Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61502" | x <- my5Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61501" | x <- my6Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61705" | x <- my7Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61564" | x <- my8Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\62150" | x <- my9Shifts]
    -- , [(className =? x <||> title =? x <||> resource =? x) --> doShiftAndGo "\61872" | x <- my10Shifts]
    ]
    where
    -- doShiftAndGo = doF . liftM2 (.) W.greedyView W.shift
    myCFloats = ["Arandr", "Arcolinux-calamares-tool.py", "Arcolinux-tweak-tool.py", "Arcolinux-welcome-app.py", "Galculator", "feh", "Xfce4-terminal"]
    myTFloats = ["Downloads", "Save As..."]
    myRFloats = []
    myIgnores = ["desktop_window"]
    -- my1Shifts = ["Chromium", "Vivaldi-stable", "Firefox"]
    -- my2Shifts = []
    -- my3Shifts = ["Inkscape"]
    -- my4Shifts = []
    -- my5Shifts = ["Gimp", "feh"]
    -- my6Shifts = ["vlc", "mpv"]
    -- my7Shifts = ["Virtualbox"]
    -- my8Shifts = ["Thunar"]
    -- my9Shifts = []
    -- my10Shifts = ["discord"]




myLayout = spacingRaw True (Border 0 5 5 5) True (Border 5 5 5 5) True $ mkToggle (NBFULL ?? NOBORDERS ?? EOT) $ tiled ||| Mirror tiled ||| spiral (6/7)  ||| ThreeColMid 1 (3/100) (1/2) ||| noBorders Full
    where
        tiled = Tall nmaster delta tiled_ratio
        nmaster = 1
        delta = 3/100
        tiled_ratio = 1/2


arch-linux window-manager
  • 1 1 个回答
  • 487 Views

1 个回答

  • Voted
  1. Best Answer
    techsk8
    2022-04-06T18:14:12+08:002022-04-06T18:14:12+08:00

    我终于找到了解决方案。我进行了xmonad.hs彻底的研究,并开始了解事物是如何工作的,以及我应该更换什么以使其按照我想要的方式正常工作。所以我将我的旧配置文件(它具有我想要并习惯的键绑定)与这个具有我想要的布局的配置文件合并。如果您想更深入地了解这一点,也许DTs 配置会有所帮助,因为那里也有很多东西。

    无论如何,这就是我如何让它为我工作:

    ------------------------------------------------------------------------
    -- import
    ------------------------------------------------------------------------
    
    import XMonad hiding ( (|||) ) -- jump to layout
    import XMonad.Config.Desktop
    import qualified XMonad.StackSet as W
    import System.Exit
    import System.IO
    
    -- data
    import Data.Char (isSpace)
    import Data.List
    import Data.Monoid
    import Data.Maybe (isJust)
    import Data.Ratio ((%)) -- for video
    import qualified Data.Map as M
    import Graphics.X11.ExtraTypes.XF86
    import qualified XMonad.StackSet as W
    import qualified Data.Map as M
    import qualified Data.ByteString as B
    import Control.Monad (liftM2)
    import qualified DBus as D
    import qualified DBus.Client as D
    
    -- util
    import XMonad.Util.Run (safeSpawn, unsafeSpawn, runInTerm, spawnPipe)
    import XMonad.Util.SpawnOnce
    import XMonad.Util.EZConfig (additionalKeysP, additionalMouseBindings)  
    import XMonad.Util.NamedScratchpad
    import XMonad.Util.NamedWindows
    import XMonad.Util.WorkspaceCompare
    
    -- hooks
    --import XMonad
    import XMonad.Hooks.SetWMName
    import XMonad.Hooks.DynamicLog
    import XMonad.Hooks.ManageDocks (avoidStruts, docksStartupHook, manageDocks, ToggleStruts(..))
    import XMonad.Hooks.EwmhDesktops -- to show workspaces in application switchers
    import XMonad.Hooks.ManageHelpers (isFullscreen, isDialog,  doFullFloat, doCenterFloat, doRectFloat) 
    import XMonad.Hooks.Place (placeHook, withGaps, smart)
    import XMonad.Hooks.UrgencyHook
    import qualified Codec.Binary.UTF8.String as UTF8
    
    -- actions
    import XMonad.Actions.UpdatePointer -- update mouse postion
    import XMonad.Actions.SpawnOn
    import XMonad.Actions.CycleWS
    
    
    -- layout 
    import XMonad.Layout.LayoutCombinators (JumpToLayout(..), (|||)) -- jump to layout
    import XMonad.Layout.Renamed (renamed, Rename(Replace))
    -- import XMonad.Layout.NoBorders
    import qualified XMonad.Layout.NoBorders as BO
    import XMonad.Layout.Spacing
    import XMonad.Layout.GridVariants
    import XMonad.Layout.ResizableTile
    import XMonad.Layout.BinarySpacePartition
    import XMonad.Layout.Fullscreen (fullscreenFull)
    import XMonad.Layout.Cross(simpleCross)
    import XMonad.Layout.Spiral(spiral)
    import XMonad.Layout.ThreeColumns
    import XMonad.Layout.MultiToggle
    import XMonad.Layout.MultiToggle.Instances
    import XMonad.Layout.IndependentScreens
    import XMonad.Layout.CenteredMaster(centerMaster)
    
    
    ------------------------------------------------------------------------
    -- variables
    ------------------------------------------------------------------------
    
    myModMask = mod4Mask -- Sets modkey to super/windows key
    myTerminal = "alacritty" -- Sets default terminal
    myBorderWidth = 2 -- Sets border width for windows
    encodeCChar = map fromIntegral . B.unpack
    myFocusFollowsMouse = True
    --myNormalBorderColor = "#839496"
    --myFocusedBorderColor = "#268BD2"
    myWorkspaces    = ["\61612","\61899","\61947","\61635","\61502","\61501","\61705","\61564","\62150","\61872"]
    --myWorkspaces    = ["1","2","3","4","5","6","7","8","9","10"]
    --myWorkspaces    = ["I","II","III","IV","V","VI","VII","VIII","IX","X"]
    
    
    ------------------------------------------------------------------------
    -- desktop notifications -- dunst package required
    ------------------------------------------------------------------------
    
    data LibNotifyUrgencyHook = LibNotifyUrgencyHook deriving (Read, Show)
    
    instance UrgencyHook LibNotifyUrgencyHook where
        urgencyHook LibNotifyUrgencyHook w = do
            name     <- getName w
            Just idx <- fmap (W.findTag w) $ gets windowset
    
            safeSpawn "notify-send" [show name, "workspace " ++ idx]
    
    ------------------------------------------------------------------------
    -- Startup hook
    ------------------------------------------------------------------------
    
    myStartupHook = do
          spawn "$HOME/.xmonad/scripts/autostart.sh"
          setWMName "LG3D"
    
    -- colours
    normBord = "#4c566a"
    focdBord = "#5e81ac"
    fore     = "#DEE3E0"
    back     = "#282c34"
    winType  = "#c678dd"
    
    ------------------------------------------------------------------------
    -- layout
    ------------------------------------------------------------------------
    
    myLayout = BO.lessBorders BO.Never $ avoidStruts (full ||| tiled ||| grid ||| bsp)
      where
        
          -- full
         full = renamed [Replace "Full"] 
              $ BO.noBorders (Full)
          
          --- tiled
         tiled = renamed [Replace "Tall"] 
               $ spacingRaw True (Border 10 0 10 0) True (Border 0 10 0 10) True
               -- $ spacingRaw True (Border 0 5 5 5) True (Border 5 5 5 5) True 
               $ ResizableTall 1 (3/100) (1/2) []
          -- grid
        
         grid = renamed [Replace "Grid"] 
              $ spacingRaw True (Border 10 0 10 0) True (Border 0 10 0 10) True 
              $ Grid (16/10)
        
         -- bsp
         bsp = renamed [Replace "BSP"] 
             $ emptyBSP
    
         -- 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   = 3/100
    
    ------------------------------------------------------------------------
    -- Window rules:
    ------------------------------------------------------------------------
     
    myManageHook = composeAll
        [ isDialog                      --> doCenterFloat
        , isFullscreen                  --> doFullFloat
        , className =? "mpv"            --> doRectFloat (W.RationalRect (1 % 4) (1 % 4) (1 % 2) (1 % 2))
        , title =?  "virt-manager"      --> doFloat
        , className =? "Gimp"           --> doFloat 
        --, className =? "Brave"          --> doFloat
        , className =? "Firefox" <&&> resource =? "Toolkit" --> doFloat -- firefox pip
        --, title =? "emacs-capture"      --> doRectFloat (W.RationalRect (1 % 4) (1 % 4) (1 % 2) (1 % 2)) -- emacs org capture
        , title =?  "Downloads"         --> doCenterFloat
        , title =?  "Save As..."        --> doCenterFloat
        , title =?  "Arandr"                        --> doCenterFloat
        , title =?  "Arcolinux-calamares-tool.py"   --> doCenterFloat
        , title =?  "Arcolinux-tweak-tool.py"       --> doCenterFloat
        , title =?  "Arcolinux-welcome-app.py"      --> doCenterFloat
        , title =?  "galculator"                    --> doCenterFloat
        , title =?  "feh"                           --> doCenterFloat
        , title =?  "Xfce4-terminal"                --> doCenterFloat
        --, title =?  ""                  --> doCenterFloat
        --, title =?  ""                  --> doCenterFloat
        , resource  =? "desktop_window" --> doIgnore
        , resource  =? "kdesktop"       --> doIgnore 
        ]
        
    ------------------------------------------------------------------------
    -- Key bindings. Add, modify or remove key bindings here.
    ------------------------------------------------------------------------
    
    myMouseBindings (XConfig {XMonad.modMask = modMask}) = M.fromList $
    
        -- mod-button1, Set the window to floating mode and move by dragging
        [ ((modMask, 1), (\w -> focus w >> mouseMoveWindow w >> windows W.shiftMaster))
    
        -- mod-button2, Raise the window to the top of the stack
        , ((modMask, 2), (\w -> focus w >> windows W.shiftMaster))
    
        -- mod-button3, Set the window to floating mode and resize by dragging
        , ((modMask, 3), (\w -> focus w >> mouseResizeWindow w >> windows W.shiftMaster))
    
        ]
    --
    --myKeys =
    --  [("M-" ++ m ++ k, windows $ f i)
    --        | (i, k) <- zip (myWorkspaces) (map show [1 :: Int ..])
    --        , (f, m) <- [(W.view, ""), (W.shift, "S-"), (copy, "S-C-")]]
    --    ++
    --    [("S-C-a", windows copyToAll)   -- copy window to all workspaces
    --     , ("S-C-z", killAllOtherCopies)  -- kill copies of window on other workspaces
    --     , ("M-a", sendMessage MirrorExpand)
    --     , ("M-z", sendMessage MirrorShrink)
    --     , ("M-s", sendMessage ToggleStruts)
    --     , ("M-f", sendMessage $ JumpToLayout "Full")
    --     , ("M-t", sendMessage $ JumpToLayout "Tall")
    --     , ("M-g", sendMessage $ JumpToLayout "Grid")
    --     , ("M-b", sendMessage $ JumpToLayout "BSP")
    --     , ("M-p", spawn "rofi -show drun") -- rofi
    --     , ("S-M-t", withFocused $ windows . W.sink) -- flatten floating window to tiled
    --     , ("M-C-<Space>", namedScratchpadAction myScratchpads "terminal")
    --     , ("M-C-<Return>", namedScratchpadAction myScratchpads "emacs-scratch")
    --    ]
    
    myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
      ----------------------------------------------------------------------
      -- SUPER + FUNCTION KEYS
    
      [ ((modMask, xK_d ), spawn $ "dmenu_run -i -nb '#191919' -nf '#fea63c' -sb '#fea63c' -sf '#191919' -fn 'NotoMonoRegular:bold:pixelsize=15'")
      --, ((modMask, xK_f), sendMessage ToggleGaps >> spawn "polybar-msg cmd toggle" )
      --, ((modMask, xK_b), sendMessage $ Toggle NBFULL)
      , ((modMask, xK_a), sendMessage MirrorExpand )
      , ((modMask, xK_z), sendMessage MirrorShrink )
      , ((modMask, xK_s), sendMessage ToggleStruts )
      , ((modMask, xK_f), sendMessage $ JumpToLayout "Full" )
      , ((modMask, xK_t), sendMessage $ JumpToLayout "Tall" ) 
      , ((modMask, xK_g), sendMessage $ JumpToLayout "Grid" ) 
      , ((modMask, xK_b), sendMessage $ JumpToLayout "BSP" ) 
      , ((modMask, xK_Return), spawn $ "alacritty" )
      , ((modMask, xK_q), kill )
      , ((modMask, xK_space), spawn $ "rofi -show drun" )
      , ((modMask, xK_x), spawn $ "arcolinux-logout" )
      , ((modMask, xK_Escape), spawn $ "xkill" )
      , ((modMask, xK_e), spawn $ "" )
      , ((modMask, xK_y), spawn $ "polybar-msg cmd toggle" )
      --, ((modMask, xK_s ), spawn $ "")
      --, ((modMask, xK_v), spawn $ "" )
      --, ((modMask, xK_c), spawn $ "conky-toggle" )
      
    
      -- FUNCTION KEYS
      , ((0, xK_F12), spawn $ "xfce4-terminal --drop-down" )
    
      -- SUPER + SHIFT KEYS
    
      
      , ((modMask .|. shiftMask , xK_r ), spawn $ "xmonad --recompile && xmonad --restart")
      , ((modMask .|. shiftMask , xK_q ), kill)
      , ((modMask .|. shiftMask , xK_Return ), spawn $ "termite")
      --, ((modMask .|. shiftMask , xK_h ), spawn $ "betterlockscreen -l && arcolinux-logout && xdotool key h"   )
      -- , ((modMask .|. shiftMask , xK_x ), io (exitWith ExitSuccess))
    
     
      -- CONTROL + KEYS
        
    
      -- CONTROL + ALT KEYS
      , ((controlMask .|. mod1Mask , xK_l), spawn $ "betterlockscreen -l")
      , ((controlMask .|. mod1Mask , xK_v ), spawn $ "virt-manager")
      , ((controlMask .|. mod1Mask , xK_Prior ), spawn $ "conky-rotate -p")
      , ((controlMask .|. mod1Mask , xK_a ), spawn $ "xfce4-appfinder")
      , ((controlMask .|. mod1Mask , xK_b ), spawn $ "brave")
      , ((controlMask .|. mod1Mask , xK_e ), spawn $ "thunar")
      , ((controlMask .|. mod1Mask , xK_w ), spawn $ "waterfox-g4")
      --, ((controlMask .|. mod1Mask , xK_ ), spawn $ "")
      , ((controlMask .|. mod1Mask , xK_f ), spawn $ "firefox")
      , ((controlMask .|. mod1Mask , xK_t ), spawn $ "telegram-desktop")
      , ((controlMask .|. mod1Mask , xK_s ), spawn $ "signal-desktop")
      --, ((controlMask .|. mod1Mask , xK_v ), spawn $ "pavucontrol")
      --, ((controlMask .|. mod1Mask , xK_t ), spawn $ "xfce4-terminal")
      --, ((controlMask .|. mod1Mask , xK_i ), spawn $ "nitrogen")
      --, ((controlMask .|. mod1Mask , xK_r ), spawn $ "rofi-theme-selector")
      --, ((controlMask .|. mod1Mask , xK_o ), spawn $ "$HOME/.xmonad/scripts/picom-toggle.sh")
      --, ((controlMask .|. mod1Mask , xK_c ), spawn $ "catfish")
      --, ((controlMask .|. mod1Mask , xK_k ), spawn $ "arcolinux-logout")
      --, ((controlMask .|. mod1Mask , xK_l ), spawn $ "arcolinux-logout")
      --, ((controlMask .|. mod1Mask , xK_Next ), spawn $ "conky-rotate -n")
      
      
      -- ALT + ... KEYS
    
      , ((mod1Mask, xK_n), spawn $ "variety -n" )
      , ((mod1Mask, xK_F3), spawn $ "xfce4-appfinder" )
      , ((mod1Mask, xK_p), spawn $ "variety -p" )
      , ((mod1Mask, xK_r), spawn $ "xmonad --restart" )
      --, ((mod1Mask, xK_f), spawn $ "variety -f" )
      --, ((mod1Mask, xK_t), spawn $ "variety -t" )
      --, ((mod1Mask, xK_Up), spawn $ "variety --pause" )
      --, ((mod1Mask, xK_Down), spawn $ "variety --resume" )
      --, ((mod1Mask, xK_Left), spawn $ "variety -p" )
      --, ((mod1Mask, xK_Right), spawn $ "variety -n" )
      --, ((mod1Mask, xK_F2), spawn $ "xfce4-appfinder --collapsed" )
    
      --VARIETY KEYS WITH PYWAL
    
      --, ((mod1Mask .|. shiftMask , xK_f ), spawn $ "variety -f && wal -i $(cat $HOME/.config/variety/wallpaper/wallpaper.jpg.txt)&")
      --, ((mod1Mask .|. shiftMask , xK_n ), spawn $ "variety -n && wal -i $(cat $HOME/.config/variety/wallpaper/wallpaper.jpg.txt)&")
      --, ((mod1Mask .|. shiftMask , xK_p ), spawn $ "variety -p && wal -i $(cat $HOME/.config/variety/wallpaper/wallpaper.jpg.txt)&")
      --, ((mod1Mask .|. shiftMask , xK_t ), spawn $ "variety -t && wal -i $(cat $HOME/.config/variety/wallpaper/wallpaper.jpg.txt)&")
      --, ((mod1Mask .|. shiftMask , xK_u ), spawn $ "wal -i $(cat $HOME/.config/variety/wallpaper/wallpaper.jpg.txt)&")
    
      --CONTROL + SHIFT KEYS
      --, ((mod1Mask .|. shiftMask , xK_Return ), spawn $ ""
      
    
      --SCREENSHOTS
    
      , ((0, xK_Print), spawn $ "flameshot gui")
      --, ((0, xK_Print), spawn $ "scrot 'ArcoLinux-%Y-%m-%d-%s_screenshot_$wx$h.jpg' -e 'mv $f $$(xdg-user-dir PICTURES)'")
      , ((controlMask, xK_Print), spawn $ "xfce4-screenshooter" )
      , ((controlMask .|. shiftMask , xK_Print ), spawn $ "xfce4-screenshooter -r -c")
    
    
      --MULTIMEDIA KEYS
    
      -- Mute volume
      , ((0, xF86XK_AudioMute), spawn $ "amixer -q set Master toggle")
    
      -- Decrease volume
      , ((0, xF86XK_AudioLowerVolume), spawn $ "amixer -q set Master 5%-")
    
      -- Increase volume
      , ((0, xF86XK_AudioRaiseVolume), spawn $ "amixer -q set Master 5%+")
    
      -- Increase brightness
      , ((0, xF86XK_MonBrightnessUp),  spawn $ "light -A 5")
    
      -- Decrease brightness
      , ((0, xF86XK_MonBrightnessDown), spawn $ "light -U 5")
    
    --  , ((0, xF86XK_AudioPlay), spawn $ "mpc toggle")
    --  , ((0, xF86XK_AudioNext), spawn $ "mpc next")
    --  , ((0, xF86XK_AudioPrev), spawn $ "mpc prev")
    --  , ((0, xF86XK_AudioStop), spawn $ "mpc stop")
    
      , ((0, xF86XK_AudioPlay), spawn $ "playerctl play-pause")
      , ((0, xF86XK_AudioNext), spawn $ "playerctl next")
      , ((0, xF86XK_AudioPrev), spawn $ "playerctl previous")
      , ((0, xF86XK_AudioStop), spawn $ "playerctl stop")
    
    
      --------------------------------------------------------------------
      --  XMONAD LAYOUT KEYS
    
      -- Cycle through the available layout algorithms.
      , ((modMask .|. shiftMask , xK_l), sendMessage NextLayout )
    
      --Focus selected desktop
      , ((mod1Mask, xK_Tab), windows W.focusDown)
    
      --Focus selected desktop
      , ((modMask, xK_Tab), nextWS)
    
      --Focus selected desktop
      , ((controlMask .|. mod1Mask , xK_Left ), prevWS)
    
      --Focus selected desktop
      , ((controlMask .|. mod1Mask , xK_Right ), nextWS)
    
      --  Reset the layouts on the current workspace to default.
      , ((modMask .|. shiftMask, xK_space), setLayout $ XMonad.layoutHook conf)
    
      -- Move focus to the next window.
      , ((modMask, xK_j), windows W.focusDown)
    
      -- Move focus to the previous window.
      , ((modMask, xK_k), windows W.focusUp  )
    
      -- Move focus to the master window.
      , ((modMask .|. shiftMask, xK_m), windows W.focusMaster  )
    
      -- Swap the focused window with the next window.
      , ((modMask .|. shiftMask, xK_j), windows W.swapDown  )
    
      -- Swap the focused window with the next window.
      , ((controlMask .|. modMask, xK_Down), windows W.swapDown  )
    
      -- Swap the focused window with the previous window.
      , ((modMask .|. shiftMask, xK_k), windows W.swapUp    )
    
      -- Swap the focused window with the previous window.
      , ((controlMask .|. modMask, xK_Up), windows W.swapUp  )
    
      -- Shrink the master area.
      , ((controlMask .|. shiftMask , xK_h), sendMessage Shrink)
    
      -- Expand the master area.
      , ((controlMask .|. shiftMask , xK_l), sendMessage Expand)
    
      -- Push window back into tiling.
      , ((modMask .|. shiftMask , xK_t), withFocused $ windows . W.sink)
    
      -- Increment the number of windows in the master area.
      , ((controlMask .|. modMask, xK_Left), sendMessage (IncMasterN 1))
    
      -- Decrement the number of windows in the master area.
      , ((controlMask .|. modMask, xK_Right), sendMessage (IncMasterN (-1)))
    
      ]
      ++
    
      -- mod-[1..9], Switch to workspace N
      -- mod-shift-[1..9], Move client to workspace N
      [((m .|. modMask, k), windows $ f i)
    
      --Keyboard layouts
      --qwerty users use this line
       | (i, k) <- zip (XMonad.workspaces conf) [xK_1,xK_2,xK_3,xK_4,xK_5,xK_6,xK_7,xK_8,xK_9,xK_0]
    
           , (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)
          , (\i -> W.greedyView i . W.shift i, shiftMask)]]
    
      -- ++
      -- ctrl-{w,e,r}, Switch to physical/Xinerama screens 1, 2, or 3
      -- ctrl-shift-{w,e,r}, Move client to screen 1, 2, or 3
      --[((m .|. controlMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
      --    | (key, sc) <- zip [xK_w, xK_e] [0..]
      --    , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
    
    
    ------------------------------------------------------------------------
    -- scratchpads
    ------------------------------------------------------------------------
    
    --myScratchpads = [ NS "terminal" spawnTerm findTerm manageTerm
    --              , NS "emacs-scratch" spawnEmacsScratch findEmacsScratch manageEmacsScratch
    --                ] 
    --    where
    --    role = stringProperty "WM_WINDOW_ROLE"
    --    spawnTerm = myTerminal ++  " -name scratchpad"
    --    findTerm = resource =? "scratchpad"
    --    manageTerm = nonFloating
    --    findEmacsScratch = title =? "emacs-scratch"
    --    spawnEmacsScratch = "emacsclient -a='' -nc --frame-parameters='(quote (font . \"Inconsolata:size=24:weight=regular:antialias=true:hinting=true:hintstyle=hintfull\")(name . \"emacs-scratch\"))'"
    --    manageEmacsScratch = nonFloating
        
    ------------------------------------------------------------------------
    -- main
    ------------------------------------------------------------------------
    main :: IO ()
    main = do
        dbus <- D.connectSession
        -- Request access to the DBus name
        D.requestName dbus (D.busName_ "org.xmonad.Log")
            [D.nameAllowReplacement, D.nameReplaceExisting, D.nameDoNotQueue]
    
        
        
        xmonad $ withUrgencyHook LibNotifyUrgencyHook $ ewmh desktopConfig
            { manageHook = ( isFullscreen --> doFullFloat ) <+> manageDocks <+> myManageHook <+> manageHook desktopConfig
            , startupHook        = myStartupHook
            , layoutHook         = myLayout
            , handleEventHook    = handleEventHook desktopConfig
            , workspaces         = myWorkspaces
            , borderWidth        = myBorderWidth
            , terminal           = myTerminal
            , modMask            = myModMask
            , normalBorderColor  = normBord
            , focusedBorderColor = focdBord
            , logHook            = updatePointer (0.25, 0.25) (0.25, 0.25)
            , keys = myKeys
            , mouseBindings = myMouseBindings
            }
    
    • 0

相关问题

  • Nftables 配置错误:指定的协议冲突:inet-service v. icmp

  • archlinux efi netboot 内核“ip”不起作用?systemd "启动 Switch Root 失败。"

  • 如何在 Arch Linux 上设置音频,支持多个程序同时发出音频而不创建 asoundrc?

  • 为什么有时需要手动导入密钥?

  • 在启动时加载设备

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    模块 i915 可能缺少固件 /lib/firmware/i915/*

    • 3 个回答
  • Marko Smith

    无法获取 jessie backports 存储库

    • 4 个回答
  • Marko Smith

    如何将 GPG 私钥和公钥导出到文件

    • 4 个回答
  • Marko Smith

    我们如何运行存储在变量中的命令?

    • 5 个回答
  • Marko Smith

    如何配置 systemd-resolved 和 systemd-networkd 以使用本地 DNS 服务器来解析本地域和远程 DNS 服务器来解析远程域?

    • 3 个回答
  • Marko Smith

    dist-upgrade 后 Kali Linux 中的 apt-get update 错误 [重复]

    • 2 个回答
  • Marko Smith

    如何从 systemctl 服务日志中查看最新的 x 行

    • 5 个回答
  • Marko Smith

    Nano - 跳转到文件末尾

    • 8 个回答
  • Marko Smith

    grub 错误:你需要先加载内核

    • 4 个回答
  • Marko Smith

    如何下载软件包而不是使用 apt-get 命令安装它?

    • 7 个回答
  • Martin Hope
    user12345 无法获取 jessie backports 存储库 2019-03-27 04:39:28 +0800 CST
  • Martin Hope
    Carl 为什么大多数 systemd 示例都包含 WantedBy=multi-user.target? 2019-03-15 11:49:25 +0800 CST
  • Martin Hope
    rocky 如何将 GPG 私钥和公钥导出到文件 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Evan Carroll systemctl 状态显示:“状态:降级” 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim 我们如何运行存储在变量中的命令? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S 为什么 /dev/null 是一个文件?为什么它的功能不作为一个简单的程序来实现? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 如何从 systemctl 服务日志中查看最新的 x 行 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - 跳转到文件末尾 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla 为什么真假这么大? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis 在一个巨大的(70GB)、一行、文本文件中替换字符串 2017-12-30 06:58:33 +0800 CST

热门标签

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve