Mike Meredith

Sep 202017
 

By default, the Awesome window manager sets up 9 tags and uses a rather clever method for setting keyboard shortcuts for those tags.

And that is also one of the irritations of using Awesome because I have gotten into the habit of using more virtual screens (“tags”) than this. After a dumb way of increasing the number, I have come up with a rather improved method that can be used to replace the existing method in the Awesome rc.lua file :-

local taglist = { "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=" }
-- The list of tags that I use.
…
 awful.tag( taglist, s, awful.layout.layouts[1])
…
for i = 1, #taglist do
  globalkeys = awful.util.table.join(globalkeys,
    awful.key({ modkey}, taglist[i],
                  function ()
                        local screen = awful.screen.focused()
                        local tag = screen.tags[i]
                        if tag then
                           tag:view_only()
                        end
                  end,
                  {description = "view tag", group = "tag"}),
        awful.key({ modkey, "Control" }, taglist[i],
                  function ()
                      local screen = awful.screen.focused()
                      local tag = screen.tags[i]
                      if tag then
                         awful.tag.viewtoggle(tag)
                      end
                  end,
                  {description = "toggle tag", group = "tag"}),
        awful.key({ modkey, "Shift" }, taglist[i],
                  function ()
                      if client.focus then
                          local tag = client.focus.screen.tags[i]
                          if tag then
                              client.focus:move_to_tag(tag)
                          end
                     end
                  end,
                  {description = "move focused client to tag", group = "tag"}),
        awful.key({ modkey, "Control", "Shift" }, taglist[i],
                  function ()
                      if client.focus then
                          local tag = client.focus.screen.tags[i]
                          if tag then
                              client.focus:toggle_tag(tag)
                          end
                      end
                  end,
                  {description = "toggle focused client on tag", group = "tag"})
    )
end

That’s three different parts of the code to change – a list of tags to use at the top of the file, a replacement somewhere in the middle, and a large chunk replacing existing code at the end of the keyboard configuration. I don’t claim this is better than the standard way, but it is handy for me.

The Window

Sep 162017
 

As with yesterday’s Brighton pictures, some accumulated images of Southsea that have not been processed before …

#1: Spring Sailing

Spring Sailing

#2: Rusty Anchor In The Sky

Rusty Anchor In The Sky

#3: Light’s Shadow

(Apologies for the pun)

Light’s Shadow

Sep 162017
 

My Facebook news feed came up with a post with this embedded within it :-

Now I’m not in the business of telling someone they should own a smartphone, but taking some of the objections in turn …

Firstly if you are letting your smartphone boss you around and letting it overwhelm you, you’re using it wrong. You decide when to use your smartphone as a communications tool; most of those messages and emails that your phone is constantly pinging and burbling to you about can wait until it is convenient for you to answer.

Do any of your friends get annoyed when you don’t respond to their messages within seconds? Tell them to grow up and get a life.

To give you an idea of how I use my smartphone, here’s a typical day :-

  1. The phone is charging downstairs in the front room where it has been since the evening. If it is ringing, bleeping, throbbing, burbling madly, I won’t know until I’ve finished getting up.
  2. If I am curious about the reaction to some photos I posted the previous night I might pick it up and take a quick look at the notifications, or I might not.
  3. As I head out the door for work, I’ll pick it up and put it straight into my pocket. On the way into work I might hear phone calls, or I might not.
  4. may as I approach work, pull out the phone and take a quick look at the agenda screen (particularly if I recall an early meeting).
  5. If I remember, I’ll switch the phone to silent before I sit down to work. If not, and the notifications get annoying, I’ll remember then.
  6. If I get a phonecall whilst I’m working, I’ll pull out the phone, check who is calling, and slide to red (to reject the phonecall) if I don’t recognise the caller.
  7. When I take a break from work, and I’m not chatting to anyone, I’ll pull out the phone and have a quick look at Facebook, home email, etc.
  8. When I head home from work. the phone stays in my pocket. I’ll check the phone on getting home to see if I missed anything.

You might be wondering why I have a smartphone given I use it so little. Well first of all I do use it more than is implied here – particularly whilst travelling (having train timetables and maps in your pocket is really handy).

In terms of ethical production, not all smartphones are the same. There are even places which score phones based on the ethics of their production; there is even a smartphone whose whole purpose in existence is to be an ethically produced phone – the Fairphone.

So giving up your smartphone is the lazy way of ensuring you have an ethically produced phone that you don’t get bossed around by. No harm in being lazy here of course!