Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to work with Wine app? #424

Closed
3 tasks done
DreamPy opened this issue Oct 26, 2022 · 19 comments
Closed
3 tasks done

How to work with Wine app? #424

DreamPy opened this issue Oct 26, 2022 · 19 comments

Comments

@DreamPy
Copy link

DreamPy commented Oct 26, 2022

Problem Description

Best practices for using Wine with xmonad ? ask for help, thanks

Steps to Reproduce

Give detailed step-by-step instructions on how to reproduce the problem.

Configuration File

Please include the smallest full configuration file that reproduces
the problem you are experiencing:

module Main (main) where

import XMonad

main :: IO ()
main = xmonad def

Checklist

  • I've read CONTRIBUTING.md

  • I tested my configuration

    • With xmonad version XXX (commit XXX if using git)
    • With xmonad-contrib version XXX (commit XXX if using git)
@slotThe
Copy link
Member

slotThe commented Oct 26, 2022

Just... use it? What problems are you having?

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022 via email

@slotThe
Copy link
Member

slotThe commented Oct 26, 2022

As in, it's floating? Or that XMonad ignores it entirely? Do you have a screenshot available? Does this really happen with just main = xmonad def as your config?

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022 via email

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022 via email

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

image

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

As in, it's floating? Or that XMonad ignores it entirely? Do you have a screenshot available? Does this really happen with just main = xmonad def as your config?
This is the screenshot of installing and using xmonad and wine wechat under Ubuntu. Thanks for your help

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

I have also tried manjaro plasma and kubuntu, both of which have this problem

@slotThe
Copy link
Member

slotThe commented Oct 26, 2022 via email

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

v

On Wed, Oct 26 2022 02:13, LiXu wrote: I have also tried manjaro plasma and kubuntu, both of which have this problem
So this is not xmonad-exclusive? Sounds like a problem with your general setup in that case, which could be quite difficult to debug. I can't really tell what I'm looking at in the screenshot; is the black background the wallpaper? How does opening a normal window look? And what do you mean by you "put it in a floating layout"?

I'm not very good at Linux. I've tried a lot, but I haven't solved the problem of using the wine (wechat application) application. So I came here for help. I immediately provided a screenshot of the regular window and the wine window on kubuntu, as well as the configuration file for personal use. Sorry, I'm not very good at English

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

---IMPORTS

    -- Base
import XMonad hiding ( (|||) ) -- 'hiding' because there is a conflict with LayoutCombinators
import XMonad.Config.Desktop
import Data.Monoid
import Data.Maybe (isJust)
import System.IO (hPutStrLn)
import System.Exit (exitSuccess)
import Control.Monad (liftM2)
import qualified XMonad.StackSet as W
import qualified Data.Map as M

    -- Utils
import XMonad.Util.SpawnOnce
import XMonad.Util.Run (runInTerm, spawnPipe)
import XMonad.Util.Loggers
import XMonad.Util.EZConfig (additionalKeysP, removeKeysP) --For parsing keybindigs in a different format
import XMonad.Util.NamedScratchpad

    -- Hooks
import XMonad.Hooks.DynamicLog (dynamicLogWithPP, wrap, pad, xmobarPP, xmobarColor, shorten, PP(..))
import XMonad.Hooks.ManageDocks (manageDocks, avoidStruts, ToggleStruts(..))
import XMonad.Hooks.ManageHelpers (isFullscreen, doFullFloat)
import XMonad.Hooks.EwmhDesktops --Useful with some applications

    -- Actions
import XMonad.Actions.Promote --Promotes the focused window to the master pane
import XMonad.Actions.RotSlaves (rotSlavesDown, rotAllDown)
import XMonad.Actions.CopyWindow (kill1, copyToAll, killAllOtherCopies, runOrCopy) -- Bindings to duplicate a window on multiple workspaces
import XMonad.Actions.WithAll (sinkAll, killAll)
import XMonad.Actions.CycleWS (moveTo, shiftTo, WSType(..), nextScreen, prevScreen, shiftNextScreen, shiftPrevScreen)
import XMonad.Actions.Submap --Create sub-maps of key bindings
import XMonad.Actions.MouseResize --Resizes windows with the mouse
import qualified XMonad.Actions.Search as S

    -- Layouts
import XMonad.Layout.GridVariants (Grid(Grid)) --Grid Layout
import XMonad.Layout.SimplestFloat --Float Layout
import XMonad.Layout.ThreeColumns --ThreeColums Layout
import XMonad.Layout.ResizableTile
import XMonad.Layout.Renamed (renamed, Rename(CutWordsLeft, Replace))
import XMonad.Layout.Spacing (Spacing, Border(..), spacingRaw)
import XMonad.Layout.NoBorders
import XMonad.Layout.PerWorkspace
import XMonad.Layout.LimitWindows (limitWindows, increaseLimit, decreaseLimit) --Set limits to the number of windows that can be shown
import XMonad.Layout.WindowArranger (windowArrange, WindowArrangerMsg(..)) --Resize windows in any Layout
import XMonad.Layout.MultiToggle (mkToggle, single, EOT(EOT), Toggle(..), (??))
import XMonad.Layout.MultiToggle.Instances (StdTransformers(NBFULL, MIRROR, NOBORDERS))
import XMonad.Layout.LayoutCombinators --Comine Layouts and Jump directly to a Layout

    -- Prompts
import XMonad.Prompt
import XMonad.Prompt.Shell

    -- Pywal Colors
import Colors
-- jwt app error
import XMonad.Hooks.SetWMName
import XMonad.Actions.CycleWS

import XMonad.Actions.GridSelect
import XMonad.Config.Kde
import Control.Monad
import Data.Maybe
------------------------------------------------------------------------
---VARIABLES


myFont          = "xft:noto sans:pixelsize=8"
myModMask       = mod4Mask
myTerminal      = "alacritty"
myTextEditor    = "vim"
myBrowser       = "qutebrowser"
myBorderWidth   = 2
myScreenshot = "flameshot gui -p ~/.config/captures"
windowCount     = gets $ Just . show . length . W.integrate' . W.stack . W.workspace . W.current . windowset

myPyLab = "alacritty --class=LxIpython,LxIpython -e python"
myLauncher = "~/.config/rofi/launch"
myWindow = "~/.config/rofi/window"
myScreenLocker = "betterlockscreen -l dimblur"
------------------------------------------------------------------------
---MAIN = DO
addNETSupported :: Atom -> X ()
addNETSupported x   = withDisplay $ \dpy -> do
    r               <- asks theRoot
    a_NET_SUPPORTED <- getAtom "_NET_SUPPORTED"
    a               <- getAtom "ATOM"
    liftIO $ do
       sup <- (join . maybeToList) <$> getWindowProperty32 dpy a_NET_SUPPORTED r
       when (fromIntegral x `notElem` sup) $
         changeProperty32 dpy r a_NET_SUPPORTED a propModeAppend [fromIntegral x]
addEWMHFullscreen :: X ()
addEWMHFullscreen   = do
    wms <- getAtom "_NET_WM_STATE"
    wfs <- getAtom "_NET_WM_STATE_FULLSCREEN"
    mapM_ addNETSupported [wms, wfs]

main = do
    xmproc <- spawnPipe "xmobar -x 0 $HOME/.config/xmobar/xmobarrc"
    xmonad  $ (ewmhFullscreen . ewmh) kdeConfig
        { manageHook = ( isFullscreen --> doFullFloat ) <+> myManageHook <+> manageDocks
        , modMask            = myModMask
        , terminal           = myTerminal
        , startupHook        = myStartupHook <+> setWMName "LG3D"
        , layoutHook         = myLayout
        , workspaces         = myWorkspaces
        , focusFollowsMouse  = False
        , handleEventHook    = handleEventHook desktopConfig
        , borderWidth        = myBorderWidth
        , normalBorderColor  = color0
        , focusedBorderColor = color2
        , keys               = myExtraKeys
        , logHook = dynamicLogWithPP xmobarPP
                        { ppOutput = \x -> hPutStrLn xmproc x                             -- Workspace StOut
                        , ppCurrent = xmobarColor color1  "" . wrap " \xf7a5 " "\xf7a5 "  -- Current workspace in xmobar - Wrap under Font Awesome's grip-lines-vertical
                        , ppVisible = xmobarColor color2 ""                               -- Visible but not current workspace
                        , ppHidden = xmobarColor color2 "" . wrap "" ""                   -- Hidden workspaces in xmobar
                        , ppHiddenNoWindows = xmobarColor color7 ""                       -- Hidden workspaces (no windows)
                        , ppTitle = xmobarColor color7 "" . shorten 80                    -- Title of active window in xmobar
                        , ppSep =  xmobarColor color7 "" " | "                            -- Separators in xmobar
                        , ppLayout = xmobarColor color2 ""                                -- Layout name format
                        , ppUrgent = xmobarColor color3 "" . wrap "!" "!"                 -- Urgent workspace
                        , ppExtras  = [windowCount]                                       -- Number of windows in the current workspace
                        , ppOrder  = \(ws:l:t:ex) -> [ws,l]++ex++[t]                      -- Orders xmobar Output
           --             , ppSort = fmap (.namedScratchpadFilterOutWorkspace) $ ppSort xmobarPP -- Hides the 'NSP' workspace created by opening a Scratchpad
                        }
        } `additionalKeysP`         myKeys   `removeKeysP` myRemovedKeys

------------------------------------------------------------------------
---STARTUP

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

            -- spawn "bash $HOME/.config/conky/launch.sh"
            -- -- spawn "fcitx5"
            -- spawn "feh --recursive --bg-fill --randomize $HOME/.config/wallpaper"
            -- spawn "picom -b"
            -- spawn "bash /$HOME/.config/polybar/launch.sh "
            -- spawn "vmware-user-suid-wrapper"
            -- spawn "systemctl start --user emacs.service"
            -- spawn "bash $HOME/.config/redshift/launch.sh"

------------------------------------------------------------------------
---KEYBINDINGS
myRemovedKeys = [
  "M-S-q" -- default exit xmonad
                ]
myKeys =
    -- XMonad
        [ ("M-x r", spawn "xmonad --recompile")      -- Recompiles xmonad
        , ("M-x S-r", spawn "xmonad --restart")        -- Restarts xmonad
        , ("M-x q", io exitSuccess)                -- Quits xmonad
--        , ("M-S-q s", spawn "poweroff")              -- Shutdown
--        , ("M-S-q r", spawn "reboot")                -- Reboot

    -- Windows
        , ("M-w", kill1)                           -- Kill the currently focused client
        , ("M-x S-w", killAll)                         -- Kill all the windows on current workspace
    -- Launcher
        , ("M-;", spawn myLauncher)
        , ("M-'", spawn myWindow)
    -- Floating
        , ("M-<Delete>", withFocused $ windows . W.sink)  -- Push floating window back to tile.
        , ("M-S-<Delete>", sinkAll)                  -- Push ALL floating windows back to tile.

    -- Windows navigation
        , ("M-m", windows W.focusMaster)             -- Move focus to the master window
        , ("M-j", windows W.focusDown)               -- Move focus to the next window
        , ("M-k", windows W.focusUp)                 -- Move focus to the prev window
        , ("M-S-m", windows W.swapMaster)
        -- Swap the focused window and the master window
        , ("M-S-j", windows W.swapDown)              -- Swap the focused window with the next window
        , ("M-S-k", windows W.swapUp)                -- Swap the focused window with the prev window
        , ("M-<Tab>", promote)                       -- Promote focused window to master, changing order
        , ("M-<Backspace>", rotSlavesDown)           -- Rotate all windows except master and keep focus in place
        , ("M-S-<Backspace>", rotAllDown)                 -- Rotate all the windows in the current stack
        -- TODO what is window copy?
        -- , ("M-M1-x", killAllOtherCopies)             -- Kill all 'other' copies of the focused window

    -- Layouts
        , ("M-S--", sendMessage Shrink)                                    --Shrink Focused Window
        , ("M-S-=", sendMessage Expand)                                    --Expand Focused Window
        , ("M-d", sendMessage $ JumpToLayout "tall")                       -- Jump to the 'tall' layout aka the 'default' layout
        -- , ("M-f", send Message $ JumpToLayout "monocle")                    -- Jump to the 'monocle' layout
        -- , ("M-g", sendMessage $ JumpToLayout "grid")                       -- Jump to the 'grid' layout
        -- , ("M-s", sendMessage $ JumpToLayout "threeCol")                   -- Jump to the 'threeCol' layout
        -- , ("M-a", sendMessage $ Toggle MIRROR)                               -- Toggles Mirror Layouts
        -- , ("M-S-=", sendMessage ToggleStruts)                              -- Toggles struts
        -- , ("M-S-b", sendMessage $ Toggle NOBORDERS)                        -- Toggles noborder
        , ("M-<Space>", sendMessage NextLayout)
        , ("M-f", sendMessage (Toggle NBFULL)) -- Toggles noborder/full
        , ("M-S-f", sendMessage (Toggle NBFULL) >> sendMessage ToggleStruts) -- Toggles noborder/full
        -- TODO what is master panel
        -- , ("M-<KP_Multiply>", sendMessage (IncMasterN 1))   -- Increase number of clients in the master pane
        -- , ("M-<KP_Divide>", sendMessage (IncMasterN (-1)))  -- Decrease number of clients in the master pane
        -- , ("M-S-<KP_Multiply>", increaseLimit)              -- Increase number of windows that can be shown
        --, ("M-S-<KP_Divide>", decreaseLimit)                -- Decrease number of windows that can be shown

    -- Workspaces

        -- , ("M-<XF86Forward>", moveTo Next nonNSP)                           -- Move to the next workspace
        -- , ("M-<XF86Back>", moveTo Prev nonNSP)                              -- Move to the previous workspace
        -- , ("M-S-<XF86Forward>", shiftTo Next nonNSP >> moveTo Next nonNSP)  -- Shifts focused window to next workspace
        -- , ("M-S-<XF86Back>", shiftTo Prev nonNSP >> moveTo Prev nonNSP)     -- Shifts focused window to previous workspace
        , ("M-h", moveTo Prev nonNSP)                                       -- Move to the previous workspace
        , ("M-l", moveTo Next nonNSP)                                       -- Move to the next workspace
        , ("M-S-l", shiftTo Next nonNSP >> moveTo Next nonNSP)              -- Shifts focused window to next workspace
        , ("M-S-h", shiftTo Prev nonNSP >> moveTo Prev nonNSP)              -- Shifts focused window to previous workspace
        , ("M-[",     toggleWS' ["NSP"])                                    -- Move to last workspace
    -- Scratchpads
        , ("M-]", namedScratchpadAction myScratchPads "drop_down")
        , ("M-\\", namedScratchpadAction myScratchPads "emacs")
        , ("M-M1-]", namedScratchpadAction myScratchPads "youdao")
        , ("M-M1-\\", namedScratchpadAction myScratchPads "dingtalk")
        , ("M-M1-p", namedScratchpadAction myScratchPads "wechat")
        , ("M-M1-o", namedScratchpadAction myScratchPads "full_width_terminal")
--        , ("M-C-<Return>", namedScratchpadAction myScratchPads "vifm")
--        , ("M-M1-c", namedScratchpadAction myScratchPads "calcurse")



    -- Flame shot
        , ("M-S-s", spawn myScreenshot)
        -- Grid Select
        , ("M-S-g",  goToSelected def)

    -- Screen lock
        , ("M-/", spawn myScreenLocker)
    -- Terminal
        , ("M-<Return>", spawn myTerminal)
        , ("M-S-<Return>", shellPrompt myXPConfig) --Shell Prompt


        ]
        -- TODO don't know !!!
        -- ++ [("M-p " ++ k, S.promptSearchBrowser myXPConfig myBrowser f) | (k,f) <- searchList ] --Search Prompt Keybindings
        -- ++ [("M-S-p " ++ k, S.selectSearchBrowser myBrowser f) | (k,f) <- searchList ]
          where nonNSP          = WSIs (return (\ws -> W.tag ws /= "NSP"))
                nonEmptyNonNSP  = WSIs (return (\ws -> isJust (W.stack ws) && W.tag ws /= "nsp"))

myExtraKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $

  -- 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]

  --French Azerty users use this line
  -- | (i, k) <- zip (XMonad.workspaces conf) [xK_ampersand, xK_eacute, xK_quotedbl, xK_apostrophe, xK_parenleft, xK_minus, xK_egrave, xK_underscore, xK_ccedilla , xK_agrave]

  --Belgian Azerty users use this line
  -- | (i, k) <- zip (XMonad.workspaces conf) [xK_ampersand, xK_eacute, xK_quotedbl, xK_apostrophe, xK_parenleft, xK_section, xK_egrave, xK_exclam, xK_ccedilla, xK_agrave]

      , (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 .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
      | (key, sc) <- zip [xK_q, xK_e] [0..]
      , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]



------------------------------------------------------------------------
---WORKSPACES

-- xmobarEscape = concatMap doubleLts
--  where
--        doubleLts '<' = "<<"
--        doubleLts x   = [x]

mySpacesO = [
         "\xf120", --Terminal
         "\xf26b", --Web
         "\xf1d9", --Read
         "\xf21e", --Emacs
         "\xf7a2", --Heart
         "\xf11b", --Game
         "\xf86a", --Video
         "\xf001", --Music
         "\xf26c"  --Sync
           ] -- Using Font Awesome
mySpaces   = ["\61612","\61899","\61947","\61635","\61502","\61501","\61705","\61564","\62150","\61872"]


myWorkspaces :: [String]
myWorkspaces =  mySpaces

myManageHook :: Query (Data.Monoid.Endo WindowSet)
myManageHook = composeAll

-- To find the property name associated with a program, use
-- -- > xprop | grep WM_CLASS
-- -- and click on the client you're interested in.

-- To work on CLI programs, you need to use the window title in 'title' intead of
-- -- 'className' as used below.

     [
        className =? "Brave-browser"     --> doShift (mySpaces !! 1)
      , className =? "Tor Browser"       --> doShift (mySpaces !! 1)
      , className =? "qutebrowser"       --> viewShift (mySpaces !! 1)
      , title =? "newsboat"              --> doShift (mySpaces !! 2)
      -- , className =? "Emacs"             --> viewShift (mySpaces !! 3)
      , title =? "neomutt"               --> doShift (mySpaces !! 4)
      , className =? "Zulip"             --> doShift (mySpaces !! 4)
      , className =? "discord"           --> doShift (mySpaces !! 4)
      , className =? "Steam"             --> doShift (mySpaces !! 5)
      , className =? "mpv"               --> viewShift (mySpaces !! 6)
      , className =? "qBittorrent"       --> doShift (mySpaces !! 8)
      , className =? "FireDragon"       --> viewShift (mySpaces !! 1)
      -- , className =? "DingTalk"      --> doShift (mySpaces !! 3)
      -- , className =? "weixin"      --> doIgnore

     ] <+> namedScratchpadManageHook myScratchPads
        where viewShift = doF . liftM2 (.) W.greedyView W.shift

------------------------------------------------------------------------
---LAYOUTS

myLayout = onWorkspace (mySpaces !! 6) monocle $
         avoidStruts $ smartBorders $ mouseResize $ windowArrange $ mkToggle (NBFULL ?? NOBORDERS ?? EOT) $
           onWorkspace (mySpaces !! 1) threeCol $
           myDefaultLayout
             where
                 myDefaultLayout = mkToggle (single MIRROR) (tall ||| monocle ||| threeCol ||| grid)

tall       = renamed [Replace "tall"]     $ limitWindows 12 $ mySpacing $ ResizableTall 1 (3/100) (1/2) []
monocle    = renamed [Replace "monocle"]  $ limitWindows 20 $ noBorders Full
grid       = renamed [Replace "grid"]     $ limitWindows 12 $ mySpacing $ Grid (16/10)
threeCol   = renamed [Replace "threeCol"] $ limitWindows 3  $ mySpacing $ ThreeColMid 1 (3/100) (1/2)

mySpacing = spacingRaw
        moreThanTwo
        screenBorder
        boolScreenBorder
        windowBorder
        boolWindowBorder
   where
    moreThanTwo = True
    boolWindowBorder = True
    boolScreenBorder = True
    windowBorder = Border 4 4 4 4
    screenBorder = Border 2 2 2 2
--Border :: top bottom right left

------------------------------------------------------------------------
---SCRATCHPADS

myScratchPads = [ NS "terminal" spawnTerm findTerm manageTerm,
                  NS "taskell" spawnTaskell findTaskell manageTaskell,
                  NS "cmus" spawnCmus findCmus manageCmus,
                  NS "vifm" spawnVifm findVifm manageVifm,
                  NS "calcurse" spawnCalcurse findCalcurse manageCalcurse,
                  NS "bashtop" "alacritty -e bashtop &" (title =? "BashTOP")
                     (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3)) ,
                  NS "emacs" "dex ~/.local/share/applications/spacemacs.desktop" (title =? "spacemacs")
                     spacemacsT ,
                  NS "ipython" myPyLab (className =? "LxIpython")
                     (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3)) ,
                  NS "full_width_terminal" "alacritty --class==LxFullWidth,LxFullWidth &" (className =? "LxFullWidth")
                     (customFloating $ W.RationalRect (1/1000) (1/1000) (1/4) (4/5)) ,
                  NS "drop_down" "alacritty --class=LxDropDown &" (className =? "LxDropDown")
                     (customFloating $ W.RationalRect (1/6) (1/6) (2/3) (2/3)) ,
                  NS "youdao" "/usr/bin/python3 /usr/bin/youdao-dict &" (className =? "Youdao Dict")
                     (customFloating $ W.RationalRect (1/100) (1/40) (2/3) (2/3)),

                  NS "dingtalk" "dex /usr/share/applications/dingtalk-linux.desktop" (className =? "dingtalklinux")
                     (customFloating $ W.RationalRect (66/100) (10/100) (60/100) (40/100)), -- left top width high

                  NS "wechat" "dex /usr/share/applications/wechat-uos.desktop" (className =? "weixin")
                     (customFloating $ W.RationalRect (-10/100) (40/100) (40/100) (40/100)) -- left top width high
                ]

    where
    spawnTerm  = myTerminal ++  " -n scratchpad"
    findTerm   = resource =? "scratchpad"
    manageTerm = customFloating $ W.RationalRect l t w h
                 where
                 h = 0.9
                 w = 0.9
                 t = 0.95 -h
                 l = 0.95 -w
    spacemacsT = customFloating $ W.RationalRect l t w h
                 where
                 h = 0.9
                 w = 0.9
                 t = 0.95 -h
                 l = 0.95 -w
    spawnTaskell  = myTerminal ++  " -n scratchpad taskell "
    findTaskell   = resource =? "taskell"
    manageTaskell = customFloating $ W.RationalRect l t w h
                 where
                 h = 0.9
                 w = 0.9
                 t = 0.95 -h
                 l = 0.95 -w
    spawnCmus  = myTerminal ++  " -n cmus 'cmus' "
    findCmus   = resource =? "cmus"
    manageCmus = customFloating $ W.RationalRect l t w h
                 where
                 h = 0.9
                 w = 0.9
                 t = 0.95 -h
                 l = 0.95 -w
    spawnVifm  = myTerminal ++  " -n vifm 'vifm' "
    findVifm   = resource =? "vifm"
    manageVifm = customFloating $ W.RationalRect l t w h
                 where
                 h = 0.9
                 w = 0.9
                 t = 0.95 -h
                 l = 0.95 -w
    spawnCalcurse  = myTerminal ++  " -n scratchpad calcurse "
    findCalcurse   = resource =? "calcurse"
    manageCalcurse = customFloating $ W.RationalRect l t w h
                 where
                 h = 0.9
                 w = 0.9
                 t = 0.95 -h
                 l = 0.95 -w

------------------------------------------------------------------------
---PROMPT

myXPConfig :: XPConfig
myXPConfig = def
      { font                = "xft:noto sans:style=Bold:size=9"
      , bgColor             = color0
      , fgColor             = color2
      , bgHLight            = color2
      , fgHLight            = color7
      , borderColor         = color1
      , promptBorderWidth   = 0
      , position            = Top
      , height              = 20
      , historySize         = 16
      , historyFilter       = deleteAllDuplicates
      , defaultText         = []
      , autoComplete        = Nothing
      , showCompletionOnTab = False
      , alwaysHighlight     = False
      , maxComplRows        = Just 1
      }

--SEARCH PROMPTS
searx, archwiki, aur, ebay, libgen, nlab, rutracker, wiktionary, hackage :: S.SearchEngine
archwiki = S.searchEngine "ArchWiki" "https://wiki.archlinux.org/index.php?search="
aur      = S.searchEngine "AUR" "https://aur.archlinux.org/packages/?K="
ebay     = S.searchEngine "ebay" "https://www.ebay.com/sch/i.html?_nkw="
libgen   = S.searchEngine "LibGen" "http://gen.lib.rus.ec/search.php?req="
nlab     = S.searchEngine "NLab" "https://ncatlab.org/nlab/search?query="
rutracker = S.searchEngine "RuTracker" "https://rutracker.org/forum/tracker.php?nm="
wiktionary = S.searchEngine "Wiktionary" "https://en.wiktionary.org/w/index.php?search="
hackage = S.searchEngine "Hackage" "http://hackage.haskell.org/packages/search?terms="
searx = S.searchEngine "SearX" "https://searx.tuxcloud.net/?q="

searchList :: [(String, S.SearchEngine)]
searchList = [ ("a", archwiki)
             , ("u", aur)
             , ("e", ebay)
             , ("l", libgen)
             , ("n", nlab)
             , ("r", rutracker)
             , ("d", wiktionary)
             , ("s", searx)
             , ("h", hackage)
             , ("w", S.wikipedia)
             , ("y", S.youtube)
             ]

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

image
image

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

On Wed, Oct 26 2022 02:13, LiXu wrote: I have also tried manjaro plasma and kubuntu, both of which have this problem
So this is not xmonad-exclusive? Sounds like a problem with your general setup in that case, which could be quite difficult to debug. I can't really tell what I'm looking at in the screenshot; is the black background the wallpaper? How does opening a normal window look? And what do you mean by you "put it in a floating layout"?

Thanks again

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

Recurrence steps

wget -O- https://deepin-wine.i-m.dev/setup.sh | sh

sudo apt-get install com.qq.weixin.deepin

# run wechat

/opt/apps/com.qq.weixin.deepin/files/run.sh

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

On Wed, Oct 26 2022 02:13, LiXu wrote: I have also tried manjaro plasma and kubuntu, both of which have this problem
So this is not xmonad-exclusive? Sounds like a problem with your general setup in that case, which could be quite difficult to debug. I can't really tell what I'm looking at in the screenshot; is the black background the wallpaper? How does opening a normal window look? And what do you mean by you "put it in a floating layout"?

This problem occurs only when xmonad is used as the window manager

@DreamPy
Copy link
Author

DreamPy commented Oct 26, 2022

I tried to change the "xmonad $ (ewmhFullscreen. ewmh) kdeConfig" in the configuration to "xmonad $ kdeConfig". The problem was solved, but I don't know why?

@slotThe
Copy link
Member

slotThe commented Nov 5, 2022

Ah, right kdeConfig already applies ewmh. I would have thought that our use of ExtensibleConf would prevent a double application from causes trouble, but you never know. Maybe the wine doesn't play nice with fullscreen support either...

@slotThe slotThe closed this as completed Nov 5, 2022
@liskin
Copy link
Member

liskin commented Nov 5, 2022

@slotThe We don't use the once api of ExtensibleConf in ewmh stuff yet. That work is still a draft in xmonad/xmonad-contrib#625. One of the problems I had there, I vaguely remember, was SetWMName — I couldn't figure out a fully backwards compatible way to preserve the mechanics of it, especially when users override it.

@slotThe
Copy link
Member

slotThe commented Nov 5, 2022

Ah, I see; that makes sense then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants