From 76cb1ea2e2c8a7100e8d6086cb721a3a737c6993 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Wed, 4 Jul 2018 13:28:44 +0200 Subject: Disable GTK3 menu bar window dragging …this was a _joy_ to debug. Who would have thought that the GTK3 default interferred with window management to that extend. --- gui/conf/xmonad.hs | 11 +++++------ gui/gtk.nix | 11 +++++++++-- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gui/conf/xmonad.hs b/gui/conf/xmonad.hs index d451913..9354c6d 100644 --- a/gui/conf/xmonad.hs +++ b/gui/conf/xmonad.hs @@ -73,7 +73,7 @@ scratchpads = [ NS "terminal" "kitty --class=scratchterm" (className =? "scratch , NS "messaging" "telegram-desktop" (className =? "TelegramDesktop") (customFloating sideBarRight) ] -keybindings = +customKeybindings = -- xmonad session control [ ("C-M1-" , io (exitWith ExitSuccess)) , ("C-M1-" , spawn "xmonad --restart") @@ -126,8 +126,7 @@ keybindings = , ("M-c " , spawn "amixer sset Master 10%-") , ("M-c m" , spawn "amixer sset Master toggle") ] -mousebindings :: XConfig Layout -> M.Map (KeyMask, Button) (Window -> X ()) -mousebindings (XConfig {XMonad.modMask = modMask}) = M.fromList +customMousebindings (XConfig {XMonad.modMask = modMask}) = M.fromList [ ((modMask .|. shiftMask, button1), \w -> XMonad.focus w >> mouseMoveWindow w) , ((modMask .|. shiftMask, button3), \w -> XMonad.focus w >> mouseResizeWindow w) ] @@ -153,9 +152,9 @@ main = xmonad $ ewmh , borderWidth = 3 , normalBorderColor = "#161616" , focusedBorderColor = "#909636" - , keys = \c -> mkKeymap c keybindings - , mouseBindings = mousebindings - , startupHook = return () >> checkKeymap def keybindings + , keys = \c -> mkKeymap c customKeybindings + , mouseBindings = customMousebindings + , startupHook = return () >> checkKeymap def customKeybindings , handleEventHook = customEventHook , manageHook = customManageHook , logHook = customLogHook diff --git a/gui/gtk.nix b/gui/gtk.nix index 1a6a0ff..f373cd9 100644 --- a/gui/gtk.nix +++ b/gui/gtk.nix @@ -51,8 +51,15 @@ package = pkgs.iosevka; }; - gtk3.extraConfig = { - gtk-decoration-layout = ""; + gtk3 = { + extraConfig = { + gtk-decoration-layout = ""; + }; + extraCss = '' + menubar, .menubar { + -GtkWidget-window-dragging: false; + } + ''; }; }; -- cgit v1.2.3