You are not logged in.
I am running xmonad and I am having issues getting the dmenu_run to execute properly. It was working fine before but now it just launches with a white bar and nothing autocompletes. I am running Xmonad 0.9.2-2.1 and dmenu 4.4-1. Here is my entry in xmonad.hs:
, ((modMask, xK_p ), spawn "dmenu_run | dmenu -b")
Also, here is my entire xmonad.hs:
import XMonad hiding (Tall)
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import XMonad.Layout.HintedTile
import XMonad.Layout.LayoutHints (layoutHints)
import XMonad.Prompt
import XMonad.Prompt.Shell
import XMonad.Util.Run(spawnPipe)
import System.Exit
import System.IO
import Data.Monoid
import qualified XMonad.StackSet as W
import qualified Data.Map as M
myBorderWidth = 1
main = do
xmproc <- spawnPipe "/usr/bin/xmobar /home/comhack/.xmobarcc"
xmonad $ defaultConfig {
terminal = "urxvt",
modMask = mod1Mask,
workspaces = ["Net", "Chat", "Work", "4", "5", "6", "7", "8", "9"],
normalBorderColor = "#000000",
focusedBorderColor = "#838B8B",
manageHook = composeOne [isFullscreen -?> doFullFloat],
borderWidth = myBorderWidth,
keys = myKeys,
focusFollowsMouse = True,
layoutHook = myLayout,
logHook = dynamicLogWithPP $ xmobarPP
{ ppOutput = hPutStrLn xmproc,
ppTitle = xmobarColor "green" "" . shorten 60,
ppHiddenNoWindows = xmobarColor "grey" ""
}
}
myKeys conf@(XConfig {XMonad.modMask = modMask}) = M.fromList $
[ ((modMask , xK_Return ), spawn $ XMonad.terminal conf)
, ((modm , xK_backslash ), spawn “amixer -q set Master toggle”)
, ((modm , xK_minus ), spawn “amixer -q set Master 3- unmute”)
, ((modm , xK_equal ), spawn “amixer -q set Master 3+ unmute”)
, ((modMask .|. shiftMask, xK_c ), kill)
, ((modMask , xK_space ), sendMessage NextLayout)
, ((modMask .|. shiftMask, xK_space ), setLayout $ XMonad.layoutHook conf)
, ((modMask , xK_n ), refresh)
, ((modMask, xK_p ), spawn "dmenu_run | dmenu -b")
, ((modMask , xK_Tab ), windows W.focusDown)
, ((modMask , xK_j ), windows W.focusDown)
, ((modMask , xK_k ), windows W.focusUp)
, ((modMask , xK_m ), windows W.focusMaster)
, ((modMask .|. shiftMask, xK_Return ), windows W.swapMaster)
, ((modMask .|. shiftMask, xK_j ), windows W.swapDown)
, ((modMask .|. shiftMask, xK_k ), windows W.swapUp)
, ((modMask , xK_h ), sendMessage Shrink)
, ((modMask , xK_l ), sendMessage Expand)
, ((modMask , xK_t ), withFocused $ windows . W.sink)
, ((modMask , xK_comma ), sendMessage (IncMasterN 1))
, ((modMask , xK_period ), sendMessage (IncMasterN (-1)))
, ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess))
, ((modMask , xK_q ), spawn "xmonad --recompile")
, ((modMask , xK_F2 ), shellPrompt defaultXPConfig)
, ((0 , 0x1008ff30 ), shellPrompt defaultXPConfig)
, ((0 , 0x1008ff13 ), spawn "amixer -q set Master 2dB+")
, ((0 , 0x1008ff11 ), spawn "amixer -q set Master 2dB-")
, ((0 , 0x1008ff12 ), spawn "amixer -q set Master toggle")
, ((0 , 0x1008ff16 ), spawn "cmus-remote --prev")
, ((0 , 0x1008ff17 ), spawn "cmus-remote --next")
, ((0 , 0x1008ff14 ), spawn "cmus-remote --pause")
, ((0 , 0x1008ff5b ), spawn "urxvt -e screen -rd cmus")
, ((modMask , xK_Print ), spawn "scrot -e 'mv $f ~/Screenshots'")
]
++
[((m .|. modMask, k), windows $ f i)
| (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]
, (f, m) <- [(W.greedyView, 0), (W.shift, shiftMask)]]
++
[((m .|. modMask, key), screenWorkspace sc >>= flip whenJust (windows . f))
| (key, sc) <- zip [xK_w, xK_e, xK_r] [0..]
, (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
myLayout = avoidStruts $ tiled ||| wideTiled ||| Full
where
tiled = HintedTile nmaster delta ratio Center Tall
wideTiled = HintedTile nmaster delta ratio Center Wide
nmaster = 1
ratio = 1/2
delta = 3/100
It was working fine before so I am thinking that it must of been an update or something. If I run the command in a terminal, it works just fine. So it has to be the syntax or something. This works perfectly:
dmenu_run | dmenu -b
Any ideas?
Last edited by securitybreach (2011-08-08 03:07:25)
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
how about:
dmenu_run -b
?
Last edited by JokerBoy (2011-07-21 14:44:18)
Arch64/DWM || My Dropbox referral link
Offline
Thanks Joker but that did not work either.
Also, I am getting an error when I --recompile XMonad:
╔═ comhack@Cerberus 09:46 AM
╚═══ ~-> xmonad --recompile
Error detected while loading xmonad configuration file: /home/comhack/.xmonad/xmonad.hs
xmonad.hs:17:18:
Could not find module `XMonad.StackSet':
Use -v to see a list of the files searched for.
Please check the file for errors.
xmonad: xmessage: executeFile: does not exist (No such file or directory)
Maybe this is related?
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
Might not be just an XMonad issue. After upgrade yesterday, not quite working for me neither with Openbox. I downgraded to get it to work again.
Offline
Same problem with openbox too and also did a downgrade to solve the issue.
Offline
Thanks a lot Marxav and Xamaco, gonna downgrade now.
As soon as I downgraded, it worked perfectly. I did not even have to --recompile Xmonad.
Last edited by securitybreach (2011-07-21 18:16:16)
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
I have the exact same problem here. So, perhaps a bug should be filed?
"Computer Science is embarrassed by the computer." -- Alan J. Perlis
Offline
Same problem on XMonad here as well.
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
I'm having the same issues on XMonad as well. Anyone having these issues on anything other than Arch? If not, I'm going to go ahead and submit bug reports both here and upstream. (Correct me if that's not due process; this will be my first bug retort.)
Last edited by mjdwitt (2011-07-22 05:42:09)
Offline
I don't think it's an actual bug; it's just updated syntax. For me, this solved the issue:
In my xmonad.hs, I _had_ the line
, ((modm, xK_p ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
I changed this to use dmenu_run instead and not piping to dmenu:
, ((modm, xK_p ), spawn "exe=`dmenu_run` && eval \"exec $exe\"")
A recompile is necessary for this to take effect. One of you did not have to recompile, but that was most likely because the downgraded dmenu understood the old syntax.
Now it works...YMMV.
EDIT: I see now that user "securitybreach" uses "dmenu_run" already... Try not piping the command; when I did this, I got two instances of Dmenu running: one with all the executables in path as usual, and one blank.
Last edited by Obscaenvs (2011-07-22 09:49:52)
Offline
Please look into the dmenu_run script by yourself. You don't need the pipe. Plain dmenu_run will work.
For the record:
1. dmenu 4.4 changes it's cache from ~/.dmenu_cache to ~/.cache/dmenu_run. You can remove ~/.dmenu_cache now.
2. dmenu_run now uses lsx (also from suckless, shipped with dmenu 4.4) to create the list of excutables, saved to the cache file. dmenu_path is gone.
This silver ladybug at line 28...
Offline
@Obscaenvs I tried your second entry but I get the same white bar without the executables even after recompiling Xmonad.
"Every normal man must be tempted at times to spit upon his hands, hoist the black flag, and begin slitting throats." -- H.L. Mencken
Website Configs
Forum Admin: Bruno's All Things Linux
securitybreach<a>archlinux.us
Offline
I don't think it's an actual bug; it's just updated syntax. For me, this solved the issue:
In my xmonad.hs, I _had_ the line
, ((modm, xK_p ), spawn "exe=`dmenu_path | dmenu` && eval \"exec $exe\"")
I changed this to use dmenu_run instead and not piping to dmenu:
, ((modm, xK_p ), spawn "exe=`dmenu_run` && eval \"exec $exe\"")
A recompile is necessary for this to take effect. One of you did not have to recompile, but that was most likely because the downgraded dmenu understood the old syntax.
Now it works...YMMV.
EDIT: I see now that user "securitybreach" uses "dmenu_run" already... Try not piping the command; when I did this, I got two instances of Dmenu running: one with all the executables in path as usual, and one blank.
There are people having issues with dmenu using other window managers besides XMonad, so that is not the same issue. Not to mention, that my spawn of dmenu is WAY less complicated than that, and I am still getting the issue (before downgrade).
#binarii @ irc.binarii.net
Matrix Server: https://matrix.binarii.net
-------------
Allan -> ArchBang is not supported because it is stupid.
Offline
I'm shocked by this thread.
Why do people do things like
dmenu_run | dmenu -b
or even
exe=`dmenu_run` && eval \"exec $exe\"
which are plain wrong, especially the second one can set your ass on fire.
Read /usr/bin/dmenu_run please.
This silver ladybug at line 28...
Offline
I'm shocked by this thread.
Why do people do things likedmenu_run | dmenu -b
or even
exe=`dmenu_run` && eval \"exec $exe\"
which are plain wrong, especially the second one can set your ass on fire.
Read /usr/bin/dmenu_run please.
Why is #2 plain wrong? Why will it set your ass on fire?
Offline
lolilolicon wrote:I'm shocked by this thread.
Why do people do things likedmenu_run | dmenu -b
or even
exe=`dmenu_run` && eval \"exec $exe\"
which are plain wrong, especially the second one can set your ass on fire.
Read /usr/bin/dmenu_run please.
Why is #2 plain wrong? Why will it set your ass on fire?
First, sorry I forgot to remove the backslash.
The following is what the guy whould run with that config, run it in a new terminal window:
exe=`dmenu_run` && eval "exec $exe"
in the dmenu prompt, type
echo touch /tmp/bomb
The first thing you notice is that your terminal window disappears.
Then if you check /tmp, you will see that bomb.
The code *does* do what you said to do, but it *also* does whatever your command spits out to stdout.
This silver ladybug at line 28...
Offline
I see what you mean, lolilolicon, about it not being a dmenu bug. I am confused, however, about something you said earlier. If
exe='dmenu_run' && eval "exec $exec"
is such a bad idea–as it sounds from your explanation–then why does the xmonad 0.9.2 config use
exe='dmenu_path | dmenu' && eval "exec $exe"
as the default method of launching dmenu?
Offline
@mjdwitt
The two commands are not equal.
dmenu_run already does the exec part, as well as listing executables (what dmenu_path did).
BTW it's not single quotes ('}, but backticks (`).
I suggest that you learnt some basic shell scripting. It's required for staying alive
To all those too lazy to look at the dmenu_run script: Ubuntu?
This silver ladybug at line 28...
Offline
If anyone is still having issues, I got mine working as it was before the upgrade without downgrading dmenu. As lolilolicon was directing, dmenu_run takes care of the exec command that is coded into xmonad.hs. To adjust for this, change
exe=`dmenu_path | dmenu` && eval "exec $exe"
to
dmenu_run
This should fix your M-p dmenu.
Offline
If anyone is still having issues, I got mine working as it was before the upgrade without downgrading dmenu. As lolilolicon was directing, dmenu_run takes care of the exec command that is coded into xmonad.hs. To adjust for this, change
exe=`dmenu_path | dmenu` && eval "exec $exe"
to
dmenu_run
This should fix your M-p dmenu.
Thanks
Offline
If anyone is still having issues, I got mine working as it was before the upgrade without downgrading dmenu. As lolilolicon was directing, dmenu_run takes care of the exec command that is coded into xmonad.hs. To adjust for this, change
exe=`dmenu_path | dmenu` && eval "exec $exe"
to
dmenu_run
This should fix your M-p dmenu.
I've done that and it still doesn't work, here's the relevant part of my conf:
myKeys conf@(XConfig {XMonad.modMask = modMask}) =
[ ((modMask, xK_o), sendMessage ToggleStruts)
, ((modMask, xK_p), (spawn "dmenu_run")) ]
newKeys x = M.union (keys defaultConfig x) (M.fromList (myKeys x))
Offline
Hey guys,
Saw your post here, and I got this working, so thought I'd share my solution. The reason for dmenu not autocompleting things is because (at least on my machines) dmenu_path wasn't working correctly. In fact, there was no such command after the upgrade of dmenu. Instead I installed 'dmenu-path-c':
[jorge@ashitaka ~]$ packer -Ss dmenu_path
aur/dmenu-path-c 0.1-2
dmenu_path C rewrite. 2-4x faster on cache hits, 10-20x faster on cache misses
So after installing this package, I modified the entry in my xmonad.hs to look like this:
-- launch dmenu
, ((modm, xK_p ), spawn "exe=`dmenu_path_c | dmenu` && eval \"exec $exe\"")
That seems to do the trick, as everything is working fine. Hope this helps out someone.
Offline
Saw your post here
You saw, but you didn't read.
https://bbs.archlinux.org/viewtopic.php … 95#p964095
This thread is so heartbreaking.
If I really didn't make it clear enough:
1. lsx replaced dmenu_path.
2. `dmenu_run' is all you need to use dmenu as an application launcher.
This thread is a shock movie.
Also, JFTR dmenu 4.4 does have some bugs, but they're nothing relevant to this thread.
Last edited by lolilolicon (2011-07-24 12:28:22)
This silver ladybug at line 28...
Offline
I don't explicitly call dmenu in my config or define any keys. What is the simplest way for me to add dmenu_run to my config?
Offline
I don't explicitly call dmenu in my config or define any keys. What is the simplest way for me to add dmenu_run to my config?
I use EZConfig to add additional keybindings. There's some documentation with examples here. You'll be wanting to add a binding somewhat like this, using additionalKeys:
((modMask, xK_p), spawn "dmenu_run")
Note that this line will be different if you've re-defined modMask.
Also, if you want to be really lazy and copy from my (extremely minimal) XMonad config, you can find that here.
Last edited by austin.rbn (2011-07-25 10:49:42)
"Computer Science is embarrassed by the computer." -- Alan J. Perlis
Offline