Awesome 'awful.client.movetotag' function
I'm wondering if anyone has a way around this. Setting up hotkeys to open things like thunar, i have:
if name:lower():find("thunar") then
awful.client.movetotag(tags[screen][1])
end
but when thunar starts, the title is actually 'username - File Manager'. That isn't a problem, I can make another action that searches my username, and puts it in the tag I want. The problem is trying to get pidgin windows to do the same. When pidgin opens, it has the name of the user sending the messege. I don't want to have to write a separate case for each user on my list
I was wondering if there's a better way?
If you're using a recent awesome commit, client:class_get() was added a bit back, you could use that to check for the WM_CLASS instead of the window title.
Last edited by GGLucas (2008-06-07 20:24:34)
Similar Messages
-
The MS15-10 Security Update for Windows Server 2012/R2 Essentials and the Client Restore Functionality - The Windows Server Essentials and Small Business Server Blog - Site Home - TechNet Blogs:
http://blogs.technet.com/b/sbs/archive/2015/03/13/the-ms15-10-security-update-for-windows-server-2012-r2-essentials-and-the-client-restore-functionality.aspx
FYIHi Susan. I hope there's a better 'fix' coming to replace this "uninstall the updates, restore, then reinstall the updates after the restore". This kind of workaround requires that all of us remember that there's a problem
with KB3023562 and KB3004375 from now until the end of WS2012E. Not sure I'll remember this 6 months from now when the problem crops up during a restore. -:(
Merv Porter
========================= -
The customer is considering to implement client switch functionality in interaction center for CRM7. Are there implications for this scenario if one of the CRM/ERP pairs is unavailable due to outage?
regards,
bill.Hello Suvitha,
Sure, the Client Switch scenario is designed for situations in which you need to keep data from different customers completely separated and secure. For example, this is commonly used in business processing outsourcing (BPO) situations where a company provides call-center hosting for a number of different companies. When a customer calls, the system recognizes the caller and pulls up the record from the correct SAP CRM client. Here are some more details:
[http://help.sap.com/saphelp_crm60/helpdata/en/ee/59d9aff0fc4a2fb48d73a0cf93c90c/content.htm]
[http://www.sap.com/community/webcast/2008_06_SAPSkills_de/2008_06_sapskills_de_F5.pdf]
Best regards,
John -
[solved] awesome: awful.rules: stop matching further rules
Is there a way to make awesome stop matching further rules in awful.rules?
Example: I'd like to place all Thunar windows on tab 4 by default. But if I move one of them to another tag, I'd like to have dialogs of that window (e.g. a rename-dialog) appear on the same tag, not the default one.
This could be done like this:
awful.rules.rules = {
-- default
-- additional rules
{ rule = { class = "Dialog" },
properties = { floating = true } ,
stopmatching = true },
{ rule = { class = "Thunar" },
properties = { tag = tags[1][4] } }
Any ideas how to achieve this?
Thanks in advance
lynix
Last edited by lynix (2011-11-15 18:04:12)Tried to do this, but it seems there's a problem properly matching the window:
The rename-window has the following xprop:
_NET_WM_DESKTOP(CARDINAL) = 3
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MODAL
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x1000040
bitmap id # of mask for icon: 0x1000041
window id # of group leader: 0x1000001
XdndAware(ATOM) = BITMAP
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
_NET_WM_ICON(CARDINAL) = Icon (48 x 48):
WM_TRANSIENT_FOR(WINDOW): window id # 0x1000003
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 16780243
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG
_NET_WM_USER_TIME(CARDINAL) = 983672
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x1000bd2
WM_CLIENT_LEADER(WINDOW): window id # 0x1000001
_NET_WM_PID(CARDINAL) = 1861
WM_LOCALE_NAME(STRING) = "de_DE.UTF-8"
WM_CLIENT_MACHINE(STRING) = "thor"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified location: 0, 0
program specified minimum size: 230 by 113
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "thunar", "Thunar"
WM_ICON_NAME(STRING) = "»aquaero_5_deu.pdf« umbenennen"
_NET_WM_ICON_NAME(UTF8_STRING) = "»aquaero_5_deu.pdf« umbenennen"
WM_NAME(STRING) = "»aquaero_5_deu.pdf« umbenennen"
_NET_WM_NAME(UTF8_STRING) = "»aquaero_5_deu.pdf« umbenennen"
Any idea how to match that _NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG line?
I tried with these rules, without success:
{ rule = { class = "Dialog" },
properties = { floating = true } },
{ rule = { class = "Thunar" }, except = { class = "dialog" },
properties = { tag = tags[1][4] } } -
Web ADI in 11.5.10.2 vs Thick Client ADI Functionality?
I am the Apps DBA and we recently patched our 11.5.10.2 instance to the latest RUP6 patches which included BNE (Web ADI) patches. We have not done the functional post-steps for Web ADI, nor have we rolled out Web ADI, because of internal debate on our team. For me, I would like people to get off thick client apps, esp since ADI is so old (requiring Oracle 8 sqlnet) and the associated termserver we have set up to access it. Others however say that the users in Finance will not be able to replicate the functionality they need using WebADI, and that in fact we should just wait until R12 to upgrade to WebAdi. Apparently several financial consultants feel the same. Can anyone state their own experiences and the "bottom line" on WebAdI Functionality as it currently exists? thanks!
The last organization I worked at implemented webadi a number of years ago with minimal pain. Pretty sure that they were just using it for journal imports.
The comparison linked in the previous comment hasn't been updated recently, I think the budget and asset wizards are in place now.
Creating custom integrators for webadi has been commented on in these forums in the past and they seem to be in use at a number of different installations. -
LR web gallery w/ client feedback function?
Probably been asked before, but I can't find it in the search feature, so sorry in advance if this bugs you.
I'm a 20 year user of Photoshop but new to LR. I shot a project for which I am using LR to do my selects and basic adjustments. I need to put my adjusted images in front of my clients with a web gallery that would allow them to make their selects, tag the files with ranking, and leave text comments if they wish. There are about 2000 images in this project.
Photoshop used to have a (barely usable) automated web gallery that allowed for client feedback in text. Is there something like this in LR? Is there a light box function in a web gallery?
Is it built in, our do I have to spend more money to get something that should have been in the product in the first place? (sorry for the mini-rant)
CraigVictoria,
I would argue that a relatively high percentage of professional photographers would like to have this feature to be able to get feedback from clients. I don't agree that it would be generally considered bloat. Among commercial photographers, photo-journalists, and probably wedding photographers I would argue that the ability to create a web gallery that facilitates feedback from a client, or an editor's desk, has a greater level of value than does having 20 different gallery layouts with various transitions between slides, and cozy color palettes. I do see the value of that variety, but I'd like to see a little more utility also.
Even Photoshop, up to version CS3, had the ability to make a gallery with feedback option. Each image in the gallery had a text box that essentially acted like a Submit button. All comments a viewer made were compiled in an email and the comments were tagged with the image number/name. The gallery was cramped and ugly, but the feature was very useful.
While the TTG Client Response Gallery plug-in looks like it fits the bill, it also requires more of a learning curve than I would like. It also requires making sure my ISP has the correct version of PHP and the correct type of Apache server – certainly more than a basic HTML solution. -
FortiClient SSL VPN Client Not Functioning Correctly
Hello,
I use the FortiClient SSL application to connect to work. In Windows 7 x64 it works without issue. In Windows 8 Build 9200 it exhibits and odd behaviour.
I can connect using FortiClient version 4.4.3.445. Once connected my sent bytes continues to increase which is correct. However received bytes stays at 0.
If I try to Remote Desktop it fails. This is obviously due to no inbound packets coming back from the Fortigate appliance being allowed back to Windows 8.
Disabling the Firewall doesn't have any affect on the condition. Received bytes stays at 0.
This is a clean install with no 3rd party applications, other than the Forticlient software. This is only the SSL VPN portion of the the FortiClient software and does not included AV or Firewall options.
Doing some Googling, I've seen some other people with the same problem but no resolution. Another FortiClient user and Sophos & Juniper SSL VPN clients having the same problem.
Does anybody have any idea what would be causing the SSL VPN to only send bytes but not receive.
Thanks!
UPDATE 2:
In the built in MSTSC.exe "Remote Desktop" I went into Options/Advanced/Server Authentication. I switched the setting to "Connect and don't warn me" and that fixed the problem. The default was "Warn Me' However the warning screen was not coming up.
Just for the heck of it I switched it back to the default settings and saved. Strangely I now get the "Warning" screen that you would normally see. So now both the built-in and App Store Remote Desktop applications are working. FortiClient still shows Bytes
received as 0.....which is odd.
UPDATE: Solved Workaround
I was using the built-in Remote Desktop Application without success. I went into the APP Store and saw their was an APP called "Remote Desktop" I installed that and connected my FortiClient SSL to work. Still no received bytes like I would get in
Win7. I then launched the "APP" Remote Desktop, punched in my PC name at work and creds and boom I can login to my work PC. FortiClient SSL still showing no received bytes, but the "Remote Desktop" from the APP store does work. Not sure why MSTSC.exe will
not work, and why FortiClient shows no received bytes is still unsolved. At least the APP Store Remote Desktop works with the SSL Client.Hello Everyone,
I finally able to track down the issue .
After spending 3 days i found that VPN Client may bind some setting with user. I tried to install the same on my personal laptop and another machine where the user bind with same account
(hotmail).
Then I realize may be this is user issue so I follow below steps and it work fine.
1. Uninstall Client from Machine
2. Remove same from IE ( Options =>> Connections)
3. Restart System
4. Create Local user and provide administrator rights.
5. Login with new user and logoff all other.
6. Install Client. -
How to autostart a client in a specific tag in Awesome?
I know how to autostart something. From http://awesome.naquadah.org/wiki/Autost … ostart_way I'm using the advanced method of the simple way (that takes 4 parameters). It's working fine, but everything starts at the first tag. I tried to use the awful.client.movetotag() function, but with no luck.
How can I get this to work?
Thanks!
Last edited by VeXe (2013-02-16 22:17:24)@frank604: Thanks again, it worked! BUT: when I passed a parameter to my terminal to run htop, it didn't work
{ rule = { instance = "gnome-terminal -e htop" },
properties = { }, callback = function (c)
if not skipMovingT then
awful.client.movetotag(tags[1][9], c)
skipMovingT = true
end
end },
Any ideas?
@doug piston: Thanks, but I have read that page. The rules are permenant that way, and I just want them at startup, not all the time (repeating my self here) -
Awesome window manager client rule for "GtkFileChooserDialog"
Hi,
I've set up my current awesome wm so that the web browser (chromium) always opens on tag 2 of screen 1.
When I have an external screen however, I soemtimes like to move the web browser to the external screen.
The problem with my setup is that when I want to e.g. download something, the file chooser dialog opens (of course)
on tag 2 of screen 1, instead of the current tag and screen of the main window of my web browser.
Is there a way to set a rule for clients that are dialog windows to appear floating on the same tag and screen
as the window that started the dialog?
When I wanted to make a rule for this, the first problem I encountered is that the class and name of the dialog or the same as the main window.
So I wondered if I can use other properties of windows besides name, class or instance.
The second problem is that I do not know how to get the screen and tag of the window that opened the dialog?
xprop of main window:
_NET_WM_DESKTOP(CARDINAL) = 0
_NET_WM_USER_TIME(CARDINAL) = 1953613
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x100004d
bitmap id # of mask for icon: 0x100004e
window id # of group leader: 0x1000001
_GTK_HIDE_TITLEBAR_WHEN_MAXIMIZED(CARDINAL) = 1
XdndAware(ATOM) = BITMAP
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
_NET_WM_ICON(CARDINAL) = Icon (64 x 64):
... (deleted icons) ...
WM_WINDOW_ROLE(STRING) = "browser"
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 16777288
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x1000047
WM_CLIENT_LEADER(WINDOW): window id # 0x1000001
_NET_WM_PID(CARDINAL) = 1164
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "arch"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified minimum size: 266 by 63
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "chromium", "Chromium"
WM_ICON_NAME(STRING) = "Post new topic / Arch Linux Forums - Chromium"
_NET_WM_ICON_NAME(UTF8_STRING) = "Post new topic / Arch Linux Forums - Chromium"
WM_NAME(STRING) = "Post new topic / Arch Linux Forums - Chromium"
_NET_WM_NAME(UTF8_STRING) = "Post new topic / Arch Linux Forums - Chromium"
xprop of dialog:
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_STATE(ATOM) = _NET_WM_STATE_MODAL
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x100004d
bitmap id # of mask for icon: 0x100004e
window id # of group leader: 0x1000001
XdndAware(ATOM) = BITMAP
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x10, 0x0, 0x0, 0x0
_NET_WM_ICON(CARDINAL) = Icon (64 x 64):
... (deleted icons) ...
WM_WINDOW_ROLE(STRING) = "GtkFileChooserDialog"
WM_TRANSIENT_FOR(WINDOW): window id # 0x1000046
_NET_WM_SYNC_REQUEST_COUNTER(CARDINAL) = 16796216
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_DIALOG
_NET_WM_USER_TIME(CARDINAL) = 1703990
_NET_WM_USER_TIME_WINDOW(WINDOW): window id # 0x1004a37
WM_CLIENT_LEADER(WINDOW): window id # 0x1000001
_NET_WM_PID(CARDINAL) = 1164
WM_LOCALE_NAME(STRING) = "en_US.UTF-8"
WM_CLIENT_MACHINE(STRING) = "arch"
WM_NORMAL_HINTS(WM_SIZE_HINTS):
program specified location: 0, 0
program specified minimum size: 545 by 294
window gravity: NorthWest
WM_PROTOCOLS(ATOM): protocols WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, _NET_WM_SYNC_REQUEST
WM_CLASS(STRING) = "chromium", "Chromium"
WM_ICON_NAME(STRING) = "Save File"
_NET_WM_ICON_NAME(UTF8_STRING) = "Save File"
WM_NAME(STRING) = "Save File"
_NET_WM_NAME(UTF8_STRING) = "Save File"
So, something like:
{ rule = {window_role = "GtkFileChooserDialog"}, properties = {tag = mainwindow.tag, screen = mainwindow.screen} }
(apologies for the limited pseudo lua-code)
Any kind of help would be much appreciated
grtz{ rule = { role = "GtkFileChooserDialog" },
properties = { floating = true, ontop = true },
callback = function (c)
awful.placement.centered(c, nil)
awful.client.movetotag(tags[mouse.screen][awful.tag.getidx()], c)
end -
Awesome systray is not showing all icons, perhaps overlapping widgets?
I have a problem with my Awesome configuration that results in some of the icons being missing or partially missing from my systray. I suspect this is because of some overlapping, since they are partially hidden. You can see the problem in the top right corner.
rc.lua:
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
--Wiget Library
require("vicious")
-- awesoMPD Widget
--require("awesompd/awesompd")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/blind-alien/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "urxvt"
editor = os.getenv("EDITOR") or "vim"
editor_cmd = terminal .. " -e " .. editor
-- Enable or disable widgets:
-- You also have to edit the wiboxes!
useSysInfo = true
usePacman = true
useMpd = true
useWifi = false
useNet = true
useBat = false
useCpu = true
useMem = true
useTemp = false
-- Widget Settings
cpuCores = 2 --Number of CPU Cores
thermalZone = "coretemp.0" --Thermal Zone to read cpu temperature from (check vicious docu)
thermalData = "core" --Data Source: "proc", "core" or "sys"
netAdapter = "eth0" --Network adapter to monitor
wifiAdapter = "wlan0" --Wifi adapter for wifi widget
pacUpdate = "yaourt -Sy" --Command to update pacman cache
pacUpgrade = "yaourt -Su" --Command to upgrade system
networkManager = terminal .. " -e wicd-curses"
battery = "BAT1" --Battery to monitor
widthMpd = 420 --Width of MPD widget
-- Widget update intervals in seconds
updateCpu = 1
updatePac = 1801
updateMpd = 1
updateWifi = 7
updateNet = 1
updateBat = 31
updateMem = 7
-- For Dual-Screen setups:
-- Set "dualScreen" to "2" if you want a different, optimized widget layout for every screen.
-- If you set it to "-1" it will copy the same widget layout to both screens. (default Awesome behavior)
dualScreen = -1
screencount = screen.count()
-- 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.tile,
awful.layout.suit.tile.left,
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.magnifier,
awful.layout.suit.floating,
awful.layout.suit.max
-- {{{ Tags
-- Define a tag table which will hold all screen tags.
tags = {
--names = { "1", "2", "3", "4", "5", "6"},
--names = { "⌘", "♐", "⌥", "ℵ"},
--names = { "⠪", "⠫", "⠬", "⠭", "⠮", "⠳"},
names = { "⠐", "⠡", "⠪", "⠵", "⠻", "⠿" },
--names = { " ∙", "⠡", "⠲", "⠵", "⠻", "⠿"},
--names = { " ⠐ ", " ⠡ ", " ⠲ ", " ⠵ ", " ⠾ ", " ⠿ "},
--names = { "⢷", "⣨", "⡪", "⣌", "⣪", "⡝"},
layout = {
layouts[8], layouts[8], layouts[8], layouts[5], layouts[8], layouts[8]
for s = 1, screencount do
tags[s] = awful.tag(tags.names, s, tags.layout)
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 WM", awesome.restart },
{ "logout", awesome.quit },
{ "shutdown" , "sudo /sbin/halt -p" },
{ "reboot" , "sudo /sbin/reboot" }
myinternet = {
{ "Chromium", "chromium" },
{ "Firefox" , "firefox" },
{ "IM" , "pidgin" },
{ "IRC" , "xchat"}
mymedia = {
{ "Spotify", "spotify" },
{ "Rhythmbox", "rhythmbox" },
{ "ncmpcpp", "urxvt -e ncmpcpp" },
{ "Gnome Mplayer", "gnome-mplayer" },
{ "VLC" , "vlc" }
mygraphics = {
{ "GIMP" , "gimp" },
{ "Inkscape" , "inkscape" },
{ "Image viewer" , "eog" }
myoffice = {
{ "Base" , "lobase" },
{ "Calc" , "localc" },
{ "Impress" , "loimpress" },
{ "LibreOffice" , "loffice" },
{ "Writer" , "lowriter" },
{ "Lyx" , "lyx" },
{ "Document viewer" , "evince" }
mysystem = {
{ "htop" , "urxvt -e htop" },
{ "Partition" , "gksudo gparted" },
{ "Sys mon" , "gnome-system-monitor" }
myutilities = {
{ "Gedit" , "gedit" },
{ "Virtualbox" , "VirtualBox" },
{ "File Manager" , "nautilus --no-desktop" }
myplaces = {
{ "Home" , "nautilus --no-desktop /home/johan/" },
{ "Documents" , "nautilus --no-desktop /home/johan/Documents/" },
{ "Downloads" , "nautilus --no-desktop /home/johan/Downloads/" },
{ "Music" , "nautilus --no-desktop /home/johan/Music/" },
{ "Pictures" , "nautilus --no-desktop /home/johan/Pictures/" }
myserverplaces = {
{ "Server root" , "nautilus --no-desktop /srv/" },
{ "Downloads" , "nautilus --no-desktop /srv/download/" },
{ "Movies" , "nautilus --no-desktop /srv/movies/" },
{ "Tv-Series" , "nautilus --no-desktop /srv/tv-series/" },
{ "Misc" , "nautilus --no-desktop /srv/misc/" }
mymainmenu = awful.menu({ items = {
{ "Terminal", terminal },
{ "Places" , myplaces },
{ "Server" , myserverplaces },
{ "Internet" , myinternet },
{ "Media" , mymedia },
{ "Graphics" , mygraphics },
{ "Office" , myoffice },
{ "Utilities" , myutilities },
{ "Systools" , mysystem },
{ "Awesome", myawesomemenu }
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
-- Separators
bubble = widget({ type = "textbox" })
spacer = widget({ type = "textbox" })
space = widget({ type = "textbox" })
separator = widget({ type = "textbox" })
bracketl = widget({ type = "textbox" })
bracketr = widget({ type = "textbox" })
vertline = widget({ type = "textbox" })
dash = widget({ type = "textbox" })
bubble.text = " ∘ "
spacer.text = " "
space.text = " "
--separator.text = "<span font_desc='ClearlyU'> ⡾ </span>"
separator.text = "] ["
vertline.text = "|"
dash.text = "-"
bracketl.text = "["
bracketr.text = "]"
-- Status Labels
cpuLabel = {}
for s = 1, cpuCores do
cpuLabel[s] = widget({ type = "textbox" })
cpuLabel[s].text = "Core " .. s
end
rlabel = widget({ type = "textbox" })
rlabel.text = "Root:"
hlabel = widget({ type = "textbox" })
hlabel.text = "Home:"
-- WIDGETS --
-- OS info
if useSysInfo == true then
sys = widget({ type = "textbox" })
vicious.register(sys, vicious.widgets.os, "$1 $2")
end
-- Pacman updates
if usePacman == true then
-- Widget
pnoghosticon = widget({ type = "imagebox" })
pnoghosticon.image = image(beautiful.widget_pacnoghost)
pnoghosticon.visible = true
pghosticon = awful.widget.launcher({
image = beautiful.widget_pacghost,
command = terminal .. " -e " .. pacUpgrade .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
pghosticon.visible = false
-- Icon
-- picon = widget({ type = "imagebox" })
-- picon.image = image(beautiful.widget_pacnew)
-- Use the Pacman icon as launcher to update the package list (change to fit your package-management system)
picon = awful.widget.launcher({
image = beautiful.widget_pacnew,
command = pacUpdate .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
runpicon = awful.widget.launcher({
image = beautiful.widget_pacman_run,
command = pacUpdate .. " && echo -e 'vicious.force({ pacup, })' | awesome-client"
runpicon.visible = false
pacup = widget({ type = "textbox" })
vicious.register(pacup, vicious.widgets.pkg,
function(widget, args)
local nr = tonumber(args[1])
if nr ~= 0 then
pnoghosticon.visible = false
pghosticon.visible = true
picon.visible = false
runpicon.visible = true
else
pghosticon.visible = false
pnoghosticon.visible = true
runpicon.visible = false
picon.visible = true
end
end, updatePac, "Arch")
end
-- MPD Widget
if useMpd == true then
-- PLAY, STOP, PREV/NEXT Buttons
-- requires modification of /usr/share/awesome/lib/awful/widget/launcher.lua
-- b = util.table.join(w:buttons(), button({}, 1, nil, function () util.spawn(args.command) end))
-- to:
-- b = util.table.join(w:buttons(), button({}, 1, nil, function () util.spawn_with_shell(args.command) end))
music_play = awful.widget.launcher({
image = beautiful.widget_play,
command = "mpc toggle && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
music_pause = awful.widget.launcher({
image = beautiful.widget_pause,
command = "mpc toggle && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
music_pause.visible = false
music_stop = awful.widget.launcher({
image = beautiful.widget_stop,
command = "mpc stop && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
music_prev = awful.widget.launcher({
image = beautiful.widget_prev,
command = "mpc prev && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
music_next = awful.widget.launcher({
image = beautiful.widget_next,
command = "mpc next && echo -e 'vicious.force({ mpdwidget, })' | awesome-client"
mpdicon = widget({ type = "imagebox" })
mpdicon.image = image(beautiful.widget_mpd)
-- Initialize widget
mpdwidget = widget({ type = "textbox" })
--mpdwidget.wrap = "none"
mpdwidget.width = widthMpd
--mpdwidget.wrap = "word_char"
-- Register Widget
--vicious.register(mpdwidget, vicious.widgets.mpd, "(${state}) : ${Artist} - ${Title} ]", 13)
-- Set the maximum width of the MPD widget inside the string.format function as "%.<length>s"
vicious.register(mpdwidget, vicious.widgets.mpd,
function(widget, args)
--local maxlength = 85
local font = beautiful.font
local string = args["{Artist}"] .. " - " .. args["{Title}"]
--local string = "[" .. args["{state}"] .. "]" .. " : " .. args["{Artist}"] .. " - " .. args["{Title}"]
--[[ if maxlength < string.len(string) then
return "<span font_desc='" .. font .. "'>" .. string.sub(string, 0, maxlength-6) .. "</span> ..."
else
return "<span font_desc='" .. font .. "'>" .. string .. "</span>"
end]]
if args["{state}"] == "Play" then
music_play.visible = false
music_pause.visible = true
else
music_play.visible = true
music_pause.visible = false
end
return string
end, updateMpd)
end
---- WIFI Widget
--if useWifi == true then
-- wifiwidget = widget({ type = "textbox" })
-- wifiwidget.width = 22
-- wifiwidget.align = "right"
-- --wifiimage = widget({ type = "imagebox" })
-- wifiimage0 = awful.widget.launcher({
-- image = beautiful.widget_wifi0,
-- command = networkManager
-- wifiimage0.image.visible = true
-- wifiimage1 = awful.widget.launcher({
-- image = beautiful.widget_wifi1,
-- command = networkManager
-- wifiimage1.image.visible = false
-- wifiimage2 = awful.widget.launcher({
-- image = beautiful.widget_wifi2,
-- command = networkManager
-- wifiimage2.image.visible = false
-- wifiimage3 = awful.widget.launcher({
-- image = beautiful.widget_wifi3,
-- command = networkManager
-- wifiimage3.image.visible = false
-- wifiimage4 = awful.widget.launcher({
-- image = beautiful.widget_wifi4,
-- command = networkManager
-- wifiimage4.image.visible = false
-- -- Register Widget
-- -- change to the desired network adapter if needed
-- --vicious.register(wifiwidget, vicious.widgets.wifi, "~ ${link}%", 5, "wlan0")
-- vicious.register(wifiwidget, vicious.widgets.wifi,
-- function(widget, args)
-- if tonumber(args["{link}"]) > 75 then
-- wifiimage0.visible = false
-- wifiimage1.visible = false
-- wifiimage2.visible = false
-- wifiimage3.visible = false
-- wifiimage4.visible = true
-- elseif tonumber(args["{link}"]) > 50 then
-- wifiimage0.visible = false
-- wifiimage1.visible = false
-- wifiimage2.visible = false
-- wifiimage3.visible = true
-- wifiimage4.visible = false
-- elseif tonumber(args["{link}"]) > 25 then
-- wifiimage0.visible = false
-- wifiimage1.visible = false
-- wifiimage2.visible = true
-- wifiimage3.visible = false
-- wifiimage4.visible = false
-- elseif tonumber(args["{link}"]) > 0 then
-- wifiimage0.visible = false
-- wifiimage1.visible = true
-- wifiimage2.visible = false
-- wifiimage3.visible = false
-- wifiimage4.visible = false
-- else
-- wifiimage0.visible = true
-- wifiimage1.visible = false
-- wifiimage2.visible = false
-- wifiimage3.visible = false
-- wifiimage4.visible = false
-- end
-- return string.format("%02d%%", tonumber(args["{link}"]))
-- end, updateWifi, wifiAdapter)
--end
-- NETWORK Widget
if useNet == true then
dnicon = widget({ type = "imagebox" })
upicon = widget({ type = "imagebox" })
dnicon.image = image(beautiful.widget_down)
upicon.image = image(beautiful.widget_up)
-- Initialize widget
netdnwidget = widget({ type = "textbox" })
netdnwidget.width = 55
--netdnwidget.align = "right"
netupwidget = widget({ type = "textbox" })
netupwidget.width = 55
--netupwidget.align = "right"
-- Register widget
-- change to the desired network adapter if needed
--vicious.register(netdnwidget, vicious.widgets.net, "${eth0 down_kb} kB/s", 1)
--vicious.register(netupwidget, vicious.widgets.net, "${eth0 up_kb} kB/s", 1)
-- The following code formats the output to fill with zeroes at the beginning i.e. 013 kB/s instead of 13 kB/s.
-- It also automatically switches to MB/s if there is more than 999 kB/s
vicious.register(netdnwidget, vicious.widgets.net,
function(widget, args)
if tonumber(args["{" .. netAdapter .. " down_kb}"]) > 999 then
return string.format("%04.1f MB/s", tonumber(args["{" .. netAdapter .. " down_mb}"]))
else
return string.format("%03d kB/s", tonumber(args["{" .. netAdapter .. " down_kb}"]))
end
end, updateNet)
vicious.register(netupwidget, vicious.widgets.net,
function(widget, args)
if tonumber(args["{" .. netAdapter .. " up_kb}"]) > 999 then
return string.format("%04.1f MB/s", tonumber(args["{" .. netAdapter .. " up_mb}"]))
else
return string.format("%03d kB/s", tonumber(args["{" .. netAdapter .. " up_kb}"]))
end
end, updateNet)
end
---- BATTERY widget
--if useBat == true then
-- baticon = widget({ type = "imagebox" })
-- --baticon.image = image(beautiful.widget_batfull)
-- --Initialize widget
-- batwidget = widget({ type = "textbox" })
-- batwidget.width = 22
-- batwidget.align = "right"
-- --Register widget
-- --vicious.register(batwidget, vicious.widgets.bat, "$1$2", 31, "BAT1")
-- vicious.register(batwidget, vicious.widgets.bat,
-- function(widget, args)
-- if string.match(args[1], "[+↯]") then
-- baticon.image = image(beautiful.widget_ac)
-- elseif tonumber(args[2]) > 40 then
-- baticon.image = image(beautiful.widget_batfull)
-- elseif tonumber(args[2]) > 20 then
-- baticon.image = image(beautiful.widget_batlow)
-- else
-- baticon.image = image(beautiful.widget_batempty)
-- end
-- if tonumber(args[2]) == 100 then
-- return "Full"
-- end
-- return args[2] .. "%"
-- end, updateBat, battery)
--end
-- {{{ CPU
--if useTemp == true then
-- -- Core Temp
-- tempwidget = widget({ type = "textbox" })
-- tempwidget.width = 26
-- tempwidget.align = "right"
-- vicious.register(tempwidget, vicious.widgets.thermal, "$1 C", updateCpu, { thermalZone, thermalData })
-- --vicious.register(tempwidget, vicious.widgets.thermal, "$1°C", 5, { "thermal_zone0", "sys" })
-- -- Icon
-- tempicon = widget({ type = "imagebox" })
-- tempicon.image = image(beautiful.widget_temp)
--end
-- Readout
if useCpu == true then
-- Icon
cpuicon = widget({ type = "imagebox" })
cpuicon.image = image(beautiful.widget_cpu)
-- Core 1 Meter
cpubar = {}
freq = {}
displayCores = {}
displayCpu = {}
for s = 1, cpuCores do
cpubar[s] = awful.widget.progressbar()
cpubar[s]:set_width(50)
cpubar[s]:set_height(6)
cpubar[s]:set_vertical(false)
cpubar[s]:set_background_color("#434343")
--cpubar:set_color(beautiful.fg_normal)
cpubar[s]:set_gradient_colors({ beautiful.fg_normal, beautiful.fg_normal, beautiful.fg_normal, beautiful.bar })
--Delete the following line if you want to put the widget on the left side of the wibox
cpubar[s].layout = awful.widget.layout.horizontal.rightleft
vicious.register(cpubar[s], vicious.widgets.cpu, "$" .. s, updateCpu)
awful.widget.layout.margins[cpubar[s].widget] = { top = 6 }
-- Frequency
freq[s] = widget({ type = "textbox" })
freq[s].width = 44
freq[s].align = "right"
--vicious.register(freq1, vicious.widgets.cpufreq, "$2 GHz", 9, "cpu0")
vicious.register(freq[s], vicious.widgets.cpufreq,
function(widget, args)
return string.format("%03.1f GHz", args[2])
end, updateCpu, "cpu" .. s - 1)
-- Cache that shit
vicious.cache(vicious.widgets.cpu)
end
end
-- }}} CPU
-- {{{ MEM
if useMem == true then
-- Icon
memicon = widget({ type = "imagebox" })
memicon.image = image(beautiful.widget_mem)
-- Percentage
--mem = widget({ type = "textbox" })
--vicious.register(mem, vicious.widgets.mem, "$1%")
-- Meter
membar = awful.widget.progressbar()
membar:set_width(50)
membar:set_height(6)
membar:set_vertical(false)
membar:set_background_color("#434343")
--membar:set_color(beautiful.fg_normal )
membar:set_gradient_colors({ beautiful.fg_normal, beautiful.fg_normal, beautiful.fg_normal, beautiful.bar })
--This bar should be placed on the right side of the wibox unless
--it's a dual-screen config in which case the default (leftright)
--layout is used... change that if you need!
if screencount ~= dualScreen then
membar.layout = awful.widget.layout.horizontal.rightleft
end
--Register the widget
vicious.register(membar, vicious.widgets.mem, "$1", updateMem)
-- Align progressbars
awful.widget.layout.margins[membar.widget] = { top = 6 }
-- MEM Usage
--mem_total = widget({ type = "textbox" })
--vicious.register(mem_total, vicious.widgets.mem, "$3 MB", 9)
--mem_used = widget({ type = "textbox" })
--vicious.register(mem_total, vicious.widgets.mem, "$2 MB", 9,)
-- Cache that shit
vicious.cache(vicious.widgets.mem)
end
-- }}} MEM
-- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right" }, "%H:%M")
awful.widget.layout.margins[mytextclock] = { top = -1 }
-- Create a systray
mysystray = widget({ type = "systray"})
-- Create a wibox for each screen and add it
mywibox = {}
mybottomwibox = {}
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 not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
client.focus = c
c:raise()
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, screencount do
-- Set a screen margin for borders
awful.screen.padding(screen[s], { top = 0 })
-- 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)))
mylayoutbox[s].resize = false
-- Create a taglist widget
mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
awful.widget.layout.margins[mytaglist[s]] = { top = -2 }
-- WARNING: In order to properly view the tasklist some lua files have been modified. For the
-- tasklist_floating_icon icon to be placed on the left side of the task name instead of the
-- right alignment, /usr/share/awesome/lib/awful/widget/tasklist.lua in function new(label, buttons) the
-- variable widgets.textbox has to be modified like this:
-- remove bg_align = "right" and
-- modify the left margin from 2 to icon width + 2 (i.e.: 18).
-- Create a tasklist widget
mytasklist[s] = awful.widget.tasklist(function(c)
return awful.widget.tasklist.label.currenttags(c, s,
-- WARNING: Requires modified /usr/share/awesome/lib/awful/widget/tasklist.lua !!!
-- This basically hides the application icons on the tasklist. If you don't want this or
-- prefer not to change your tasklist.lua remove the following line!
{ hide_icon = true })
end, mytasklist.buttons)
awful.widget.layout.margins[mytasklist[s]] = { top = 2 }
-- WIBOXES --
-- Here we create the wiboxes if it's not a dual-screen layout
if screencount ~= dualScreen then
-- Create the wibox
mywibox[s] = awful.wibox({ position = "top", screen = s, border_width = 0, height = 18 })
-- Add widgets to the wibox - order matters
mywibox[s].widgets = {
mytaglist[s],
mypromptbox[s],
displaySysInfo,
layout = awful.widget.layout.horizontal.leftright
mytextclock,
mylayoutbox[s],
s == 1 and mysystray or nil,
mytasklist[s],
layout = awful.widget.layout.horizontal.rightleft
mybottomwibox[s] = awful.wibox({ position = "bottom", screen = s, border_width = 0, height = 18 })
mybottomwibox[s].widgets = {
space, music_play, music_pause, music_stop, music_prev, music_next, space, mpdwidget,
layout = awful.widget.layout.horizontal.leftright
spacer,
bracketr,
-- spacer, batwidget, spacer, baticon, spacer,
-- separator,
-- spacer, wifiwidget, spacer, wifiimage0, wifiimage1, wifiimage2, wifiimage3, wifiimage4, spacer,
-- separator,
-- spacer, tempwidget, spacer, tempicon, spacer,
-- separator,
spacer, freq[1], spacer, cpubar[1], spacer,
--cpuLabel[1], spacer,
cpuicon, spacer,
separator,
spacer, membar, spacer, memicon, spacer,
separator,
spacer, netupwidget, spacer, upicon, spacer, separator, spacer, netdnwidget, spacer, dnicon, spacer,
separator,
space, pghosticon, pnoghosticon, runpicon, picon, space,
bracketl,
layout = awful.widget.layout.horizontal.rightleft
end
end
if screencount == dualScreen then
-- Here we create the wiboxes if it is a dual screen configuration:
mywibox[1] = awful.wibox({ position = "top", screen = 1, border_width = 0, height = 18 })
-- Add widgets to the wibox - order matters
mywibox[1].widgets = {
mytaglist[1],
spacer,
mypromptbox[1],
mytasklist[1],
layout = awful.widget.layout.horizontal.leftright
spacer,
mytextclock,
-- spacer,
mylayoutbox[1],
-- spacer,
-- mytasklist[1],
layout = awful.widget.layout.horizontal.rightleft
mybottomwibox[1] = awful.wibox({ position = "bottom", screen = 1, border_width = 0, height = 18 })
mybottomwibox[1].widgets = {
space, music_play, music_pause, music_stop, music_prev, music_next, space, mpdwidget,
layout = awful.widget.layout.horizontal.leftright
space,
s == 1 and mysystray or nil,
layout = awful.widget.layout.horizontal.rightleft
mywibox[2] = awful.wibox({ position = "top", screen = 2, border_width = 0, height = 18 })
mywibox[2].widgets = {
space,
mytaglist[2],
spacer,
mypromptbox[2],
layout = awful.widget.layout.horizontal.leftright
spacer,
mytextclock,
space,
mylayoutbox[2],
spacer,
mytasklist[2],
layout = awful.widget.layout.horizontal.rightleft
mybottomwibox[2] = awful.wibox({ position = "bottom", screen = 2, border_width = 0, height = 18 })
mybottomwibox[2].widgets = {
spacer,
bracketl,
spacer, sys, spacer,
separator,
space, runpicon, picon, pghosticon, pnoghosticon, space,
separator,
spacer, dnicon, spacer, netdnwidget, spacer, separator, spacer, upicon, spacer, netupwidget, spacer,
separator,
spacer, memicon, spacer, membar, spacer,
bracketr,
layout = awful.widget.layout.horizontal.leftright
spacer,
bracketr,
spacer, tempwidget, spacer, tempicon, spacer,
separator,
spacer, freq[2], spacer, cpubar[2], spacer,
cpuLabel[2], spacer,
cpuicon, spacer,
separator,
spacer, freq[1], spacer, cpubar[1], spacer,
cpuLabel[1], spacer,
cpuicon, spacer,
bracketl,
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({ }, "Print", function () awful.util.spawn("gnome-screenshot") end),
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),
--Volume manipulation
-- awful.key({}, "XF86AudioRaiseVolume", function() awful.util.spawn("amixer set Master 5+") end),
-- awful.key({}, "XF86AudioLowerVolume", function() awful.util.spawn("amixer set Master 5-") 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),
-- 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, }, "q", 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" }, "m", function () awful.util.spawn("urxvt -T ncmpcpp -e 'ncmpcpp'") end),
awful.key({ modkey, "Shift" }, "w", function () awful.util.spawn("chromium") end),
awful.key({ modkey, }, "b", function () awful.util.spawn("nautilus --no-desktop") end),
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) c.minimized = not c.minimized 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, screencount 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,
size_hints_honor = false,
focus = true,
keys = clientkeys,
buttons = clientbuttons
rule = { class = "MPlayer" },
properties = { floating = true }
rule = { class = "pinentry" },
properties = { floating = true }
rule = { class = "gimp" },
properties = { floating = true }
{ rule = { class = "firefox" },
properties = { tag = tags[1][2] } },
{ rule = { class = "Chromium" },
properties = { tag = tags[1][2] } },
{ rule = { class = "Pidgin" },
properties = { tag = tags[1][3] } },
{ rule = { class = "Xchat" },
properties = {tag = tags[1][4] } },
-- 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)
-- {{{ Tag signal handler - selection
-- - ASCII tags 1 [2] 3 4...
-- - start with tag 1 named [1] in tag setup
for s = 1, screencount do
for t = 1, #tags[s] do
tags[s][t]:add_signal("property::selected", function ()
if tags[s][t].selected then
tags[s][t].name = "[" .. tags[s][t].name .. "]"
else--]]
--tags[s][t].name = tags[s][t].name:gsub("[%[%]]", "")
--[[ end
end)
end
end
I have tried to search around for a solution to this, but I am coming up short. Any idea on how to solve this?
Last edited by kveras (2011-11-21 09:01:47)First of all, did you check the wiki and forums? We'll help you, but you have to try to fix it yourself first.
You will need to provide more info if you want help.
Did you set up Gnome to force fallback mode?
Did you look at the Gnome wiki article? There's a few sections that sound like what your looking to do, but the examples are USING OTHER WM's. They still might be able to point you in the right direction. -
Awesome WM text pointer disappears on tag switch
Hi,
I have the following problem. On one tag I keep Atom with some file open. If I use the mouse to click on some other tag and go back to Atom everything is ok. If I use modkey+<num> to switch to another tag and back while the mouse is over the task bar or over the widgets everything is ok. But when I switch the tag again with the keyboard shortcut and go back to Atom while the mouse is somewhere over the clients the text pointer in Atom disappears and I need to click somewhere in the text to make it reappear. And it's really annoying when coding to reach for the mouse every time you change to some other tag and back.
Here's my rc.lua:
Dremora Awesome WM config 2.0
github.com/copycat-killer
-- {{{ Required libraries
local gears = require("gears")
local awful = require("awful")
awful.rules = require("awful.rules")
require("awful.autofocus")
local wibox = require("wibox")
local beautiful = require("beautiful")
local naughty = require("naughty")
local drop = require("scratchdrop")
local lain = require("lain")
-- {{{ Error handling
if awesome.startup_errors then
naughty.notify({ preset = naughty.config.presets.critical,
title = "Oops, there were errors during startup!",
text = awesome.startup_errors })
end
do
local in_error = false
awesome.connect_signal("debug::error", function (err)
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
-- {{{ Autostart applications
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("urxvtd")
run_once("unclutter")
-- {{{ Variable definitions
-- localization
--os.setlocale(os.getenv("LANG"))
-- beautiful init
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/dremora/theme.lua")
-- common
modkey = "Mod4"
altkey = "Mod1"
terminal = "xfce4-terminal" or "xterm"
editor = os.getenv("EDITOR") or "nano" or "vi"
editor_cmd = terminal .. " -e " .. editor
-- user defined
browser = "google-chrome"
browser2 = "iron"
gui_editor = "atom"
-- graphics = "gimp"
local layouts = {
awful.layout.suit.floating,
lain.layout.uselesstile,
awful.layout.suit.fair,
lain.layout.uselesstile.left,
lain.layout.uselesstile.top
-- {{{ Tags
tags = {
names = { "ƀ", "Ƅ", "Ɗ", "ƈ", "ƙ" },
layout = { layouts[1], layouts[3], layouts[2], layouts[1], layouts[5] }
for s = 1, screen.count() do
tags[s] = awful.tag(tags.names, s, tags.layout)
end
-- {{{ Wallpaper
if beautiful.wallpaper then
for s = 1, screen.count() do
gears.wallpaper.maximized(beautiful.wallpaper, s, true)
end
end
-- {{{ Menu
mymainmenu = awful.menu.new({ items = require("menugen").build_menu(),
theme = { height = 16, width = 130 }})
-- {{{ Wibox
markup = lain.util.markup
white = beautiful.fg_focus
gray = "#858585"
-- Textclock
mytextclock = awful.widget.textclock(markup(gray, " %a")
.. markup(white, " %d ") .. markup(gray, "%b ") .. markup(white, "%H:%M "))
-- Calendar
lain.widgets.calendar:attach(mytextclock, { fg = white })
--[[ Mail IMAP check
-- commented because it needs to be set before use
mailwidget = lain.widgets.imap({
timeout = 180,
server = "server",
mail = "mail",
password = "keyring get mail",
settings = function()
mail_notification_preset.fg = white
mail = ""
count = ""
if mailcount > 0 then
mail = "Mail "
count = mailcount .. " "
end
widget:set_markup(markup(gray, mail) .. markup(white, count))
end
-- MPD
mpdwidget = lain.widgets.mpd({
settings = function()
mpd_notification_preset.fg = white
artist = mpd_now.artist .. " "
title = mpd_now.title .. " "
file = mpd_now.file .. " "
if mpd_now.state == "pause" then
file = "mpd paused"
elseif mpd_now.state == "stop" then
file = ""
end
widget:set_markup(markup(gray, file))
end
-- /home fs
fshome = lain.widgets.fs({
partition = "/home",
settings = function()
fs_notification_preset.fg = white
fs_header = ""
fs_p = ""
if fs_now.used >= 90 then
fs_header = " Hdd "
fs_p = fs_now.used
end
widget:set_markup(markup(gray, fs_header) .. markup(white, fs_p))
end
-- Battery
batwidget = lain.widgets.bat({
settings = function()
bat_header = " Bat "
bat_p = bat_now.perc .. " "
if bat_now.status == "Not present" then
bat_header = ""
bat_p = ""
end
widget:set_markup(markup(gray, bat_header) .. markup(white, bat_p))
end
-- ALSA volume
volumewidget = lain.widgets.alsa({
settings = function()
header = " Vol "
vlevel = volume_now.level
if volume_now.status == "off" then
vlevel = vlevel .. "M "
else
vlevel = vlevel .. " "
end
widget:set_markup(markup(gray, header) .. markup(white, vlevel))
end
-- Weather
yawn = lain.widgets.yawn(123456,
settings = function()
yawn_notification_preset.fg = white
end
-- Separators
first = wibox.widget.textbox('<span font="Tamsyn 4"> </span>')
arrl_pre = wibox.widget.imagebox()
arrl_pre:set_image(beautiful.arrl_lr_pre)
arrl_post = wibox.widget.imagebox()
arrl_post:set_image(beautiful.arrl_lr_post)
-- 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, 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, height = 18 })
-- Widgets that are aligned to the left
local left_layout = wibox.layout.fixed.horizontal()
left_layout:add(first)
left_layout:add(mytaglist[s])
left_layout:add(arrl_pre)
left_layout:add(mylayoutbox[s])
left_layout:add(arrl_post)
left_layout:add(mypromptbox[s])
left_layout:add(first)
-- Widgets that are aligned to the right
local right_layout = wibox.layout.fixed.horizontal()
if s == 1 then right_layout:add(wibox.widget.systray()) end
right_layout:add(first)
right_layout:add(mpdwidget)
--right_layout:add(mailwidget)
right_layout:add(fshome)
right_layout:add(batwidget)
right_layout:add(volumewidget)
right_layout:add(mytextclock)
-- 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_right(right_layout)
mywibox[s]:set_widget(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(
-- Take a screenshot
-- https://github.com/copycat-killer/dots/blob/master/bin/screenshot
awful.key({ altkey }, "p", function() os.execute("screenshot") end),
-- Tag browsing
awful.key({ modkey }, "Left", awful.tag.viewprev ),
awful.key({ modkey }, "Right", awful.tag.viewnext ),
awful.key({ modkey }, "Escape", awful.tag.history.restore),
-- Non-empty tag browsing
awful.key({ altkey }, "Left", function () lain.util.tag_view_nonempty(-1) end),
awful.key({ altkey }, "Right", function () lain.util.tag_view_nonempty(1) end),
-- Default client focus
awful.key({ altkey }, "k",
function ()
awful.client.focus.byidx( 1)
if client.focus then client.focus:raise() end
end),
awful.key({ altkey }, "j",
function ()
awful.client.focus.byidx(-1)
if client.focus then client.focus:raise() end
end),
-- By direction client focus
awful.key({ modkey }, "j",
function()
awful.client.focus.bydirection("down")
if client.focus then client.focus:raise() end
end),
awful.key({ modkey }, "k",
function()
awful.client.focus.bydirection("up")
if client.focus then client.focus:raise() end
end),
awful.key({ modkey }, "h",
function()
awful.client.focus.bydirection("left")
if client.focus then client.focus:raise() end
end),
awful.key({ modkey }, "l",
function()
awful.client.focus.bydirection("right")
if client.focus then client.focus:raise() end
end),
-- Show Menu
-- 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),
-- On the fly useless gaps change
awful.key({ altkey, "Control" }, "=", function () lain.util.useless_gaps_resize(1) end),
awful.key({ altkey, "Control" }, "-", function () lain.util.useless_gaps_resize(-1) 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),
awful.key({ altkey, "Shift" }, "l", function () awful.tag.incmwfact( 0.05) end),
awful.key({ altkey, "Shift" }, "h", function () awful.tag.incmwfact(-0.05) end),
awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
awful.key({ modkey, "Control" }, "h", 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),
-- 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),
-- Dropdown terminal
awful.key({ modkey, }, "z", function () drop(terminal) end),
-- Widgets popups
awful.key({ altkey, }, "c", function () lain.widgets.calendar:show(7) end),
awful.key({ altkey, }, "h", function () fshome.show(7) end),
awful.key({ altkey, }, "w", function () yawn.show(7) end),
-- ALSA volume control
awful.key({ }, "XF86AudioRaiseVolume",
function ()
awful.util.spawn(string.format("amixer -c %s set %s 1+", volumewidget.card, volumewidget.channel))
volumewidget.update()
end),
awful.key({ }, "XF86AudioLowerVolume",
function ()
awful.util.spawn(string.format("amixer -c %s set %s 1-", volumewidget.card, volumewidget.channel))
volumewidget.update()
end),
awful.key({ }, "XF86AudioMute",
function ()
awful.util.spawn(string.format("amixer -c %s set %s toggle", volumewidget.card, volumewidget.channel))
--awful.util.spawn(string.format("amixer set %s toggle", volumewidget.channel))
volumewidget.update()
end),
awful.key({ altkey, "Control" }, "m",
function ()
awful.util.spawn(string.format("amixer -c %s set %s 100%%", volumewidget.card, volumewidget.channel))
volumewidget.update()
end),
-- MPD control
awful.key({ }, "XF86AudioPlay",
function ()
awful.util.spawn_with_shell("mpc toggle || ncmpc toggle || pms toggle")
mpdwidget.update()
end),
awful.key({ }, "XF86AudioStop",
function ()
awful.util.spawn_with_shell("mpc stop || ncmpc stop || pms stop")
mpdwidget.update()
end),
awful.key({ }, "XF86AudioPrev",
function ()
awful.util.spawn_with_shell("mpc prev || ncmpc prev || pms prev")
mpdwidget.update()
end),
awful.key({ }, "XF86AudioNext",
function ()
awful.util.spawn_with_shell("mpc next || ncmpc next || pms next")
mpdwidget.update()
end),
-- Copy to clipboard
awful.key({ modkey }, "c", function () os.execute("xsel -p -o | xsel -i -b") end),
-- User programs
awful.key({ modkey }, "w", function () awful.util.spawn(browser) end),
awful.key({ modkey }, "s", function () awful.util.spawn(gui_editor) end),
awful.key({ modkey }, "g", function () awful.util.spawn(graphics) end),
awful.key({ modkey }, "e", function () awful.util.spawn("thunar") end),
-- 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),
-- {{ Configures Keymap }} --
awful.key({ "Control", "Shift" }, "k",
function()
awful.util.spawn("xmodmap /home/peio/.Xmodmap_Internal")
naughty.notify({ timeout = 8, text = "Keyboard configured for internal." })
end),
awful.key({ "Control", "Shift" }, "l",
function()
awful.util.spawn("xmodmap /home/peio/.Xmodmap_External")
naughty.notify({ timeout = 8, text = "Keyboard configured for external." })
end)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey, }, "q", 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)
-- 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, 9 do
globalkeys = awful.util.table.join(globalkeys,
awful.key({ modkey }, "#" .. i + 9,
function ()
local screen = mouse.screen
local tag = awful.tag.gettags(screen)[i]
if tag then
awful.tag.viewonly(tag)
end
end),
awful.key({ modkey, "Control" }, "#" .. i + 9,
function ()
local screen = mouse.screen
local tag = awful.tag.gettags(screen)[i]
if tag then
awful.tag.viewtoggle(tag)
end
end),
awful.key({ modkey, "Shift" }, "#" .. i + 9,
function ()
local tag = awful.tag.gettags(client.focus.screen)[i]
if client.focus and tag then
awful.client.movetotag(tag)
end
end),
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
function ()
local tag = awful.tag.gettags(client.focus.screen)[i]
if client.focus and tag then
awful.client.toggletag(tag)
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 = awful.client.focus.filter,
keys = clientkeys,
buttons = clientbuttons,
size_hints_honor = false } },
{ rule = { class = "URxvt" },
properties = { opacity = 0.99 } },
{ rule = { class = "MPlayer" },
properties = { floating = true } },
{ rule = { class = "Dwb" },
properties = { tag = tags[1][1] } },
{ rule = { class = "Iron" },
properties = { tag = tags[1][1] } },
{ rule = { instance = "plugin-container" },
properties = { tag = tags[1][1] } },
{ rule = { class = "Gimp" },
properties = { tag = tags[1][4] } },
{ rule = { class = "Gimp", role = "gimp-image-window" },
properties = { maximized_horizontal = true,
maximized_vertical = 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 and 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
local titlebars_enabled = false
if titlebars_enabled and (c.type == "normal" or c.type == "dialog") then
-- buttons for the titlebar
local 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)
-- Title in the middle
local middle_layout = wibox.layout.flex.horizontal()
local title = awful.titlebar.widget.titlewidget(c)
title:set_align("center")
middle_layout:add(title)
middle_layout:buttons(buttons)
local layout = wibox.layout.align.horizontal()
layout:set_middle(middle_layout)
awful.titlebar(c,{size=18}):set_widget(layout)
end
end)
-- No border for maximized clients
client.connect_signal("focus",
function(c)
if c.maximized_horizontal == true and c.maximized_vertical == true then
c.border_color = beautiful.border_normal
else
c.border_color = beautiful.border_focus
end
end)
client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
-- {{{ Arrange signal handler
for s = 1, screen.count() do screen[s]:connect_signal("arrange", function ()
local clients = awful.client.visible(s)
local layout = awful.layout.getname(awful.layout.get(s))
if #clients > 0 then -- Fine grained borders and floaters control
for _, c in pairs(clients) do -- Floaters always have borders
if awful.client.floating.get(c) or layout == "floating" then
c.border_width = beautiful.border_width
-- No borders with only one visible client
elseif #clients == 1 or layout == "max" then
clients[1].border_width = 0
else
c.border_width = beautiful.border_width
end
end
end
end)
end
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("nm-applet")
If someone can help me I'll be really thankful.
Best regards,
GeorgiThis is weird behavior that I don't experience with Awesome and Atom. Does this happen only with Atom, or with anything? One aspect of your rc.lua that might cause something like this is the sloppy focusing, this bit here:
-- 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)
Try disabling that, by commenting it out entirely, and see if the problem persists.
If it only happens with Atom, then maybe Atom conflicts for some reason with this sloppy focusing. -
[SOLVED] Error when starting awesome WM.
I'm not sure if this should go here or in Workstation User, so sorry if I got it wrong. When I try to startx with "exec awesome &" in my .xinitrc I get an "expected keysym, got XF86Info: line 914 of inet" error. Someone suggested that it could be my keybindings in my rc.lua for awesome but I tried someone else's rc.lua and still got it.
Error Log
xauth: creating new authority file /home/tim/.serverauth.27451
X.Org X Server 1.5.0
Release Date:
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.26-ARCH i686
Current Operating System: Linux tim-laptop 2.6.26-ARCH #1 SMP PREEMPT Tue Sep 9 10:15:21 UTC 2008 i686
Build Date: 06 September 2008 05:03:06PM
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep 20 11:49:21 2008
(==) Using config file: "/etc/X11/xorg.conf"
expected keysym, got XF86Info: line 914 of inet
expected keysym, got XF86Info: line 914 of inet
expected keysym, got XF86Info: line 914 of inet
waiting for X server to shut down .
Xorg.log
X.Org X Server 1.5.0
Release Date:
X Protocol Version 11, Revision 0
Build Operating System: Linux 2.6.26-ARCH i686
Current Operating System: Linux tim-laptop 2.6.26-ARCH #1 SMP PREEMPT Tue Sep 9 10:15:21 UTC 2008 i686
Build Date: 06 September 2008 05:03:06PM
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Module Loader present
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Sat Sep 20 11:49:21 2008
(==) Using config file: "/etc/X11/xorg.conf"
(==) ServerLayout "X.org Configured"
(**) |-->Screen "Screen0" (0)
(**) | |-->Monitor "Monitor0"
(**) | |-->Device "Card0"
(**) |-->Input Device "Mouse0"
(**) |-->Input Device "Keyboard0"
(==) Automatically adding devices
(==) Automatically enabling devices
(==) Including the default font path /usr/share/fonts/misc,/usr/share/fonts/100dpi:unscaled,/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/TTF,/usr/share/fonts/Type1.
(**) FontPath set to:
/usr/share/fonts/misc,
/usr/share/fonts/100dpi:unscaled,
/usr/share/fonts/75dpi:unscaled,
/usr/share/fonts/TTF,
/usr/share/fonts/Type1,
/usr/share/fonts/misc,
/usr/share/fonts/100dpi:unscaled,
/usr/share/fonts/75dpi:unscaled,
/usr/share/fonts/TTF,
/usr/share/fonts/Type1
(**) ModulePath set to "/usr/lib/xorg/modules"
(II) Open ACPI successful (/var/run/acpid.socket)
(II) Loader magic: 0x81d5660
(II) Module ABI versions:
X.Org ANSI C Emulation: 0.4
X.Org Video Driver: 4.1
X.Org XInput driver : 2.1
X.Org Server Extension : 1.1
X.Org Font Renderer : 0.6
(II) Loader running on linux
(--) using VT number 7
(--) PCI:*(0@0:2:0) Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller rev 3, Mem @ 0xd0300000/0, 0xc0000000/0, 0xd0400000/0, I/O @ 0x00001800/0
(--) PCI: (0@0:2:1) Intel Corporation Mobile 945GM/GMS/GME, 943/940GML Express Integrated Graphics Controller rev 3, Mem @ 0xd0380000/0
(II) System resource ranges:
[0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
[4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
[5] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
(II) "extmod" will be loaded. This was enabled by default and also specified in the config file.
(II) "dbe" will be loaded. This was enabled by default and also specified in the config file.
(II) "glx" will be loaded. This was enabled by default and also specified in the config file.
(II) "freetype" will be loaded. This was enabled by default and also specified in the config file.
(II) "dri" will be loaded. This was enabled by default and also specified in the config file.
(II) LoadModule: "dri"
(II) Loading /usr/lib/xorg/modules/extensions//libdri.so
(II) Module dri: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.0.0
ABI class: X.Org Server Extension, version 1.1
(II) Loading extension XFree86-DRI
(II) LoadModule: "glx"
(II) Loading /usr/lib/xorg/modules/extensions//libglx.so
(II) Module glx: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.0.0
ABI class: X.Org Server Extension, version 1.1
(==) AIGLX enabled
(==) Exporting typical set of GLX visuals
(II) Loading extension GLX
(II) LoadModule: "dbe"
(II) Loading /usr/lib/xorg/modules/extensions//libdbe.so
(II) Module dbe: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.0.0
Module class: X.Org Server Extension
ABI class: X.Org Server Extension, version 1.1
(II) Loading extension DOUBLE-BUFFER
(II) LoadModule: "extmod"
(II) Loading /usr/lib/xorg/modules/extensions//libextmod.so
(II) Module extmod: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.0.0
Module class: X.Org Server Extension
ABI class: X.Org Server Extension, version 1.1
(II) Loading extension SHAPE
(II) Loading extension MIT-SUNDRY-NONSTANDARD
(II) Loading extension BIG-REQUESTS
(II) Loading extension SYNC
(II) Loading extension MIT-SCREEN-SAVER
(II) Loading extension XC-MISC
(II) Loading extension XFree86-VidModeExtension
(II) Loading extension XFree86-Misc
(II) Loading extension XFree86-DGA
(II) Loading extension DPMS
(II) Loading extension TOG-CUP
(II) Loading extension Extended-Visual-Information
(II) Loading extension XVideo
(II) Loading extension XVideo-MotionCompensation
(II) Loading extension X-Resource
(II) LoadModule: "synaptics"
(II) Loading /usr/lib/xorg/modules/input//synaptics_drv.so
(II) Module synaptics: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 0.15.2
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 2.1
(II) LoadModule: "xtrap"
(II) Loading /usr/lib/xorg/modules/extensions//libxtrap.so
(II) Module xtrap: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.0.0
Module class: X.Org Server Extension
ABI class: X.Org Server Extension, version 1.1
(II) Loading extension DEC-XTRAP
(II) LoadModule: "freetype"
(II) Loading /usr/lib/xorg/modules/fonts//libfreetype.so
(II) Module freetype: vendor="X.Org Foundation & the After X-TT Project"
compiled for 1.5.0, module version = 2.1.0
Module class: X.Org Font Renderer
ABI class: X.Org Font Renderer, version 0.6
(II) Loading font FreeType
(II) LoadModule: "evdev"
(II) Loading /usr/lib/xorg/modules/input//evdev_drv.so
(II) Module evdev: vendor="X.Org Foundation"
compiled for 1.4.99.906, module version = 2.0.4
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 2.1
(II) LoadModule: "intel"
(II) Loading /usr/lib/xorg/modules/drivers//intel_drv.so
(II) Module intel: vendor="X.Org Foundation"
compiled for 1.4.99.906, module version = 2.4.2
Module class: X.Org Video Driver
ABI class: X.Org Video Driver, version 4.1
(II) LoadModule: "synaptics"
(II) Reloading /usr/lib/xorg/modules/input//synaptics_drv.so
(II) LoadModule: "kbd"
(II) Loading /usr/lib/xorg/modules/input//kbd_drv.so
(II) Module kbd: vendor="X.Org Foundation"
compiled for 1.4.2, module version = 1.3.1
Module class: X.Org XInput Driver
ABI class: X.Org XInput driver, version 2.0
(II) intel: Driver for Intel Integrated Graphics Chipsets: i810,
i810-dc100, i810e, i815, i830M, 845G, 852GM/855GM, 865G, 915G,
E7221 (i915), 915GM, 945G, 945GM, 945GME, 965G, G35, 965Q, 946GZ,
965GM, 965GME/GLE, G33, Q35, Q33,
Mobile Intel® GM45 Express Chipset,
Intel Integrated Graphics Device, G45/G43, Q45/Q43
(II) Primary Device is: PCI 00@00:02:0
(II) resource ranges after xf86ClaimFixedResources() call:
[0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
[4] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
[5] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
(II) resource ranges after probing:
[0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
[4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[b]
[5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[b]
[6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[b]
[7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
[8] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
[9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[b]
[10] 0 0 0x000003c0 - 0x000003df (0x20) IS[b]
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Loading /usr/lib/xorg/modules//libint10.so
(II) Module int10: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.0.0
ABI class: X.Org Video Driver, version 4.1
(II) Loading sub module "vbe"
(II) LoadModule: "vbe"
(II) Loading /usr/lib/xorg/modules//libvbe.so
(II) Module vbe: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.1.0
ABI class: X.Org Video Driver, version 4.1
(II) Loading sub module "vgahw"
(II) LoadModule: "vgahw"
(II) Loading /usr/lib/xorg/modules//libvgahw.so
(II) Module vgahw: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 0.1.0
ABI class: X.Org Video Driver, version 4.1
(==) intel(0): Depth 24, (==) framebuffer bpp 32
(==) intel(0): RGB weight 888
(==) intel(0): Default visual is TrueColor
(**) intel(0): Option "AccelMethod" "exa"
(II) intel(0): Integrated Graphics Chipset: Intel(R) 945GM
(--) intel(0): Chipset: "945GM"
(--) intel(0): Linear framebuffer at 0xC0000000
(--) intel(0): IO registers at addr 0xD0300000
(II) intel(0): 2 display pipes available.
(**) intel(0): Using EXA for acceleration
(II) Loading sub module "int10"
(II) LoadModule: "int10"
(II) Reloading /usr/lib/xorg/modules//libint10.so
(II) intel(0): initializing int10
(WW) intel(0): Bad V_BIOS checksum
(II) intel(0): Primary V_BIOS segment is: 0xc000
(II) intel(0): VESA BIOS detected
(II) intel(0): VESA VBE Version 3.0
(II) intel(0): VESA VBE Total Mem: 7872 kB
(II) intel(0): VESA VBE OEM: Intel(r) 82945GM Chipset Family Graphics Chip Accelerated VGA BIOS
(II) intel(0): VESA VBE OEM Software Rev: 1.0
(II) intel(0): VESA VBE OEM Vendor: Intel Corporation
(II) intel(0): VESA VBE OEM Product: Intel(r) 82945GM Chipset Family Graphics Controller
(II) intel(0): VESA VBE OEM Product Rev: Hardware Version 0.0
(II) Loading sub module "ddc"
(II) LoadModule: "ddc"
(II) Module "ddc" already built-in
(II) Loading sub module "i2c"
(II) LoadModule: "i2c"
(II) Module "i2c" already built-in
(II) intel(0): Output VGA using monitor section Monitor0
(II) intel(0): I2C bus "CRTDDC_A" initialized.
(II) intel(0): Output LVDS has no monitor section
(II) intel(0): I2C bus "LVDSDDC_C" initialized.
(II) intel(0): Attempting to determine panel fixed mode.
(II) intel(0): I2C device "LVDSDDC_C:ddc2" registered at address 0xA0.
(II) intel(0): EDID vendor "LPL", prod id 49152
(II) intel(0): found backlight control method /sys/class/backlight/acpi_video1
(II) intel(0): Output TV has no monitor section
(II) intel(0): EDID vendor "LPL", prod id 49152
(II) intel(0): Output VGA disconnected
(II) intel(0): Output LVDS connected
(II) intel(0): Output TV disconnected
(II) intel(0): Using exact sizes for initial modes
(II) intel(0): Output LVDS using initial mode 1280x800
(II) intel(0): Monitoring connected displays enabled
(II) intel(0): detected 256 kB GTT.
(II) intel(0): detected 7932 kB stolen memory.
(==) intel(0): video overlay key set to 0x101fe
(==) intel(0): Will not try to enable page flipping
(==) intel(0): Triple buffering disabled
(==) intel(0): Intel XvMC decoder disabled
(==) intel(0): Using gamma correction (1.0, 1.0, 1.0)
(==) intel(0): DPI set to (96, 96)
(II) Loading sub module "fb"
(II) LoadModule: "fb"
(II) Loading /usr/lib/xorg/modules//libfb.so
(II) Module fb: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 1.0.0
ABI class: X.Org ANSI C Emulation, version 0.4
(II) Loading sub module "exa"
(II) LoadModule: "exa"
(II) Loading /usr/lib/xorg/modules//libexa.so
(II) Module exa: vendor="X.Org Foundation"
compiled for 1.5.0, module version = 2.4.0
ABI class: X.Org Video Driver, version 4.1
(II) Loading sub module "ramdac"
(II) LoadModule: "ramdac"
(II) Module "ramdac" already built-in
(II) intel(0): Comparing regs from server start up to After PreInit
(WW) intel(0): Register 0x61200 (PP_STATUS) changed from 0xc0000008 to 0xd000000a
(WW) intel(0): PP_STATUS before: on, ready, sequencing idle
(WW) intel(0): PP_STATUS after: on, ready, sequencing on
(WW) intel(0): Register 0x71024 (PIPEBSTAT) changed from 0x00000202 to 0x80000202
(WW) intel(0): PIPEBSTAT before: status: VSYNC_INT_STATUS VBLANK_INT_STATUS
(WW) intel(0): PIPEBSTAT after: status: FIFO_UNDERRUN VSYNC_INT_STATUS VBLANK_INT_STATUS
(==) Depth 24 pixmap format is 32 bpp
(II) do I need RAC? No, I don't.
(II) resource ranges after preInit:
[0] -1 0 0xffffffff - 0xffffffff (0x1) MX[b]
[1] -1 0 0x000f0000 - 0x000fffff (0x10000) MX[b]
[2] -1 0 0x000c0000 - 0x000effff (0x30000) MX[b]
[3] -1 0 0x00000000 - 0x0009ffff (0xa0000) MX[b]
[4] 0 0 0x000a0000 - 0x000affff (0x10000) MS[b](OprD)
[5] 0 0 0x000b0000 - 0x000b7fff (0x8000) MS[b](OprD)
[6] 0 0 0x000b8000 - 0x000bffff (0x8000) MS[b](OprD)
[7] -1 0 0x0000ffff - 0x0000ffff (0x1) IX[b]
[8] -1 0 0x00000000 - 0x00000000 (0x1) IX[b]
[9] 0 0 0x000003b0 - 0x000003bb (0xc) IS[b](OprU)
[10] 0 0 0x000003c0 - 0x000003df (0x20) IS[b](OprU)
(II) intel(0): Kernel reported 238592 total, 1 used
(II) intel(0): I830CheckAvailableMemory: 954364 kB available
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 11, (OK)
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 11, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 11, (OK)
drmOpenByBusid: drmOpenMinor returns 11
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
(II) [drm] DRM interface version 1.3
(II) [drm] DRM open master succeeded.
(II) intel(0): [drm] Using the DRM lock SAREA also for drawables.
(II) intel(0): [drm] framebuffer mapped by ddx driver
(II) intel(0): [drm] added 1 reserved context for kernel
(II) intel(0): X context handle = 0x1
(II) intel(0): [drm] installed DRM signal handler
(**) intel(0): Framebuffer compression enabled
(**) intel(0): Tiling enabled
(==) intel(0): VideoRam: 262144 KB
(II) intel(0): Attempting memory allocation with tiled buffers.
(II) intel(0): Tiled allocation successful.
(II) intel(0): [drm] Registers = 0xd0300000
(II) intel(0): [drm] ring buffer = 0xc0000000
(II) intel(0): [drm] mapped front buffer at 0xc1000000, handle = 0xc1000000
(II) intel(0): [drm] mapped back buffer at 0xc4000000, handle = 0xc4000000
(II) intel(0): [drm] mapped depth buffer at 0xc5000000, handle = 0xc5000000
(II) intel(0): [drm] mapped classic textures at 0xc6000000, handle = 0xc6000000
(II) intel(0): [drm] Initialized kernel agp heap manager, 33554432
(II) intel(0): [dri] visual configs initialized
(II) intel(0): Page Flipping disabled
(II) intel(0): vgaHWGetIOBase: hwp->IOBase is 0x03d0, hwp->PIOOffset is 0x0000
(II) EXA(0): Offscreen pixmap area of 31457280 bytes
(II) EXA(0): Driver registered support for the following operations:
(II) Solid
(II) Copy
(II) Composite (RENDER acceleration)
(==) intel(0): Backing store disabled
(==) intel(0): Silken mouse enabled
(II) intel(0): Initializing HW Cursor
(II) intel(0): [DRI] installation complete
(II) intel(0): xf86BindGARTMemory: bind key 0 at 0x01000000 (pgoffset 4096)
(II) intel(0): xf86BindGARTMemory: bind key 1 at 0x02000000 (pgoffset 8192)
(II) intel(0): xf86BindGARTMemory: bind key 2 at 0x04000000 (pgoffset 16384)
(II) intel(0): xf86BindGARTMemory: bind key 3 at 0x05000000 (pgoffset 20480)
(II) intel(0): xf86BindGARTMemory: bind key 4 at 0x06000000 (pgoffset 24576)
(II) intel(0): Fixed memory allocation layout:
(II) intel(0): 0x00000000-0x0001ffff: ring buffer (128 kB)
(II) intel(0): 0x00020000-0x0061ffff: compressed frame buffer (6144 kB, 0x000000003f820000 physical
(II) intel(0): 0x00620000-0x00620fff: compressed ll buffer (4 kB, 0x000000003fe20000 physical
(II) intel(0): 0x00621000-0x0062afff: HW cursors (40 kB, 0x000000003fe21000 physical
(II) intel(0): 0x0062b000-0x00632fff: logical 3D context (32 kB)
(II) intel(0): 0x00633000-0x00633fff: overlay registers (4 kB, 0x000000003fe33000 physical
(II) intel(0): 0x007bf000: end of stolen memory
(II) intel(0): 0x01000000-0x01ffffff: front buffer (10240 kB) X tiled
(II) intel(0): 0x02000000-0x03dfffff: exa offscreen (30720 kB)
(II) intel(0): 0x04000000-0x04ffffff: back buffer (10240 kB) X tiled
(II) intel(0): 0x05000000-0x05ffffff: depth buffer (10240 kB) X tiled
(II) intel(0): 0x06000000-0x07ffffff: classic textures (32768 kB)
(II) intel(0): 0x10000000: end of aperture
(II) intel(0): Selecting standard 18 bit TMDS pixel format.
(II) intel(0): Output configuration:
(II) intel(0): Pipe A is off
(II) intel(0): Display plane A is now disabled and connected to pipe A.
(II) intel(0): Pipe B is on
(II) intel(0): Display plane B is now enabled and connected to pipe B.
(II) intel(0): Output VGA is connected to pipe none
(II) intel(0): Output LVDS is connected to pipe B
(II) intel(0): Output TV is connected to pipe none
(II) intel(0): [drm] dma control initialized, using IRQ 16
(II) intel(0): RandR 1.2 enabled, ignore the following RandR disabled message.
(II) intel(0): Selecting standard 18 bit TMDS pixel format.
(II) intel(0): DPMS enabled
(II) intel(0): Set up textured video
(II) intel(0): Set up overlay video
(II) intel(0): direct rendering: Enabled
(--) RandR disabled
(II) Initializing built-in extension MIT-SHM
(II) Initializing built-in extension XInputExtension
(II) Initializing built-in extension XTEST
(II) Initializing built-in extension XKEYBOARD
(II) Initializing built-in extension XC-APPGROUP
(II) Initializing built-in extension SECURITY
(II) Initializing built-in extension XINERAMA
(II) Initializing built-in extension XFIXES
(II) Initializing built-in extension RENDER
(II) Initializing built-in extension RANDR
(II) Initializing built-in extension COMPOSITE
(II) Initializing built-in extension DAMAGE
(II) Initializing built-in extension XEVIE
(II) AIGLX: Screen 0 is not DRI2 capable
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 12, (OK)
drmOpenByBusid: Searching for BusID pci:0000:00:02.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 12, (OK)
drmOpenByBusid: drmOpenMinor returns 12
drmOpenByBusid: drmGetBusid reports pci:0000:00:02.0
(II) AIGLX: enabled GLX_MESA_copy_sub_buffer
(II) AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control
(II) AIGLX: enabled GLX_texture_from_pixmap with driver support
(II) AIGLX: Loaded and initialized /usr/lib/xorg/modules/dri/i915_dri.so
(II) GLX: Initialized DRI GL provider for screen 0
(II) intel(0): Setting screen physical size to 304 x 190
(II) Synaptics touchpad driver version 0.15.2
(--) Mouse0 auto-dev sets device to /dev/input/event8
(II) Mouse0: x-axis range 1472 - 5472
(II) Mouse0: y-axis range 1408 - 4448
(**) Option "Device" "/dev/input/event8"
(**) Option "SHMConfig" "true"
(**) Option "LeftEdge" "1700"
(**) Option "RightEdge" "5300"
(**) Option "TopEdge" "1700"
(**) Option "BottomEdge" "4200"
(**) Option "FingerLow" "25"
(**) Option "FingerHigh" "30"
(**) Option "MaxTapTime" "180"
(**) Option "MaxTapMove" "220"
(**) Option "VertScrollDelta" "100"
(--) Mouse0 touchpad found
(**) Option "CorePointer"
(**) Mouse0: always reports core events
(**) Option "CoreKeyboard"
(**) Keyboard0: always reports core events
(**) Option "Protocol" "standard"
(**) Keyboard0: Protocol: standard
(**) Option "AutoRepeat" "500 30"
(**) Option "XkbRules" "xorg"
(**) Keyboard0: XkbRules: "xorg"
(**) Option "XkbModel" "pc105"
(**) Keyboard0: XkbModel: "pc105"
(**) Option "XkbLayout" "us"
(**) Keyboard0: XkbLayout: "us"
(**) Option "CustomKeycodes" "off"
(**) Keyboard0: CustomKeycodes disabled
(II) evaluating device (Mouse0)
(II) XINPUT: Adding extended input device "Mouse0" (type: TOUCHPAD)
(II) evaluating device (Keyboard0)
(II) XINPUT: Adding extended input device "Keyboard0" (type: KEYBOARD)
(II) Mouse0: x-axis range 1472 - 5472
(II) Mouse0: y-axis range 1408 - 4448
(--) Mouse0 touchpad found
(II) config/hal: Adding input device SynPS/2 Synaptics TouchPad
(II) Synaptics touchpad driver version 0.15.2
(II) SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472
(II) SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448
(**) Option "Device" "/dev/input/event8"
(--) SynPS/2 Synaptics TouchPad touchpad found
(**) SynPS/2 Synaptics TouchPad: always reports core events
(II) XINPUT: Adding extended input device "SynPS/2 Synaptics TouchPad" (type: TOUCHPAD)
(II) SynPS/2 Synaptics TouchPad: x-axis range 1472 - 5472
(II) SynPS/2 Synaptics TouchPad: y-axis range 1408 - 4448
(WW) SynPS/2 Synaptics TouchPad can't grab event device, errno=16
(--) SynPS/2 Synaptics TouchPad touchpad found
(II) config/hal: Adding input device Video Bus
(**) Video Bus: always reports core events
(**) Video Bus: Device: "/dev/input/event6"
(II) Video Bus: Found keys
(II) Video Bus: Configuring as keyboard
(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Video Bus: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Video Bus: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) Video Bus: xkb_layout: "us"
(II) config/hal: Adding input device Video Bus
(**) Video Bus: always reports core events
(**) Video Bus: Device: "/dev/input/event5"
(II) Video Bus: Found keys
(II) Video Bus: Configuring as keyboard
(II) XINPUT: Adding extended input device "Video Bus" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) Video Bus: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) Video Bus: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) Video Bus: xkb_layout: "us"
(II) config/hal: Adding input device AT Translated Set 2 keyboard
(**) AT Translated Set 2 keyboard: always reports core events
(**) AT Translated Set 2 keyboard: Device: "/dev/input/event1"
(II) AT Translated Set 2 keyboard: Found keys
(II) AT Translated Set 2 keyboard: Configuring as keyboard
(II) XINPUT: Adding extended input device "AT Translated Set 2 keyboard" (type: KEYBOARD)
(**) Option "xkb_rules" "base"
(**) AT Translated Set 2 keyboard: xkb_rules: "base"
(**) Option "xkb_model" "evdev"
(**) AT Translated Set 2 keyboard: xkb_model: "evdev"
(**) Option "xkb_layout" "us"
(**) AT Translated Set 2 keyboard: xkb_layout: "us"
(II) config/hal: Adding input device Macintosh mouse button emulation
(**) Macintosh mouse button emulation: always reports core events
(**) Macintosh mouse button emulation: Device: "/dev/input/event0"
(II) Macintosh mouse button emulation: Found x and y relative axes
(II) Macintosh mouse button emulation: Found mouse buttons
(II) Macintosh mouse button emulation: Configuring as mouse
(II) XINPUT: Adding extended input device "Macintosh mouse button emulation" (type: MOUSE)
(II) UnloadModule: "synaptics"
(II) UnloadModule: "kbd"
(II) UnloadModule: "synaptics"
(II) Video Bus: Close
(II) UnloadModule: "evdev"
(II) Video Bus: Close
(II) UnloadModule: "evdev"
(II) AT Translated Set 2 keyboard: Close
(II) UnloadModule: "evdev"
(II) Macintosh mouse button emulation: Close
(II) UnloadModule: "evdev"
(II) intel(0): xf86UnbindGARTMemory: unbind key 0
(II) intel(0): xf86UnbindGARTMemory: unbind key 1
(II) intel(0): xf86UnbindGARTMemory: unbind key 2
(II) intel(0): xf86UnbindGARTMemory: unbind key 3
(II) intel(0): xf86UnbindGARTMemory: unbind key 4
(II) intel(0): [drm] removed 1 reserved context for kernel
(II) intel(0): [drm] unmapping 8192 bytes of SAREA 0xf8acb000 at 0xb7a29000
(II) intel(0): [drm] Closed DRM master.
xorg.conf
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
# RgbPath "/usr/share/X11/rgb"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/misc"
FontPath "/usr/share/fonts/100dpi:unscaled"
FontPath "/usr/share/fonts/75dpi:unscaled"
FontPath "/usr/share/fonts/TTF"
FontPath "/usr/share/fonts/Type1"
EndSection
Section "Module"
Load "dri"
Load "glx"
# Load "record"
Load "GLcore"
Load "dbe"
Load "extmod"
Load "synaptics"
Load "xtrap"
Load "freetype"
Load "evdev"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Driver "synaptics"
Identifier "Mouse0"
Option "Device" "/dev/mouse0"
Option "Protocol" "auto-dev"
Option "LeftEdge" "1700"
Option "RightEdge" "5300"
Option "TopEdge" "1700"
Option "BottomEdge" "4200"
Option "FingerLow" "25"
Option "FingerHigh" "30"
Option "MaxTapTime" "180"
Option "MaxTapMove" "220"
Option "VertScrollDelta" "100"
Option "MinSpeed" "0.06"
Option "MaxSpeed" "0.12"
Option "AccelFactor" "0.0030"
Option "SHMConfig" "true"
# Option "Repeater" "/dev/ps2mouse"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
#DisplaySize 1280 800 # mm
Identifier "Monitor0"
VendorName "LPL"
ModelName "c000"
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
BusID "PCI:0:2:0"
Option "AccelMethod" "exa"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Depth 1
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 4
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 8
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 15
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 16
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
EndSubSection
EndSection
.xinitrc
#!/bin/sh
exec openbox-session
#ivman &
#exec awesome &
#/usr/lib/wicd/wicd-client.py &
#xterm -bg black -fg white
rc.lua
-- GGLucas' Awesome-3 Lua Config :D
-- Version 2
-- This config is for use with awesome 3.0.
-- If you have any suggestions or questions, feel free
-- to pass me a message, find me in #awesome on OFTC, or
-- email me at <lucas[at]glacicle.com>
-- I use both wicked and eminent, so to use it,
-- you'll need to get both those helper libraries too.
-- Note that I use all-custom keybindings, so you might
-- want to copy the default rc.lua's keybindings
-- into here if you wish to use those, although you might
-- find you like mine better :P
---- {{{ Require lua libraries
-- Shipped with awesome
require("awful")
require("beautiful")
-- External
require("wicked") -- Widgets
require("eminent") -- Dynamic tagging
---- {{{ 'Beautiful' theme settings
-- Font
beautiful.font = "Terminus 8"
-- Background
beautiful.bg_normal = '#22222222'
beautiful.bg_focus = '#285577'
beautiful.bg_sbfocus = '#11335565'
beautiful.bg_urgent = '#A10000'
-- Foreground
beautiful.fg_normal = '#999999'
beautiful.fg_focus = '#ffffff'
beautiful.fg_urgent = '#ffffff'
-- Border
beautiful.border_width = 2
beautiful.border_normal = '#333333'
beautiful.border_focus = '#4C7899'
beautiful.border_marked = '#91231c'
---- {{{ Modkeys
key = {}
key.none = {}
key.alt = {"Mod1"}
key.super = {"Mod4"}
key.shift = {"Shift"}
key.control = {"Control"}
key.super_alt = {key.super[1], key.alt[1]}
key.super_shift = {key.super[1], key.shift[1]}
key.super_control = {key.super[1], key.control[1]}
key.control_alt = {key.control[1], key.alt[1]}
key.shift_alt = {key.shift[1], key.alt[1]}
---- {{{ Settings
-- Initialise tables
settings = {}
settings.widget = {}
settings.apps = {}
settings.tag = {}
settings.bindings = {}
-- {{{ General
-- Widget spacer and separator
settings.widget_spacer = " "
settings.widget_separator = " "
-- Warp mouse
settings.warp_mouse = true
-- New become master
settings.new_become_master = false
-- Tag mwfact
settings.tag.mwfact = 0.618033988769
-- {{{ Applications
-- Terminal application
settings.apps.terminal = 'xterm'
-- Terminal with gnu screen
settings.apps.gnu_screen = settings.apps.terminal..' -e zsh -c "exec screen -x main"'
-- Terminal with gnu screen over ssh to my main machine
settings.apps.gnu_screen_ssh_desktop = settings.apps.terminal..' -e zsh -c "ssh -t me.glacicle.com screen -x main"'
-- Terminal with gnu screen over ssh to my vps server
settings.apps.gnu_screen_ssh_server = settings.apps.terminal..' -e zsh -c "ssh -t glacicle.com screen -x"'
-- Command to lock the screen
settings.apps.lock_screen = 'xscreensaver-command -lock'
-- Command to turn screen off with DPMS
settings.apps.screen_off = 'sleep 1; xset dpms force off'
-- File manager application
settings.apps.filemanager = settings.apps.terminal..' -e zsh -c "vifm %s"'
-- Toggle music
-- Note: mpdtoggle is my own script for finding out if
-- I want to toggle or play/stop, replace it with mpc if
-- you wish to use it.
settings.apps.music_toggle = "mpdtoggle toggle"
-- {{{ Floating windows
settings.floating = {
["gimp"] = true,
["urxvtcnotify"] = true,
-- {{{ Other
-- Check what widget mode to use
if io.open(os.getenv("HOME").."/.laptop_mode") then
-- Special file exists, display widgets I want
-- on my laptop
settings.widget_mode = 'laptop'
else
settings.widget_mode = 'desktop'
end
-- Highlight statusbar of focussed screen on multiple-monitor setups
if screen.count() > 1 then
settings.statusbar_highlight_focus = {true, 1}
end
---- {{{ Keybindings
-- Initialise table
settings.bindings.wm = {}
settings.bindings.mouse = {}
-- {{{ Open the filemanager at specific locations
settings.bindings.filemanager = {
-- Data partition
["/data"] = {key.alt, "d"},
-- Data partition on desktop pc from laptop (sshfs mount)
["/desktop/data"] = {key.shift_alt, "d"},
-- Home Directory
[os.getenv("HOME")] = {key.alt, "a"},
-- {{{ Run specific commands
settings.bindings.commands = {
-- Open Terminal
[settings.apps.terminal] = {key.alt, "q"},
-- GNU Screen
[settings.apps.gnu_screen] = {key.super, "k"},
-- GNU Screen over SSH to Desktop
[settings.apps.gnu_screen_ssh_desktop] = {key.super_shift, "k"},
-- GNU Screen over SSH to VPS
[settings.apps.gnu_screen_ssh_server] = {key.super_alt, "k"},
-- Lock screen
[settings.apps.lock_screen] = {key.super, "l"},
-- Screen off with DPMS
[settings.apps.screen_off] = {key.super, "o"},
-- Toggle music
[settings.apps.music_toggle] = {key.alt, "e"},
-- {{{ Client keybindings
settings.bindings.wm.client = {
-- Alt+`: Close window
[function() client.focus:kill() end] = {key.alt, "#49"},
-- Mod+q: Focus previous window
[function() awful.client.focusbyidx(-1) end] = {key.super, "q"},
-- Mod+w: Focus next window
[function() awful.client.focusbyidx(1) end] = {key.super, "w"},
-- Mod+Shift+q: Swap with previous window
[function() awful.client.swap(-1) end] = {key.super_shift, "q"},
-- Mod+Shift+w: Swap with previous window
[function() awful.client.swap(1) end] = {key.super_shift, "w"},
-- Mod+c: Toggle floating
[awful.client.togglefloating] = {key.super, "c"},
-- Mod+\: Make window master
[function() local c = awful.client.master(); if c ~= client.focus then c:swap(client.focus) end end] =
{key.super, "#51"},
-- Mod+Shift+a: Move window to previous tag
[function () awful.client.movetotag(eminent.tag.getprev(mouse.screen)) end] =
{key.super_shift, "a"},
-- Mod+Shift+s: Move window to next tag
[function () awful.client.movetotag(eminent.tag.getnext(mouse.screen)) end] =
{key.super_shift, "s"},
-- Mod+Shift+e: Move window to next screen
[function () s = client.focus.screen+1; if s > screen.count() then s = 1 end; client.focus.screen = s end] =
{key.super_shift, "e"},
-- Mod+Shift+d: Move window to previous screen
[function () s = client.focus.screen-1; if s < 1 then s = screen.count() end; client.focus.screen = s end] =
{key.super_shift, "d"},
-- {{{ Tag bindings
settings.bindings.wm.tag = {
-- Mod+a: Switch to previous tag
[function() eminent.tag.prev(mouse.screen) end] = {key.super, "a"},
-- Mod+s: Switch to next tag
[function() eminent.tag.next(mouse.screen) end] = {key.super, "s"},
-- Alt+\: Switch to float layout
[function() awful.layout.set('floating') end] = {key.alt, "#51"},
-- Alt+z: Switch to max layout
[function() awful.layout.set('max') end] = {key.alt, "z"},
-- Alt+x: Switch to tile layout
[function() awful.layout.set('tile') end] = {key.alt, "x"},
-- {{{ Prompt bindings
settings.bindings.prompt = {
-- Alt+w: Run prompt
[{awful.spawn, " Run: "}] = {key.alt, "w"},
-- Mod+Alt+w: Lua eval prompt
[{awful.eval, " Run Lua: "}] = {key.super_alt, "w"},
-- {{{ Miscellaneous bindings
settings.bindings.wm.misc = {
-- Mod+Alt+r: Restart awesome
[awesome.restart] = {key.super_alt, "r"},
-- Mod+e: Switch focus to next screen
[function() awful.screen.focus(1) end] = {key.super, "e"},
-- Mod+d: Switch focus to previous screen
[function() awful.screen.focus(-1) end] = {key.super, "d"},
-- {{{ Keyboard digit bindings
settings.bindings.digits = {
-- Mod+##: View tag
[awful.tag.viewonly] = key.super,
-- Mod+Shift+##: Toggle tag view
[function(t) t.selected = not t.selected end] = key.super_shift,
-- Mod+Control+##: Move window to tag
[awful.client.movetotag] = key.super_control,
-- Mod+Alt+##: Toggle window on tag
[awful.client.toggletag] = key.super_alt,
-- {{{ Mouse bindings
settings.bindings.mouse.desktop = {
-- Right click on desktop: Open terminal
[function() awful.spawn(settings.apps.terminal) end] = {key.none, 3},
settings.bindings.mouse.client = {
-- Alt+Left: Move window
[function(c) c:mouse_move() end] = {key.alt, 1},
-- Alt+Right: Resize window
[function(c) c:mouse_resize({corner="bottomright"}) end] = {key.alt, 3},
---- {{{ Markup helper functions
-- Inline markup is a tad ugly, so use these functions
-- to dynamically create markup, we hook them into
-- the beautiful namespace for clarity.
beautiful.markup = {}
function beautiful.markup.bg(color, text)
return '<bg color="'..color..'" />'..text
end
function beautiful.markup.fg(color, text)
return '<span color="'..color..'">'..text..'</span>'
end
function beautiful.markup.font(font, text)
return '<span font_desc="'..font..'">'..text..'</span>'
end
function beautiful.markup.title(t)
return t
end
function beautiful.markup.title_normal(t)
return beautiful.title(t)
end
function beautiful.markup.title_focus(t)
return beautiful.markup.bg(beautiful.bg_focus, beautiful.markup.fg(beautiful.fg_focus, beautiful.markup.title(t)))
end
function beautiful.markup.title_urgent(t)
return beautiful.markup.bg(beautiful.bg_urgent, beautiful.markup.fg(beautiful.fg_urgent, beautiful.markup.title(t)))
end
function beautiful.markup.bold(text)
return '<b>'..text..'</b>'
end
function beautiful.markup.heading(text)
return beautiful.markup.fg(beautiful.fg_focus, beautiful.markup.bold(text))
end
---- {{{ Widgets
settings.statusbars = {}
settings.widgets = {}
settings.statusbars[1] = {{
position = "top",
height = 18,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
name = "mainstatusbar",
}, "all"}
settings.promptbar = {
position = "top",
height = 18,
fg = beautiful.fg_normal,
bg = beautiful.bg_normal,
name = "promptbar",
-- {{{ Taglist
maintaglist = widget({
type = 'taglist',
name = 'maintaglist'
function maintaglist.label(t)
return awful.widget.taglist.label.noempty(t)
end
maintaglist:mouse_add(mouse(key.none, 1, function (o, t) awful.tag.viewonly(t) end))
table.insert(settings.widgets, {1, maintaglist})
if settings.widget_mode == 'laptop' or settings.widget_mode == 'all' then
-- {{{ Battery Widget
batterywidget = widget({
type = 'textbox',
name = 'batterywidget',
align = 'right'
function read_battery_temp(format)
local f = io.open('/tmp/battery-temp')
if f == nil then
return {'n/a'}
end
local n = f:read()
if n == nil then
f:close()
return {'n/a'}
end
return {awful.escape(n)}
end
wicked.register(batterywidget, read_battery_temp,
settings.widget_spacer..beautiful.markup.heading('Battery')..': $1'..settings.widget_spacer..settings.widget_separator,
30)
-- Start timer to read the temp file
awful.hooks.timer.register(28, function ()
-- Call battery script to get batt%
command = "battery"
os.execute(command..' > /tmp/battery-temp &')
end, true)
table.insert(settings.widgets, {1, batterywidget})
end
if settings.widget_mode ~= 'none' then
-- {{{ MPD Widget
mpdwidget = widget({
type = 'textbox',
name = 'mpdwidget',
align = 'right'
wicked.register(mpdwidget, wicked.widgets.mpd, function (widget, args)
-- I don't want the stream name on my statusbar, so I gsub it out,
-- feel free to remove this bit
return settings.widget_spacer..beautiful.markup.heading('MPD')..': '
..args[1]:gsub('AnimeNfo Radio | Serving you the best Anime music!: ','')
..settings.widget_spacer..settings.widget_separator end)
table.insert(settings.widgets, {1, mpdwidget})
-- {{{ GMail Widget
gmailwidget = widget({
type = 'textbox',
name = 'gmailwidget',
align = 'right'
gmailwidget:mouse_add(mouse(key.none, 1, function () wicked.update(gmailwidget) end))
function read_gmail_temp(format)
local f = io.open('/tmp/gmail-temp')
if f == nil then
return {'n/a'}
end
local n = f:read()
if n == nil or f == ' ' or f == '' then
f:close()
return {'n/a'}
end
return {n}
end
wicked.register(gmailwidget, read_gmail_temp, function (widget, args)
local n = args[1]
local out = settings.widget_spacer..beautiful.markup.heading('GMail')..': '
if n ~= "n/a" and tonumber(n) > 0 then
out = out..beautiful.markup.bg(beautiful.bg_urgent, beautiful.markup.fg(beautiful.fg_urgent, tostring(n)))
else
out = out..tostring(n)
end
out = out..settings.widget_spacer..settings.widget_separator
return out
end, 120)
-- Start timer to fill the temp file
awful.hooks.timer.register(110, function ()
-- Call GMail check script to check for new email
os.execute(os.getenv("HOME")..'/other/.gmail.py > /tmp/gmail-temp &')
end, true)
wicked.update(gmailwidget)
table.insert(settings.widgets, {1, gmailwidget})
-- {{{ Load Averages Widget
loadwidget = widget({
type = 'textbox',
name = 'loadwidget',
align = 'right'
function widget_loadavg(format)
-- Use /proc/loadavg to get the average system load on 1, 5 and 15 minute intervals
local f = io.open('/proc/loadavg')
local n = f:read()
f:close()
-- Find the third space
local pos = n:find(' ', n:find(' ', n:find(' ')+1)+1)
return {n:sub(1,pos-1)}
end
wicked.register(loadwidget, widget_loadavg,
settings.widget_spacer..beautiful.markup.heading('Load')..': $1'..settings.widget_spacer..settings.widget_separator, 2)
table.insert(settings.widgets, {1, loadwidget})
-- {{{ CPU Usage Widget
cputextwidget = widget({
type = 'textbox',
name = 'cputextwidget',
align = 'right'
wicked.register(cputextwidget, wicked.widgets.cpu,
settings.widget_spacer..beautiful.markup.heading('CPU')..': $1%'..settings.widget_spacer..settings.widget_separator,
nil, nil, 2)
table.insert(settings.widgets, {1, cputextwidget})
-- {{{ CPU Graph Widget
cpugraphwidget = widget({
type = 'graph',
name = 'cpugraphwidget',
align = 'right'
cpugraphwidget.height = 0.85
cpugraphwidget.width = 45
cpugraphwidget.bg = '#333333'
cpugraphwidget.border_color = '#0a0a0a'
cpugraphwidget.grow = 'left'
cpugraphwidget:plot_properties_set('cpu', {
fg = '#AEC6D8',
fg_center = '#285577',
fg_end = '#285577',
vertical_gradient = false
wicked.register(cpugraphwidget, wicked.widgets.cpu, '$1', 1, 'cpu')
table.insert(settings.widgets, {1, cpugraphwidget})
-- {{{ Memory Usage Widget
memtextwidget = widget({
type = 'textbox',
name = 'memtextwidget',
align = 'right'
wicked.register(memtextwidget, wicked.widgets.mem,
settings.widget_spacer..beautiful.markup.heading('MEM')..': '..
'$1% ($2/$3)'..settings.widget_spacer..settings.widget_separator,
3, nil, {2, 4, 4})
table.insert(settings.widgets, {1, memtextwidget})
-- {{{ Memory Graph Widget
memgraphwidget = widget({
type = 'graph',
name = 'memgraphwidget',
align = 'right'
memgraphwidget.height = 0.85
memgraphwidget.width = 45
memgraphwidget.bg = '#333333'
memgraphwidget.border_color = '#0a0a0a'
memgraphwidget.grow = 'left'
memgraphwidget:plot_properties_set('mem', {
fg = '#AEC6D8',
fg_center = '#285577',
fg_end = '#285577',
vertical_gradient = false
wicked.register(memgraphwidget, wicked.widgets.mem, '$1', 1, 'mem')
table.insert(settings.widgets, {1, memgraphwidget})
-- {{{ Other Widget
settings.widget_spacerwidget = widget({ type = 'textbox', name = 'settings.widget_spacerwidget', align = 'right' })
settings.widget_spacerwidget.text = settings.widget_spacer..settings.widget_separator
table.insert(settings.widgets, {1, settings.widget_spacerwidget})
end
-- You shouldn't have to edit the code after this,
-- it takes care of applying the settings above.
---- {{{ Initialisations
-- Register beautiful with awful
awful.beautiful.register(beautiful)
-- Set default colors
awesome.colors_set({
fg = beautiful.fg_normal,
bg = beautiful.bg_normal })
-- Set default font
awesome.font_set(beautiful.font)
-- Pre-create new tags with eminent
for s=1, screen.count() do
eminent.newtag(s, 5)
end
---- {{{ Create statusbars
local mainstatusbar = {}
for i, b in pairs(settings.statusbars) do
mainstatusbar[i] = {}
for s=1,screen.count() do
this_screen = false
if b[2] ~= "all" then
for sc in pairs(b[2]) do
if sc == s then
this_screen = true
break
end
end
end
if b[2] == "all" or this_screen then
mainstatusbar[i][s] = statusbar(b[1])
local widgets = {}
for ii, w in pairs(settings.widgets) do
if w[1] == i then
table.insert(widgets, w[2])
end
end
mainstatusbar[i][s]:widgets(widgets)
mainstatusbar[i][s].screen = s
end
end
end
---- {{{ Create prompt statusbar
local mainpromptbar = statusbar(settings.promptbar)
local mainpromptbox = widget({type = "textbox", align = "left", name = "mainpromptbox"})
mainpromptbar:widgets({mainpromptbox})
mainpromptbar.screen = nil
---- {{{ Useful functions
-- {{{ Mouse warp function
function mouse_warp(c, force)
-- Allow skipping a warp
if warp_skip then
warp_skip = false
return
end
-- Get vars
local sel = c or client.focus
if sel == nil then return end
local coords = sel:coords()
local m = mouse.coords()
-- Settings
mouse_padd = 6
border_area = 5
-- Check if mouse is not already inside the window
if (( m.x < coords.x-border_area or
m.y < coords.y-border_area or
m.x > coords.x+coords.width+border_area or
m.y > coords.y+coords.height+border_area
) and (
table.maxn(m.buttons) == 0
)) or force
then
mouse.coords({ x=coords.x+mouse_padd, y=coords.y+mouse_padd})
end
end
-- {{{ Prompt with statusbar
function prompt_statusbar(s, callback, prompt)
if not callback then callback = awful.spawn end
if not prompt then prompt = " Run: " end
for i, b in pairs(mainstatusbar) do
for ii, bb in pairs(b) do
if bb.screen == s then
bb.screen = nil
end
end
end
mainpromptbar.screen = s
awful.prompt.run({prompt = prompt}, mainpromptbox, callback,
awful.completion.bash, os.getenv("HOME") .. "/.cache/awesome_history", 50, function ()
mainpromptbar.screen = nil
for i, b in pairs(mainstatusbar) do
for ii, bb in pairs(b) do
if ii == s then
bb.screen = ii
end
end
end
end)
end
---- {{{ Create bindings
--- This reads the binding tables and turns them into actual keybindings
-- WM Bindings
for i,table in pairs(settings.bindings.wm) do
for f, keys in pairs(table) do
keybinding(keys[1], keys[2], f):add()
end
end
-- Keyboard digit bindings
for i=1,9 do
for f, mod in pairs(settings.bindings.digits) do
keybinding(mod, i, function()
t = eminent.tag.getn(i, nil, true)
if not t then return end
f(t)
end):add()
end
end
-- Prompt Bindings
for prompt, keys in pairs(settings.bindings.prompt) do
keybinding(keys[1], keys[2], function() prompt_statusbar(mouse.screen, unpack(prompt)) end):add()
end
-- Filemanager bindings
for loc, keys in pairs(settings.bindings.filemanager) do
keybinding(keys[1], keys[2], function() awful.spawn(string.format(settings.apps.filemanager, loc)) end):add()
end
-- Custom command bindings
for command, keys in pairs(settings.bindings.commands) do
keybinding(keys[1], keys[2], function() awful.spawn(command) end):add()
end
-- Desktop mouse bindings
for f, keys in pairs(settings.bindings.mouse.desktop) do
awesome.mouse_add(mouse(keys[1], keys[2], f))
end
---- {{{ Set hooks
-- {{{ Focus hook
awful.hooks.focus.register(function (c)
-- Skip over my urxvtcnotify
if c.name and c.name:lower():find('urxvtcnotify') and awful.client.next(1) ~= c then
awful.client.focusbyidx(1)
return
end
-- Set border
c.border_color = beautiful.border_focus
-- Raise the client
c:raise()
-- Set statusbar color
if settings.statusbar_highlight_focus and settings.statusbar_highlight_focus[1] then
if last_screen == nil or last_screen ~= c.screen then
mainstatusbar[settings.statusbar_highlight_focus[2]][c.screen].bg = beautiful.bg_sbfocus
if last_screen then
mainstatusbar[settings.statusbar_highlight_focus[2]][last_screen].bg = beautiful.bg_normal
end
end
last_screen = c.screen
end
end)
-- {{{ Unfocus hook
awful.hooks.unfocus.register(function (c)
-- Set border
c.border_color = beautiful.border_normal
end)
-- {{{ Mouseover hook
awful.hooks.mouseover.register(function (c)
-- Set focus for sloppy focus
client.focus = c
end)
-- {{{ Manage hook
awful.hooks.manage.register(function (c)
local class = ""
local name = ""
if c.class then
class = c.class:lower()
end
if c.name then
name = c.name:lower()
end
-- Create border
c.border_width = beautiful.border_width
c.border_color = beautiful.border_normal
-- Add mouse bindings
for f, keys in pairs(settings.bindings.mouse.client) do
c:mouse_add(mouse(keys[1], keys[2], f))
end
-- Check if floating
for app, i in pairs(settings.floating) do
if class:find(app) or name:find(app) then
c.floating = i
break
end
end
if name:find('urxvtcnotify') then
-- I got sick of libnotify/notification-daemon
-- and their dependencies, so I'm using a little
-- urxvtc window with some text in it as notifications :P
-- This makes it appear at the correct place,
-- feel free to remove the whole section, you probably
-- won't need it.
c.screen = 3
c:coords({
x = 1680*2+1400,
y = 18,
width = 276,
height = 106
c.border_color = beautiful.border_normal
local tags = {}
for i,t in pairs(eminent.tags[3]) do
if eminent.tag.isoccupied(3, t) then
table.insert(tags, t)
end
end
c:tags(tags)
return 0
end
-- Focus new clients
client.focus = c
-- Prevent new windows from becoming master
if not settings.new_become_master then
awful.client.swap(1, c)
end
-- Don't honor size hints
c.honorsizehints = false
end)
-- {{{ Arrange hook
awful.hooks.arrange.register(function(s)
-- Warp the mouse
if settings.warp_mouse then
mouse_warp()
end
-- Check focus
if not client.focus then
local c = awful.client.focus.history.get(s, 0)
if c then client.focus = c end
end
end)
-- vim: set filetype=lua fdm=marker tabstop=4 shiftwidth=4 expandtab smarttab autoindent smartindent nu:
Last edited by Tim Fox (2008-09-20 18:15:15)andre.ramaciotti wrote:And I'm not sure if you should put that & after exec awesome. It works fine here without it.
No & after entries in .xinitrc . You've commented out the awesome entry. -
[SOLVED] awesome & urxvt results in some screen flickering
Hi,
i've been using awesome since a few weeks and i noticed a flickering problem when starting urxvt (via mod4+enter).
urxvt starts, disappears, comes back again, disappears and so on.
starting up urxvt (time until i get a usable promt) takes about 1-2 seconds.
However, i don't know how to track the problem down. Maybe it is urxvt's (i think it is), maybe it is awesome's or even ati's fault (using 2.6.32 with open source ati driver).
when i switch between multiple windows (using mod4+n) only urxvt windows are flickering. Switching between gui-apps (ff, dolphin, …) works as expected.
maybe someone has an idea about this …
Here are the configs:
.Xdefaults:
!URxvt settings
!--[Title]--!
URxvt*title: urxvtc
URxvt*termName: rxvt-unicode
URxvt*cursorBlink: true
URxvt*urgentOnBell: true
!--[Url's /launching/marking/yanking]--!
URxvt.perl-ext: default,matcher
URxvt.urlLauncher: /usr/bin/firefox
URxvt.matcher.button: 1
!--[Fonts]--!
URxvt*font: xft:Bitstream Vera Sans Mono:pixelsize=14:antialias=false
URxvt.italicFont: xft:Bitstream Vera Sans Mono:italic:autohint=true:antialias=false
URxvt.boldItalicFont: xft:Bitstream Vera Sans Mono:bold:italic:autohint=true:antialias=false
URxvt.underlineColor: yellow
URxvt.scrollBar: false
!--[Urxvt Options]--!
URxvt.boldMode: false
URxvt.imLocale: de_AT.UTF-8
URxvt.loginShell: true
URxvt.saveLines: 512
URxvt.inheritPixmap: true
URxvt.borderless: true
URxvt.jumpScroll: true
URxvt.tintColor: white
URxvt.internalBorder: 0
URxvt.cursorBlink: false
URxvt.cursorColor: #dd9900
URxvt.cursorColor2: #000000
URxvt.background: #222222
URxvt.foreground: #ddccbb
URxvt.colorBD: #ffffff
URxvt.colorIT: #bbbbbb
URxvt.colorUL: #999999
URxvt.underlineColor: #999999
URxvt*saveLines: 512
!URxvt*depth: 32
!URxvt*background: rgba:02f0/04f0/04f0/cccc
URxvt*transparent: true
URxvt*shading: 10
!--[Colours]--!
!Theme One from
!http://phraktured.net/terminal-colors/terminal%20theme.tags.html
*background: rgb:00/00/00
*foreground: rgb:a8/a8/a8
*color0: rgb:00/00/00
*color1: rgb:a8/00/00
*color2: rgb:00/a8/00
*color3: rgb:a8/54/00
*color4: rgb:00/00/a8
*color5: rgb:a8/00/a8
*color6: rgb:00/a8/a8
*color7: rgb:a8/a8/a8
*color8: rgb:54/50/54
*color9: rgb:f8/54/50
*color10: rgb:50/fc/50
*color11: rgb:f8/fc/50
*color12: rgb:50/54/f8
*color13: rgb:f8/54/f8
*color14: rgb:50/fc/f8
*color15: rgb:f8/fc/f8
http://github.com/nblock/config/blob/master/.Xdefaults
rc.lua:
-- {{{ Load libraries
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
require("vicious")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/usr/share/awesome/themes/zenburn/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "urxvtc"
editor = "vim"
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.tile, --1
awful.layout.suit.tile.left, --2
awful.layout.suit.tile.bottom, --3
awful.layout.suit.tile.top, --4
awful.layout.suit.fair, --5
awful.layout.suit.fair.horizontal, --6
awful.layout.suit.spiral, --7
awful.layout.suit.spiral.dwindle, --8
awful.layout.suit.max, --9
awful.layout.suit.max.fullscreen, --10
awful.layout.suit.magnifier, --11
awful.layout.suit.floating --12
-- some commands
local commands = {}
commands.suspend = "sudo pm-suspend"
commands.help = "touch ~/seppal"
commands.lock = "xscreensaver-command --lock"
commands.screenshot = "scrot -e 'mv $f ~/bilder/screenshots'"
--audio stuff
commands.raisevol = "amixer set PCM 2%+"
commands.lowervol = "amixer set PCM 2%-"
commands.mute = "amixer sset PCM toggle"
commands.cmusnext = "cmus-remote --next"
commands.cmusprev = "cmus-remote --prev"
commands.cmuspause = "cmus-remote --pause"
commands.cmusplay = "cmus-remote --play"
commands.calc = "krunner"
--todo
commands.fileman = "pcmanfm"
commands.calc = "xcalc"
commands.browser = "firefox"
-- {{{ 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 download", "2 mail", "3 chat",
"4 music", "5 news", "6 fm",
7, 8, 9 }, s,
{layouts[3], layouts[1], layouts[1], -- Tags: 1, 2, 3
layouts[1], layouts[1], layouts[1], -- 4, 5 ,6
layouts[1], layouts[1], layouts[1] -- 7, 8, 9
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
-- {{{ Widgets configuration
-- {{{ Reusable separators
local spacer = widget({ type = "textbox", name = "spacer" })
local separator = widget({ type = "textbox", name = "separator" })
spacer.text = " "
separator.text = " <span foreground='red'>•</span> "
-- {{{ CPU load
local cpuwidget = widget({ type = "textbox" })
vicious.register(cpuwidget, vicious.widgets.cpu, "<span foreground='orange'>load: </span><span foreground='green'>$2%</span><span foreground='orange'> - </span><span foreground='green'>$3%</span>")
-- {{{ CPU temperature
local thermalwidget = widget({ type = "textbox" })
vicious.register(thermalwidget, vicious.widgets.thermal, "<span foreground='orange'>temp: </span><span foreground='green'>$1°C</span>", 20, "thermal_zone1")
-- {{{ Battery state
-- Widget icon
-- baticon = widget({ type = "imagebox", name = "baticon" })
-- baticon.image = image(beautiful.widget_bat)
local batwidget = widget({ type = "textbox" })
vicious.register(batwidget, vicious.widgets.bat, "<span foreground='orange'>bat: </span><span foreground='green'>$1$2%</span>", 60, "C1C5")
-- {{{ Date and time
local datewidget = widget({ type = "textbox" })
vicious.register(datewidget, vicious.widgets.date, "<span foreground='green'>%a, %d.%m.%y - %H:%M</span>", 5)
-- {{{ Volume widget
local volwidget = widget({ type = "textbox" })
vicious.register(volwidget, vicious.widgets.volume, "<span foreground='orange'>vol: </span><span foreground='green'>$1%</span>", 1, 'PCM')
-- {{{ System tray
systray = widget({ type = "systray" })
-- {{{ Wibox initialisation
local wibox = {}
local promptbox = {}
local layoutbox = {}
local taglist = {}
taglist.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))
for s = 1, screen.count() do
-- Create a promptbox
promptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
-- Create a layoutbox
layoutbox[s] = awful.widget.layoutbox(s)
layoutbox[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
taglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, taglist.buttons)
-- Create the wibox
wibox[s] = awful.wibox({
position = "top", screen = s,
fg = beautiful.fg_normal, bg = beautiful.bg_normal
-- Add widgets to the wibox
wibox[s].widgets = {{
launcher, taglist[s], layoutbox[s], promptbox[s],
layout = awful.widget.layout.horizontal.leftright
s == screen.count() and systray or nil,
spacer, datewidget,
separator, volwidget,
separator, batwidget,
separator, cpuwidget,
separator, thermalwidget,
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(
--user defined
awful.key({}, "XF86PowerOff", function() awful.util.spawn_with_shell(commands.suspend) end ),
awful.key({}, "Help", function() awful.util.spawn_with_shell(commands.help) end ),
awful.key({ modkey, }, "F12", function () awful.util.spawn_with_shell(commands.lock) end),
--audio stuff
awful.key({}, "XF86AudioMute", function() awful.util.spawn_with_shell(commands.mute) end ),
awful.key({}, "XF86AudioRaiseVolume", function() awful.util.spawn_with_shell(commands.raisevol) end ),
awful.key({}, "XF86AudioLowerVolume", function() awful.util.spawn_with_shell(commands.lowervol) end ),
awful.key({}, "XF86AudioNext", function() awful.util.spawn_with_shell(commands.cmusnext) end ),
awful.key({}, "XF86AudioPrev", function() awful.util.spawn_with_shell(commands.cmusprev) end ),
awful.key({}, "XF86AudioPlay", function() awful.util.spawn_with_shell(commands.cmuspause) end ),
awful.key({}, "XF86Tools", function() awful.util.spawn_with_shell(commands.cmusplay) end ),
awful.key({}, "XF86Calculator", function() awful.util.spawn_with_shell(commands.calc) end ),
awful.key({}, "Print", function() awful.util.spawn_with_shell(commands.screenshot) end ),
-- awful.key({}, "XF86MyComputer", function() awful.util.spawn_with_shell(commands.fileman) end ),
-- awful.key({}, "XF86Mail", function() awful.util.spawn_with_shell(commands.mail) end ),
-- awful.key({}, "XF86HomePage", function() awful.util.spawn_with_shell(commands.browser) end ),
-- awful.key({}, "XF86Sleep", function() awful.util.spawn_with_shell(commands.lock) end ),
-- awful.key({"Control", "Mod1"}, "l", function() awful.util.spawn_with_shell(commands.lock) end ),
--default bindings
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, }, "n",
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(true) end),
-- Layout manipulation
awful.key({ modkey, "Shift" }, "n", function () awful.client.swap.byidx( 1) end),
awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end),
awful.key({ modkey, "Control" }, "n", 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),
-- Prompt
awful.key({ modkey }, "r", function () promptbox[mouse.screen]:run() end),
-- Run stuff in a Terminal
awful.key({ modkey }, "x", function ()
awful.prompt.run({ prompt = "Run in Terminal: " }, promptbox[mouse.screen].widget,
function (prog)
awful.util.spawn_with_shell(terminal .. " -name " .. prog .. " -e /bin/bash -c " .. prog)
end)
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, }, "j", function (c) c.minimized = not c.minimized 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 ()
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 } },
--floating apps
{ rule = { class = "pinentry-qt4" },
properties = { floating = true } },
{ rule = { class = "Gimp" },
properties = { floating = true } },
--apptags
--downloading stuff
{ rule = { class = "JDownloader" },
properties = { tag = tags[1][1],switchtotag = true } },
{ rule = { instance = "rtorrent" },
properties = { tag = tags[1][1],switchtotag = false } },
-- mail
{ rule = { class = "Kmail" },
properties = { tag = tags[1][2],switchtotag = true } },
--chat and stuff like that
{ rule = { class = "Choqok" },
properties = { tag = tags[1][3],switchtotag = false } },
{ rule = { class = "Kopete" },
properties = { tag = tags[1][3],switchtotag = false } },
-- cmus
{ rule = { instance = "cmus" },
properties = { tag = tags[1][4],switchtotag = true } },
-- news
{ rule = { instance = "newsbeuter" },
properties = { tag = tags[1][5],switchtotag = true } },
--file manager
{ rule = { class = "Dolphin" },
properties = { tag = tags[1][6],switchtotag = true } },
--misc stuff
{ rule = { class = "Konqueror" },
properties = { tag = tags[1][9],switchtotag = true } },
-- {{{ 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 })
-- remove gaps
c.size_hints_honor = false
-- 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)
-- {{{ Autostart
os.execute("krandrtray &")
-- vim: fdm=marker fdl=0 sts=4 ai
http://github.com/nblock/config/blob/ma … ome/rc.lua
Thanks.
Last edited by nblock (2010-01-02 09:59:24)Try this .Xdefaults which works with awesome/urxvt.
*utf8: 1
*faceSize: 10
*jumpScroll: true
*multiScroll: true
*boldMode: false
*scrollBar: false
*cutNewline: false
*scrollTtyOutput: false
*scrollKey: true
*cursorBlink: true
*dynamicColors: true
*saveLines: 5000
*geometry: 125x45
! URxvt
URxvt*termName: xterm
URxvt.font: xft:Bitstream Vera Sans Mono:antialias=true:pixelsize=12
!urxvt.font: xft:Bitstream Vera Sans Mono-12:antialias=true
URxvt*transparent: false
URxvt*tintColor: #666666
URxvt*shading: 50
URxvt*scrollBar: false
URxvt*internalBorder: 5
URxvt*urgentOnBell: true
URxvt*scrollTtyKeypress: true
URxvt*underlineColor: yellow
URxvt*perl-ext-common: default,matcher
URxvt*urlLauncher: firefox
URxvt*matcher.button: 1
URxvt*matcher.pattern.1: \\bwww\\.[\\w-]\\.[\\w./?&@#-]*[\\w/-]
! Colours
*background: #303030
*foreground: #f2f2f2
*cursorColor: #999
*highlightColor: #333
*color0: #101010
*color1: #f13a21
*color2: #93f91d
*color3: #ffd00a
*color4: #404f9e
*color5: #ec0048
*color6: #2aa7e7
*color7: #f2f2f2
*color8: #1d202f
*color9: #ff361e
*color10: #ffc005
*color11: #93ff00
*color12: #3071ff
*color13: #ef0051
*color14: #4bb8fd
*color15: #a020f0
Last edited by r6 (2010-01-02 05:05:11) -
[awesome] New to the tiling world
Hey everybody,
After the surprises and joys of the basic Archlinux install, I first installed KDE4 as DE, because I was quite used to use it.
The I saw that KDE wasn't enough light to change my PC in a formula 1 car, so I searched. After that I installed Openbox, which has a great community here.
But that was a quite common wm.
Then I switched to awesome, and I'm here to fix some problems : when I start an awesome session, I only see my wallpaper, no right menu or bar on top as expected.
Here is my rc.lua :
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
--require("vicious")
-- Load Debian menu entries
--require("debian.menu")
-- Custom libraries
require("revelation")
require("shifty")
require("vicious")
require("teardrop")
--if true then return end
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/home/alex/.config/awesome/theme/fiesta/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "xterm"
editor = os.getenv("EDITOR") or "editor"
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"
modkey2 = "Mod3"
-- Table of layouts to cover with awful.layout.inc, order matters.
layouts =
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.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier,
awful.layout.suit.floating
-- {{{ Tags
shifty.config.tags = {
["xterm"] = { position = 1, init = true, },
["www"] = { position = 2, spawn = browser,},
["inkscape"] = { position = 3, exclusive = true, nopopup = true, spawn = inkscape, },
["irc"] = { position = 4, nopopup = true, spawn = "xterm -T weechat -e weechat-curses" },
["sys"] = { position = 5, exclusive = true, nopopup = true, },
["msg"] = { position = 7, exclusive = true, nopopup = true, },
["view"] = { position = 8, exclusive = true, nopopup = true, },
["mail"] = { position = 10, exclusive = true, nopopup = true, spawn = claws-mail },
["med"] = { position = 11, nopopup = true, },
["[mplayer]"] = { position = 11, nopopup = true, spawn = "xterm -T mplay"},
["dl"] = { position = 12, nopopup = true, spawn = "Transmission"},
shifty.taglist = mytaglist
-- Clients rules
shifty.config.apps = {
{ match = {"Transmission" }, tag = "dl" },
{ match = {"^Download$", "Preferences", "VideoDownloadHelper","Downloads", "Firefox Preferences", }, float = true, intrusive = true },
{ match = {"Firefox","Iceweasel","Vimperator","Shiretoko"} , tag = "www", opacity = 1.0 } ,
{ match = {"WeeChat 0.2.6","weechat-curses","weechat" }, tag = "irc" , },
{ match = {"Inkscape" }, tag = "inkscape", float = true , opacity = 1.0 },
{ match = {"MPlayer","QuodLibet" }, float = true, opacity = 1.0 },
{ match = {"claws-mail" }, tag = "mail", float = true, opacity = 1.0},
{ match = {"med" }, tag = "med" },
{ match = {"ncmpcpp","ncmpc++ ver.0.3.4","med" }, tag = "med", },
{ match = {"Pidgin" }, tag = "msg", },
{ match = {"htop" }, tag = "sys", },
{ match = {"Texmaker" }, tag = "texmaker", float = true, opacity = 1.0 },
{ match = {"lxappearence","Caml graphics" }, float = true, opacity = 1.0 },
{ match = {"gpicview","Epdfview" }, float = true, tag = "view", },
{ match = { "" },
buttons = 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),
awful.button({ modkey }, 8, awful.mouse.client.resize))
-- Options par défaut.
shifty.config.defaults = {
layout = awful.layout.suit.tile,
ncol = 1,
mwfact = 0.50,
floatBars=false,
-- {{{ 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 },
-- { "Debian", debian.menu.Debian_menu.Debian },
{ "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 not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
client.focus = c
c:raise()
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)
--- {{ Section des Widgets
-- Date
datewidget = widget({ type = "textbox" })
vicious.register(datewidget, vicious.widgets.date, "%b %d, %R", 60)
-- Mem Widget
memwidget = widget({ type = "textbox" })
vicious.register(memwidget, vicious.widgets.mem, " $2MB/$3MB", 13)
-- CPU Widget
-- Initialize widget
cpuwidget = widget({ type = "textbox" })
-- Register widget
vicious.register(cpuwidget, vicious.widgets.cpu, "$1%")
-- Widget MPD
--mpdwidget = widget({ type = "textbox", name = "mpdwidget" })
--vicious.register(mpdwidget, vicious.widgets.mpd, " $1", 5, { 30, "mpd" })
-- Net Widget
netwidget = widget({ type = "textbox", name = "netwidget" })
vicious.register(netwidget, vicious.widgets.net, '${wlan0 down_kb} kbps / ${wlan0 up_kb} kbps', 3)
-- FS Widget
fswidget = widget({ type = "textbox", name = "fswidget" })
vicious.register(fswidget, vicious.widgets.fs,
' ${/home used_gb}<span color="'.. beautiful.fg_widget ..'"> /</span> ${/home size_gb} ', 120)
tempwidget = widget({ type = "textbox", name = "tempwidget" })
vicious.register(tempwidget, vicious.widgets.thermal, "$1°C", 20, "thermal_zone2")
-- Icones
mycpuicon = widget({ type = "imagebox", name = "mycpuicon" })
mycpuicon.image = image(beautiful.widget_cpu)
myneticon = widget({ type = "imagebox", name = "myneticon" })
myneticonup = widget({ type = "imagebox", name = "myneticonup" })
myneticonup.image = image(beautiful.widget_netup)
myneticon.image = image(beautiful.widget_net)
myvolicon = widget({ type = "imagebox", name = "myvolicon" })
myvolicon.image = image(beautiful.widget_vol)
mymusicicon = widget({ type = "imagebox", name = "mymusicicon"})
mymusicicon.image = image(beautiful.widget_music)
myspacer = widget({ type = "textbox", name = "myspacer" })
myseparator = widget({ type = "textbox", name = "myseparator" })
myspacer.text = " "
myseparator.text = "|"
mydiskicon = widget({ type = "imagebox", name = "mydiskicon" })
mytimeicon = widget({ type = "imagebox", name = "mytimeicon" })
mytimeicon.image = image(beautiful.widget_date)
mydiskicon.image = image(beautiful.widget_fs)
mymemicon = widget({ type = "imagebox", name = "mymemicon" })
mymemicon.image = image(beautiful.widget_mem)
-- 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.rightleft
mylayoutbox[s],
myspacer,
datewidget, mytimeicon,
s == 1 and mysystray or nil,
myspacer,
mpdwidget, mymusicicon,
myspacer,
fswidget, mydiskicon,
myspacer,
myneticonup, netwidget, myneticon,
myspacer,
cpuwidget,
mycpuicon,
myspacer,
memwidget,
mymemicon,
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, "Shift" }, "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(true) end),
-- Layout manipulationi
-- awful
awful.key({ modkey, }, "Tab", function () awful.client.focus.byidx( 1) end),
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, "Shift" }, "Tab",
function ()
awful.client.focus.history.previous()
if client.focus then
client.focus:raise()
end
end),
-- Shifty
awful.key({ modkey, "Shift" }, "t", shifty.add),
awful.key({ modkey }, "r", shifty.rename),
awful.key({ modkey }, "w", shifty.del),
awful.key({ modkey, "Shift" }, "Left", shifty.shift_prev ),
awful.key({ modkey, "Shift" }, "Right", shifty.shift_next ),
-- awful.key({ modkey }, "Escape", function() awful.tag.history.restore() end), -- move to prev tag by history
awful.key({ modkey, "Shift" }, "n", shifty.send_prev), -- move client to prev tag
awful.key({ modkey }, "n", shifty.send_next),
-- shifty.config.clientkeys = clientkeys
-- 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 },"x", function () teardrop("urxvtc", "top") end),
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 }, "Down", revelation.revelation),
-- Keybindings Perso
awful.key({ modkey2}, "Left", function () awful.util.spawn("amixer -q sset Front 2dB-") end),
awful.key({ modkey2}, "Right", function () awful.util.spawn("amixer -q sset Front 2dB+") end),
awful.key({ modkey}, "v", function () awful.util.spawn("apps") end),
--}) end),
-- Prompt
awful.key({ modkey }, "BackSpace", function () mypromptbox[mouse.screen]:run() end)
-- Customs prompts
awful.key({ modkey }, "g", function ()
awful.prompt.run({ prompt = "Xterm" }, promptbox[mouse.screen].widget,
function (name)
exec("xterm -T "..name.."")
end)
end)
clientkeys = awful.util.table.join(
awful.key({ modkey, }, "s", function (c) c.ontop = not c.ontop end ),
awful.key({ modkey, }, "s", function (c) c.sticky = not c.sticky end ),
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
awful.key({ modkey }, "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, }, "n", function (c) c.minimized = not c.minimized 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.
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)
shifty.config.globalkeys = globalkeys
shifty.config.clientkeys = clientkeys
-- {{{ 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)
shifty.init()
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)
client.add_signal("focus", function(c)
c.border_color = beautiful.border_focus
if c.opacity < 1.0 then
c.opacity = beautiful.opacity_focus
end
end)
client.add_signal("unfocus", function(c)
c.border_color = beautiful.border_normal
if c.opacity < 1.0 then
c.opacity = beautiful.opacity_normal
end
end)
I did this from the only tutorial I saw.
It would be nice if you help me fixing the bugs and errors.
Last edited by aleks223 (2010-03-27 13:44:56)You are using way to many third party libraries at once for us to be able and point the finger at the problem. Which might not even be there, but turns out your personal theme is broken.
Idea: start simple and clean with a default rc.lua, then add one thing at a time, not 10 libraries from some tutorial
Link: all the information you will ever need indexed at one place http://awesome.naquadah.org/wiki/Main_Page
Last edited by anrxc (2010-03-27 14:54:03) -
Awesome 3.4.5-1 video issues (lingering visuals)
I recently upgraded to awesome 3.4.5-1. I didn't reboot at the time, just restarted x.
I rebooted when my house burned down, and at the same time had to change my nvidia settings [back to a single screen].
Since rebooting and changing settings, my awesome desktop is acting odd. It won't bring up a wallpaper, and if I change tags, the first tag's programs carry over... also, if I close a program, it doesn't visually disappear, including the awesome menu [right click]... they just stay there, unusable, but visible.
rc.lua
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
require("vicious")
-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/home/dan/.themes/theme.lua")
-- This is used later as the default terminal and editor to run.
terminal = "urxvt"
editor = os.getenv("EDITOR") or "vim"
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.fair.horizontal,
awful.layout.suit.spiral,
awful.layout.suit.spiral.dwindle,
awful.layout.suit.max,
awful.layout.suit.max.fullscreen,
awful.layout.suit.magnifier
-- {{{ 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
mynetworkmenu = {
{ "wvdial", terminal .. " -e sudo wvdial" }
myawesomemenu = {
{ "manual", terminal .. " -e man awesome" },
{ "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
{ "restart", awesome.restart },
{ "quit", awesome.quit },
{ "Shutdown", terminal .. "-e shutdown"}
mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
{ "networking", mynetworkmenu },
{ "open terminal", terminal },
{ 'open the GIMP', 'gimp' },
{ 'open thunar', 'thunar' }
mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
menu = mymainmenu })
--Separators
--spacer = widget({ type = "textbox" })
--separator = widget ( type = "textbox"})
--spacer.text = " "
--separator.text = "|"
--unread =widget({ type = "textbox" })
--unread.txt = "unread"
--gmail widget
gmailicon = widget({ type = "imagebox" })
vicious.cache(vicious.widgets.gmail)
gmailicon.image = image(beautiful.widget_mail)
gmailwidget = widget ({ type = "textbox" })
vicious.register(gmailwidget, vicious.widgets.gmail, "${count}", 120)
--Memory widget
--memwidget = widget({type = "textbox" })
--vicious.enable_caching(vicious.widgets.mem)
--vicious.register(memwidget, vicious.widgets.mem, "$1% ($2 MiB)", 10)
-- {{{ 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 = {gmailwidget}
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 not c:isvisible() then
awful.tag.viewonly(c:tags()[1])
end
client.focus = c
c:raise()
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],
-- gmailwidget, spacer, separator, spacer,
layout = awful.widget.layout.horizontal.leftright
mylayoutbox[s],
-- memwidget,
gmailwidget,
gmailicon,
-- spacer,
-- separator,
-- spacer,
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(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, }, "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),
-- 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, }, "n", function (c) c.minimized = not c.minimized 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 ()
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 } },
{ rule = { class = "Namaroka" },
properties = { floating = false } },
-- 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)
-- Autorun programs
autorun = true
autorunApps =
"xcompmgr",
-- "mutt",
-- "consonance",
-- "linux-fetion",
-- "weechat-curses",
if autorun then
for app = 1, #autorunApps do
awful.util.spawn(autorunApps[app])
end
end
-- Transparency handling
client.add_signal("focus", function(c)
c.border_color = beautiful.border_focus
c.opacity = .9
end)
client.add_signal("unfocus", function(c)
c.border_color = beautiful.border_normal
c.opacity = 0.7
end)There appears to be a problem with awsetbg. It is fixed in the git version. I am currently trying to figure out how to get it working in 3.4.5.
edit: the solution is to change your line theme.wallpaper_cmd = { "awsetbg FILEHERE"} to theme.wallpaper_cmd = { "awsetbg -u feh FILEHERE"}. This line is located in your theme file.
Last edited by Revelation60 (2010-05-30 18:47:19)
Maybe you are looking for
-
Apple TV 1 Not Showing in iTunes 10.6.1, All other devices fine!
Win7 64 all current updates. Itunes 10.6.1. Two ipads, two iphones, wifes iMac all show in home sharing or devices node. However, suddenly after updating to 10.6.1 itunes, Apple TV1 is not there and won't appear. Wireshark on the pc shows the bonjou
-
Hi all, does anybody know, if RPC services on Solaris 7 are required for a running WebLogic 5.1 instance? We would like to harden the server and I'm not sure about disabling the RPC services for security reasons. Regards Andreas
-
"Get info" (command I) shortcut not working
When using Finder (MacBookPro 10.5.5), if I try to use the keyboard shortcut of command-I to get info on a file, it doesn't work. Nothing happens. If I go through the menu, then it works fine. Other shortcuts, like open (command-O) still work. I've a
-
Hide the Deployment window in a built executable
My LabVIEW application uses Shared Variables to pass data around, and therefore my built executable needs to deploy the shared variables at launch. This is all handled automatically it seems by the builder/executable, but it results in a Deployment W
-
I was trying to update for macbook book pro. and i restart then it's loading for 4 hours
i was trying to update for macbook book pro. and i restart then it's loading at the lock screen for 4 hours