Awesomewm and dmenu

Ive got dmenu as mod4+p in my rc.lua and it only works in the first tag, none of the others.
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/arch/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "aterm"
editor = os.getenv("EDITOR") or "nano"
editor_cmd = terminal .. " -e " .. editor
-- Default modkey.
-- Usually, Mod4 is the key with a logo between Control and Alt.
-- If you do not like this or do not have such a key,
-- I suggest you to remap Mod4 to another key using xmodmap or other tools.
-- However, you can use another modifier like Mod1, but it may interact with others.
modkey = "Mod4"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
awful.layout.suit.floating,
awful.layout.suit.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.max
-- {{{ Tags
-- Define a tag table which hold all screen tags.
tags = {}
for s = 1, screen.count() do
-- Each screen has its own tag table.
tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
end
-- {{{ Menu
-- Create a laucher widget and a main menu
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit }
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "open terminal", terminal }
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
-- {{{ Wibox
-- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right"} )
-- Create a systray
mysystray = widget({ type = "systray" })
-- Create a wibox for each screen and add it
mywibox = {}
mypromptbox = {}
mylayoutbox = {}
mytaglist = {}
mytaglist.buttons = awful.util.table.join(
awful.button({ }, 1, awful.tag.viewonly),
awful.button({ modkey }, 1, awful.client.movetotag),
awful.button({ }, 3, awful.tag.viewtoggle),
awful.button({ modkey }, 3, awful.client.toggletag),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
if not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
-- This will also un-minimize
-- the client, if needed
client.focus = c
c:raise()
end
end),
awful.button({ }, 3, function ()
if instance then
instance:hide()
instance = nil
else
instance = awful.menu.clients({ width=250 })
end
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
if client.focus then client.focus:raise() end
end),
awful.button({ }, 5, function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end))
for s = 1, screen.count() do
-- Create a promptbox for each screen
mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
-- Create an imagebox widget which will contains an icon indicating which layout we're using.
-- We need one layoutbox per screen.
mylayoutbox[s] = awful.widget.layoutbox(s)
mylayoutbox[s]:buttons(awful.util.table.join(
awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(function(c)
return awful.widget.tasklist.label.currenttags(c, s)
end, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = {
mylauncher,
mytaglist[s],
mypromptbox[s],
layout = awful.widget.layout.horizontal.leftright
mylayoutbox[s],
mytextclock,
s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
end
-- {{{ Mouse bindings
root.buttons(awful.util.table.join(
awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
awful.button({ }, 5, awful.tag.viewprev)
-- {{{ Key bindings
globalkeys = awful.util.table.join(
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
awful.key({ modkey, }, "j",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "k",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true}) end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "j", function () awful.screen.focus_relative( 1) end),
awful.key({ modkey, "Control" }, "k", function () awful.screen.focus_relative(-1) end),
awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
awful.key({ modkey, }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Standard program
awful.key({ modkey, "Shift" }, "Return", function () awful.util.spawn(terminal)
end),
awful.key({ modkey, "Control" }, "r", awesome.restart),
awful.key({ modkey, "Shift" }, "q", awesome.quit),
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
awful.key({ modkey, "Control" }, "n", awful.client.restore),
-- Prompt
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
awful.key({ modkey }, "x",
function ()
awful.prompt.run({ prompt = "Run Lua code: " },
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
awful.util.getdir("cache") .. "/history_eval")
end)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end),
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
awful.key({ modkey, }, "n",
function (c)
-- The client currently has the input focus, so it cannot be
-- minimized, since minimized clients can't have the focus.
c.minimized = true
end),
awful.key({ modkey, }, "m",
function (c)
c.maximized_horizontal = not c.maximized_horizontal
c.maximized_vertical = not c.maximized_vertical
end),
awful.key({ modkey }, "p", function ()
awful.util.spawn("dmenu_run -i -p 'Run command:' -nb '" ..
beautiful.bg_normal .. "' -nf '" .. beautiful.fg_normal ..
"' -sb '" .. beautiful.bg_focus ..
"' -sf '" .. beautiful.fg_focus .. "'")
end)
-- Compute the maximum number of digit we need, limited to 9
keynumber = 0
for s = 1, screen.count() do
keynumber = math.min(9, math.max(#tags[s], keynumber));
end
-- Bind all key numbers to tags.
-- Be careful: we use keycodes to make it works on any keyboard layout.
-- This should map on the top row of your keyboard, usually 1 to 9.
for i = 1, keynumber do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewonly(tags[screen][i])
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
if tags[screen][i] then
awful.tag.viewtoggle(tags[screen][i])
end
end),
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.movetotag(tags[client.focus.screen][i])
end
end),
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
if client.focus and tags[client.focus.screen][i] then
awful.client.toggletag(tags[client.focus.screen][i])
end
end))
end
clientbuttons = awful.util.table.join(
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
awful.button({ modkey }, 1, awful.mouse.client.move),
awful.button({ modkey }, 3, awful.mouse.client.resize))
-- Set keys
root.keys(globalkeys)
-- {{{ Rules
awful.rules.rules = {
-- All clients will match this rule.
{ rule = { },
properties = { border_width = beautiful.border_width,
border_color = beautiful.border_normal,
focus = true,
keys = clientkeys,
buttons = clientbuttons } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "pinentry" },
properties = { floating = true } },
{ rule = { class = "gimp" },
properties = { floating = true } },
-- Set Firefox to always map on tags number 2 of screen 1.
-- { rule = { class = "Firefox" },
-- properties = { tag = tags[1][2] } },
-- {{{ Signals
-- Signal function to execute when a new client appears.
client.add_signal("manage", function (c, startup)
-- Add a titlebar
-- awful.titlebar.add(c, { modkey = modkey })
-- Enable sloppy focus
c:add_signal("mouse::enter", function(c)
if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
and awful.client.focus.filter(c) then
client.focus = c
end
end)
if not startup then
-- Set the windows at the slave,
-- i.e. put it at the end of others instead of setting it master.
-- awful.client.setslave(c)
-- Put windows in a smart way, only if they does not set an initial position.
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
awful.placement.no_offscreen(c)
end
end
end)
client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)

thanks for the advice, I put it in the global keys and it worked.
Now, problem is a run dmenu in a blank tag to spawn a browser then switch to tag 2 and try to run dmenu again, but i cant because the cursor is now the stop watch thing and wont let me run dmenu

Similar Messages

  • [SOLVED] uzbl-browser and dmenu-vertical

    I recently installed the uzbl-browser, which is just great.  It uses dmenu for bookmarks, and it has been suggested (I can dredge up posts if necessary) that the "patched" version dmenu-vertical will improve the experience by listing the bookmarks vertically (horizontally you can see the first three or so, and then end up scrolling).  Looking in the AUR there are two packages: dmenu-vertical and dmenu-vertical-xft.  I chose the version with XFT support. 
    When I tried to install it, pacman complained that it conflicted with dmenu, which was already installed.  I uninstalled dmenu, which required uninstalling uzbl-browser, installed dmenu-vertical-xft, and then attempted to install uzbl-browser.  When I answered "no" to that installation's suggestion that I replace dmenu-vertical-xft with dmenu, the install aborted.
    So I have reverted to uzbl-browser with vanilla dmenu, but I would like to get it working with the vertical patch.  Has anybody done this, and if so how?
    Thanks - Hy
    Last edited by Hy Ginsberg (2010-04-10 00:10:35)

    Thanks -- just what I needed.  - Hy

  • Xmonad and dmenu options

    I've been using xmonad for a while now, and just started playing with Xmonad.Actions.WindowBringer.
    It uses dmenu for the menu, and I can't for the life of me figure out where to put the options that I want to use for dmenu.   Things like different, and bigger font, different colors, etc....
    I looked at the windowbringer.hs file, and found something about  dmenu opts = menu dmenu opts or something like that.   So I thought that if I could modify that in my ~/.xmonad.hs file, I would be good, but on recompile, I kept getting an error message about that line, so was I on the right track or is there an easier way to do it? 

    I did not know that, but then again, I only tried dwm (which dmenu came from, if I remember right) for a little while, as I got tired or recompiling it all the time. 
    I'll give it a shot, though, when it's updated thru pacman.... but I'll try it.  Thanks.

  • AwesomeWM and trader workstation (java application)

    Hi guys,
    is anyone using the Interactive Brokers Trader Workstation (Package: ib-tws) and AwesomeWM?
    I'm having trouble with some features of Trader Workstation e.g. changing the timeframe of a stock chart. This feature is crucial for me and I did not do any further tests as I saw that it is not working.
    Because it is a Java application, I already tried all suggestions from: http://awesome.naquadah.org/wiki/Problems_with_Java
    I also tried Oracle Java and OpenJDK as well. Nothing did the trick for me.
    I'm using the following package versions:
    awesome 3.5.5-1
    awesome-freedesktop-git 20111029-2
    awesome-gnome 0.0.1-2
    jdk7-openjdk 7.u51_2.4.6-1
    jre7-openjdk 7.u51_2.4.6-1
    jre7-openjdk-headless 7.u51_2.4.6-1
    Can anyone help?
    Greets,
    joe
    Last edited by tobacco_joe (2014-04-14 20:35:23)

    Still doesn't work. But, a little more information.
    - Active Trader Pro uses .NET, so the issue is NOT with Java but with .NET
    - I uninstalled the APP, restarted the PC and reinstalled the APP - doesn't work
    - I uninstalled JAVA (update 8 rev 25), restarted PC (this is forced), and reinstalled Java - APP still doesn't work
    - I unmarked .Net 3.5 in the control panel (Turn windows features on or off), started APP, and it asks me to install .Net 3.5 etc. I accept and .Net 3.5 is reconfigured. APP still doesn't work.
    I suspect that some incompatibility was introduced with .Net in Build 9860. If this is important and you want me to try something else, I could help out.
    m__v

  • Difference dmenu and dmenu-xft

    Hello guys,
    the default dmenu highlights the selected entry with a brighter text color where dmenu-xft displays selected entries with the same color than the others.
    All I changed in dwm is
    static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
    to
    static const char *dmenucmd[] = { "dmenu_run", "-fa", "Inconsolata-9", "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
    Why does it make a difference?
    orschiro

    orschiro wrote:static const char *dmenucmd[]  = { "dmenu_run", "-fa", "Inconsolata-9", "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
    Shouldn't that be "-fn"?

  • AwesomeWM and scrot keybind [SOLVED]

    My keybind is:
    awful.key({"Mod1"}, "Print", function() awful.util.spawn("scrot-select") end)
    where scrot-select is this script:
    #!/bin/sh
    scrot -s 'screenshot-%s.png' -e 'mv $f ~/images/ && gimp ~/images/$f'
    This does not work. But if I launch scrot-select from a terminal then it does work. I have a different keybind that just screenshots the entire screen and that works fine. Something about the -s flag is problematic.
    Solution, put a sleep 1s before the scrot command:
    https://bbs.archlinux.org/viewtopic.php … 4#p1219944
    Last edited by anonymous_user (2013-01-20 03:18:28)

    using the -s flag doesn't work for me, either.
    and it should be a comma after "Mod1",  i don't know why but without it the keybinding doesn't work

  • AwesomeWM and lua question

    Hello,  At the moment I have this at the bottom of my lua.rc (awesome config file)
    run_once("name of app")
    i was wondering what is the best way in lua to
    A) check if app is already running and it it is do nothing
    B) if it is not running start it
    Anyonw use Awesome/and or is good at  lua?

    spark666 wrote:I think he is talking about startup programs
    Yep, I mean starting up apps not going to a tab with an app on it etc
    Anyway I found the info  I wanted on the Awesome page but in the end did it a simper way without using lua code.
    Last edited by chickenPie4tea (2012-09-02 05:46:17)

  • AwesomeWM and amazing help

    I just installed awesome3-git and amazing-git, but when I run amazing it gives me
    /usr/lib/ruby/site_ruby/1.8/amazing/config/dsl.rb:22:in `import': (eval):2:in `require': no such file to load -- statgrab (LoadError)
    from (eval):2:in `import'
    from /usr/lib/ruby/site_ruby/1.8/amazing/config/dsl.rb:14:in `initialize'
    from /usr/lib/ruby/site_ruby/1.8/amazing/config.rb:20:in `new'
    from /usr/lib/ruby/site_ruby/1.8/amazing/config.rb:20:in `from_dsl'
    from /usr/lib/ruby/site_ruby/1.8/amazing/config.rb:11:in `initialize'
    from /usr/lib/ruby/site_ruby/1.8/amazing/cli/helpers.rb:68:in `new'
    from /usr/lib/ruby/site_ruby/1.8/amazing/cli/helpers.rb:68:in `parse_config'
    from /usr/lib/ruby/site_ruby/1.8/amazing/cli.rb:55:in `run'
    from /usr/bin/amazing:19
    Any help would be great. Used the config branch.
    Last edited by Reasons (2008-05-14 00:07:29)

    I just rebuild amazing but with the config branch and this is my config
    require 'statgrab'
    require 'find'
    module Helpers::PangoMarkup
    def urgent(text)
    foreground("#ff5656", text)
    end
    def normal(text)
    foreground("#888888", text)
    end
    def white(text)
    foreground("#ffffff", text)
    end
    end
    awesome {
    set :statusbar => "top"
    widget("battery") {
    set :interval => 10
    property("text") {
    dir = ""
    if @state == :charging
    dir = "^"
    elsif @state == :discharging
    dir = "v"
    else
    dir = "="
    end
    if @percentage <= 20
    urgent(" #{dir}#{@percentage.to_i}#{dir} ")
    else
    normal(" #{dir}#{@percentage.to_i}#{dir} ")
    end
    widget("mpd") {
    set :interval => 1
    property("text") {
    case @state
    when :playing : txt = ">>:"; show_info = true
    when :paused : txt = "||:"; show_info = true
    else show_info = false
    end
    if show_info
    " #{txt} #@artist - #@title (#@position/#@length) "
    else # Player is stopped or connection not initialized
    " []: not playing "
    end
    widget("gmail") {
    set :interval => 5.minutes
    set :username => "purposeofreason"
    set :password => "CENSORED"
    property("text") {
    if @count > 0
    urgent(" #@count")
    else
    normal(" 0")
    end
    widget("pacman") {
    set :interval => 1.hours
    property("text") {
    if @count > 0
    urgent(" #@count ")
    else
    normal(" 0 ")
    end
    widget("clock") {
    set :interval => 1
    set :format => " %T %d.%m.%Y "
    widget("cpu_usage") {
    set :interval => 2
    set :module => :noop
    property("text") {
    percents = Statgrab.new.cpu_percents
    if percents[:user] >= 50
    urgent(" %.1f%% " % percents[:user])
    else
    white(" %.1f%% " % percents[:user])
    end
    widget("cpu_freq") {
    set :module => :cpu_info
    set :interval => 3
    property ("text") {
    ghz = @speed[0] / 1000
    if @speed[0] >= 1000
    urgent("@ %3.2fGHz " % ghz)
    else
    normal("@ #{@speed[0].to_i}MHz ")
    end
    My .awesomerc might help
    screen 0
    general
    border = 3
    snap = 8
    mwfact_lower_limit = 0.1
    mwfact_upper_limit = 0.9
    resize_hints = false
    new_get_focus = true
    new_become_master = false
    floating_placement = smart
    opacity_unfocused = 0.9
    styles
    normal
    font = "Myriad Pro 8"
    fg = "#B7A67A"
    bg = "#3D352A"
    border = "#3D352A"
    focus
    fg = "#3D352A"
    bg = "#B7A67A"
    border = "#B7A67A"
    urgent
    fg = "#111111"
    bg = "#ff4500"
    tags
    tag main { layout = "tile" mwfact = 0.7 }
    tag work { }
    tag float { layout = "floating" }
    layouts
    layout tile { image = "/usr/share/awesome/icons/layouts/tilew.png" }
    layout tileleft { image = "/usr/share/awesome/icons/layouts/tileleftw.png" }
    layout tilebottom { image = "/usr/share/awesome/icons/layouts/tilebottomw.png" }
    layout tiletop { image = "/usr/share/awesome/icons/layouts/tiletopw.png" }
    layout max { image = "/usr/share/awesome/icons/layouts/maxw.png" }
    layout spiral { image = "/usr/share/awesome/icons/layouts/spiralw.png" }
    layout dwindle { image = "/usr/share/awesome/icons/layouts/dwindlew.png" }
    layout floating { image = "/usr/share/awesome/icons/layouts/floatingw.png" }
    statusbar mystatusbar
    position = "top"
    height = "16"
    taglist mytaglist
    mouse { button = "1" command = "tag_view" }
    mouse { button = "1" modkey = {"Mod4"} command = "client_tag" }
    mouse { button = "3" command = "tag_toggleview" }
    mouse { button = "3" modkey = {"Mod4"} command = "client_toggletag" }
    mouse { button = "4" command = "tag_viewnext" }
    mouse { button = "5" command = "tag_viewprev" }
    layoutinfo mylayoutinfo
    mouse { button = "1" command = "tag_setlayout" args = {"+1"} }
    mouse { button = "4" command = "tag_setlayout" args = {"+1"} }
    mouse { button = "3" command = "tag_setlayout" args = {"-1"} }
    mouse { button = "5" command = "tag_setlayout" args = {"-1"} }
    textbox battery
    align = "right"
    textbox gmail
    mouse { button = "1" command = "spawn" args = {"amazing -u gmail/top/0"} }
    align = "right"
    textbox pacman
    align = "right"
    mouse { button = "1" command = "spawn" args = {"amazing -u pacman/top/0"} }
    textbox mpd
    align = "right"
    mouse { button = "1" command = "spawn" args = {"mpc toggle"} }
    textbox clock
    align = "right"
    rules
    rule { name = "Gimp" tags = "float" float = "true" }
    rule { name = "Pidgin" tags = "float" float = "true" }
    rule { name = "MPlayer" tags = "float" float = "true" }
    rule { name = "Acroread" float = true }
    rule { name = "pinentry" float = true }
    rule { name = "epiphany" tags = "main" master = "true"}
    mouse
    root { button = "3" command = "spawn" args = {"exec urxvt"} }
    root { button = "4" command = "tag_viewnext" }
    root { button = "5" command = "tag_viewprev" }
    client { modkey = {"Mod4"} button = "1" command = "client_movemouse" }
    client { modkey = {"Mod4"} button = "2" command = "client_swap" args = {"0"} }
    client { modkey = {"Mod4"} button = "3" command = "client_resizemouse" }
    titlebar { button = "1" command = "client_movemouse" }
    titlebar { button = "3" command = "client_resizemouse" }
    keys
    key { modkey = {"Mod4"} key = "F1" command = "spawn" args = {"for i in /usr/share/man/man?;do ls $i; done | cut -d. -f1 | awesome-menu -e 'urxvt -e man ' 'See manual page for:'"} }
    key { modkey = {"Mod4"} key = "F2" command = "spawn" args = {"find /usr/bin -type f -executable ! -empty | awesome-menu -e 'exec ' Execute:"} }
    key { modkey = {"Mod4"} key = "F3" command = "spawn" args = {"cut -d' ' -f1 ~/.ssh/known_hosts | cut -d, -f1 | awesome-menu -e 'urxvt -e ssh ' 'ssh to:'"} }
    key { modkey = {"Mod4"} key = "Return" command = "spawn" args = {"exec urxvt"} }
    key { modkey = {"Mod4"} key = "space" command = "tag_setlayout" args = {"+1"} }
    key { modkey = {"Mod4", "Shift"} key = "space" command = "tag_setlayout" args = {"-1"} }
    key { modkey = {"Mod4"} key = "b" command = "statusbar_toggle" }
    key { modkey = {"Mod4"} key = "j" command = "client_focus" args = {"+1"} }
    key { modkey = {"Mod4"} key = "k" command = "client_focus" args = {"-1"} }
    key { modkey = {"Mod4"} key = "Tab" command = "focus_history" args = {"-1"} }
    key { modkey = {"Mod4", "Shift"} key = "j" command = "client_swap" args = {"+1"} }
    key { modkey = {"Mod4", "Shift"} key = "k" command = "client_swap" args = {"-1"} }
    key { modkey = {"Mod4", "Control"} key = "j" command = "screen_focus" args = {"+1"} }
    key { modkey = {"Mod4", "Control"} key = "k" command = "screen_focus" args = {"-1"} }
    key { modkey = {"Mod4"} key = "h" command = "tag_setmwfact" args = {"-0.05"} }
    key { modkey = {"Mod4"} key = "l" command = "tag_setmwfact" args = {"+0.05"} }
    key { modkey = {"Mod4", "Shift"} key = "h" command = "tag_setnmaster" args = {"+1"} }
    key { modkey = {"Mod4", "Shift"} key = "l" command = "tag_setnmaster" args = {"-1"} }
    key { modkey = {"Mod4", "Control"} key = "h" command = "tag_setncol" args = {"+1"} }
    key { modkey = {"Mod4", "Control"} key = "l" command = "tag_setncol" args = {"-1"} }
    key { modkey = {"Mod4"} key = "Escape" command = "tag_prev_selected" }
    key { modkey = {"Mod4"} key = "Left" command = "tag_viewprev" }
    key { modkey = {"Mod4"} key = "Right" command = "tag_viewnext" }
    key { modkey = {"Mod4"} key = "m" command = "client_togglemax" }
    key { modkey = {"Mod4", "Control"} key = "Return" command = "client_swap" args = {"0"} }
    key { modkey = {"Mod4", "Control"} key = "space" command = "client_setfloating" }
    key { modkey = {"Mod4"} key = "s" command = "client_togglescratch" }
    key { modkey = {"Mod4", "Control"} key = "s" command = "client_setscratch" }
    key { modkey = {"Mod4"} key = "r" command = "client_redraw" }
    key { modkey = {"Mod4"} key = "F4" command = "client_kill" }
    key { modkey = {"Mod4", "Shift"} key = "q" command = "quit" }
    key { modkey = {"Mod4", "Control"} key = "r" command = "restart" }
    key { modkey = {"Mod4"} key = "0" command = "tag_toggleview" }
    key { modkey = {"Mod4", "Control"} key = "0" command = "tag_toggleview" }
    key { modkey = {"Mod4", "Control"} key = "1" command = "tag_toggleview" args = {"1"} }
    key { modkey = {"Mod4", "Control"} key = "2" command = "tag_toggleview" args = {"2"} }
    key { modkey = {"Mod4", "Control"} key = "3" command = "tag_toggleview" args = {"3"} }
    key { modkey = {"Mod4", "Control"} key = "4" command = "tag_toggleview" args = {"4"} }
    key { modkey = {"Mod4", "Control"} key = "5" command = "tag_toggleview" args = {"5"} }
    key { modkey = {"Mod4", "Control"} key = "6" command = "tag_toggleview" args = {"6"} }
    key { modkey = {"Mod4", "Control"} key = "7" command = "tag_toggleview" args = {"7"} }
    key { modkey = {"Mod4", "Control"} key = "8" command = "tag_toggleview" args = {"8"} }
    key { modkey = {"Mod4", "Control"} key = "9" command = "tag_toggleview" args = {"9"} }
    key { modkey = {"Mod4", "Shift"} key = "0" command = "client_tag" }
    key { modkey = {"Mod4", "Shift"} key = "1" command = "client_tag" args = {"1"} }
    key { modkey = {"Mod4", "Shift"} key = "2" command = "client_tag" args = {"2"} }
    key { modkey = {"Mod4", "Shift"} key = "3" command = "client_tag" args = {"3"} }
    key { modkey = {"Mod4", "Shift"} key = "4" command = "client_tag" args = {"4"} }
    key { modkey = {"Mod4", "Shift"} key = "5" command = "client_tag" args = {"5"} }
    key { modkey = {"Mod4", "Shift"} key = "6" command = "client_tag" args = {"6"} }
    key { modkey = {"Mod4", "Shift"} key = "7" command = "client_tag" args = {"7"} }
    key { modkey = {"Mod4", "Shift"} key = "8" command = "client_tag" args = {"8"} }
    key { modkey = {"Mod4", "Shift"} key = "9" command = "client_tag" args = {"9"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "0" command = "client_toggletag" }
    key { modkey = {"Mod4", "Shift", "Control"} key = "1" command = "client_toggletag" args = {"1"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "2" command = "client_toggletag" args = {"2"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "3" command = "client_toggletag" args = {"3"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "4" command = "client_toggletag" args = {"4"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "5" command = "client_toggletag" args = {"5"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "6" command = "client_toggletag" args = {"6"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "7" command = "client_toggletag" args = {"7"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "8" command = "client_toggletag" args = {"8"} }
    key { modkey = {"Mod4", "Shift", "Control"} key = "9" command = "client_toggletag" args = {"9"} }
    ## MINE ##
    key { modkey = {"Mod4"} key = "grave" command = "spawn" args = {"urxvt"} }
    key { modkey = {"Mod4"} key = "1" command = "spawn" args = {"epiphany"} }
    key { modkey = {"Mod4"} key = "2" command = "spawn" args = {"abiword"} }
    key { modkey = {"Mod4"} key = "3" command = "spawn" args = {"thunar"} }
    key { modkey = {"Mod4"} key = "4" command = "spawn" args = {"gimp"} }
    key { modkey = {"Mod4"} key = "5" command = "spawn" args = {"pidgin"} }
    # vim: filetype=conf
    Last edited by Reasons (2008-05-14 00:01:10)

  • SOLVED:Dmenu not launching correctly in Xmonad

    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)

    Obscaenvs wrote:
    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).

  • AwesomeWM: disable menu transparency

    I've recently switched to AwesomeWM and I'm also starting to understand how to properly configure it with rc.lua. What I couldn't find out so far however, despite some extensive googling, is hot to disable the transparency effect in the menu bar and the dropdown/popup menus (widget menus and main menu). The effect is that the wallpaper is visible as the background of these menus, which I don't like.
    It's not that much of a problem as I intend to set the wallpaper to solid black anyway, but that would only fix the manifestation of the problem, not the problem itself (i.e. the transparency effect).
    The effect doesn't work properly anyway, that is, the background doesn't refresh itself as it should. When I change the background from an image to solid black (as I just did), all these areas displaying the wallpaper still show the disabled wallpaper instead of the solid black background! (Note that it works as it should if I use a 1x1px solid black background image instead of setting the background with 'xsetroot -solid black'...)
    Last edited by cryptkeeper (2012-12-26 14:56:51)

    If you mean a full-screen Canvas, use the setFullScreenMode() method of Canvas.

  • Dmenu help!!!

    Is there any link to dmenu examples or dmenu scripts.I recently installed awsome and dmenu but I don't know how to configure dmenu...

    I think I got it, I changed your script a bit so it prints all information on one line in 3 columns (directory / title / url). That way you can use dmenu to search for an entry and have firefox launch the URL.
    Launcher:
    #! /bin/dash
    url=$(bookmarkhistory_fx_export | dmenu -i -l 7 -rs -ni -xs | cut -sf3)
    [ -z "$url" ] && exit
    firefox "$url"
    bookmarkhistory_fx_export:
    #!/usr/bin/python
    import os
    import pysqlite2.dbapi2 as sqlite
    import shutil
    import ConfigParser
    import random
    import time
    # change this if you want:
    DISPLAY_PROFILE_NUMBER = 0
    parser = ConfigParser.ConfigParser()
    homedir = os.path.expanduser('~')
    moz = '.mozilla/firefox'
    moz_dir = os.path.join(homedir, moz)
    tmpdir = '/tmp'
    BOOKMARK = 1
    FOLDER = 2
    query_folders = 'SELECT id, title FROM moz_bookmarks WHERE type = 2;'
    query_bookmarks = 'SELECT moz_bookmarks.id, moz_bookmarks.parent, moz_bookmarks.title, moz_places.url \
    FROM moz_bookmarks \
    INNER JOIN moz_places \
    ON moz_bookmarks.fk = moz_places.id \
    WHERE moz_bookmarks.type = 1;'
    def getprofiles():
    profilesini = os.path.join(moz_dir, 'profiles.ini')
    parser.read(profilesini)
    prof = []
    i = 0
    while parser.has_section('Profile' + str(i)):
    name = parser.get('Profile' + str(i), 'Name')
    path = parser.get('Profile' + str(i), 'Path')
    prof.append({'name': name, 'path': path})
    i += 1
    return prof
    def randfilename():
    tmp = 'moz_bmarx_'
    for i in range(12):
    tmp += chr(random.randint(97, 122))
    return tmp
    def opendb(profile):
    places = os.path.join(moz_dir, profile['path'], 'places.sqlite')
    tmpfile = os.path.join(tmpdir, randfilename())
    shutil.copy(places, tmpfile)
    db = sqlite.connect(tmpfile)
    return db
    def printitem(folder, title, url=''):
    if not title: title="noname"
    if not folder: folder="nofolder"
    if not url: url="nourl"
    print folder.encode("UTF-8")+"\t"+title.encode("UTF-8")+"\t"+url.encode("UTF-8")
    def printtree(db, parent, recentfolder):
    cur = db.cursor()
    query = 'SELECT id, type FROM moz_bookmarks WHERE parent = ' + str(parent)
    cur.execute(query)
    res = cur.fetchall()
    for item in res:
    if item[1] == FOLDER:
    query_name = 'SELECT title FROM moz_bookmarks WHERE id = ' + str(item[0])
    cur.execute(query_name)
    name, = cur.fetchone()
    printtree(db, item[0], recentfolder+"/"+name)
    if item[1] == BOOKMARK:
    query_bmark = 'SELECT moz_bookmarks.title, moz_places.url \
    FROM moz_bookmarks \
    INNER JOIN moz_places \
    ON moz_bookmarks.fk = moz_places.id \
    WHERE moz_bookmarks.id = ' + str(item[0])
    cur.execute(query_bmark)
    title, url = cur.fetchone()
    if url[0:5]=="place": continue
    printitem(recentfolder, title, url)
    def allhistory(db):
    cur=db.cursor()
    query_history = 'SELECT moz_historyvisits.visit_date, moz_places.title, moz_places.url FROM moz_historyvisits INNER JOIN moz_places ON moz_historyvisits.place_id = moz_places.id ORDER BY moz_historyvisits.visit_date DESC;'
    cur.execute(query_history)
    res = cur.fetchall()
    for item in res:
    printitem(time.ctime(item[0]/1000000),item[1],item[2])
    profs = getprofiles()
    prf = profs[DISPLAY_PROFILE_NUMBER]
    db = opendb(prf)
    print 'Bookmarks from Profile ' + prf['name']
    printtree(db, 1, "")
    allhistory(db)

  • AwesomeWM Colors

    I just started to use AwesomeWM, and I haven't been able to figure out something yet. I'm trying to edit the default colour of a window, such as xterm. I haven't been able to figure it out yet. Out of all the colour options in theme files, I've only been able to change the colour of the top bar. Is there another file I am missing that I have to change? None of the options appear to apply to anything other than the top bar. I've looked online and at other people's files, and for the life of me I can't figure it out.

    You want to  set xterm information in ~/.Xdefaults. http://wiki.archlinux.org/index.php/Xde … references
    Last edited by dunnen (2010-02-15 07:38:27)

  • AwesomeWM change default starting layout[Solved]

    HI,
    I use awesomeWM and I am very happy with it so far. Today I upgraded the system, and as usual, the configuration file changed. I have managed to deal with the differences so far for every upgrade, but today I must confess as a non lua expert that this time one of the features I tweak got me.
    The new awesome 3.4-1 starts the screens with every tag in the very annoying floating layout. I do not want to change every tag to the desired layout. In the past I have managed to create a customlayout array to start every tag with a desised layout.
    I believe such a tweak is very easy for a lua expert, I just do not see it.
    So bottom line: Is there a way customize the layout of each tag or at least change the "floating" default?
    Thanks in advance
    Last edited by donpicoro (2009-10-23 23:02:42)

    I changed
    tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s)
    to
    tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, awful.layout.suit.tile)
    to get back the default tiling layout.

  • Awesome cursor theme not applied at root-window and bar.

    I've just started using awesomeWM and it's quite neat. My problem is that my cursor theme doesn't get applied completely. It's all fine in apps, but appears without theme when mouse is over the bar and root window.
    My setup info here:
    1. I set my xcursor theme with this:
    ln -s /usr/share/icons/Flatbed-Green-Regular/ ~/.icons/default
    2. I have this in my ~/.xinitrc
    xsetroot -cursor_name left_ptr &
    and the cursor actually is set to be left pointer instead of an "X".
    3. Version
    awesome --version
    awesome v3.4-rc2-5-g9a9c3d1 (Piku)
    • Build: Oct 8 2009 17:56:27 for i686 by gcc version 4.4.1
    • D-Bus support: ✔
    Also /usr/share/doc/awesome/luadoc/modules/root.html#cursor must be just for this purpose, but I don't know the working syntax... I tried adding this to rc.lua (but with no avail):
    cursor = "Flatbed-Green-Regular"
    root.cursor(cursor)
    Edit: Well, anrxc told me "xcb does not support Xcursor yet", meaning this issue can't really be solve by now.
    Last edited by lolilolicon (2009-10-09 14:32:20)

    Got it now.  xsetroot needs the display if you've got a multihead setup or I guess it just doesn't bother.  (Alternately I might just have a weird multihead setup.  Nvidia with one rotated screen in TwinView which isn't even supposed to work.)
    xsetroot -d :0 -cursor_name left_ptr
    xsetroot -d :0.1 -cursor_name left_ptr
    That fixed it for me.

  • Finding Dmenu's window class?

    Normally I would simply run xprop in a terminal and click on the window in question with the cross hairs. However, for the dmenu  "window" this procedure yields no result. Any idea how I could find dmenu window class so I can style and position it using devilspie2?
    I already tried a few obvious guesses for dmenu's window class. "Dmenu_run," "dmenu" and "Dmenu" don't work.
    Last edited by marko2010 (2014-05-25 21:35:00)

    dmenu does not set these properties.
    What are you trying to change with devilspie?  You know dmenu can be configured for most things you'd want to change?
    If you need to use devilspie, you could just add a resource class declaration to the dmenu code and recompile.
    Just add the following 5 lines at line 609 in dmenu.c (changing a_name and a_class to be whatever you want them to be):
    XClassHint *hint = XAllocClassHint();
    hint->res_name = "a_name";
    hint->res_class = "a_class";
    XSetClassHint(dc->dpy, win, hint);
    XFree(hint);
    Last edited by Trilby (2014-05-25 21:53:11)

Maybe you are looking for

  • Fresh install of Acrobat 9 Pro Extended and now I can't update.

    The error I get: There are no updates available at this time. Please note that some updates for the following products cannot be determined at this time: Adobe Updater. I have had this problem in the past and I forgot how I corrected it. Please help.

  • How do I save a Pages 2012 document as an iWork '08 file?

    How do I save a Pages 2012 document as an iWork '08 file?

  • Stripping selective HTML tags?

    Anyone have a "best practice" for stripping (or allowing) certain HTML tags on an insert/update transaction? I'm using TinyMCE in my forms which does this automatically, but if a user has javascript disabled they can bypass the TinyMCE stripping and

  • Save as .mov or .m4v

    I have made a lot of dvds of home movies over the years using final cut pro and then idvd.  I want to recapture the videos back to my computer for future use and also to save them to my apple tv.   I would like to have them in my system, in case I wa

  • Roles required for accessing BBPGETVD Transaction

    Hi Can any one help me what are the required roles to be assigned to a user to access the tcode BBPGETVD. I mean I wanted access the BBPGETVD transaction . what are the roles that i need to assign myself so that i can use that tcode. Regards Sairam E