How To: Awesome WM with Debian/Ubuntu


Recommended Posts

How to: Awesome WM 2.3.4 with Debian/Ubuntu/*buntu

First, install the awesome wm package ? apt-get install awesome (which will be the 2.3.4 version)

Once installation is complete, most of the customization will be done in the .awesomerc file.

This will be located in your ~/user directory

The default setup is simple to read, for the most part, and configuration parameters are plainly laid out.

To boot into your Awesome WM session, log out of your current desktop and you should be able to select it from your session menu. In my case, I edited the .Xsession file to include awesome and all relevant programs as my xclient session.

Here is my ~/.Xsession file:

gnome-power-manager &

nm-applet & 

gnome-screensaver &

feh --bg-scale /home/lance/images/wallpapers/shared/Geeky/1270448911455.jpg

sh /home/lance/.awesome/awesomeclock.sh &



exec awesome

The above file loads the gnome-power-manager for logouts and sleep mode, along with nm-applet for wireless networking. It also displays the default wallpaper using feh (which is installable by using apt-get install feh), and a script to display a clock with the current date.

The clock script is as follows:

#!/bin/sh

while true

do

    echo "0 widget_tell mystatusbar clock text " \

         "`date +"%A %B %d, %Y %l:%M %p"`" | awesome-client

    sleep 1

done

Paste the above text into a text file and save as awesomeclock.sh in your .awesome directory.

This is called by the .awesomerc config file, which I have added below. The statusbar section will call the widgets displayed. Paste this snippet at the bottom of the statusbar section to call the clock script. The .Xsession file will call the script at boot.

 textbox clock

        {

            text = "-"

            align = "right"

        }

     }

}

I have also installed dmenu, an application launcher that displays in your status bar. In my .awesomerc, I have set up the menu to launch using the Windows (Mod4) key +p. Just type the first few letters of the application to launch, and it will be displayed in the menu. Press Enter to execute.

I am still working on getting more widgets/status displays in the status bar to show cpu, mem, and disk space. Once I get it working, I will add it to this post.

BTW, visit http://awesome.naquadah.org/wiki/Main_Page for Awesome shortcuts and tips/tricks.

Also, to check that your .awesomerc file is correct, you can type awesome -k at the command prompt in the terminal. If it is not correct, errors will be displayed.

This is by no means an end-all-be-all intro to Awesome, just something to get your feet wet.

Here is my full .awesomerc:

screen 0
{
    styles
    {
        normal
        {
            font = "sans 7"
            fg = "#cccccc"
            bg = "#444444"
            border = "#555555"
        }
        focus
        {
            fg = "#000000"
            bg = "#666666"
            border = "#535d6c"
        }
        urgent
        {
            fg = "#111111"
            bg = "#ff4500"
        }
    }
    tags
    {
        tag main { }
        tag www{ }
        tag mail{ }
        tag media{ }
        tag term { }
        #tag  { }
        #tag 7 { }
        #tag 8 { }
        #tag 9 { }
    }
    layouts
    {
        layout tile { image = "/usr/share/awesome/icons/layouts/tilew.png" }
        layout tileleft { image = "/usr/share/awesome/icons/layouts/tileleftw.png" }
        layout tilebottom { image = "/usr/share/awesome/icons/layouts/tilebottomw.png" }
        layout tiletop { image = "/usr/share/awesome/icons/layouts/tiletopw.png" }
        layout max { image = "/usr/share/awesome/icons/layouts/maxw.png" }
        layout spiral { image = "/usr/share/awesome/icons/layouts/spiralw.png" }
        layout dwindle { image = "/usr/share/awesome/icons/layouts/dwindlew.png" }
        layout floating { image = "/usr/share/awesome/icons/layouts/floatingw.png" }
    }
    statusbar mystatusbar
    {
        position = "top"
        height = "17"

        taglist mytaglist
        {
            mouse
            {
                button = "1"
                command = "tag_view"
            }
            mouse
            {
                button = "1"
                modkey = {"Mod4"}
                command = "client_tag"
            }
            mouse
            {
                button = "3"
                command = "tag_toggleview"
            }
            mouse
            {
                button = "3"
                modkey = {"Mod4"}
                command = "client_toggletag"
            }
            mouse
            {
                button = "4"
                command = "tag_viewnext"
            }
            mouse
            {
                button = "5"
                command = "tag_viewprev"
            }
        }
        layoutinfo mylayoutinfo
        {
            mouse
            {
                button = "1"
                command = "tag_setlayout"
                arg = "+1"
            }
            mouse
            {
                button = "4"
                command = "tag_setlayout"
                arg = "+1"
            }
            mouse
            {
                button = "3"
                command = "tag_setlayout"
                arg = "-1"
            }
            mouse
            {
                button = "5"
                command = "tag_setlayout"
                arg = "-1"
            }
        }
        tasklist mytasklist
        {
            show_icons = false

            mouse
            {
                button = "4"
                command = "client_focusnext"
            }
            mouse
            {
                button = "5"
                command = "client_focusprev"
            }
            mouse
            {
                modkey = {"Mod4"}
                button = "4"
                command = "client_swapnext"
            }
            mouse
            {
                modkey = {"Mod4"}
                button = "5"
                command = "client_swapprev"
            }
        }
        iconbox logo
        {
           image = "/usr/share/awesome/icons/awesome16.png"
            mouse
            {
                button = "1"
                command = "spawn"
                arg = "exec x-terminal-emulator -e man awesome"
           }
        }
        textbox clock
        {
            text = "-"
            align = "right"
        }
     }
}

rules
{
    rule { name = "Gimp" float = true }
    rule { name = "MPlayer" float = true }
    rule { name = "Acroread" float = true }
    rule { name = "pinentry" float = true }
    rule { name = "gedit" float = true }
    rule { name = "pidgin" float = true }
}

mouse
{
    root
    {
        button = "3"
        command = "spawn"
        arg = "exec x-terminal-emulator"
    }
    root
    {
        button = "4"
        command = "tag_viewnext"
    }
    root
    {
        button = "5"
        command = "tag_viewprev"
    }
    client
    {
        modkey = {"Mod4"}
        button = "1"
        command = "client_movemouse"
    }
    client
    {
        modkey = {"Mod4"}
        button = "2"
        command = "client_zoom"
    }
    client
    {
        modkey = {"Mod4"}
        button = "3"
        command = "client_resizemouse"
    }
    titlebar
    {
        button = "1"
        command = "client_movemouse"
    }
    titlebar
    {
        button = "3"
        command = "client_resizemouse"
    }
}

keys
{
    key
    {
        modkey = {"Mod4"}
        key = "F1"
        command = "spawn"
        arg = "exec x-terminal-emulator -e man `for i in /usr/share/man/man?;do ls $i; done | cut -d. -f1 | awesome-menu 'See manual page for:'`"
    }
    key
    {
        modkey = {"Mod4"}
        key = "F2"
        command = "spawn"
        arg = "exec find /usr/bin -type f -executable ! -empty | sed 's,.*/,,' | awesome-menu -e 'exec ' Execute:"
    }
    key
    {
        modkey = {"Mod4"}
        key = "F3"
        command = "spawn"
        arg = "exec x-terminal-emulator -e ssh `cut -d' ' -f1 ~/.ssh/known_hosts | cut -d, -f1 | awesome-menu 'ssh to:'`"
    }
    key
    {
        modkey = {"Mod4"}
        key = "Return"
        command = "spawn"
        arg = "exec x-terminal-emulator"
    }
    key
    {
        modkey = {"Mod4"}
        key = "space"
        command = "tag_setlayout"
        arg = "+1"
    }
    key
    {
        modkey = {"Mod4", "Shift"}
        key = "space"
        command = "tag_setlayout"
        arg = "-1"
    }
    key
    {
        modkey = {"Mod4"}
        key = "b"
        command = "statusbar_toggle"
    }
    key
    {
        modkey = {"Mod4"}
        key = "j"
        command = "client_focusnext"
    }
    key
    {
        modkey = {"Mod4"}
        key = "k"
        command = "client_focusprev"
    }
    key
    {
        modkey = {"Mod4"}
        key = "p"
        command = "spawn"
        arg = "dmenu_path | awesome-menu -e 'exec ' Execute:"
    }
     key
    {
        modkey = {"Mod4"}
        key = "Tab"
        command = "focus_history"
        arg = "-1"
    }
    key
    {
        modkey = {"Mod4", "Shift"}
        key = "j"
        command = "client_swapnext"
    }
    key
    {
        modkey = {"Mod4", "Shift"}
        key = "k"
        command = "client_swapprev"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "j"
        command = "screen_focus"
        arg = "+1"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "k"
        command = "screen_focus"
        arg = "-1"
    }
    key
    {
        modkey = {"Mod4"}
        key = "h"
        command = "tag_setmwfact"
        arg = "-0.05"
    }
    key
    {
        modkey = {"Mod4"}
        key = "l"
        command = "tag_setmwfact"
        arg = "+0.05"
    }
    key
    {
        modkey = {"Mod4", "Shift"}
        key = "h"
        command = "tag_setnmaster"
        arg = "+1"
    }
    key
    {
        modkey = {"Mod4", "Shift"}
        key = "l"
        command = "tag_setnmaster"
        arg = "-1"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "h"
        command = "tag_setncol"
        arg = "+1"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "l"
        command = "tag_setncol"
        arg = "-1"
    }
    key
    {
        modkey = {"Mod4"}
        key = "Escape"
        command = "tag_prev_selected"
    }
    key
    {
        modkey = {"Mod4"}
        key = "Left"
        command = "tag_viewprev"
    }
    key
    {
        modkey = {"Mod4"}
        key = "Right"
        command = "tag_viewnext"
    }
    key
    {
        modkey = {"Mod4"}
        key = "m"
        command = "client_togglemax"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "Return"
        command = "client_zoom"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "space"
        command = "client_togglefloating"
    }
    key
    {
        modkey = {"Mod4"}
        key = "s"
        command = "client_togglescratch"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "s"
        command = "client_setscratch"
    }
    key
    {
        modkey = {"Mod4", "Shift"}
        key = "c"
        command = "client_kill"
    }
    key
    {
        modkey = {"Mod4", "Shift"}
        key = "q"
        command = "quit"
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "r"
        command = "restart"
    }
    key  # dmenu launcher
    {
        modkey = {"Mod4", "Shift"}
        key = "p"
        command = "spawn"
        arg = "dmenu_path | awesome-menu -e 'exec ' Execute:"
    }
    key
    {
       modkey = {"Mod4"}
       key = "0"
       command = "tag_view"
    }
    keylist
    {
        modkey = {"Mod4"}
        command = "tag_view"
        keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
        arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
    }
    key
    {
        modkey = {"Mod4", "Control"}
        key = "0"
        command = "tag_toggleview"
    }
    keylist
    {
        modkey = {"Mod4", "Control"}
        command = "tag_toggleview"
        keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
        arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
    }

    key
    {
        modkey = {"Mod4", "Shift"}
        key = "0"
        command = "client_tag"
    }
    keylist
    {
        modkey = {"Mod4", "Shift"}
        command = "client_tag"
        keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
        arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
    }

    key
    {
        modkey = {"Mod4", "Shift", "Control"}
        key = "0"
        command = "client_toggletag"
    }
    keylist
    {
        modkey = {"Mod4", "Shift", "Control"}
        command = "client_toggletag"
        keylist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
        arglist = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }
    }
   }
# vim: filetype=conf 

I may have left out something in this post. If there are any questions or you can't get something working, I'll try my best to answer. :)

  • Like 2
Link to comment
https://www.neowin.net/forum/topic/901758-how-to-awesome-wm-with-debianubuntu/
Share on other sites

Some common Awesome commands:

(Mod key - 'Windows' key)

Mod+space = rotate open screen layout

Mod+h or l = scale focused window left or right, makes the window larger or smaller

Right-click on the empty screen to launch terminal

Mod + F1 = terminal

Mod + F2 = Awesome Menu

Mod + b = statusbar toggle

Mod + Ctrl + R = Reload Awesome

Mod + Shift + Q = Quit to login screen

Those listed above are the ones I use the most. More shortcuts can be found in the 'key' section of the .awesomerc file.

Thanks for posting this (Y) As soon as I get some time I'll try it, I've never played with tiling wm's before.

No problem :). Ive been using Awesome off and on for a while - I seem to keep coming back to it. Hopefully my rudimentary guide will help out.

Awesome is an awesome window manager. Personally, I prefer dwm, though. (Y)

I like DWM as well. It is installed by default on #!, although I never could tweak it to my likings. I may give it another shot though - I have heard good things about it. Also Xmonad as well.

Love the background, but that's it. Sorry, looks a little too barebones for me! Thanks for the guide, though. A good learning experience!

I understand completely. I kept going more minimalistic in my DE/WMs, not sure you can go more minimalistic than this. ;)

I like minimal. I'm thinking I'll try this soon.

One question. In Ubuntu, Openbox has a feature I really like--holding down superkey brings up a little toggle where you can press the arrow keys to go through your open windows. I like avoiding the mouse as much as possible. Does Awesome do this, or at least can it be made to do this?

I like minimal. I'm thinking I'll try this soon.

One question. In Ubuntu, Openbox has a feature I really like--holding down superkey brings up a little toggle where you can press the arrow keys to go through your open windows. I like avoiding the mouse as much as possible. Does Awesome do this, or at least can it be made to do this?

Mod+J will change focus to the open windows, one by one. Mod + arrow keys will rotate through the different desktops.

I found some help on the interwebs about a load average/clock script that will display in the statusbar. For those that are unsure how a load average works, from our friends at wikipedia:

For example, one can interpret a load average of "1.73 0.50 7.98" on a single-CPU system as:

* during the last minute, the CPU was overloaded by 73% (1 CPU with 1.73 runnable processes, so that 0.73 processes had to wait for a turn)

* during the last 5 minutes, the CPU was underloaded 50% (no processes had to wait for a turn)

* during the last 15 minutes, the CPU was overloaded 698% (1 CPU with 7.98 runnable processes, so that 6.98 processes had to wait for a turn)

Add the following to the bottom of the 'statusbar' section in the .awesomerc

textbox uptime
        {
                style
                {
                    font = "sans 7"
                    fg = "#ffffff"
                }
                text = " 0.00 0.00 0.00 |"
                align = right
                text_align = right
                width = 0
                mouse
                {
                    button = "1"
                    command = "spawn"
                    arg = "exec x-terminal-emulator -e htop"
                }
        }
        textbox clock
        {
                style
                {
                    font = "sans 7"
                }
                text = " Day Mon 00, 00:00 "
                align = right
                text_align = left
                width = 0
        }

This will display the load average, and add a clock to the right of it. (this also adds a button that will launch htop, the process manager, when clicking on the load average)

The script that will pipe the information is:

#!/bin/sh
#
while true
do
    if [ -S ~/.awesome_ctl.0 ]; then
        while true
        do
            echo "0 widget_tell mystatusbar clock text `date +\"%a %b %d, %k:%M\"` "
            echo "0 widget_tell mystatusbar uptime text `uptime | sed 's/.*://; s/,//g'` "
            echo "" # an empty line flushes data inside awesome
            sleep 10
        done | awesome-client
    else
        sleep 1
    fi
done

Save this as .awesomeclock.sh (or whatever) and save it in the .awesome directory. Make sure to make it executable by running

chmod +x .awesomeclock.sh

from the terminal in the .awesome directory.

or

user@host:~/.awesome$ chmod +x .awesomeclock.sh

and add the following line to the .Xsession file

sh /home/lance/.awesome/awesomeclock.sh &

This will give the following result:

aetq9f.jpg

Hope this works...

  • 2 weeks later...

Since I have posted this hopefully helpful how-to, I have upgraded my Awesome setup from 2.3.4 to 3.4.1. This was a bigger chore than I had envisioned.

The config file itself went from an easy to understand text file to a config file driven by Lua. This brought some challenges, although the new config file allows for more customization and flexibility.

I had to use a user .ppa to upgrade the package itself, which once that was complete, my adventure began. After the installation was complete and I booted into my new Awesome setup, I had to start customizing. I found some very helpful tutorials on DesktopEvolution.org, posted by Darthlukan, which made the widget setup and statusbar customization fairly painless.

The .ppa is located here: http://ppa.launchpad.net/aguignard/ppa/ubuntu. Once enabled, update Synaptic and install Awesome 3.4.1.

To customize the statusbar to enable the cpu, mem, etc. widgets, follow the instructions laid out in Darthlukan's posts. He has made it very easy to follow. After all the widgets were installed and I almost achieved my customization goals, I still had one issue that bothered me. The open programs would display their icons in the status bar. I posed my question in several IRC and forum threads with no luck. I finally posted on Linuxquestions.org and was responded to by antegallya, which solved my issue. The following code had to be 'patched' into the /usr/share/awesom/lib/awful/widget/tasklist.lua file:

@@ -95,6 +95,10 @@
     local text = "<span font_desc='"..font.."'>"
     local name
     local status_image
+    local c_icon
+    if not args.hide_icon then
+        c_icon = c.icon
+    end
     if client.floating.get(c) and floating_icon then
         status_image = capi.image(floating_icon)
     end

@@ -120,7 +124,7 @@
         text = text .. name
     end
     text = text .. "</span>"
-    return text, bg, status_image, c.icon
+    return text, bg, status_image, c_icon
 end

To patch the file, add the code where there is a + symbol, and replace the code where the - symbol is.

For help, here is my .rc.lua, which was copied from /etc/xdg/awesome/rc.lua -

-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
-- Widget library
require("vicious")

-- Load Debian menu entries
require("debian.menu")

-- {{{ Variable definitions
-- Themes define colours, icons, and wallpapers
beautiful.init("/home/lance/.config/awesome/theme.lua")

-- This is used later as the default terminal and editor to run.
terminal = "terminator"
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"

-- 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
-- Define a tag table which hold all screen tags.
tags = {}
tagnames = { "fm", "net", "irc", "editor", "term" }
taglayouts = {
        awful.layout.suit.tile.left,
        awful.layout.suit.max,
        awful.layout.suit.max,
        awful.layout.suit.floating,
        awful.layout.suit.max }
for s = 1, screen.count() do
    -- Each screen has its own tag table.
    tags[s] = {}
    for tagnumber = 1, 5 do
        -- Add tags and name them.
        tags[s][tagnumber] = tag(tagnames[tagnumber])
        -- Add tags to screen one by one, giving them their layouts at the same time.
        tags[s][tagnumber].screen = s
        awful.layout.set(taglayouts[tagnumber], tags[s][tagnumber])
    end
    -- I'm sure you want to see at least one tag.
    tags[s][1].selected = true
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 },
                                    { "Debian", debian.menu.Debian_menu.Debian },
                                    { "open terminal", terminal }
                                  }
                        })

mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
                                     menu = mymainmenu })
-- }}}

--Separators
spacer    = widget({ type = "textbox"})
separator = widget({ type = "textbox"})
spacer.text     =" "
separator.text  ="."

-- {{{ Wibox

-- Create a cpuwidget (usage%)
cpuicon = widget({ type= "imagebox" })
cpuicon.image = image("/home/lance/.config/awesome/icons/cpu.png")
-- Initialize widget
cpuwidget = widget({ type = "textbox" })
-- Register widget
vicious.register(cpuwidget, vicious.widgets.cpu, "cpu-$1%", 2)

-- Create a memwidget (usage$ usedMB/TotalMB)
memicon = widget({ type =  "imagebox" })
memicon.image = image("/home/lance/.config/awesome/icons/mem.png")
-- Initialize widget
memwidget = widget({ type = "textbox" })
-- Register widget
vicious.register(memwidget, vicious.widgets.mem, "mem-$1% ($2MB/$3MB)", 13)

-- Create a batwidget (status chrg%)
baticon = widget({ type = "imagebox" })
baticon.image = image("/home/lance/.config/awesome/icons/bat.png")
-- Initialize widget
batwidget = widget({ type = "imagebox" })
-- Register widget
vicious.register(batwidget, vicious.widgets.bat, "$1$2%", 31, "BAT0")

-- Create a textclock widget
clockicon = widget({ type = "imagebox" })
clockicon.image = image("/home/lance/.config/awesome/icons/time.png")
mytextclock = awful.widget.textclock({ align = "right" })

--Create a netwidget (usage)
dnicon = widget({ type = "imagebox" })
upicon = widget({ type = "imagebox" })
dnicon.image = image("/home/lance/.config/awesome/icons/down.png")
upicon.image = image("/home/lance/.config/awesome/icons/up.png")
-- Initialize widget
netwidget = widget({ type = "textbox" })
-- Register widget
vicious.register(netwidget, vicious.widgets.net, "up-${eth1 up_kb}kb/s / down-${eth1 down_kb}kb/s", 1)


-- Create a fswidget (usage)
fsicon = widget({ type = "imagebox" })
fsicon.image = image("/home/lance/.config/awesome/icons/disk.png")
-- Initialize widget
fswidget = widget({ type = "textbox" })
-- Register widget
vicious.register(fswidget, vicious.widgets.fs, "root- ${/ used_gb}gb / ${/ avail_gb}gb", 37)
-- 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, { hide_icon = true })
                                          end, mytasklist.buttons)

    -- Create the wibox
    mywibox[s] = awful.wibox({ position = "top", height = "15", screen = s })
    -- Add widgets to the wibox - order matters
    mywibox[s].widgets = {
        {
            mylauncher,
            mytaglist[s],
            mypromptbox[s],
            layout = awful.widget.layout.horizontal.leftright
        },                                                                                                       
        mylayoutbox[s],
        mytextclock, spacer, clockicon,                 
        separator, spacer, cpuwidget, spacer, cpuicon, separator,
        spacer, memwidget, spacer, memicon, separator,
        spacer, netwidget, spacer, separator,
        spacer, fswidget, spacer, separator,
        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 } },
    -- 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)
-- }}}

Hopefully, some will make the attempt to try a tiling WM, as I've never felt that I've had more control over my system. If there are any questions, feel free to post here again, and I will try to help to the best of my (limited) abilities.

BTW, here is a screenie of my statusbar with the widgets and icons disabled:

5xq2c5.jpg

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Rufus 4.15.2393 Beta 2 by Razvan Serea Rufus is a small utility that helps format and create bootable USB flash drives, such as USB keys/pendrives, memory sticks, etc. Despite its small size, Rufus provides everything you need! Oh, and Rufus is fast. For instance it's about twice as fast as UNetbootin, Universal USB Installer or Windows 7 USB download tool, on the creation of a Windows 7 USB installation drive from an ISO (with honorable mention to WiNToBootic for managing to keep up). It is also marginally faster on the creation of Linux bootable USBs from ISOs. A non-exhaustive list of Rufus supported ISOs is available here. It can be especially useful for cases where: you need to create USB installation media from bootable ISOs (Windows, Linux, UEFI, etc.) you need to work on a system that doesn't have an OS installed you need to flash a BIOS or other firmware from DOS you want to run a low-level utility Rufus 4.15.2393 Beta 2 changelog: Add RISC-V 64 support to UEFI:NTFS Improve the guards for using the "silent" option Improve the ability to cancel during write retries Improve progress reporting for compressed image extraction Fix unrestricted XML entity expansion and integer overflow in ezxml parser (courtesy of @esadowski4) [GHSA-55r2-34wg-8mv9] Fix "silent" Windows installation failing at 75% in most cases [#2960] Fix a crash during boot when using UEFI:NTFS on Snapdragon X based ARM64 platforms [#2934] Fix the first WUE option always being checked by default [#2965] Fix an infinite loop when using Windows ISOs that contain multiple WIMs Fix "Enable runtime UEFI media validation" checkbox not always being properly enabled Other WUE improvements/fixes for OneDrive removal and username validation (with thanks to @christian8641) [#2984, #2991] Download: Rufus 4.15 Beta 2 | 1.9 MB (Open Source) Links: Rufus Home Page | Project Page @GitHub | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Tixati 3.43 by Razvan Serea Tixati is a free and easy to use BitTorrent client featuring detailed views of all seed, peer, and file transfer properties. Also included are powerful bandwidth charting and throttling capabilities, and a full DHT implementation. Tixati is one of the most advanced and flexible BitTorrent clients available. And unlike many other clients, Tixati contains NO SPYWARE, NO ADS, and NO GIMMICKS. Tixati portable version is meant to run on a USB flash drive or other portable media. It stores all its configuration files in the same folder as the executable binary files, and all file paths are stored in a format relative to the program executable folder. It is important you do not delete the "tixati_portable_mode.txt" file within the executables folder. This file is what triggers Tixati to run in portable mode. (The executable binaries are actually the same as the standard edition binaries.) When running the portable edition from a USB flash drive, especially one that is formatted in FAT16/FAT32, you may experience some lag when initially loading a new transfer. This is because initializing and allocating large files on flash-based media consumes a greater amount of time and resources compared to a conventional hard-drive. Tixati has the following features: detailed views of all aspects of the swarm, including peers, pieces, files, and trackers support for magnet links, so no need to download .torrent files if a simple magnet-link is available super-efficient peer choking/unchoking algorithms ensure the fastest downloads peer connection encryption for added security full DHT (Distributed Hash Table) implementation for trackerless torrents, including detailed message traffic graphs and customizable event logging advanced bandwidth charting of overall traffic and per-transfer traffic, with separate classification of protocol and file bytes, and with separate classification of outbound traffic for trading and seeding highly flexible bandwidth throttling, including trading/seeding proportion adjustment and adjustable priority for individual transfers and peers bitfield graphs that show the completeness of all downloaded files, what pieces other peers have available, and the health of the overall swarm customizable event logging for each download, and individual event logs for all peers within the swarm expert local file management functions which allow you to move files to a different partition even while downloading is still in progress 100% compatible with the BitTorrent protocol Windows and Linux-GTK native versions available Tixati 3.43 changelog: Several major DHT improvements Added several screening heuristics to filter malicious DHT nodes, prevent Sybil floods Rewrote DHT search algorithms to add support for multi-path lookups Improved DHT logging, more details in several error messages Extended timeout lengths for outgoing queries over I2P Added incoming query / response per second to DHT table status display Updated Regex engine to PCRE2 Faster Search function, scans channel user profiles in much less time Fixed problems with file name parsing and date handling in RSS Faster and more accurate RSS filtering and episode number detection Several optimizations to global text processing functions, such as UTF-8 cleaning, line splitting, and token parsing Complete update of port-mapping UPNP/NAT-PMP engine, added PCP support, mapping over VPN support, and more Several refinements to default gateway detection on Windows / Android, which is used for port-mapping Support for IPv6 interface-scoped addresses, which is sometimes needed for IPv6 gateway detection and port mapping Full support for PCP port remapping, added backup zero-port query in case requested port is rejected New UPNP/NAT-PMP Monitor in Help > Diagnostics New reflected local port/location tracker that analyzes DHT replies to detect true port/location and NAT mapping type New TCP/UDP Ports monitor in Help > Diagnostics, with several statistic and information tabs, and a detailed event log Calculated/reflected local port is now used for port parameter in tracker queries and peer handshake Fixed several problems with Linux Wayland compatibility Completely replaced tray icon functions in Linux, new SNI implementation is now the default with GSI backup Implemented full DBus-Menu server to be used by new SNI tray icon implementation Replaced Linux tray balloon notification DBus client Rewrote auto-shutdown DBus interface for Linux Rewrote sleep inhibit DBus interface for Linux Dropped deprecated Linux dbus-glib dependencies Completely new Windows asynchronous file handling, now using IOCP model with several block-alignment optimizations Better handling of system network resets and interface down/up cycles Added option to fully clear configuration in Settings > Import/Export Remember last option checkboxes when using Import/Export Fixed minor I2P incoming connection routing problems Much faster I2P vanity host name finder Much faster channel user vanity key finder Raised length limit for torrent tracker remote failure messages to 120 from 64 Fixed problems setting download location on a torrent before the meta info is resolved Added location/MOC paths to category pane tooltips Several minor Web Interface fixes Refinements to static and scrolling ellipsizing layout routines Several fixes and improvements to single and multi-line text edit controls Many other minor fixes throughout the user interface A major overhaul of the Android framework has also been done: API target raised to 35, page alignment set to 16K Rewrote all inset processing routines Full rewrite of foreground service, application, and main activity objects New permission request routines Added multi-cast lock request before UPNP/LPDP discovery operations Fixed file permission and locking problems when loading .torrent from web browsers Fixed problems with Z-ordering of modal / non-modal and popup windows Fixed handling of back gesture on newer OS Added status bar icon adjustment based on status bar background color Added option in Settings > UI > Behavior to continue running in tray when task removed from recents App can be closed by swiping away notification Rewrote IME interface, fixed several problems with auto-correct, on-screen keyboard visibility, and cursor positioning Added full support for Android hardware mouse and keyboard function Added full tooltip implementation for Android hovering via mouse or other cursor device Full rewrite of popup menu widgets to better support hardware pointers and keyboard Added mouse cursor updating framework for Android hovering Added Settings > Import/Export to Android builds Added language file support to Android builds Download: Tixati 64-bit | Tixati 32-bit ~20.0 MB (Freeware) Download: Portable Tixati 3.43 | 114.0 MB Download: Tixati 3.43 for Linux | Android View: Tixati Website | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Firefox 152.0.1 by Razvan Serea Firefox is a fast, full-featured Web browser. It offers great security, privacy, and protection against viruses, spyware, malware, and it can also easily block pop-up windows. The key features that have made Firefox so popular are the simple and effective UI, browser speed and strong security capabilities. Firefox has complete features for browsing the Internet. It is very reliable and flexible due to its implemented security features, along with customization options. Firefox includes pop-up blocking, tab-browsing, integrated Google search, simplified privacy controls, a streamlined browser window that shows you more of the page than any other browser and a number of additional features that work with you to help you get the most out of your time online. Firefox key features Enhanced Tracking Protection (ETP) – Blocks trackers, cookies, cryptominers, and fingerprinters by default. Private Browsing Mode – Deletes history, cookies, and temporary files when closed. Lightweight & Fast Performance – Optimized memory usage with efficient page loading. Cross-Platform Sync – Sync bookmarks, passwords, history, and open tabs across devices. Customizable Interface – Toolbars, themes, and extensions can be tailored to user needs. Strong Privacy Controls – Options to manage cookies, permissions, and site data easily. Reader Mode – Strips away clutter for distraction-free reading. Pocket Integration – Save and read articles offline with Pocket built into Firefox. Picture-in-Picture (PiP) – Watch videos in a floating window while multitasking. Extensions & Add-ons – Vast library for productivity, security, and personalization. Built-in PDF Viewer – No need for external software to view PDFs. Firefox Monitor – Alerts users if their email is part of a known data breach. Multi-Account Containers – Isolate browsing sessions (e.g., work, personal, shopping). Performance & Resource Efficiency – Uses fewer system resources than some competitors. Open Source & Community-Driven – Transparent development with global contributions. Firefox 152.0.1 fixes: Fixed frequent crashes affecting users with Intel Raptor Lake processors. (Bug 2039575) Fixed an issue on macOS where choosing a PDF option, such as "Save as PDF", from the system print dialog would send the job to your printer instead of saving a file. (Bug 2047850) Download: Firefox 64-bit | Firefox 32-bit | ARM64 | ~70.0 MB (Freeware) Download: Firefox for MacOS | 146.0 MB View: Firefox Home Page | Release Notes Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Zed 1.7.2 has landed with updated OpenCode models, bug fixes and other improvements by David Uzondu Zed 1.7.2 recently landed on the stable release channel, bringing a host of AI-related features including automatic context compaction and settings-based skill management, along with other things like better Markdown preview rendering and custom git commands in the graph view. Starting with the AI stuff, the developers introduced "/compact", a command that basically summarizes your conversation history on demand. This tool prevents your active chat window from hitting token limits by compressing older parts of the dialogue into a brief overview. In addition to that, the team relocated skill management to the settings UI, improving how the application communicates errors regarding those skills, and updated the OpenCode model roster to support DeepSeek V4 Flash, MiniMax M3, Qwen 3.7 Plus, and Nemotron 3 Ultra Free. External agent users can also monitor context window cost metrics and delete individual sessions directly from their history. Right-clicking ref labels in the git graph now opens a context menu that runs different actions against selected targets, kind of how VS Code does it. Here are some of the bug fixes this new release brings: The active agent fails to auto-select when creating a new git worktree. A scrollbar unexpectedly appears on wrapped code blocks in the agent chat. Collapse indicators for project headers appear when performing sidebar searches. Bracketed ellipsis title prefixes fail to show the ellipsis icon properly. Project icons render incorrectly in the recent projects picker. Diff hunk controls appear inside non-editable commit view multibuffers. The software update button hangs indefinitely on the downloading stage. Restoring an agent terminal in a remote project triggers a sudden crash. Splitting a pane that contains an active commit view causes a crash. Linux Wayland freezes when trying to read the clipboard from laggy external apps. Zed is a "newish" code editor trying to break the massive stronghold VS Code has on the developer community. Funny enough, the editor was created by former GitHub employees who worked on the Atom text editor (which Microsoft killed in 2022, several years after it bought GitHub). The project officially hit version 1.0 back in April, introducing platform parity for Windows and Linux alongside deep support for DeepSeek-V4-Pro.
    • 26H2 absolutely will support ARM Windows just not on devices that came with 26H1. This is evident by the fact I am running 26H2, which on my MacBook Neo and Surface Pro 12 (inch), within a VM.
  • Recent Achievements

    • One Year In
      hhgygy earned a badge
      One Year In
    • One Month Later
      AMV earned a badge
      One Month Later
    • Week One Done
      AMV earned a badge
      Week One Done
    • Collaborator
      ryansurfer98 went up a rank
      Collaborator
    • One Month Later
      Eurosoft10 earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      523
    2. 2
      +Edouard
      172
    3. 3
      PsYcHoKiLLa
      78
    4. 4
      Steven P.
      72
    5. 5
      Michael Scrip
      71
  • Tell a friend

    Love Neowin? Tell a friend!