LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Dmenu (http://www.linuxquestions.org/questions/slackware-14/dmenu-4175435436/)

michijo 11-03-2012 05:46 AM

Dmenu
 
After upgrading Slackware, Dmenu in Xmonad quit working. It turned black with white letters, and no longer has completion feature, but yet it still launches programs after the full name is typed. I have used dmenu for years without ever having problem.

markush 11-03-2012 09:13 AM

I'm running Slackware64-14.0 with xmonad, xmobar and dmenu without any problems. But I rebuild the whole bunch of haskell-packages including xmonad after upgrading to 14.

Markus

michijo 11-03-2012 09:40 AM

Quote:

Originally Posted by markush (Post 4821375)
I'm running Slackware64-14.0 with xmonad, xmobar and dmenu without any problems. But I rebuild the whole bunch of haskell-packages including xmonad after upgrading to 14.

Markus

Ah, that is probably what it is, the haskell needs rebuilding. Do you mean that you downloaded all new haskell packages? In what way did you rebuild them?

markush 11-03-2012 09:44 AM

I've written a Howto for the new SlackDocs Wiki: http://docs.slackware.com/howtos:win...window_manager
There are the packages listed in the correct order. Please, if you find that the list in the Howto is not in the correct order, post it here so that I can change it on the Wiki-page.

Markus

[edit]I have built the versions of the packages which are yet listed in Slackbuilds.org for Slackware-14[/edit]

michijo 11-03-2012 11:23 AM

Quote:

Originally Posted by markush (Post 4821402)
I've written a Howto for the new SlackDocs Wiki: http://docs.slackware.com/howtos:win...window_manager
There are the packages listed in the correct order. Please, if you find that the list in the Howto is not in the correct order, post it here so that I can change it on the Wiki-page.

Markus

[edit]I have built the versions of the packages which are yet listed in Slackbuilds.org for Slackware-14[/edit]

That's cool actually. I installed all these manually the first time from Slackbuilds.org, and afterwards I thought, If I need to install my system all over again, I may not choose slackware, but with sbopkg and a basic list in order, it might be a clean automated affair. I am trying to install these now through the sbopkg queue.

michijo 11-03-2012 11:28 AM

...

markush 11-03-2012 11:31 AM

Quote:

Originally Posted by michijo (Post 4821461)
I think before xmonad-contrib you need something called "haskell-random".

Yes, but this is mentioned in the correct order in the Howto, haskell-random before xmonad-contrib.

Markus

philanc 11-03-2012 01:30 PM

Quote:

Originally Posted by markush (Post 4821402)
I've written a Howto for the new SlackDocs Wiki: http://docs.slackware.com/howtos:win...window_manager
There are the packages listed in the correct order.

Thanks for the Howto.

After the package list, in "I have additionally installed dwm which is integrated into the statusbar and starts programs (like gmrun).", maybe you mean "dmenu" instead of "dwm"?

markush 11-03-2012 01:35 PM

Quote:

Originally Posted by philanc (Post 4821516)
...
After the package list, in "I have additionally installed dwm which is integrated into the statusbar and starts programs (like gmrun).", maybe you mean "dmenu" instead of "dwm"?

:doh: you are right, I meant dmenu, it is already changed, thanks very much for the hint.

Markus

michijo 11-03-2012 04:59 PM

I reinstalled all of this, but dmenu remains broken. I just removed dmenu completely with removepkg, then reinstalled it with sbopkg, but it still does not work.

markush 11-03-2012 05:08 PM

Could you please post the code in your xmonad.hs which launches dmenu?

Markus

michijo 11-03-2012 05:29 PM

I dont really have any code in there that launches dmenu. Its merely the default keybinding, which produces a dmenu, but not like it used to. Bear in mind I have used xmonad and dmenu on this machine for at least a year, and only after upgrading, it stopped showing completion results and turned black. It still launched programs if the full name is typed. Note in this hs that it still has an iceweasel reference from using it in Debian a long time age.

Code:

import XMonad
import XMonad.Layout.Tabbed
import XMonad.Layout.Accordion
import XMonad.Layout.Roledex
import XMonad.Layout.NoBorders
import XMonad.Actions.NoBorders
import XMonad.Hooks.ManageDocks                                           
import XMonad.Layout.SimpleFloat
import XMonad.ManageHook
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.FadeInactive
import XMonad.Layout.ShowWName
import XMonad.Util.Run
import System.IO
import Graphics.X11.Xlib.Extras
import XMonad.Actions.SimpleDate
import XMonad.Core
import XMonad.Layout.DragPane
import XMonad.Layout.ResizableTile
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.FixedColumn
import XMonad.Layout.IM
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Spiral
import XMonad.Layout.Dishes
import XMonad.Layout.Reflect
import XMonad.Layout.Circle   
import XMonad.Layout.Grid
import XMonad.Config.Desktop
import XMonad.Hooks.EwmhDesktops
import XMonad.Config.Gnome
import XMonad.Actions.CycleWS
import XMonad.Config.Xfce
import XMonad.Layout.Named
import XMonad.Layout.LayoutCombinators hiding ((|||))
import XMonad.Util.Dzen
import System.Locale
import System.Exit
import qualified System.IO.UTF8
import Graphics.X11
import qualified Data.Map as M
import qualified XMonad.StackSet as W

myWorkspaces    = ["1","2","3","4","5","6","7","8"]

myKeys x =
    [
    ((modMask x, xK_Left), prevWS),
    ((modMask x, xK_Right), nextWS),
    ((modMask x, xK_g ), withFocused toggleBorder), --toggle red border movies
    ((modMask x, xK_d), date)   
    ]
 
keyMap x = M.union (keys defaultConfig x) (M.fromList (myKeys x))

myManageHook = composeAll
  [ className =? "Ekiga"      --> doShift "6"
  , className =? "Skype"      --> doShift "6"
  , className =? "Evince"      --> doShift "7"   
  , className =? "Twinkle"      --> doShift "6" 
  , className =? "Pidgin"      --> doShift "6"   
  , title =? "Alsa"      --> doShift "5"
  , title =? "Lernu"      --> doShift "2" 
  , className =? "Xpdf"      --> doShift "2"   
  , title =? "Web"      --> doShift "1"       
  , title =? "Phone"      --> doShift "5"   
  , title =? "Piton"      --> doShift "5" 
  , title =? "Midnight"    --> doShift "6"
  , title =? "Disk"    --> doShift "5"   
  , title =? "Notes"    --> doShift "3" 
  , title =? "News"      --> doShift "3" 
  , title =? "Cal"      --> doShift "3" 
  , title =? "Music"      --> doShift "5"
  , title =? "Blogs"      --> doShift "3" 
  , title =? "Mud"      --> doShift "6" 
  , title =? "Tinalias"      --> doShift "6"   
  , title =? "Finch"      --> doShift "2"
  , title =? "Ips"      --> doShift "4" 
  , title =? "Streams"      --> doShift "4" 
  , title =? "Htop"      --> doShift "4"   
  , className =? "Vidalia"      --> doShift "6"   
  , className =? "Iceweasel"      --> doShift "1"
  , className =? "Opera"      --> doShift "1"
  , className =? "kurso3"      --> doShift "6"
  , className =? "Xmessage"  --> doFloat
  , className =? "Ekiga"  --> unfloat 
  , className =? "Smplayer"  --> doFloat
  , className =? "VirtualBox"  --> unfloat
  , className =? "Gimp"  --> unfloat 
  , className =? "Gimp-2.6"  --> unfloat
  , manageDocks
  ]
                  where unfloat = ask >>= doF . W.sink

-- Startup options       
myStartUp = "/home/michijo/Sekurkopio/bin/finch-bin" 



myDzenPP h = defaultPP

            { ppOutput  = hPutStrLn h
            , ppCurrent  = dzenColor "#f8f8f8" "DodgerBlue4" . pad
            , ppVisible  = dzenColor "#f8f8f8" "LightSkyBlue4"
                            . pad
            , ppUrgent  = dzenColor "#f8f8f8" "red4" . pad
            , ppHidden  = pad
            , ppLayout  = dzenColor "DarkOrange" ""
            , ppTitle    = dzenColor "#61ce3c" "" . dzenEscape
            , ppSep      = " "
            , ppWsSep    = "|"
            }

-- Color, font and iconpath definitions:
--myIconDir = "/home/michijo/Backup/Window-Manager/icons/blacks"
--myDzenFGColor = "#ffffff"
--myNormalFGColor = "#ffffff"
--myFont = "-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859"
--myNormalBGColor = "black"

-- Statusbars options       
myStatusBar = "dzen2 -ta l -fg yellow -bg black -w 1920 -h 20 -x 0"

-- Struts
myDefaultGaps = [(16, 16, 0, 0)]

-- Layouthook Window Arrangements

defaultLayouts =  avoidStruts (tall ||| Grid ||| Mirror tall ||| spiral (6/7) ||| noBorders Full ||| tabbedLayout)

                    where
                      tall = Tall 1 (3/100) (1/2)
                      tabbedLayout = tabbedBottomAlways shrinkText defaultTheme

-- Put all layouts together
myLayouts = avoidStruts ( onWorkspace "4" Grid $ defaultLayouts)

ppLog = defaultPP
  { ppOutput = \s -> do
      h <- openFile "/home/$USER/.xmonad/xmonad.log" WriteMode
      System.IO.UTF8.hPutStrLn h s
      hClose h
  }

main = do
 dzen <- spawnPipe myStatusBar 
 startup <- spawnPipe myStartUp
 xmonad $ xfceConfig   
                {terminal = "terminal"
                , borderWidth = 1
                , keys = keyMap
                , manageHook      = myManageHook <+> manageHook xfceConfig   
                , workspaces      = myWorkspaces
                , startupHook = ewmhDesktopsStartup
                , handleEventHook = ewmhDesktopsEventHook
                , logHook          = ewmhDesktopsLogHook
                >> (dynamicLogWithPP $ myDzenPP dzen)
                , layoutHook      = showWName myLayouts

                }


michijo 11-03-2012 05:32 PM

Quote:

Originally Posted by michijo (Post 4821623)
I dont really have any code in there that launches dmenu. Its merely the default keybinding, which produces a dmenu, but not like it used to. Bear in mind I have used xmonad and dmenu on this machine for at least a year, and only after upgrading, it stopped showing completion results and turned black. It still launched programs if the full name is typed. Note in this hs that it still has an iceweasel reference from using it in Debian a long time age.

Code:

import XMonad
import XMonad.Layout.Tabbed
import XMonad.Layout.Accordion
import XMonad.Layout.Roledex
import XMonad.Layout.NoBorders
import XMonad.Actions.NoBorders
import XMonad.Hooks.ManageDocks                                           
import XMonad.Layout.SimpleFloat
import XMonad.ManageHook
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.UrgencyHook
import XMonad.Hooks.FadeInactive
import XMonad.Layout.ShowWName
import XMonad.Util.Run
import System.IO
import Graphics.X11.Xlib.Extras
import XMonad.Actions.SimpleDate
import XMonad.Core
import XMonad.Layout.DragPane
import XMonad.Layout.ResizableTile
import XMonad.Layout.ToggleLayouts
import XMonad.Layout.FixedColumn
import XMonad.Layout.IM
import XMonad.Layout.PerWorkspace
import XMonad.Layout.Spiral
import XMonad.Layout.Dishes
import XMonad.Layout.Reflect
import XMonad.Layout.Circle   
import XMonad.Layout.Grid
import XMonad.Config.Desktop
import XMonad.Hooks.EwmhDesktops
import XMonad.Config.Gnome
import XMonad.Actions.CycleWS
import XMonad.Config.Xfce
import XMonad.Layout.Named
import XMonad.Layout.LayoutCombinators hiding ((|||))
import XMonad.Util.Dzen
import System.Locale
import System.Exit
import qualified System.IO.UTF8
import Graphics.X11
import qualified Data.Map as M
import qualified XMonad.StackSet as W

myWorkspaces    = ["1","2","3","4","5","6","7","8"]

myKeys x =
    [
    ((modMask x, xK_Left), prevWS),
    ((modMask x, xK_Right), nextWS),
    ((modMask x, xK_g ), withFocused toggleBorder), --toggle red border movies
    ((modMask x, xK_d), date)   
    ]
 
keyMap x = M.union (keys defaultConfig x) (M.fromList (myKeys x))

myManageHook = composeAll
  [ className =? "Ekiga"      --> doShift "6"
  , className =? "Skype"      --> doShift "6"
  , className =? "Evince"      --> doShift "7"   
  , className =? "Twinkle"      --> doShift "6" 
  , className =? "Pidgin"      --> doShift "6"   
  , title =? "Alsa"      --> doShift "5"
  , title =? "Lernu"      --> doShift "2" 
  , className =? "Xpdf"      --> doShift "2"   
  , title =? "Web"      --> doShift "1"       
  , title =? "Phone"      --> doShift "5"   
  , title =? "Piton"      --> doShift "5" 
  , title =? "Midnight"    --> doShift "6"
  , title =? "Disk"    --> doShift "5"   
  , title =? "Notes"    --> doShift "3" 
  , title =? "News"      --> doShift "3" 
  , title =? "Cal"      --> doShift "3" 
  , title =? "Music"      --> doShift "5"
  , title =? "Blogs"      --> doShift "3" 
  , title =? "Mud"      --> doShift "6" 
  , title =? "Tinalias"      --> doShift "6"   
  , title =? "Finch"      --> doShift "2"
  , title =? "Ips"      --> doShift "4" 
  , title =? "Streams"      --> doShift "4" 
  , title =? "Htop"      --> doShift "4"   
  , className =? "Vidalia"      --> doShift "6"   
  , className =? "Iceweasel"      --> doShift "1"
  , className =? "Opera"      --> doShift "1"
  , className =? "kurso3"      --> doShift "6"
  , className =? "Xmessage"  --> doFloat
  , className =? "Ekiga"  --> unfloat 
  , className =? "Smplayer"  --> doFloat
  , className =? "VirtualBox"  --> unfloat
  , className =? "Gimp"  --> unfloat 
  , className =? "Gimp-2.6"  --> unfloat
  , manageDocks
  ]
                  where unfloat = ask >>= doF . W.sink

-- Startup options       
myStartUp = "/home/michijo/Sekurkopio/bin/finch-bin" 



myDzenPP h = defaultPP

            { ppOutput  = hPutStrLn h
            , ppCurrent  = dzenColor "#f8f8f8" "DodgerBlue4" . pad
            , ppVisible  = dzenColor "#f8f8f8" "LightSkyBlue4"
                            . pad
            , ppUrgent  = dzenColor "#f8f8f8" "red4" . pad
            , ppHidden  = pad
            , ppLayout  = dzenColor "DarkOrange" ""
            , ppTitle    = dzenColor "#61ce3c" "" . dzenEscape
            , ppSep      = " "
            , ppWsSep    = "|"
            }

-- Color, font and iconpath definitions:
--myIconDir = "/home/michijo/Backup/Window-Manager/icons/blacks"
--myDzenFGColor = "#ffffff"
--myNormalFGColor = "#ffffff"
--myFont = "-*-terminus-*-r-normal-*-*-120-*-*-*-*-iso8859"
--myNormalBGColor = "black"

-- Statusbars options       
myStatusBar = "dzen2 -ta l -fg yellow -bg black -w 1920 -h 20 -x 0"

-- Struts
myDefaultGaps = [(16, 16, 0, 0)]

-- Layouthook Window Arrangements

defaultLayouts =  avoidStruts (tall ||| Grid ||| Mirror tall ||| spiral (6/7) ||| noBorders Full ||| tabbedLayout)

                    where
                      tall = Tall 1 (3/100) (1/2)
                      tabbedLayout = tabbedBottomAlways shrinkText defaultTheme

-- Put all layouts together
myLayouts = avoidStruts ( onWorkspace "4" Grid $ defaultLayouts)

ppLog = defaultPP
  { ppOutput = \s -> do
      h <- openFile "/home/$USER/.xmonad/xmonad.log" WriteMode
      System.IO.UTF8.hPutStrLn h s
      hClose h
  }

main = do
 dzen <- spawnPipe myStatusBar 
 startup <- spawnPipe myStartUp
 xmonad $ xfceConfig   
                {terminal = "terminal"
                , borderWidth = 1
                , keys = keyMap
                , manageHook      = myManageHook <+> manageHook xfceConfig   
                , workspaces      = myWorkspaces
                , startupHook = ewmhDesktopsStartup
                , handleEventHook = ewmhDesktopsEventHook
                , logHook          = ewmhDesktopsLogHook
                >> (dynamicLogWithPP $ myDzenPP dzen)
                , layoutHook      = showWName myLayouts

                }


funny, I just looked through this and noticed it has xfceconfig in use. Not sure why! I probably tried running it with xfce4. changing it to defaultConfig failed to help dmenu though. Otherwise it works fine but for dmenu.

markush 11-03-2012 05:37 PM

I saw that my xmonad.hs (which I've yet in use) doesn't launch dmenu explicitly. In so far it should work without dmenu in the xmonad.hs.

Do you have any configuration for dmenu? Did you change anything in your configuration for xmonad?

Markus

michijo 11-03-2012 05:40 PM

Quote:

Originally Posted by markush (Post 4821629)
I saw that my xmonad.hs (which I've yet in use) doesn't launch dmenu explicitly. In so far it should work without dmenu in the xmonad.hs.

Do you have any configuration for dmenu? Did you change anything in your configuration for xmonad?

Markus

No, I dont have a .dmenurc file or anything. Its really quite strange. Ive been thinking to use xmobar though. xmobar didnt really work with early slackware versions. Now I think it can work.


All times are GMT -5. The time now is 11:15 PM.