HELP Can't call terminal by Mod4+Enter (awesome wm)

I can't call terminal by binding key Mod4+Enter. What wrong happened with my rc.lua ?. Please help me. My english not well, sorry everyone.!
-- z1lt0id Awesome WM 3.5.+ config --
-- github.com/z1lt0id --
-- Varation of github.com/copycat --
-- Required Libraries
gears = require("gears")
awful = require("awful")
awful.rules = require("awful.rules")
awful.autofocus = require("awful.autofocus")
wibox = require("wibox")
beautiful = require("beautiful")
naughty = require("naughty")
vicious = require("vicious")
scratch = require("scratch")
-- layouts
layouts = require("layouts")
-- Conky
function get_conky()
local clients = client.get()
local conky = nil
local i = 1
while clients[i]
do
if clients[i].class == "Conky"
then
conky = clients[i]
end
i = i + 1
end
return conky
end
function raise_conky()
local conky = get_conky()
if conky
then
conky.ontop = true
end
end
function lower_conky()
local conky = get_conky()
if conky
then
conky.ontop = false
end
end
function toggle_conky()
local conky = get_conky()
if conky
then
if conky.ontop
then
conky.ontop = false
else
conky.ontop = true
end
end
end
-- Run once function
function run_once(cmd)
findme = cmd
firstspace = cmd:find(" ")
if firstspace then
findme = cmd:sub(0, firstspace-1)
end
awful.util.spawn_with_shell("pgrep -u $USER -x " .. findme .. " > /dev/null || (" .. cmd .. ")")
end
run_once("compton --backend glx --paint-on-overlay --vsync opengl-swc --unredir-if-possible --shadow-exclude 'n:a:Conky' --blur-background-exclude 'n:a:Conky' --config ~/.compton.conf -b")
-- run_once("nm-applet")
-- run_once("/opt/dropbox/dropboxd")
run_once("mpd")
run_once("conky ~/.conkyrc")
run_once("unclutter -idle 1")
-- Localization
os.setlocale("en_AU.UTF-8")
-- Error Handling
-- Check if awesome encountered an error during startup and fell back to
-- another config (This code will only ever execute for the fallback config)
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
-- Handle runtime errors after startup
do
in_error = false
awesome.connect_signal("debug::error", function (err)
-- Make sure we don't go into an endless error loop
if in_error then return end
in_error = true
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, an error happened!",
text = err })
in_error = false
end)
end
-- Variable Definitions
home = os.getenv("HOME")
confdir = home .. "/.config/awesome"
scriptdir = confdir .. "/script/"
themes = confdir .. "/themes"
active_theme = themes .. "/blackburn"
beautiful.init(active_theme .. "/theme.lua")
terminal = "urxvt"
editor = "vim"
editor_cmd = terminal .. " -e " .. editor
gui_editor = "gedit"
browser = "dwb"
browser2 = "dwb"
mail = terminal .. " -g 130x30 -e mutt "
tasks = terminal .. " -e htop "
musicplr = terminal .. " -g 130x34-320+16 -e ncmpcpp "
modkey = "Mod4"
altkey = "Mod1"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
awful.layout.suit.floating,
layouts.uselesstile,
layouts.termfair,
layouts.browse,
layouts.uselessfair,
layouts.centerwork,
-- Wallpaper
if beautiful.wallpaper then
for s = 1, screen.count() do
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
end
end
-- Tags
tags = {
names = { " :) ", " :/ ", " :P ", " X) ", " ;) "},
layout = { layouts[1], layouts[2], layouts[2], layouts[2], layouts[2] }
for s = 1, screen.count() do
tags[s] = awful.tag(tags.names, s, tags.layout)
end
-- Menu
myaccessories = {
{ "ranger", terminal .. " -depth 16 -g 130x30 -e ranger"},
{ "editor", gui_editor }
myinternet = {
{ "weechat", terminal .. " -g 130x30 -e weechat-curses" },
{ "sabnzbd" , "dwb http://localhost:9090" },
{ "transmission", terminal .. " -g 130x30 -e transmission-remote-cli -c xenogia:dot.dot.dot@localhost:9091" },
{ "sickbeard", "dwb http://localhost:8081" },
{ "couchpotato", "dwb http://localhost:5050"}
mymedia = {
{ "volume", "pavucontrol"},
{ "smplayer", "smplayer"},
{ "vlc", terminal .. " -e vlc -I ncurses" },
{ "cdw", terminal .. " -g 130x30 -e cdw"},
{ "devede", "devede"},
{ "ghb" , "ghb"}
mygames = {
{ "playonlinux", "playonlinux"},
{ "dosbox" , "dosbox"},
{ "desura", "desura"},
{ "steam", "steam" },
mygraphics = {
{ "gimp" , "gimp" },
{ "feh" , "feh" }
myoffice = {
{ "libreoffice" , "libreoffice" }
mysystem = {
{ "lxappearance" , "lxappearance" },
{ "gparted" , "sudo gparted"},
{ "htop" , tasks }
mymainmenu = awful.menu({ items = {
{ "accessories" , myaccessories },
{ "graphics" , mygraphics },
{ "internet" , myinternet },
{ "media" , mymedia },
{ "games" , mygames },
{ "office" , myoffice },
{ "system" , mysystem },
mylauncher = awful.widget.launcher({ image = beautiful.awesome_icon,
menu = mymainmenu })
-- Colours
coldef = "</span>"
colwhi = "<span color='#b2b2b2'>"
colbwhi = "<span color='#ffffff'>"
blue = "<span color='#7493d2'>"
yellow = "<span color='#e0da37'>"
grey = "<span color='#636060'>"
purple = "<span color='#e33a6e'>"
lightpurple = "<span color='#eca4c4'>"
azure = "<span color='#80d9d8'>"
green = "<span color='#87af5f'>"
lightgreen = "<span color='#62b786'>"
red = "<span color='#bd0707'>"
orange = "<span color='#ff7100'>"
brown = "<span color='#db842f'>"
fuchsia = "<span color='#800080'>"
gold = "<span color='#e7b400'>"
lightblue="<span color='#3eae9e'>"
lightblue2="<span color='#266c76'>"
lightblue3="<span color='#285666'>"
lightblue4="<span color='#257c85'>"
lightblue5="<span color='#223d5a'>"
lightblue6="<span color='#235369'>"
offyellow="<span color='#857b52'>"
bottomgrey="<span color='#999999'>"
-- {{{ Wibox
-- {{{{ Temp
tempicon = wibox.widget.imagebox()
tempicon:set_image(beautiful.widget_temp)
tempwidget = wibox.widget.textbox()
vicious.register(tempwidget, vicious.widgets.thermal, bottomgrey .. " Temp: $1°C" .. coldef, 15, "thermal_zone0")
-- {{{ Kernel Info
sysicon = wibox.widget.imagebox()
sysicon:set_image(beautiful.widget_arch)
syswidget = wibox.widget.textbox()
vicious.register( syswidget, vicious.widgets.os, bottomgrey .. " Kernel: $2" .. coldef)
-- {{{ Uptime
uptimeicon = wibox.widget.imagebox()
uptimeicon:set_image(beautiful.widget_uptime)
uptimewidget = wibox.widget.textbox()
vicious.register( uptimewidget, vicious.widgets.uptime, bottomgrey .. " Uptime: $1d $2h $3m" .. coldef)
-- {{{ Cpu
-- CPU widget
cpuicon = wibox.widget.imagebox()
cpuicon:set_image(beautiful.widget_cpu)
cpuwidget = wibox.widget.textbox()
vicious.register(cpuwidget, vicious.widgets.cpu, bottomgrey .. " Cpu: $1%" .. coldef, 15)
cpuicon:buttons(awful.util.table.join(awful.button({ }, 1, function () awful.util.spawn(tasks, false) end)))
-- {{{ Ram
-- Memory widget
memicon = wibox.widget.imagebox()
memicon:set_image(beautiful.widget_mem)
memwidget = wibox.widget.textbox()
vicious.register(memwidget, vicious.widgets.mem, bottomgrey .. " Memory: $2MB" .. coldef, 15)
-- {{{ Mpd
mpdicon = wibox.widget.imagebox()
mpdicon:set_image(beautiful.widget_mpd)
mpdwidget = wibox.widget.textbox()
-- Register widget
vicious.register(mpdwidget, vicious.widgets.mpd,
function (widget, args)
if args["{state}"] == "Stop" then
return " - "
else
return args["{Artist}"]..' - '.. args["{Title}"]
end
end, 10)
-- {{{ Net
-- Net widget
netdownicon = wibox.widget.imagebox()
netdownicon:set_image(beautiful.widget_netdown)
netdownicon.align = "middle"
netdowninfo = wibox.widget.textbox()
vicious.register(netdowninfo, vicious.widgets.net, green .. "${enp9s0 down_kb}" .. coldef, 1)
netupicon = wibox.widget.imagebox()
netupicon:set_image(beautiful.widget_netup)
netupicon.align = "middle"
netupinfo = wibox.widget.textbox()
vicious.register(netupinfo, vicious.widgets.net, red .. "${enp9s0 up_kb}" .. coldef, 1)
ethdowninfo = wibox.widget.textbox()
vicious.register(ethdowninfo, vicious.widgets.net, "<span color=\"#d3c6d7\">${enp9s0 down_kb}</span>", 1)
ethupinfo = wibox.widget.textbox()
vicious.register(ethupinfo, vicious.widgets.net, "<span color=\"#d3c6d7\">${enp9s0 up_kb}</span>", 1)
-- {{{ Volume
-- Volume widget
volicon = wibox.widget.imagebox()
volicon:set_image(beautiful.widget_vol)
volumewidget = wibox.widget.textbox()
vicious.register(volumewidget, vicious.widgets.volume, bottomgrey .. " Volume: $1%" .. coldef, 1, "Master")
-- Pacman Widget --
-- Pacman Icon
pacicon = wibox.widget.imagebox()
pacicon:set_image(beautiful.widget_pac)
-- Pacman Widget
pacwidget = wibox.widget.textbox()
pacwidget_t = awful.tooltip({ objects = {pacwidget},})
vicious.register(pacwidget, vicious.widgets.pkg,
function(widget,args)
local io = { popen = io.popen }
local s = io.popen("pacman -Qu")
local str = ''
for line in s:lines() do
str = str .. line .. "\n"
end
pacwidget_t:set_text(str)
s:close()
return "" .. bottomgrey .. " Updates: " .. args[1] .. coldef
end, 60, "Arch")
--'1800' means check every 30 minutes
pacicon:buttons(awful.util.table.join(
awful.button({ }, 3, function () awful.util.spawn("".. terminal.. " --hold -e sudo pacman -Syu", false) end),
awful.button({ }, 1, function () awful.util.spawn("sudo pacman -Syu", false) end)
-- {{{ Clock
-- Textclock widget
clockicon = wibox.widget.imagebox()
clockicon:set_image(beautiful.widget_clock)
mytextclock = awful.widget.textclock(bottomgrey .. " %A %d %B</span> " .. colwhi .. "</span><span color=\"#ffffff\">></span> <span color='#999999'>%H:%M</span>")
-- {{{ Spacers
space = wibox.widget.textbox()
space:set_text(' ')
-- {{{ Seperator
openb = wibox.widget.textbox(lightblue6 .. " [" .. coldef)
closeb = wibox.widget.textbox(lightblue6 .. " ]" .. coldef)
-- Create a wibox for each screen and add it
mywibox = {}
mybottomwibox = {}
bottombox = {}
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, function(t) awful.tag.viewnext(awful.tag.getscreen(t)) end),
awful.button({ }, 5, function(t) awful.tag.viewprev(awful.tag.getscreen(t)) end)
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
if c == client.focus then
c.minimized = true
else
-- Without this, the following
-- :isvisible() makes no sense
c.minimized = false
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()
-- 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.filter.all, mytaglist.buttons)
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s })
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(mylauncher)
left_layout:add(mypromptbox[s])
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.horizontal()
right_layout:add(space)
right_layout:add(space)
-- right_layout:add(mylayoutbox[s])
-- Now bring it all together (with the tasklist in the middle)
local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout)
-- layout:set_middle(mytasklist[s])
layout:set_middle(mytaglist[s])
layout:set_right(right_layout)
mywibox[s]:set_widget(layout)
-- Create Bottom WiBox
mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s })
-- Widgets Aligned to the Middle
local bottom_left_layout = wibox.layout.fixed.horizontal()
bottom_left_layout:add(sysicon)
bottom_left_layout:add(syswidget)
bottom_left_layout:add(space)
bottom_left_layout:add(volicon)
bottom_left_layout:add(volumewidget)
bottom_left_layout:add(space)
bottom_left_layout:add(cpuicon)
bottom_left_layout:add(cpuwidget)
bottom_left_layout:add(space)
bottom_left_layout:add(memicon)
bottom_left_layout:add(memwidget)
bottom_left_layout:add(space)
bottom_left_layout:add(tempicon)
bottom_left_layout:add(tempwidget)
bottom_left_layout:add(space)
bottom_left_layout:add(pacicon)
bottom_left_layout:add(pacwidget)
bottom_left_layout:add(space)
bottom_left_layout:add(uptimeicon)
bottom_left_layout:add(uptimewidget)
bottom_left_layout:add(space)
bottom_left_layout:add(clockicon)
bottom_left_layout:add(mytextclock)
local bottom_right_layout = wibox.layout.fixed.horizontal()
if s == 1 then bottom_right_layout:add(wibox.widget.systray()) end
-- Bring Bottom Wibox Together
local bottom_layout = wibox.layout.align.horizontal()
bottom_layout:set_middle(bottom_left_layout)
bottom_layout:set_right(bottom_right_layout)
mybottomwibox[s]:set_widget(bottom_layout)
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(
-- Capture a screenshot
awful.key({ altkey }, "p", function() awful.util.spawn("screenshot",false) end),
-- Move clients
awful.key({ altkey }, "Next", function () awful.client.moveresize( 1, 1, -2, -2) end),
awful.key({ altkey }, "Prior", function () awful.client.moveresize(-1, -1, 2, 2) end),
awful.key({ altkey }, "Down", function () awful.client.moveresize( 0, 1, 0, 0) end),
awful.key({ altkey }, "Up", function () awful.client.moveresize( 0, -1, 0, 0) end),
awful.key({ altkey }, "Left", function () awful.client.moveresize(-1, 0, 0, 0) end),
awful.key({ altkey }, "Right", function () awful.client.moveresize( 1, 0, 0, 0) end),
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, }, "k",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ modkey, }, "j",
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),
-- Show/Hide Wibox
awful.key({ modkey }, "b", function ()
mywibox[mouse.screen].visible = not mywibox[mouse.screen].visible
end),
-- Application Switcher
awful.key({ "Mod1" }, "Tab", function ()
-- If you want to always position the menu on the same place set coordinates
awful.menu.menu_keys.down = { "Down", "Alt_L" }
local cmenu = awful.menu.clients({width=245}, { keygrabber=true, coords={x=525, y=330} })
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, }, "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),
-- Dropdown terminal
awful.key({ modkey, }, "z", function () scratch.drop(terminal) end),
-- Widgets popups
-- Volume control
awful.key({ "Control" }, "Up", function ()
awful.util.spawn("amixer set Master playback 1%+", false )
vicious.force({ volumewidget })
end),
awful.key({ "Control" }, "Down", function ()
awful.util.spawn("amixer set Master playback 1%-", false )
vicious.force({ volumewidget })
end),
awful.key({ "Control" }, "m", function ()
awful.util.spawn("amixer set Master playback mute", false )
vicious.force({ volumewidget })
end),
awful.key({ "Control" }, "u", function ()
awful.util.spawn("amixer set Master playback unmute", false )
vicious.force({ volumewidget })
end),
awful.key({ altkey, "Control" }, "m", function ()
awful.util.spawn("amixer set Master playback 100%", false )
vicious.force({ volumewidget })
end),
-- Music control
awful.key({ altkey, "Control" }, "Up", function ()
awful.util.spawn( "mpc toggle", false )
vicious.force({ mpdwidget } )
end),
awful.key({ altkey, "Control" }, "Down", function ()
awful.util.spawn( "mpc stop", false )
vicious.force({ mpdwidget } )
end ),
awful.key({ altkey, "Control" }, "Left", function ()
awful.util.spawn( "mpc prev", false )
vicious.force({ mpdwidget } )
end ),
awful.key({ altkey, "Control" }, "Right", function ()
awful.util.spawn( "mpc next", false )
vicious.force({ mpdwidget } )
end ),
-- Copy to clipboard
awful.key({ modkey, }, "c", function () os.execute("xsel -p -o | xsel -i -b") end),
-- User programs
awful.key({ modkey, }, "q", function () awful.util.spawn( "dwb", false ) end),
awful.key({ modkey, "Control" }, "m", function () awful.util.spawn( terminal .. " -g 130x30 -e mutt", false ) end),
awful.key({ modkey, }, "s", function () awful.util.spawn(gui_editor) end),
awful.key({ modkey, "Control" }, "f", function () awful.util.spawn( terminal .. " -depth 16 -g 130x30 -e ranger", false ) end),
awful.key({ modkey, "Control" }, "v", function () awful.util.spawn( "/usr/local/bin/video", false) end),
-- awful.key({ modkey, }, "d", function () awful.util.spawn( "spacefm", false ) end),
-- Conky
-- 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, }, "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)
-- 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 ()
screen = mouse.screen
if tags[screen][i] then
awful.tag.viewonly(tags[screen][i])
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
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,
size_hints_honor = false
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { name = "PlayOnLinux" },
properties = { tag = tags[1][1] } },
{ rule = { instance = "urxvt", class = "URxvt" },
properties = { tag = tags[1][2] } },
{ rule = { class = "Sublime_text" },
properties = { tag = tags[1][4] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "sabcurses.py"},
properties = { tag = tags[1][5] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "ranger"},
properties = { tag = tags[1][2] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "weechat"},
properties = { tag = tags[1][3] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "mutt" },
properties = { tag = tags[1][3] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "htop" },
properties = { tag = tags[1][2] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "cdw" },
properties = { tag = tags[1][2] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "transmission-remote-cli"},
properties = { tag = tags[1][5] } },
{ rule = { instance = "urxvt", class = "URxvt", name = "vlc"},
properties = { tag = tags[1][4] } },
{ rule = { class = "Conky" },
properties = {
floating = true,
sticky = true,
ontop = false,
border_width = 0,
focusable = false,
size_hints = {"program_position", "program_size"}
{ rule = { class = "Ghb" },
properties = { tag = tags[1][1] } },
{ rule = { class = "Devede" },
properties = { tag = tags[1][1] } },
{ rule = { name = "LibreOffice"},
properties = { tag = tags[1][4] } },
{ rule = { class = "Gimp" },
properties = { tag = tags[1][1],
floating = true } },
-- Signals
-- Signal function to execute when a new client appears.
client.connect_signal("manage", function (c, startup)
-- Enable sloppy focus
c:connect_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
local titlebars_enabled = false
if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(awful.titlebar.widget.iconwidget(c))
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.horizontal()
right_layout:add(awful.titlebar.widget.floatingbutton(c))
right_layout:add(awful.titlebar.widget.maximizedbutton(c))
right_layout:add(awful.titlebar.widget.stickybutton(c))
right_layout:add(awful.titlebar.widget.ontopbutton(c))
right_layout:add(awful.titlebar.widget.closebutton(c))
right_layout:add(awful.titlebar.widget.closebutton(c))
-- The title goes in the middle
local title = awful.titlebar.widget.titlewidget(c)
title:buttons(awful.util.table.join(
awful.button({ }, 1, function()
client.focus = c
c:raise()
awful.mouse.client.move(c)
end),
awful.button({ }, 3, function()
client.focus = c
c:raise()
awful.mouse.client.resize(c)
end)
-- Now bring it all together
local layout = wibox.layout.align.horizontal()
layout:set_left(left_layout)
layout:set_right(right_layout)
layout:set_middle(title)
awful.titlebar(c):set_widget(layout)
end
end)
client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)

@Prezioso: sorry about that i will upload some screenshots about error
Sloved. Thank you very much. urxvt not install, i change terminal to gnome-terminal.
I have one question about themes for copycat-killer. This is github https://github.com/copycat-killer/awesome-copycats.
I can't use his themes althought installed fonts are Terminus (Multicolor, Powerarrow Darker) and Tamsyn (other ones).
Then I copy them to ~/.fonts and use command " fc-cache -fv ". after that restart awesome but error font. What wrong i do. ?
this is my calendar.lua file
Licensed under GNU General Public License v2
* (c) 2013, Luke Bonham
local icons_dir = require("lain.helpers").icons_dir
local awful = require("awful")
local beautiful = require("beautiful")
local naughty = require("naughty")
local io = { popen = io.popen }
local os = { date = os.date }
local tonumber = tonumber
local setmetatable = setmetatable
-- Calendar notification
-- lain.widgets.calendar
local calendar = {}
local cal_notification = nil
function calendar:hide()
if cal_notification ~= nil then
naughty.destroy(cal_notification)
cal_notification = nil
end
end
function calendar:show(t_out, inc_offset, scr)
calendar:hide()
local offs = inc_offset or 0
local tims = t_out or 0
local f, c_text
local today = tonumber(os.date('%d'))
local init_t = calendar.cal .. ' | sed -r -e "s/(^| )( '
calendar.offset = calendar.offset + offs
if offs == 0 or calendar.offset == 0
then -- current month showing, today highlighted
if today >= 10
then
init_t = calendar.cal .. ' | sed -r -e "s/_\\x08//g" | sed -r -e "s/(^| )('
end
calendar.offset = 0
calendar.notify_icon = calendar.icons .. today .. ".png"
-- bg and fg inverted to highlight today
f = io.popen( init_t .. today ..
')($| )/\\1<b><span foreground=\\"'
.. calendar.bg ..
'\\" background=\\"'
.. calendar.fg ..
'\\">\\2<\\/span><\\/b>\\3/"' )
else -- no current month showing, no day to highlight
local month = tonumber(os.date('%m'))
local year = tonumber(os.date('%Y'))
month = month + calendar.offset
if month > 12 then
month = month % 12
year = year + 1
if month <= 0 then
month = 12
end
elseif month < 1 then
month = month + 12
year = year - 1
if month <= 0 then
month = 1
end
end
calendar.notify_icon = nil
f = io.popen(calendar.cal .. ' ' .. month .. ' ' .. year)
end
c_text = "<tt><span font='" .. calendar.font .. " "
.. calendar.font_size .. "'><b>"
.. f:read() .. "</b>\n\n"
.. f:read() .. "\n"
.. f:read("*a"):gsub("\n*$", "")
.. "</span></tt>"
f:close()
cal_notification = naughty.notify({
text = c_text,
icon = calendar.notify_icon,
position = calendar.position,
fg = calendar.fg,
bg = calendar.bg,
timeout = tims,
screen = scr or 1
end
function calendar:attach(widget, args)
local args = args or {}
calendar.cal = args.cal or "/usr/bin/cal"
calendar.icons = args.icons or icons_dir .. "cal/white/"
calendar.font = args.font or beautiful.font:sub(beautiful.font:find(""),
beautiful.font:find(" "))
calendar.font_size = tonumber(args.font_size) or 11
calendar.fg = args.fg or beautiful.fg_normal or "#FFFFFF"
calendar.bg = args.bg or beautiful.bg_normal or "#FFFFFF"
calendar.position = args.position or "top_right"
calendar.scr_pos = args.scr_pos or 1
calendar.offset = 0
calendar.notify_icon = nil
widget:connect_signal("mouse::enter", function () calendar:show(0, 0, scr_pos) end)
widget:connect_signal("mouse::leave", function () calendar:hide() end)
widget:buttons(awful.util.table.join( awful.button({ }, 1, function ()
calendar:show(0, -1, scr_pos) end),
awful.button({ }, 3, function ()
calendar:show(0, 1, scr_pos) end),
awful.button({ }, 4, function ()
calendar:show(0, -1, scr_pos) end),
awful.button({ }, 5, function ()
calendar:show(0, 1, scr_pos) end)))
end
return setmetatable(calendar, { __call = function(_, ...) return create(...) end })
Thank everyone.
Last edited by zyzzvn (2015-02-04 14:55:21)

Similar Messages

  • HELP Can't call or receive calls

    Recently, whenever I get a call on my iPhone 4 it makes a loud beeping noise. I can barely hear what the other person is saying. It also makes the beeping noise for the person at the other end of the call, which I thought was odd. This is keeping me from being able to call anyone at all and I need to know if this can be fixed or if I will be out of luck and have to buy a new phone (which I really don't want to do).

    Hi loisdan
    First try a battery pull restart by removing the battery while your device is Powered On , wait for a min. then reinsert it back , after reboot please check if you're able to make call or send text message .
    If problem persists then you should call or contact your Carrier T-Mobile to know about the issue .
    Click " Like " if you want to Thank someone.
    If Problem Resolves mark the post(s) as " Solution ", so that other can make use of it.

  • How to log in with my old Apple account? I forgot my pass and I did change my apple ID before canceling first?? I am from Croatia so did folow al the discussion and the to resolve the problem but no luck. Can not call from Croatia the Apple help desk

    How to log in with my old Apple account? I forgot my pass and I did change my apple ID before canceling first?? I am from Croatia so did folow al the discussion and the to resolve the problem but no luck. Can not call from Croatia the Apple help desk.i did try all the options but I can not find the phone number to call from Croatia,
    I can not change my Apple ID to the old mail (not possible!)
    The old mail don't accept the new password..
    I can not delete the Icloud all the time asking my the password of the old mail!
    I realy need help

    You can not merge accounts.
    Apps are tied to the Apple ID used to download them, you can not transfer them.

  • After my iphone4S update to 7.0.6, it have a problem that keep searching network then no service show on display. Can't call. I have try check sim card, reset network settings, and restore my iphone. Still not working at all. Need help please.

    After my iphone4S update to 7.0.6, it have a problem that keep searching network then no service show on display. Can't call. I have try check sim card, reset network settings, and restore my iphone. Still not working at all. Need help please.Urgent.TQ

    Izit software or hardware? Confuse:(
    Only can use wifi now.
    Any way thanks guys for ur suggestion:) amishcake and simes

  • Since i have updated to IOS 7.1 my phone no longer can make calls, connect using 3G or send text messages. can someone help please?

    since i have updated to IOS 7.1 my phone no longer can make calls, connect using 3G or send text messages. has anyone else had this trouble? i've tried resetting the phone, but had no luck. i can recieve calls and texts, but cannot make calls, text or use the 3G.
    please can anyone help?

    Yes! All the above. I have to buy a new phone. I contacted my phone company and there is nothing they can do 

  • How can I call external SSL application to enter Payments from EBS 10.5.10?

    Hello
    I am not able to do
    [Can I call any ActiveX control in the Forms under Oracle EBS 11.5.10 ?|http://forums.oracle.com/forums/thread.jspa?threadID=1086549&tstart=135]
    Now I am looking for some ideas or alternatives or suggestions.
    We are at EBS 11.5.10 on 9i and window environment.
    Background:
    We have a custom application that runs in EBS to enter payments againts Customers, Invoices or Orders. (pl do not recommand iPayments)
    When payment type is CreditCard upon saving a procedure calls a consol apps to charge the card electronicaly using Authorize.net APIs.
    Problem:
    Now this procedure of calling (consol apps) is not PCI compliance as unencrypted card number is passed to console app. (consol app is not using SSL connection)
    Solution:
    Created SSL web site using .NET and can call this using WEB.SHOW_DOCUMENT. Because this is external apps hence I can not get data/response back to calling form (Oracle EBS). This solution is not very elegant as user has to manually query (in the EBS) after saving/submitting/closing web page.
    Any other idea to improve above solution or or suggestions for new one. Except for payment part everything else in this suitation is in EBS.
    Thanks a lot.

    All Gurus please give some advice. Its is for EBS 11.5.10 (not 10.5.11 typo in the message title). Thanks..

  • In my iPhone 4s, since I updated to the latest iOS 6.1.2 I have noticed that my battery drains very quickly, and that after 15 days after date, I lost the cell signal, I have 3g, but I can not call or receive calls or sms. HELP!

    In my iPhone 4s, since I updated to the latest iOS 6.1.2 I have noticed that my battery drains very quickly, and that after 15 days after date, I lost the cell signal, I have 3g, but I can not call or receive calls or sms. HELP!
    Sorry for my bad english :S
    Please, please help me

    Contact the carrier.

  • Never once has my phone updated without deleting everything. It says "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes. I can't call for help because my phone is frozen on the screen with iTune

    Never once has my phone updated without deleting everything. It says "iTunes has detected an iPhone in recovery mode. You must restore this iPhone before it can be used with iTunes. I can't call for help because my phone is frozen on the screen with iTunes. On line live chat won't chat until I give them my serial number which I can't get to because its frozen and can't call for the same reason!!  Omg!  Someone please help me!?

    Morning AppleHlumamkhululi,
    Thanks for using Apple Support Communities.
    In most cases, the connected iPod needs to be restored.
    For more information on this, take a look at this article:
    iTunes has detected an iPod in recovery mode - Use iTunes to restore
    http://support.apple.com/kb/ts1456
    Best of luck,
    Mario

  • HT201195 Who can I call about getting help with redeeming my iTunes card?

    Title is pretty self explanatory: Who can I call about getting help with redeeming my iTunes card?

    There isn't a phone number for iTunes Support, you can contact them via this page (you will probably need to give them images of the front and back of the card, and possibly its receipt) : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then iTunes Cards And Codes

  • Just bought a new Macbook Air (and a new to Mac) and having trouble connecting to home hub. Hub can be found yet when I enter my password, I receive the message "timed out".  Can anyone help me?

    Just bought a new Macbook Air (and a new to Mac) and having trouble connecting to home hub. Hub can be found yet when I enter my password, I receive the message "timed out".  Can anyone help me?
    G

    Go into your router's page and disable password protection and try connecting again.

  • HT4993 I'm trying to place a phone call and when I do the 3G icon goes away and the phone just says connecting but never does. I have almost full service and only have had my new iPhone 5 for two days. Can anyone help because I can't call Sprint at the mo

    I'm trying to place a phone call and when I do the 3G icon goes away and the phone just says connecting but never does. I have almost full service and only have had my new iPhone 5 for two days. Can anyone help because I can't call Sprint at the moment???

    Settings > General > Reset > Reset Network Settings

  • Can anyone help me on this problem? Caller cannot hear me , but i can hear caller voice?

    I'm new to IP 4; caller cannot hear me - but i can hear caller>> is this a network problem or phone problem?

    hi noor zilawati,
    Just for your info,
    1)Pls do try to turn off n on the phone for up to 5  times. ( to reboot the program )
    Maybe you need to take out the battery n put in back again. Just be patient.  The phone may not be okay straight away. Maybe after a day or two , the phone will go back to normal operation.
    2) Try using the handfree set or earphone. If it is working, this shows your phone is ok. Maybe you have to bear with the inconvenience of using the earphone for a day or two.
    3) Remember, if you send back to the supplier like digi,maxis or celcom -  the technician over there will do just the same. They will say they need to send your phone back to factory or they will ask you to register the complaint
    and ask you to wait for the spare parts.
    4) IF IT IS POSSIBLE, JUST ASK THEM TO REPLACE A NEW PHONE FOR YOU ! DEMAND YOUR RIGHTS!
    Hope the above  is helpful to you.
    Best regards,
    Hugh
    ps. you can contact me at [email protected]

  • I have set reminders of birthdays for 2013 opting for yeARly reminders however only three of them are showing for 2014 and rest are missing can someone help, while i called up customer support they asked me to reset the phone which as well didn't help

    I have set reminders of birthdays for 2013 opting for yeARly reminders however only three of them are showing for 2014 and rest are missing can someone help, while i called up customer support they asked me to reset the phone which as well didn't help

    Tina,
    I would go crazy if this was me.  You may find this interesting from the customer agreement (to see full agreement go here:Customer Agreement | Verizon Wireless):
    "HOW AND WHEN CAN I DISPUTE CHARGES?
    If you're a Postpay customer, you can dispute your bill within 180 days of receiving it, but unless otherwise provided by law or unless you're disputing charges because your wireless device was lost or stolen, you still have to pay all charges until the dispute is resolved. If you're a Prepaid customer, you can dispute a charge within 180 days of the date the disputed charge was incurred. YOU MAY CALL US TO DISPUTE CHARGES ON YOUR BILL OR ANY SERVICE(S) FOR WHICH YOU WERE BILLED, BUT IF YOU WISH TO PRESERVE YOUR RIGHT TO BRING AN ARBITRATION OR SMALL CLAIMS CASE REGARDING SUCH DISPUTE, YOU MUST WRITE TO US AT THE CUSTOMER SERVICE ADDRESS ON YOUR BILL, OR SEND US A COMPLETED NOTICE OF DISPUTE FORM (AVAILABLE AT VERIZONWIRELESS.COM), WITHIN THE 180–DAY PERIOD MENTIONED ABOVE. IF YOU DO NOT NOTIFY US IN WRITING OF SUCH DISPUTE WITHIN THE 180-DAY PERIOD, YOU WILL HAVE WAIVED YOUR RIGHT TO DISPUTE THE BILL OR SUCH SERVICE(S) AND TO BRING AN ARBITRATION OR SMALL CLAIMS CASE REGARDING ANY SUCH DISPUTE."
    This may help you also: Arbitration and Mediation FAQs | Verizon Wireless
    You can dispute any charges by doing an Arbitration or Mediation.  I have never done it, so I can not help much there but this all may get you started.
    Let me know if any of this works! Good Luck! Please keep me updated. I really hope they help you.

  • HT5312 Every time i try to buy something from the Itunes i cant because i most answer the security question but I don't remember my security question answer help plzzz, note: I can't call the apple support because I live in Saudi Arabi

    Every time i try to buy something from the AppStore  on my iPad or iPhone 4S i cant because i most answer the security question but I don't remember my security question answer, when I try to go change it from my Apple account he ask me the security questions agin and I don't know the answer help plzzz, note: I can't call the apple support because I live in Saudi Arabia

    If you don't see the 'send reset info' button on the page where you can change them then I assume that you don't have a rescue email address (which is not the same thing as an alternate email address) set up on your account. As you won't be able to add one until you can answer 2 of your questions, you will need to contact iTunes Support or Apple to get the questions reset. You could try contacting iTunes Support : http://www.apple.com/support/itunes/contact/ - click on Contact iTunes Store Support on the right-hand side of the page, then Account Management , and then try Apple ID Account Security

  • IPhone 4 with Att, 3g, I can receive calls but caller can't hear me. I tried reboot and remove sim card. Help!

    IPhone 4 with Att, 3g, I can receive calls but caller can't hear me. I tried reboot and remove sim card. Help!

    Restart the device. http://support.apple.com/kb/ht1430
    Reset the device. (Same article as above.)
    Restore from backup. http://support.apple.com/kb/ht1766 (If you don't have a backup, make one now, then skip to the next step.)
    Restore as new device. http://support.apple.com/kb/HT4137  For this step, do not re-download ANYTHING, and do not sign into your Apple ID.
    Test the issue after each step.  If the last one does not resolve the issue, it is likely a hardware problem.

Maybe you are looking for

  • Creating timer problem in oracle forms

    Hello,         I am using oracle weblogic 10.3.5 with oracle forms 11g at windows 7.I am trying to make a trigger but getting frm 40738 argument 1 to builtin GET_APPLICATION_PROPERTY cant be null error. I am using code at when-new-form-Instance trigg

  • Mac book pro with Komplete 4 and other AU plugins

    I just got a full loaded mac book pro, NI Komplete 4 , korg legacy digital edition, Arturia minimoog v. and haven't got any of them to run successfully with Logic pro 7 (7.2.3). they run as stand alones but logic is having trouble finding them, i hav

  • SAP Business WORKFLOW User Decision Rejection Rollback.

    Dear SAP experts. Please help on below Query: 1) In my Custom workflow , we are mailing to a user with user decision on change of some SAP data.( material master, source list, PO change). 2) In A User Decision there are 2 Options: APPROVE Changes. RE

  • Unable to save my files on cloud

    I am using office 365 but when I try to save a file on my OneDrive location on the internet I get the message " This possibility has been deactivated by your administrator". As a workaround I have to save the file on my desktop and then access my One

  • Standard WebItems in WAD

    Hi all. plz can anybody tell me the standard webitems like report, navigation pane, filter pane .plz don't lgive any link try to explain with simple word. already i refered many document but i am unable to get it. plz try to explain with simple words