├── README.md ├── rc.lua ├── scratch ├── drop.lua ├── init.lua └── pad.lua ├── themes └── dust │ ├── awesome-dust22.png │ ├── awesome-icon.png │ ├── awesome-icon24.png │ ├── background.jpg │ ├── layouts │ ├── dwindle.png │ ├── dwindlew.png │ ├── fairh.png │ ├── fairhw.png │ ├── fairv.png │ ├── fairvw.png │ ├── floating.png │ ├── floatingw.png │ ├── fullscreen.png │ ├── fullscreenw.png │ ├── magnifier.png │ ├── magnifierw.png │ ├── max.png │ ├── maxw.png │ ├── spiral.png │ ├── spiralw.png │ ├── tile.png │ ├── tilebottom.png │ ├── tilebottomw.png │ ├── tileleft.png │ ├── tileleftw.png │ ├── tiletop.png │ ├── tiletopw.png │ └── tilew.png │ ├── taglist │ ├── square.png │ └── squaref.png │ ├── theme.lua │ ├── titlebar │ ├── close_focus.png │ ├── close_normal.png │ ├── floating_focus_active.png │ ├── floating_focus_inactive.png │ ├── floating_normal_active.png │ ├── floating_normal_inactive.png │ ├── maximized_focus_active.png │ ├── maximized_focus_inactive.png │ ├── maximized_normal_active.png │ ├── maximized_normal_inactive.png │ ├── ontop_focus_active.png │ ├── ontop_focus_inactive.png │ ├── ontop_normal_active.png │ ├── ontop_normal_inactive.png │ ├── sticky_focus_active.png │ ├── sticky_focus_inactive.png │ ├── sticky_normal_active.png │ └── sticky_normal_inactive.png │ ├── tp │ ├── cpu.png │ ├── down.png │ ├── fs_01.png │ ├── fs_02.png │ ├── ram.png │ ├── swap.png │ └── up.png │ └── widgets │ ├── ac.png │ ├── acblink.png │ ├── bat.png │ ├── batempty.png │ ├── batfull.png │ ├── batlow.png │ ├── batmed.png │ ├── blank.png │ ├── cpu.png │ ├── crit.png │ ├── disk.png │ ├── down.png │ ├── fs.png │ ├── fs2.png │ ├── mail.png │ ├── mailnew.png │ ├── mpd.png │ ├── mpdplay.png │ ├── mute.png │ ├── note.png │ ├── note2.png │ ├── note3.png │ ├── nowifi.png │ ├── pac.png │ ├── pacnew.png │ ├── pause.png │ ├── play.png │ ├── ram.png │ ├── temp.png │ ├── temphot.png │ ├── tempwarm.png │ ├── up.png │ ├── vol.png │ └── wifi.png └── wi.lua /README.md: -------------------------------------------------------------------------------- 1 | # [@tdy](https://github.com/tdy) / awesome 2 | 3 | My [awesomeWM](https://github.com/awesomeWM/awesome) configs 4 | with [Vicious](http://git.sysphere.org/vicious/about/)-based widgets 5 | and a [Dust](https://wiki.ubuntu.com/Artwork/Incoming/DustTheme)-inspired theme. 6 | 7 | ## Version 4.x 8 | 9 | * Config: [rc.lua](rc.lua) 10 | * Widgets: [wi.lua](wi.lua) 11 | * Theme: [theme.lua](themes/dust/theme.lua) 12 | 13 | [Arch Linux rMBP 15″ (2017)](https://raw.githubusercontent.com/tdy/screenshots/master/awesome_20170105_2880x1800.png) 14 | *Arch Linux Laptop (2017)* 15 | 16 | ## Version [3.5.9](https://github.com/tdy/awesome/tree/v3.5.9) 17 | 18 | * Config: [v3.5.9/rc.lua](https://github.com/tdy/awesome/blob/v3.5.9/rc.lua) 19 | * Widgets: [v3.5.9/wi.lua](https://github.com/tdy/awesome/blob/v3.5.9/wi.lua) 20 | * Theme: [v3.5.9/theme.lua](https://github.com/tdy/awesome/blob/v3.5.9/themes/dust/theme.lua) 21 | 22 | [Arch Linux rMBP 15″ (2013)](https://raw.githubusercontent.com/tdy/screenshots/master/awesome_20130301_2880x1800.png) 23 | *Arch Linux Laptop (2013)* 24 | 25 | ## Version [3.4.14](https://github.com/tdy/awesome/tree/v3.4.14) 26 | 27 | * Config: [v3.4.14/rc.lua](https://github.com/tdy/awesome/blob/v3.4.14/rc.lua) 28 | * Widgets: [v3.4.14/wi.lua](https://github.com/tdy/awesome/blob/v3.4.14/wi.lua) 29 | * Theme: [v3.4.14/theme.lua](https://github.com/tdy/awesome/blob/v3.4.14/themes/dust/theme.lua) 30 | 31 | [Arch Linux Desktop (2010)](https://raw.githubusercontent.com/tdy/screenshots/master/awesome_20100113_1680x1050.png) 32 | *Arch Linux Desktop (2010)* 33 | 34 | -------------------------------------------------------------------------------- /rc.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | - awesomeWM 4.0 configuration 3 | - github@tdy/awesome 4 | --]] 5 | 6 | local gears = require("gears") 7 | local awful = require("awful") 8 | require("awful.autofocus") 9 | local wibox = require("wibox") 10 | local beautiful = require("beautiful") 11 | beautiful.init(awful.util.getdir("config") .. "/themes/dust/theme.lua") 12 | local naughty = require("naughty") 13 | local menubar = require("menubar") 14 | local hotkeys_popup = require("awful.hotkeys_popup").widget 15 | 16 | local vicious = require("vicious") 17 | local scratch = require("scratch") 18 | local wi = require("wi") 19 | 20 | -- {{{ Error handling 21 | -- Startup 22 | if awesome.startup_errors then 23 | naughty.notify({ 24 | preset = naughty.config.presets.critical, 25 | title = "Oops, there were errors during startup!", 26 | text = awesome.startup_errors 27 | }) 28 | end 29 | 30 | -- Runtime 31 | do 32 | local in_error = false 33 | awesome.connect_signal("debug::error", 34 | function(err) 35 | if in_error then return end 36 | in_error = true 37 | 38 | naughty.notify({ 39 | preset = naughty.config.presets.critical, 40 | title = "Oops, an error happened!", 41 | text = tostring(err) 42 | }) 43 | in_error = false 44 | end 45 | ) 46 | end 47 | -- }}} 48 | 49 | -- {{{ Variables 50 | terminal = "urxvtc" 51 | editor = os.getenv("EDITOR") or "vim" 52 | editor_cmd = terminal .. " -e " .. editor 53 | 54 | pianobar_cmd = os.getenv("HOME") .. "/.config/pianobar/control-pianobar.sh " 55 | pianobar_toggle = pianobar_cmd .. "p" 56 | pianobar_next = pianobar_cmd .. "n" 57 | pianobar_like = pianobar_cmd .. "l" 58 | pianobar_ban = pianobar_cmd .. "b" 59 | pianobar_tired = pianobar_cmd .. "t" 60 | pianobar_history = pianobar_cmd .. "h" 61 | pianobar_upcoming = pianobar_cmd .. "u" 62 | pianobar_station = pianobar_cmd .. "ss" 63 | pianobar_playing = pianobar_cmd .. "c" 64 | pianobar_quit = pianobar_cmd .. "q && screen -S pianobar -X quit" 65 | pianobar_screen = "screen -Sdm pianobar && screen -S pianobar -X screen " .. pianobar_toggle 66 | 67 | modkey = "Mod4" 68 | altkey = "Mod1" 69 | -- }}} 70 | 71 | -- {{{ Layouts 72 | awful.layout.layouts = { 73 | awful.layout.suit.floating, 74 | awful.layout.suit.tile, 75 | awful.layout.suit.tile.left, 76 | awful.layout.suit.tile.bottom, 77 | awful.layout.suit.tile.top, 78 | awful.layout.suit.fair, 79 | awful.layout.suit.fair.horizontal, 80 | awful.layout.suit.spiral, 81 | awful.layout.suit.spiral.dwindle, 82 | awful.layout.suit.max, 83 | awful.layout.suit.max.fullscreen, 84 | awful.layout.suit.magnifier, 85 | awful.layout.suit.corner.nw, 86 | awful.layout.suit.corner.ne, 87 | awful.layout.suit.corner.sw, 88 | awful.layout.suit.corner.se 89 | } 90 | -- }}} 91 | 92 | -- {{{ Notifications 93 | naughty.config.defaults.timeout = 5 94 | naughty.config.defaults.screen = 1 95 | naughty.config.defaults.position = "top_right" 96 | naughty.config.defaults.margin = 8 97 | naughty.config.defaults.gap = 1 98 | naughty.config.defaults.ontop = true 99 | naughty.config.defaults.font = "terminus 12" 100 | naughty.config.defaults.icon = nil 101 | naughty.config.defaults.icon_size = 256 102 | naughty.config.defaults.fg = beautiful.fg_tooltip 103 | naughty.config.defaults.bg = beautiful.bg_tooltip 104 | naughty.config.defaults.border_color = beautiful.border_tooltip 105 | naughty.config.defaults.border_width = 2 106 | naughty.config.defaults.hover_timeout = nil 107 | -- }}} 108 | 109 | -- {{{ Helpers 110 | local function client_menu_toggle_fn() 111 | local instance = nil 112 | 113 | return 114 | function() 115 | if instance and instance.wibox.visible then 116 | instance:hide() 117 | instance = nil 118 | else 119 | instance = awful.menu.clients({ 120 | theme = { width = 250 } 121 | }) 122 | end 123 | end 124 | end 125 | -- }}} 126 | 127 | -- {{{ Power 128 | mylauncher = wibox.widget.imagebox() 129 | mylauncher:set_image(beautiful.awesome_icon) 130 | mylauncher:buttons(awful.util.table.join( 131 | -- Lock 132 | awful.button({ }, 1, 133 | function() 134 | local lock = "i3lock -d -p default -c " .. beautiful.bg_focus:gsub("#","") 135 | awful.util.spawn(lock, false) 136 | end 137 | ), 138 | -- Reboot 139 | awful.button({ modkey }, 1, 140 | function() 141 | local reboot = "zenity --question --text 'Reboot?' && systemctl reboot" 142 | awful.util.spawn(reboot, false) 143 | end 144 | ), 145 | -- Shutdown 146 | awful.button({ modkey }, 3, 147 | function() 148 | local shutdown = "zenity --question --text 'Shut down?' && systemctl poweroff" 149 | awful.util.spawn(shutdown, false) 150 | end 151 | ) 152 | )) 153 | 154 | menubar.utils.terminal = terminal 155 | -- }}} 156 | 157 | -- {{{ Wallpaper 158 | local function set_wallpaper(s) 159 | if beautiful.wallpaper then 160 | local wallpaper = beautiful.wallpaper 161 | if type(wallpaper) == "function" then 162 | wallpaper = wallpaper(s) 163 | end 164 | gears.wallpaper.maximized(wallpaper, s, true) 165 | end 166 | end 167 | screen.connect_signal("property::geometry", set_wallpaper) 168 | -- }}} 169 | 170 | -- {{{ Tags 171 | tags = { 172 | names = { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10" }, 173 | layouts = { 174 | awful.layout.layouts[2], 175 | awful.layout.layouts[10], 176 | awful.layout.layouts[2], 177 | awful.layout.layouts[2], 178 | awful.layout.layouts[2], 179 | awful.layout.layouts[1], 180 | awful.layout.layouts[10], 181 | awful.layout.layouts[1], 182 | awful.layout.layouts[1], 183 | awful.layout.layouts[1] 184 | } 185 | } 186 | -- }}} 187 | 188 | mykeyboardlayout = awful.widget.keyboardlayout() 189 | mytextclock = wibox.widget.textclock( 190 | "%a %m/%d @ %I:%M %p" 191 | ) 192 | 193 | -- {{{ Initialize wiboxes 194 | mywibox = {} 195 | mygraphbox = {} 196 | mypromptbox = {} 197 | mylayoutbox = {} 198 | 199 | -- Taglist 200 | local taglist_buttons = awful.util.table.join( 201 | awful.button({ }, 1, function(t) t:view_only() end), 202 | awful.button({ modkey }, 1, 203 | function(t) 204 | if client.focus then 205 | client.focus:move_to_tag(t) 206 | end 207 | end 208 | ), 209 | awful.button({ }, 3, awful.tag.viewtoggle), 210 | awful.button({ modkey }, 3, 211 | function(t) 212 | if client.focus then 213 | client.focus:toggle_tag(t) 214 | end 215 | end 216 | ), 217 | awful.button({ }, 4, function(t) awful.tag.viewnext(t.screen) end), 218 | awful.button({ }, 5, function(t) awful.tag.viewprev(t.screen) end) 219 | ) 220 | 221 | -- Tasklist 222 | local tasklist_buttons = awful.util.table.join( 223 | awful.button({ }, 1, 224 | function(c) 225 | if c == client.focus then 226 | c.minimized = true 227 | else 228 | c.minimized = false 229 | if not c:isvisible() and c.first_tag then 230 | c.first_tag:view_only() 231 | end 232 | client.focus = c 233 | c:raise() 234 | end 235 | end 236 | ), 237 | awful.button({ }, 3, client_menu_toggle_fn()), 238 | awful.button({ }, 4, function() awful.client.focus.byidx(1) end), 239 | awful.button({ }, 5, function() awful.client.focus.byidx(-1) end)) 240 | -- }}} 241 | 242 | -- {{{ Create wiboxes 243 | awful.screen.connect_for_each_screen( 244 | function(s) 245 | -- Wallpaper 246 | set_wallpaper(s) 247 | 248 | -- Taglist 249 | awful.tag(tags.names, s, tags.layouts) 250 | s.mytaglist = awful.widget.taglist( 251 | s, awful.widget.taglist.filter.all, taglist_buttons 252 | ) 253 | 254 | -- Promptbox 255 | s.mypromptbox = awful.widget.prompt() 256 | 257 | -- Layoutbox 258 | s.mylayoutbox = awful.widget.layoutbox(s) 259 | s.mylayoutbox:buttons(awful.util.table.join( 260 | awful.button({ }, 1, function() awful.layout.inc(1) end), 261 | awful.button({ }, 3, function() awful.layout.inc(-1) end), 262 | awful.button({ }, 4, function() awful.layout.inc(1) end), 263 | awful.button({ }, 5, function() awful.layout.inc(-1) end) 264 | )) 265 | 266 | -- Tasklist 267 | s.mytasklist = awful.widget.tasklist( 268 | s, awful.widget.tasklist.filter.currenttags, tasklist_buttons 269 | ) 270 | 271 | -- Wibox 272 | local left_wibox = wibox.layout.fixed.horizontal() 273 | left_wibox:add(s.mytaglist) 274 | left_wibox:add(space) 275 | left_wibox:add(s.mypromptbox) 276 | left_wibox:add(s.mylayoutbox) 277 | left_wibox:add(space) 278 | 279 | local right_wibox = wibox.layout.fixed.horizontal() 280 | right_wibox:add(wibox.widget.systray()) 281 | right_wibox:add(mykeyboardlayout) 282 | right_wibox:add(mpdicon) 283 | right_wibox:add(mpdwidget) 284 | right_wibox:add(pacicon) 285 | right_wibox:add(pacwidget) 286 | right_wibox:add(baticon) 287 | right_wibox:add(batpct) 288 | right_wibox:add(volicon) 289 | right_wibox:add(volpct) 290 | right_wibox:add(volspace) 291 | 292 | local wibox_layout = wibox.layout.align.horizontal() 293 | wibox_layout:set_left(left_wibox) 294 | wibox_layout:set_middle(s.mytasklist) 295 | wibox_layout:set_right(right_wibox) 296 | 297 | s.mywibox = awful.wibar({ position = "top", height = 16, screen = s }) 298 | s.mywibox:set_widget(wibox_layout) 299 | 300 | -- Graphbox 301 | local left_graphbox = wibox.layout.fixed.horizontal() 302 | left_graphbox:add(mylauncher) 303 | left_graphbox:add(space) 304 | left_graphbox:add(cpufreq) 305 | left_graphbox:add(cpugraph0) 306 | left_graphbox:add(cpupct0) 307 | left_graphbox:add(tab) 308 | left_graphbox:add(memused) 309 | left_graphbox:add(membar) 310 | left_graphbox:add(mempct) 311 | left_graphbox:add(tab) 312 | left_graphbox:add(rootfsused) 313 | left_graphbox:add(rootfsbar) 314 | left_graphbox:add(rootfspct) 315 | left_graphbox:add(tab) 316 | left_graphbox:add(txwidget) 317 | left_graphbox:add(txgraph) 318 | left_graphbox:add(upwidget) 319 | left_graphbox:add(tab) 320 | left_graphbox:add(rxwidget) 321 | left_graphbox:add(rxgraph) 322 | left_graphbox:add(dnwidget) 323 | 324 | local right_graphbox = wibox.layout.fixed.horizontal() 325 | right_graphbox:add(weather) 326 | right_graphbox:add(space) 327 | right_graphbox:add(mytextclock) 328 | right_graphbox:add(space) 329 | 330 | local graphbox_layout = wibox.layout.align.horizontal() 331 | graphbox_layout:set_left(left_graphbox) 332 | graphbox_layout:set_right(right_graphbox) 333 | 334 | s.mygraphbox = awful.wibar({ position = "bottom", height = 12, screen = s }) 335 | s.mygraphbox:set_widget(graphbox_layout) 336 | end 337 | ) 338 | -- }}} 339 | 340 | -- {{{ Mouse bindings 341 | root.buttons(awful.util.table.join( 342 | awful.button({ }, 4, awful.tag.viewnext), 343 | awful.button({ }, 5, awful.tag.viewprev) 344 | )) 345 | -- }}} 346 | 347 | -- {{{ Key bindings 348 | globalkeys = awful.util.table.join( 349 | -- Popups 350 | awful.key({ modkey }, "s", hotkeys_popup.show_help), 351 | 352 | -- Tag navigation 353 | awful.key({ modkey }, "Left", awful.tag.viewprev), 354 | awful.key({ modkey }, "Right", awful.tag.viewnext), 355 | awful.key({ modkey }, "Escape", awful.tag.history.restore), 356 | 357 | -- Client navigation 358 | awful.key({ altkey }, "Tab", 359 | function() 360 | awful.client.focus.byidx(1) 361 | if client.focus then client.focus:raise() end 362 | end 363 | ), 364 | awful.key({ altkey, "Shift" }, "Tab", 365 | function() 366 | awful.client.focus.byidx(-1) 367 | if client.focus then client.focus:raise() end 368 | end 369 | ), 370 | 371 | -- Layout manipulation 372 | awful.key({ modkey, "Shift" }, "j", function() awful.client.swap.byidx(1) end), 373 | awful.key({ modkey, "Shift" }, "k", function() awful.client.swap.byidx(-1) end), 374 | awful.key({ modkey }, "Tab", function() awful.screen.focus_relative(1) end), 375 | awful.key({ modkey, "Shift" }, "Tab", function() awful.screen.focus_relative(-1) end), 376 | awful.key({ modkey }, "u", awful.client.urgent.jumpto), 377 | awful.key({ modkey }, "p", 378 | function() 379 | awful.client.focus.history.previous() 380 | if client.focus then client.focus:raise() end 381 | end 382 | ), 383 | 384 | -- Standard program 385 | awful.key({ modkey }, "Return", function() awful.spawn(terminal) end), 386 | awful.key({ modkey, "Control" }, "r", awesome.restart), 387 | awful.key({ modkey, "Shift" }, "q", awesome.quit), 388 | awful.key({ modkey }, "l", function() awful.tag.incmwfact(0.05) end), 389 | awful.key({ modkey }, "h", function() awful.tag.incmwfact(-0.05) end), 390 | awful.key({ modkey }, "k", function() awful.client.incwfact(0.03) end), 391 | awful.key({ modkey }, "j", function() awful.client.incwfact(-0.03) end), 392 | awful.key({ modkey, "Shift" }, "h", function() awful.tag.incnmaster(1, nil, true) end), 393 | awful.key({ modkey, "Shift" }, "l", function() awful.tag.incnmaster(-1, nil, true) end), 394 | awful.key({ modkey, "Control" }, "h", function() awful.tag.incncol(1, nil, true) end), 395 | awful.key({ modkey, "Control" }, "l", function() awful.tag.incncol(-1, nil, true) end), 396 | awful.key({ modkey }, "space", function() awful.layout.inc(1) end), 397 | awful.key({ modkey, "Shift" }, "space", function() awful.layout.inc(-1) end), 398 | awful.key({ modkey, "Control" }, "n", 399 | function() 400 | local c = awful.client.restore() 401 | if c then 402 | client.focus = c 403 | c:raise() 404 | end 405 | end 406 | ), 407 | 408 | -- Scratch 409 | awful.key({ modkey }, "`", 410 | function() 411 | scratch.drop('urxvtc -name scratch', "bottom", "center", 1.0, 0.40, false) 412 | end 413 | ), 414 | 415 | -- Prompts 416 | awful.key({ altkey }, "F2", function() awful.screen.focused().mypromptbox:run() end), 417 | awful.key({ modkey }, "x", 418 | function() 419 | awful.prompt.run { 420 | prompt = "Run Lua code: ", 421 | textbox = awful.screen.focused().mypromptbox.widget, 422 | exe_callback = awful.util.eval, 423 | history_path = awful.util.get_cache_dir() .. "/history_eval" 424 | } 425 | end 426 | ), 427 | awful.key({ modkey }, "r", function() menubar.show() end), 428 | 429 | -- Pianobar 430 | awful.key({ modkey }, "XF86AudioPrev", function() awful.util.spawn(pianobar_history, false) end), 431 | awful.key({ modkey }, "XF86AudioNext", function() awful.util.spawn(pianobar_next, false) end), 432 | awful.key({ modkey, "Shift" }, "XF86AudioPlay", function() awful.util.spawn(pianobar_quit, false) end), 433 | awful.key({ modkey }, "XF86AudioPlay", 434 | function() 435 | local f = io.popen("pgrep pianobar") 436 | p = f:read("*line") 437 | if p then 438 | awful.util.spawn(pianobar_toggle, false) 439 | else 440 | awful.util.spawn(pianobar_screen, false) 441 | end 442 | end 443 | ), 444 | awful.key({ modkey }, "'", 445 | function() 446 | local f = io.popen("pgrep pianobar") 447 | p = f:read("*line") 448 | if not p then awful.util.spawn_with_shell(pianobar_screen) end 449 | scratch.drop("xterm -name pianobar -e 'screen -x pianobar'", "top", "center", 0.5, 0.2, false) 450 | end 451 | ), 452 | awful.key({ modkey }, "=", function() awful.util.spawn(pianobar_like, false) end), 453 | awful.key({ modkey }, "-", function() awful.util.spawn(pianobar_ban, false) end), 454 | awful.key({ modkey, "Shift" }, "-", function() awful.util.spawn(pianobar_tired, false) end), 455 | awful.key({ modkey }, "[", function() awful.util.spawn(pianobar_station, false) end), 456 | awful.key({ modkey }, "]", function() awful.util.spawn(pianobar_upcoming, false) end), 457 | awful.key({ modkey }, "\\", function() awful.util.spawn(pianobar_playing, false) end) 458 | ) 459 | 460 | clientkeys = awful.util.table.join( 461 | awful.key({ modkey }, "f", 462 | function(c) 463 | c.fullscreen = not c.fullscreen 464 | c:raise() 465 | end 466 | ), 467 | awful.key({ modkey, "Shift" }, "c", function(c) c:kill() end), 468 | awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle), 469 | awful.key({ modkey, "Control" }, "Return", function(c) c:swap(awful.client.getmaster()) end), 470 | awful.key({ modkey }, "o", function(c) c:move_to_screen() end), 471 | awful.key({ modkey }, "t", function(c) c.ontop = not c.ontop end), 472 | awful.key({ modkey }, "n", function(c) c.minimized = true end), 473 | awful.key({ modkey }, "m", 474 | function(c) 475 | c.maximized = not c.maximized 476 | c:raise() 477 | end 478 | ), 479 | 480 | -- Scratchify 481 | awful.key({ modkey }, "v", function(c) scratch.pad.set(c, 0.50, 0.50, true) end) 482 | ) 483 | 484 | for i = 1, 10 do 485 | globalkeys = awful.util.table.join(globalkeys, 486 | awful.key({ modkey }, "#" .. i + 9, 487 | function() 488 | local screen = awful.screen.focused() 489 | local tag = screen.tags[i] 490 | if tag then 491 | tag:view_only() 492 | end 493 | end 494 | ), 495 | awful.key({ modkey, "Control" }, "#" .. i + 9, 496 | function() 497 | local screen = awful.screen.focused() 498 | local tag = screen.tags[i] 499 | if tag then 500 | awful.tag.viewtoggle(tag) 501 | end 502 | end 503 | ), 504 | awful.key({ modkey, "Shift" }, "#" .. i + 9, 505 | function() 506 | if client.focus then 507 | local tag = client.focus.screen.tags[i] 508 | if tag then 509 | client.focus:move_to_tag(tag) 510 | end 511 | end 512 | end 513 | ), 514 | awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9, 515 | function() 516 | if client.focus then 517 | local tag = client.focus.screen.tags[i] 518 | if tag then 519 | client.focus:toggle_tag(tag) 520 | end 521 | end 522 | end 523 | ) 524 | ) 525 | end 526 | 527 | clientbuttons = awful.util.table.join( 528 | awful.button({ }, 1, function(c) client.focus = c; c:raise() end), 529 | awful.button({ modkey }, 1, awful.mouse.client.move), 530 | awful.button({ modkey }, 3, awful.mouse.client.resize) 531 | ) 532 | 533 | root.keys(globalkeys) 534 | -- }}} 535 | 536 | -- {{{ Rules 537 | awful.rules.rules = { 538 | -- All clients 539 | { 540 | rule = { }, 541 | properties = { 542 | border_width = beautiful.border_width, 543 | border_color = beautiful.border_normal, 544 | focus = awful.client.focus.filter, 545 | raise = true, 546 | keys = clientkeys, 547 | buttons = clientbuttons, 548 | screen = awful.screen.preferred, 549 | placement = awful.placement.no_overlap+awful.placement.no_offscreen, 550 | size_hints_honor = false 551 | } 552 | }, 553 | 554 | -- Floating clients 555 | { 556 | rule_any = { 557 | instance = { 558 | "Download", 559 | "Browser", 560 | "Toplevel", 561 | "Places" 562 | }, 563 | class = { 564 | "Skype", 565 | "mpv", 566 | "pinentry", 567 | "Gimp-2.8", 568 | "xtightvncviewer" 569 | }, 570 | name = { 571 | "Event Tester" -- xev 572 | }, 573 | role = { 574 | "AlarmWindow", -- Thunderbird calendar 575 | "pop-up" -- Google Chrome developer tools (detached) 576 | } 577 | }, 578 | properties = { floating = true } 579 | }, 580 | 581 | -- Tagged clients 582 | { 583 | rule = { class = "Skype" }, 584 | properties = { screen = 1, tag = "1" } 585 | }, 586 | { 587 | rule = { class = "Firefox" }, 588 | properties = { screen = 1, tag = "2" } 589 | }, 590 | { 591 | rule = { class = "Thunar" }, 592 | properties = { screen = 1, tag = "7" } 593 | }, 594 | { 595 | rule = { class = "Gimp-2.8" }, 596 | properties = { screen = 1, tag = "8" } 597 | } 598 | } 599 | -- }}} 600 | 601 | -- {{{ Signals 602 | -- Positioning 603 | client.connect_signal("manage", 604 | function(c) 605 | if not awesome.startup then awful.client.setslave(c) end 606 | if awesome.startup and not c.size_hints.user_position and not c.size_hints.program_position then 607 | awful.placement.no_offscreen(c) 608 | end 609 | end 610 | ) 611 | 612 | -- Titlebar if requested 613 | client.connect_signal("request::titlebars", 614 | function(c) 615 | local buttons = awful.util.table.join( 616 | awful.button({ }, 1, 617 | function() 618 | client.focus = c 619 | c:raise() 620 | awful.mouse.client.move(c) 621 | end 622 | ), 623 | awful.button({ }, 3, 624 | function() 625 | client.focus = c 626 | c:raise() 627 | awful.mouse.client.resize(c) 628 | end 629 | ) 630 | ) 631 | 632 | awful.titlebar(c):setup { 633 | -- Left 634 | { 635 | awful.titlebar.widget.iconwidget(c), 636 | buttons = buttons, 637 | layout = wibox.layout.fixed.horizontal 638 | }, 639 | -- Middle 640 | { 641 | { 642 | align = "center", 643 | widget = awful.titlebar.widget.titlewidget(c) 644 | }, 645 | buttons = buttons, 646 | layout = wibox.layout.flex.horizontal 647 | }, 648 | -- Right 649 | { 650 | awful.titlebar.widget.floatingbutton(c), 651 | awful.titlebar.widget.maximizedbutton(c), 652 | awful.titlebar.widget.stickybutton(c), 653 | awful.titlebar.widget.ontopbutton(c), 654 | awful.titlebar.widget.closebutton(c), 655 | layout = wibox.layout.fixed.horizontal() 656 | }, 657 | layout = wibox.layout.align.horizontal 658 | } 659 | end 660 | ) 661 | 662 | -- Sloppy focus 663 | client.connect_signal("mouse::enter", 664 | function(c) 665 | if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier and awful.client.focus.filter(c) then 666 | client.focus = c 667 | end 668 | end 669 | ) 670 | 671 | client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end) 672 | client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end) 673 | -- }}} 674 | 675 | -- vim: ft=lua ts=2 sts=2 sw=2 et 676 | -------------------------------------------------------------------------------- /scratch/drop.lua: -------------------------------------------------------------------------------- 1 | ------------------------------------------------------------------- 2 | -- Drop-down applications manager for the awesome window manager 3 | ------------------------------------------------------------------- 4 | -- Coded by: * Lucas de Vries 5 | -- Hacked by: * Adrian C. (anrxc) 6 | -- Licensed under the WTFPL version 2 7 | -- * http://sam.zoy.org/wtfpl/COPYING 8 | ------------------------------------------------------------------- 9 | -- To use this module add: 10 | -- local scratch = require("scratch") 11 | -- to the top of your rc.lua, and call it from a keybinding: 12 | -- scratch.drop(prog, vert, horiz, width, height, sticky, screen) 13 | -- 14 | -- Parameters: 15 | -- prog - Program to run; "urxvt", "gmrun", "thunderbird" 16 | -- vert - Vertical; "bottom", "center" or "top" (default) 17 | -- horiz - Horizontal; "left", "right" or "center" (default) 18 | -- width - Width in absolute pixels, or width percentage 19 | -- when <= 1 (1 (100% of the screen) by default) 20 | -- height - Height in absolute pixels, or height percentage 21 | -- when <= 1 (0.25 (25% of the screen) by default) 22 | -- sticky - Visible on all tags, false by default 23 | -- screen - Screen (optional), mouse.screen by default 24 | ------------------------------------------------------------------- 25 | 26 | -- Grab environment 27 | local pairs = pairs 28 | local awful = require("awful") 29 | local setmetatable = setmetatable 30 | local capi = { 31 | mouse = mouse, 32 | client = client, 33 | screen = screen 34 | } 35 | 36 | -- Scratchdrop: drop-down applications manager for the awesome window manager 37 | local drop = {} -- module scratch.drop 38 | 39 | 40 | local dropdown = {} 41 | 42 | -- Create a new window for the drop-down application when it doesn't 43 | -- exist, or toggle between hidden and visible states when it does 44 | function toggle(prog, vert, horiz, width, height, sticky, screen) 45 | vert = vert or "top" 46 | horiz = horiz or "center" 47 | width = width or 1 48 | height = height or 0.25 49 | sticky = sticky or false 50 | screen = screen or capi.mouse.screen 51 | 52 | -- Determine signal usage in this version of awesome 53 | local attach_signal = capi.client.connect_signal or capi.client.add_signal 54 | local detach_signal = capi.client.disconnect_signal or capi.client.remove_signal 55 | 56 | if not dropdown[prog] then 57 | dropdown[prog] = {} 58 | 59 | -- Add unmanage signal for scratchdrop programs 60 | attach_signal("unmanage", function (c) 61 | for scr, cl in pairs(dropdown[prog]) do 62 | if cl == c then 63 | dropdown[prog][scr] = nil 64 | end 65 | end 66 | end) 67 | end 68 | 69 | if not dropdown[prog][screen] then 70 | spawnw = function (c) 71 | dropdown[prog][screen] = c 72 | 73 | -- Scratchdrop clients are floaters 74 | awful.client.floating.set(c, true) 75 | 76 | -- Client geometry and placement 77 | local screengeom = capi.screen[screen].workarea 78 | 79 | if width <= 1 then width = screengeom.width * width end 80 | if height <= 1 then height = screengeom.height * height end 81 | 82 | if horiz == "left" then x = screengeom.x 83 | elseif horiz == "right" then x = screengeom.width - width 84 | else x = screengeom.x+(screengeom.width-width)/2 end 85 | 86 | if vert == "bottom" then y = screengeom.height + screengeom.y - height 87 | elseif vert == "center" then y = screengeom.y+(screengeom.height-height)/2 88 | else y = screengeom.y - screengeom.y end 89 | 90 | -- Client properties 91 | c:geometry({ x = x, y = y, width = width, height = height }) 92 | c.ontop = true 93 | c.above = true 94 | c.skip_taskbar = true 95 | if sticky then c.sticky = true end 96 | if c.titlebar then awful.titlebar.remove(c) end 97 | 98 | c:raise() 99 | capi.client.focus = c 100 | detach_signal("manage", spawnw) 101 | end 102 | 103 | -- Add manage signal and spawn the program 104 | attach_signal("manage", spawnw) 105 | awful.util.spawn(prog, false) 106 | else 107 | -- Get a running client 108 | c = dropdown[prog][screen] 109 | 110 | -- Switch the client to the current workspace 111 | if c:isvisible() == false then c.hidden = true 112 | awful.client.movetotag(awful.tag.selected(screen), c) 113 | end 114 | 115 | -- Focus and raise if hidden 116 | if c.hidden then 117 | -- Make sure it is centered 118 | if vert == "center" then awful.placement.center_vertical(c) end 119 | if horiz == "center" then awful.placement.center_horizontal(c) end 120 | c.hidden = false 121 | c:raise() 122 | capi.client.focus = c 123 | else -- Hide and detach tags if not 124 | c.hidden = true 125 | local ctags = c:tags() 126 | for i, t in pairs(ctags) do 127 | ctags[i] = nil 128 | end 129 | c:tags(ctags) 130 | end 131 | end 132 | end 133 | 134 | return setmetatable(drop, { __call = function(_, ...) return toggle(...) end }) 135 | -------------------------------------------------------------------------------- /scratch/init.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------- 2 | -- Drop-down applications and scratchpad manager for awesome wm 3 | --------------------------------------------------------------- 4 | -- Coded by: * Adrian C. (anrxc) 5 | -- Licensed under the WTFPL version 2 6 | -- * http://sam.zoy.org/wtfpl/COPYING 7 | --------------------------------------------------------------- 8 | 9 | local scratch = {} -- module scratch 10 | 11 | scratch.pad = require("scratch.pad") 12 | scratch.drop = require("scratch.drop") 13 | 14 | return scratch 15 | -------------------------------------------------------------------------------- /scratch/pad.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------- 2 | -- Basic scratchpad manager for the awesome window manager 3 | --------------------------------------------------------------- 4 | -- Coded by: * Adrian C. (anrxc) 5 | -- Licensed under the WTFPL version 2 6 | -- * http://sam.zoy.org/wtfpl/COPYING 7 | --------------------------------------------------------------- 8 | -- To use this module add: 9 | -- local scratch = require("scratch") 10 | -- to the top of your rc.lua, and call: 11 | -- scratch.pad.set(c, width, height, sticky, screen) 12 | -- from a clientkeys binding, and: 13 | -- scratch.pad.toggle(screen) 14 | -- from a globalkeys binding. 15 | -- 16 | -- Parameters: 17 | -- c - Client to scratch or un-scratch 18 | -- width - Width in absolute pixels, or width percentage 19 | -- when <= 1 (0.50 (50% of the screen) by default) 20 | -- height - Height in absolute pixels, or height percentage 21 | -- when <= 1 (0.50 (50% of the screen) by default) 22 | -- sticky - Visible on all tags, false by default 23 | -- screen - Screen (optional), mouse.screen by default 24 | --------------------------------------------------------------- 25 | 26 | -- Grab environment 27 | local pairs = pairs 28 | local awful = require("awful") 29 | local capi = { 30 | mouse = mouse, 31 | client = client, 32 | screen = screen 33 | } 34 | 35 | -- Scratchpad: basic scratchpad manager for the awesome window manager 36 | local pad = {} -- module scratch.pad 37 | 38 | 39 | local scratchpad = {} 40 | 41 | -- Toggle a set of properties on a client. 42 | local function toggleprop(c, prop) 43 | c.ontop = prop.ontop or false 44 | c.above = prop.above or false 45 | c.hidden = prop.hidden or false 46 | c.sticky = prop.stick or false 47 | c.skip_taskbar = prop.task or false 48 | end 49 | 50 | -- Scratch the focused client, or un-scratch and tile it. If another 51 | -- client is already scratched, replace it with the focused client. 52 | function pad.set(c, width, height, sticky, screen) 53 | width = width or 0.50 54 | height = height or 0.50 55 | sticky = sticky or false 56 | screen = screen or capi.mouse.screen 57 | 58 | -- Determine signal usage in this version of awesome 59 | local attach_signal = capi.client.connect_signal or capi.client.add_signal 60 | local detach_signal = capi.client.disconnect_signal or capi.client.remove_signal 61 | 62 | local function setscratch(c) 63 | -- Scratchpad is floating and has no titlebar 64 | awful.client.floating.set(c, true); awful.titlebar.remove(c) 65 | 66 | -- Scratchpad client properties 67 | toggleprop(c, {ontop=true, above=true, task=true, stick=sticky}) 68 | 69 | -- Scratchpad geometry and placement 70 | local screengeom = capi.screen[screen].workarea 71 | if width <= 1 then width = screengeom.width * width end 72 | if height <= 1 then height = screengeom.height * height end 73 | 74 | c:geometry({ -- Scratchpad is always centered on screen 75 | x = screengeom.x + (screengeom.width - width) / 2, 76 | y = screengeom.y + (screengeom.height - height) / 2, 77 | width = width, height = height 78 | }) 79 | 80 | -- Scratchpad should not loose focus 81 | c:raise(); capi.client.focus = c 82 | end 83 | 84 | -- Prepare a table for storing clients, 85 | if not scratchpad.pad then scratchpad.pad = {} 86 | -- add unmanage signal for scratchpad clients 87 | attach_signal("unmanage", function (c) 88 | for scr, cl in pairs(scratchpad.pad) do 89 | if cl == c then scratchpad.pad[scr] = nil end 90 | end 91 | end) 92 | end 93 | 94 | -- If the scratcphad is emtpy, store the client, 95 | if not scratchpad.pad[screen] then 96 | scratchpad.pad[screen] = c 97 | -- then apply geometry and properties 98 | setscratch(c) 99 | else -- If a client is already scratched, 100 | local oc = scratchpad.pad[screen] 101 | -- unscratch, and compare it with the focused client 102 | awful.client.floating.toggle(oc); toggleprop(oc, {}) 103 | -- If it matches clear the table, if not replace it 104 | if oc == c then scratchpad.pad[screen] = nil 105 | else scratchpad.pad[screen] = c; setscratch(c) end 106 | end 107 | end 108 | 109 | -- Move the scratchpad to the current workspace, focus and raise it 110 | -- when it's hidden, or hide it when it's visible. 111 | function pad.toggle(screen) 112 | screen = screen or capi.mouse.screen 113 | 114 | -- Check if we have a client on storage, 115 | if scratchpad.pad and 116 | scratchpad.pad[screen] ~= nil 117 | then -- and get it out, to play 118 | local c = scratchpad.pad[screen] 119 | 120 | -- If it's visible on another tag hide it, 121 | if c:isvisible() == false then c.hidden = true 122 | -- and move it to the current worskpace 123 | awful.client.movetotag(awful.tag.selected(screen), c) 124 | end 125 | 126 | -- Focus and raise if it's hidden, 127 | if c.hidden then 128 | awful.placement.centered(c) 129 | c.hidden = false 130 | c:raise(); capi.client.focus = c 131 | else -- hide it if it's not 132 | c.hidden = true 133 | end 134 | end 135 | end 136 | 137 | return pad 138 | -------------------------------------------------------------------------------- /themes/dust/awesome-dust22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/awesome-dust22.png -------------------------------------------------------------------------------- /themes/dust/awesome-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/awesome-icon.png -------------------------------------------------------------------------------- /themes/dust/awesome-icon24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/awesome-icon24.png -------------------------------------------------------------------------------- /themes/dust/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/background.jpg -------------------------------------------------------------------------------- /themes/dust/layouts/dwindle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/dwindle.png -------------------------------------------------------------------------------- /themes/dust/layouts/dwindlew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/dwindlew.png -------------------------------------------------------------------------------- /themes/dust/layouts/fairh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/fairh.png -------------------------------------------------------------------------------- /themes/dust/layouts/fairhw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/fairhw.png -------------------------------------------------------------------------------- /themes/dust/layouts/fairv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/fairv.png -------------------------------------------------------------------------------- /themes/dust/layouts/fairvw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/fairvw.png -------------------------------------------------------------------------------- /themes/dust/layouts/floating.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/floating.png -------------------------------------------------------------------------------- /themes/dust/layouts/floatingw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/floatingw.png -------------------------------------------------------------------------------- /themes/dust/layouts/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/fullscreen.png -------------------------------------------------------------------------------- /themes/dust/layouts/fullscreenw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/fullscreenw.png -------------------------------------------------------------------------------- /themes/dust/layouts/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/magnifier.png -------------------------------------------------------------------------------- /themes/dust/layouts/magnifierw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/magnifierw.png -------------------------------------------------------------------------------- /themes/dust/layouts/max.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/max.png -------------------------------------------------------------------------------- /themes/dust/layouts/maxw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/maxw.png -------------------------------------------------------------------------------- /themes/dust/layouts/spiral.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/spiral.png -------------------------------------------------------------------------------- /themes/dust/layouts/spiralw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/spiralw.png -------------------------------------------------------------------------------- /themes/dust/layouts/tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tile.png -------------------------------------------------------------------------------- /themes/dust/layouts/tilebottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tilebottom.png -------------------------------------------------------------------------------- /themes/dust/layouts/tilebottomw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tilebottomw.png -------------------------------------------------------------------------------- /themes/dust/layouts/tileleft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tileleft.png -------------------------------------------------------------------------------- /themes/dust/layouts/tileleftw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tileleftw.png -------------------------------------------------------------------------------- /themes/dust/layouts/tiletop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tiletop.png -------------------------------------------------------------------------------- /themes/dust/layouts/tiletopw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tiletopw.png -------------------------------------------------------------------------------- /themes/dust/layouts/tilew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/layouts/tilew.png -------------------------------------------------------------------------------- /themes/dust/taglist/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/taglist/square.png -------------------------------------------------------------------------------- /themes/dust/taglist/squaref.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/taglist/squaref.png -------------------------------------------------------------------------------- /themes/dust/theme.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | - awesomeWM 4.0 theme 3 | - github@tdy/awesome 4 | --]] 5 | 6 | local awful = require("awful") 7 | 8 | -- {{{ Helpers 9 | function hometheme(path) return awful.util.getdir("config") .. "themes/dust/" .. path end 10 | function hometags(path) return hometheme("taglist/") .. path end 11 | function homelayouts(path) return hometheme("layouts/") .. path end 12 | function homewidgets(path) return hometheme("widgets/") .. path end 13 | function hometp(path) return hometheme("tp/") .. path end 14 | 15 | function systheme(path) return "/usr/share/awesome/themes/default/" .. path end 16 | function syslayouts(path) return systheme("layouts/") .. path end 17 | function systitle(path) return systheme("titlebar/") .. path end 18 | -- }}} 19 | 20 | -- {{{ Main 21 | local theme = {} 22 | theme.wallpaper = hometheme("background.jpg") 23 | theme.font = "terminus 10" 24 | theme.icon_theme = "Faenza-Darkest" 25 | theme.menu_height = 15 26 | theme.menu_width = 100 27 | -- }}} 28 | 29 | -- {{{ Colors 30 | theme.fg_normal = "#d9d4cc" 31 | theme.fg_focus = theme.fg_normal 32 | theme.fg_urgent = "#ffffff" 33 | theme.fg_minimize = "#908884" 34 | theme.fg_tooltip = "#323232" 35 | theme.fg_em = "#ffffef" 36 | theme.fg_widget = theme.fg_minimize 37 | theme.fg_center_widget = "#6b6461" 38 | theme.fg_end_widget = "#363230" 39 | 40 | theme.bg_normal = theme.fg_tooltip 41 | theme.bg_focus = "#75645b" 42 | theme.bg_urgent = "#c77966" 43 | theme.bg_minimize = theme.bg_normal 44 | theme.bg_tooltip = "#d6c1ae" 45 | theme.bg_em = "#5a5a5a" 46 | theme.bg_systray = theme.fg_tooltip 47 | theme.bg_widget = "#343330" 48 | 49 | theme.useless_gap = 0 50 | theme.border_width = 2 51 | theme.border_normal = "#222222" 52 | theme.border_focus = theme.bg_focus 53 | theme.border_marked = "#91231c" 54 | theme.border_tooltip = "#444444" 55 | theme.border_widget = "#3f3f3f" 56 | 57 | theme.titlebar_bg_focus = theme.border_widget 58 | theme.titlebar_bg_normal = theme.border_widget 59 | 60 | theme.mouse_finder_color = "#cc9393" 61 | -- }}} 62 | 63 | -- {{{ Icons 64 | theme.taglist_squares_sel = hometags("squaref.png") 65 | theme.taglist_squares_unsel = hometags("square.png") 66 | 67 | theme.awesome_icon = hometheme("awesome-dust22.png") 68 | theme.menu_submenu_icon = systheme("submenu.png") 69 | 70 | theme.layout_tile = homelayouts("tilew.png") 71 | theme.layout_tileleft = homelayouts("tileleftw.png") 72 | theme.layout_tilebottom = homelayouts("tilebottomw.png") 73 | theme.layout_tiletop = homelayouts("tiletopw.png") 74 | theme.layout_fairv = homelayouts("fairvw.png") 75 | theme.layout_fairh = homelayouts("fairhw.png") 76 | theme.layout_spiral = homelayouts("spiralw.png") 77 | theme.layout_dwindle = homelayouts("dwindlew.png") 78 | theme.layout_max = homelayouts("maxw.png") 79 | theme.layout_fullscreen = homelayouts("fullscreenw.png") 80 | theme.layout_magnifier = homelayouts("magnifierw.png") 81 | theme.layout_floating = homelayouts("floatingw.png") 82 | theme.layout_cornernw = syslayouts("cornernww.png") -- TODO 83 | theme.layout_cornerne = syslayouts("cornernew.png") -- TODO 84 | theme.layout_cornersw = syslayouts("cornersww.png") -- TODO 85 | theme.layout_cornerse = syslayouts("cornersew.png") -- TODO 86 | 87 | theme.widget_disk = homewidgets("disk.png") 88 | theme.widget_cpu = homewidgets("cpu.png") 89 | theme.widget_ac = homewidgets("ac.png") 90 | theme.widget_acblink = homewidgets("acblink.png") 91 | theme.widget_blank = homewidgets("blank.png") 92 | theme.widget_batfull = homewidgets("batfull.png") 93 | theme.widget_batmed = homewidgets("batmed.png") 94 | theme.widget_batlow = homewidgets("batlow.png") 95 | theme.widget_batempty = homewidgets("batempty.png") 96 | theme.widget_vol = homewidgets("vol.png") 97 | theme.widget_mute = homewidgets("mute.png") 98 | theme.widget_pac = homewidgets("pac.png") 99 | theme.widget_pacnew = homewidgets("pacnew.png") 100 | theme.widget_mail = homewidgets("mail.png") 101 | theme.widget_mailnew = homewidgets("mailnew.png") 102 | theme.widget_temp = homewidgets("temp.png") 103 | theme.widget_tempwarn = homewidgets("tempwarm.png") 104 | theme.widget_temphot = homewidgets("temphot.png") 105 | theme.widget_wifi = homewidgets("wifi.png") 106 | theme.widget_nowifi = homewidgets("nowifi.png") 107 | theme.widget_mpd = homewidgets("mpd.png") 108 | theme.widget_play = homewidgets("play.png") 109 | theme.widget_pause = homewidgets("pause.png") 110 | theme.widget_ram = homewidgets("ram.png") 111 | 112 | theme.widget_mem = hometp("ram.png") 113 | theme.widget_swap = hometp("swap.png") 114 | theme.widget_fs = hometp("fs_01.png") 115 | theme.widget_fs2 = hometp("fs_02.png") 116 | theme.widget_up = hometp("up.png") 117 | theme.widget_down = hometp("down.png") 118 | 119 | theme.titlebar_close_button_focus = systitle("close_focus.png") 120 | theme.titlebar_close_button_normal = systitle("close_normal.png") 121 | 122 | theme.titlebar_minimize_button_normal = systitle("minimize_normal.png") 123 | theme.titlebar_minimize_button_focus = systitle("minimize_focus.png") 124 | 125 | theme.titlebar_ontop_button_focus_active = systitle("ontop_focus_active.png") 126 | theme.titlebar_ontop_button_normal_active = systitle("ontop_normal_active.png") 127 | theme.titlebar_ontop_button_focus_inactive = systitle("ontop_focus_inactive.png") 128 | theme.titlebar_ontop_button_normal_inactive = systitle("ontop_normal_inactive.png") 129 | 130 | theme.titlebar_sticky_button_focus_active = systitle("sticky_focus_active.png") 131 | theme.titlebar_sticky_button_normal_active = systitle("sticky_normal_active.png") 132 | theme.titlebar_sticky_button_focus_inactive = systitle("sticky_focus_inactive.png") 133 | theme.titlebar_sticky_button_normal_inactive = systitle("sticky_normal_inactive.png") 134 | 135 | theme.titlebar_floating_button_focus_active = systitle("floating_focus_active.png") 136 | theme.titlebar_floating_button_normal_active = systitle("floating_normal_active.png") 137 | theme.titlebar_floating_button_focus_inactive = systitle("floating_focus_inactive.png") 138 | theme.titlebar_floating_button_normal_inactive = systitle("floating_normal_inactive.png") 139 | 140 | theme.titlebar_maximized_button_focus_active = systitle("maximized_focus_active.png") 141 | theme.titlebar_maximized_button_normal_active = systitle("maximized_normal_active.png") 142 | theme.titlebar_maximized_button_focus_inactive = systitle("maximized_focus_inactive.png") 143 | theme.titlebar_maximized_button_normal_inactive = systitle("maximized_normal_inactive.png") 144 | 145 | return theme 146 | 147 | -- vim: ft=lua ts=2 sts=2 sw=2 et 148 | -------------------------------------------------------------------------------- /themes/dust/titlebar/close_focus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/close_focus.png -------------------------------------------------------------------------------- /themes/dust/titlebar/close_normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/close_normal.png -------------------------------------------------------------------------------- /themes/dust/titlebar/floating_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/floating_focus_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/floating_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/floating_focus_inactive.png -------------------------------------------------------------------------------- /themes/dust/titlebar/floating_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/floating_normal_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/floating_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/floating_normal_inactive.png -------------------------------------------------------------------------------- /themes/dust/titlebar/maximized_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/maximized_focus_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/maximized_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/maximized_focus_inactive.png -------------------------------------------------------------------------------- /themes/dust/titlebar/maximized_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/maximized_normal_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/maximized_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/maximized_normal_inactive.png -------------------------------------------------------------------------------- /themes/dust/titlebar/ontop_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/ontop_focus_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/ontop_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/ontop_focus_inactive.png -------------------------------------------------------------------------------- /themes/dust/titlebar/ontop_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/ontop_normal_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/ontop_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/ontop_normal_inactive.png -------------------------------------------------------------------------------- /themes/dust/titlebar/sticky_focus_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/sticky_focus_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/sticky_focus_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/sticky_focus_inactive.png -------------------------------------------------------------------------------- /themes/dust/titlebar/sticky_normal_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/sticky_normal_active.png -------------------------------------------------------------------------------- /themes/dust/titlebar/sticky_normal_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/titlebar/sticky_normal_inactive.png -------------------------------------------------------------------------------- /themes/dust/tp/cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/tp/cpu.png -------------------------------------------------------------------------------- /themes/dust/tp/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/tp/down.png -------------------------------------------------------------------------------- /themes/dust/tp/fs_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/tp/fs_01.png -------------------------------------------------------------------------------- /themes/dust/tp/fs_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/tp/fs_02.png -------------------------------------------------------------------------------- /themes/dust/tp/ram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/tp/ram.png -------------------------------------------------------------------------------- /themes/dust/tp/swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/tp/swap.png -------------------------------------------------------------------------------- /themes/dust/tp/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/tp/up.png -------------------------------------------------------------------------------- /themes/dust/widgets/ac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/ac.png -------------------------------------------------------------------------------- /themes/dust/widgets/acblink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/acblink.png -------------------------------------------------------------------------------- /themes/dust/widgets/bat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/bat.png -------------------------------------------------------------------------------- /themes/dust/widgets/batempty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/batempty.png -------------------------------------------------------------------------------- /themes/dust/widgets/batfull.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/batfull.png -------------------------------------------------------------------------------- /themes/dust/widgets/batlow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/batlow.png -------------------------------------------------------------------------------- /themes/dust/widgets/batmed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/batmed.png -------------------------------------------------------------------------------- /themes/dust/widgets/blank.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/blank.png -------------------------------------------------------------------------------- /themes/dust/widgets/cpu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/cpu.png -------------------------------------------------------------------------------- /themes/dust/widgets/crit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/crit.png -------------------------------------------------------------------------------- /themes/dust/widgets/disk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/disk.png -------------------------------------------------------------------------------- /themes/dust/widgets/down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/down.png -------------------------------------------------------------------------------- /themes/dust/widgets/fs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/fs.png -------------------------------------------------------------------------------- /themes/dust/widgets/fs2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/fs2.png -------------------------------------------------------------------------------- /themes/dust/widgets/mail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/mail.png -------------------------------------------------------------------------------- /themes/dust/widgets/mailnew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/mailnew.png -------------------------------------------------------------------------------- /themes/dust/widgets/mpd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/mpd.png -------------------------------------------------------------------------------- /themes/dust/widgets/mpdplay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/mpdplay.png -------------------------------------------------------------------------------- /themes/dust/widgets/mute.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/mute.png -------------------------------------------------------------------------------- /themes/dust/widgets/note.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/note.png -------------------------------------------------------------------------------- /themes/dust/widgets/note2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/note2.png -------------------------------------------------------------------------------- /themes/dust/widgets/note3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/note3.png -------------------------------------------------------------------------------- /themes/dust/widgets/nowifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/nowifi.png -------------------------------------------------------------------------------- /themes/dust/widgets/pac.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/pac.png -------------------------------------------------------------------------------- /themes/dust/widgets/pacnew.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/pacnew.png -------------------------------------------------------------------------------- /themes/dust/widgets/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/pause.png -------------------------------------------------------------------------------- /themes/dust/widgets/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/play.png -------------------------------------------------------------------------------- /themes/dust/widgets/ram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/ram.png -------------------------------------------------------------------------------- /themes/dust/widgets/temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/temp.png -------------------------------------------------------------------------------- /themes/dust/widgets/temphot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/temphot.png -------------------------------------------------------------------------------- /themes/dust/widgets/tempwarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/tempwarm.png -------------------------------------------------------------------------------- /themes/dust/widgets/up.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/up.png -------------------------------------------------------------------------------- /themes/dust/widgets/vol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/vol.png -------------------------------------------------------------------------------- /themes/dust/widgets/wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tdy/awesome/954f6e86a0a1ed8da7e8784e3a4aa831770ebc6f/themes/dust/widgets/wifi.png -------------------------------------------------------------------------------- /wi.lua: -------------------------------------------------------------------------------- 1 | --[[ 2 | - awesomeWM 4.0 widgets 3 | - github@tdy/awesome 4 | --]] 5 | 6 | local awful = require("awful") 7 | local wibox = require("wibox") 8 | local beautiful = require("beautiful") 9 | local vicious = require("vicious") 10 | local naughty = require("naughty") 11 | 12 | graphwidth = 120 13 | graphheight = 20 14 | pctwidth = 40 15 | netwidth = 50 16 | mpdwidth = 365 17 | 18 | -- {{{ Spacers 19 | space = wibox.widget.textbox() 20 | space:set_text(" ") 21 | 22 | comma = wibox.widget.textbox() 23 | comma:set_markup(",") 24 | 25 | pipe = wibox.widget.textbox() 26 | pipe:set_markup("|") 27 | 28 | tab = wibox.widget.textbox() 29 | tab:set_text(" ") 30 | 31 | volspace = wibox.widget.textbox() 32 | volspace:set_text(" ") 33 | -- }}} 34 | 35 | -- {{{ Processor 36 | -- Cache 37 | vicious.cache(vicious.widgets.cpu) 38 | vicious.cache(vicious.widgets.cpuinf) 39 | 40 | -- Core 0 freq 41 | cpufreq = wibox.widget.textbox() 42 | vicious.register(cpufreq, vicious.widgets.cpuinf, 43 | function(widget, args) 44 | return string.format( 45 | "cpu%1.1fGHz", args["{cpu0 ghz}"] 46 | ) 47 | end, 48 | 3000 49 | ) 50 | 51 | -- Core 0 graph 52 | cpugraph0 = awful.widget.graph() 53 | cpugraph0:set_width(graphwidth):set_height(graphheight) 54 | cpugraph0:set_border_color(nil) 55 | cpugraph0:set_border_color(beautiful.bg_widget) 56 | cpugraph0:set_background_color(beautiful.bg_widget) 57 | cpugraph0:set_color({ 58 | type = "linear", 59 | from = { 0, graphheight }, 60 | to = { 0, 0 }, 61 | stops = { 62 | { 0, beautiful.fg_widget }, 63 | { 0.25, beautiful.fg_center_widget }, 64 | { 1, beautiful.fg_end_widget } 65 | } 66 | }) 67 | vicious.register(cpugraph0, vicious.widgets.cpu, "$2") 68 | 69 | -- Core 0 % 70 | cpupct0 = wibox.widget.textbox() 71 | function cpupct0:fit(box, w, h) return math.min(pctwidth, w), h end 72 | vicious.register(cpupct0, vicious.widgets.cpu, "$2%", 2) 73 | 74 | -- Core 1 graph 75 | cpugraph1 = awful.widget.graph() 76 | cpugraph1:set_width(graphwidth):set_height(graphheight) 77 | cpugraph1:set_border_color(nil) 78 | cpugraph1:set_border_color(beautiful.bg_widget) 79 | cpugraph1:set_background_color(beautiful.bg_widget) 80 | cpugraph1:set_color({ 81 | type = "linear", 82 | from = { 0, graphheight }, 83 | to = { 0, 0 }, 84 | stops = { 85 | { 0, beautiful.fg_widget }, 86 | { 0.25, beautiful.fg_center_widget }, 87 | { 1, beautiful.fg_end_widget } 88 | } 89 | }) 90 | vicious.register(cpugraph1, vicious.widgets.cpu, "$3") 91 | 92 | -- Core 1 % 93 | cpupct1 = wibox.widget.textbox() 94 | function cpupct1:fit(box, w, h) return math.min(pctwidth, w), h end 95 | vicious.register(cpupct1, vicious.widgets.cpu, "$3%", 2) 96 | 97 | -- Core 2 graph 98 | cpugraph2 = awful.widget.graph() 99 | cpugraph2:set_width(graphwidth):set_height(graphheight) 100 | cpugraph2:set_border_color(nil) 101 | cpugraph2:set_border_color(beautiful.bg_widget) 102 | cpugraph2:set_background_color(beautiful.bg_widget) 103 | cpugraph2:set_color({ 104 | type = "linear", 105 | from = { 0, graphheight }, 106 | to = { 0, 0 }, 107 | stops = { 108 | { 0, beautiful.fg_widget }, 109 | { 0.25, beautiful.fg_center_widget }, 110 | { 1, beautiful.fg_end_widget } 111 | } 112 | }) 113 | vicious.register(cpugraph2, vicious.widgets.cpu, "$4") 114 | 115 | -- Core 2 % 116 | cpupct2 = wibox.widget.textbox() 117 | function cpupct2:fit(box, w, h) return math.min(pctwidth, w), h end 118 | vicious.register(cpupct2, vicious.widgets.cpu, "$4%", 2) 119 | 120 | -- Core 3 graph 121 | cpugraph3 = awful.widget.graph() 122 | cpugraph3:set_width(graphwidth):set_height(graphheight) 123 | cpugraph3:set_border_color(nil) 124 | cpugraph3:set_border_color(beautiful.bg_widget) 125 | cpugraph3:set_background_color(beautiful.bg_widget) 126 | cpugraph3:set_color({ 127 | type = "linear", 128 | from = { 0, graphheight }, 129 | to = { 0, 0 }, 130 | stops = { 131 | { 0, beautiful.fg_widget }, 132 | { 0.25, beautiful.fg_center_widget }, 133 | { 1, beautiful.fg_end_widget } 134 | } 135 | }) 136 | vicious.register(cpugraph3, vicious.widgets.cpu, "$5") 137 | 138 | -- Core 3 % 139 | cpupct3 = wibox.widget.textbox() 140 | function cpupct3:fit(box, w, h) return math.min(pctwidth, w), h end 141 | vicious.register(cpupct3, vicious.widgets.cpu, "$5%", 2) 142 | -- }}} 143 | 144 | -- {{{ Memory 145 | -- Cache 146 | vicious.cache(vicious.widgets.mem) 147 | 148 | -- RAM used 149 | memused = wibox.widget.textbox() 150 | vicious.register(memused, vicious.widgets.mem, 151 | "ram$2MB", 152 | 5 153 | ) 154 | 155 | -- RAM bar 156 | membar = awful.widget.progressbar() 157 | membar:set_vertical(false) 158 | membar:set_width(graphwidth) 159 | membar:set_height(graphheight) 160 | membar:set_ticks(false):set_ticks_size(2) 161 | membar:set_border_color(nil) 162 | membar:set_background_color(beautiful.bg_widget) 163 | membar:set_color({ 164 | type = "linear", 165 | from = { 0, 0 }, 166 | to = { graphwidth, 0 }, 167 | stops = { 168 | { 0, beautiful.fg_widget }, 169 | { 0.25, beautiful.fg_center_widget }, 170 | { 1, beautiful.fg_end_widget } 171 | } 172 | }) 173 | vicious.register(membar, vicious.widgets.mem, "$1", 13) 174 | 175 | -- RAM % 176 | mempct = wibox.widget.textbox() 177 | mempct.width = pctwidth 178 | vicious.register(mempct, vicious.widgets.mem, "$1%", 5) 179 | 180 | -- {{{ Filesystem 181 | -- Cache 182 | vicious.cache(vicious.widgets.fs) 183 | 184 | -- Root used 185 | rootfsused = wibox.widget.textbox() 186 | vicious.register(rootfsused, vicious.widgets.fs, 187 | "ssd${/ used_gb}GB", 188 | 97 189 | ) 190 | 191 | -- Root bar 192 | rootfsbar = awful.widget.progressbar() 193 | rootfsbar:set_vertical(false) 194 | rootfsbar:set_width(graphwidth) 195 | rootfsbar:set_height(graphheight) 196 | rootfsbar:set_ticks(false):set_ticks_size(2) 197 | rootfsbar:set_border_color(nil) 198 | rootfsbar:set_background_color(beautiful.bg_widget) 199 | rootfsbar:set_color({ 200 | type = "linear", 201 | from = { 0, 0 }, 202 | to = { graphwidth, 0 }, 203 | stops = { 204 | { 0, beautiful.fg_widget }, 205 | { 0.25, beautiful.fg_center_widget }, 206 | { 1, beautiful.fg_end_widget } 207 | } 208 | }) 209 | vicious.register(rootfsbar, vicious.widgets.fs, "${/ used_p}", 97) 210 | 211 | -- Root % 212 | rootfspct = wibox.widget.textbox() 213 | rootfspct.width = pctwidth 214 | vicious.register(rootfspct, vicious.widgets.fs, "${/ used_p}%", 97) 215 | -- }}} 216 | 217 | -- {{{ Network 218 | -- Cache 219 | vicious.cache(vicious.widgets.net) 220 | 221 | -- TX graph 222 | txgraph = awful.widget.graph() 223 | txgraph:set_width(graphwidth) 224 | txgraph:set_height(graphheight) 225 | txgraph:set_border_color(nil) 226 | txgraph:set_background_color(beautiful.bg_widget) 227 | txgraph:set_color({ 228 | type = "linear", 229 | from = { 0, graphheight }, 230 | to = { 0, 0 }, 231 | stops = { 232 | { 0, beautiful.fg_widget }, 233 | { 0.25, beautiful.fg_center_widget }, 234 | { 1, beautiful.fg_end_widget } 235 | } 236 | }) 237 | vicious.register(txgraph, vicious.widgets.net, "${enp0s3 up_kb}") 238 | 239 | -- TX total 240 | txwidget = wibox.widget.textbox() 241 | vicious.register(txwidget, vicious.widgets.net, 242 | "tx${enp0s3 tx_mb}MB", 243 | 19 244 | ) 245 | 246 | -- TX speed 247 | upwidget = wibox.widget.textbox() 248 | function upwidget:fit(box, w, h) return math.min(netwidth, w), h end 249 | vicious.register(upwidget, vicious.widgets.net, "${enp0s3 up_kb}", 2) 250 | 251 | -- RX graph 252 | rxgraph = awful.widget.graph() 253 | rxgraph:set_width(graphwidth) 254 | rxgraph:set_height(graphheight) 255 | rxgraph:set_border_color(nil) 256 | rxgraph:set_background_color(beautiful.bg_widget) 257 | rxgraph:set_color({ 258 | type = "linear", 259 | from = { 0, graphheight }, 260 | to = { 0, 0 }, 261 | stops = { 262 | { 0, beautiful.fg_widget }, 263 | { 0.25, beautiful.fg_center_widget }, 264 | { 1, beautiful.fg_end_widget } 265 | } 266 | }) 267 | vicious.register(rxgraph, vicious.widgets.net, "${enp0s3 down_kb}") 268 | 269 | -- RX total 270 | rxwidget = wibox.widget.textbox() 271 | vicious.register(rxwidget, vicious.widgets.net, 272 | "rx${enp0s3 rx_mb}MB", 273 | 17 274 | ) 275 | 276 | -- RX speed 277 | dnwidget = wibox.widget.textbox() 278 | function dnwidget:fit(box, w, h) return math.min(netwidth, w), h end 279 | vicious.register(dnwidget, vicious.widgets.net, "${enp0s3 down_kb}", 2) 280 | -- }}} 281 | 282 | -- {{{ Weather 283 | weather = wibox.widget.textbox() 284 | vicious.register(weather, vicious.widgets.weather, 285 | "${sky} @ ${tempf}°F on", 286 | 1501, 287 | "XXXX" 288 | ) 289 | weather:buttons(awful.util.table.join(awful.button({ }, 1, 290 | function() vicious.force({ weather }) end 291 | ))) 292 | -- }}} 293 | 294 | -- {{{ Pacman 295 | -- Icon 296 | pacicon = wibox.widget.imagebox() 297 | pacicon:set_image(beautiful.widget_pac) 298 | 299 | -- Upgrades 300 | pacwidget = wibox.widget.textbox() 301 | vicious.register(pacwidget, vicious.widgets.pkg, 302 | function(widget, args) 303 | if args[1] > 0 then 304 | pacicon:set_image(beautiful.widget_pacnew) 305 | else 306 | pacicon:set_image(beautiful.widget_pac) 307 | end 308 | 309 | return args[1] 310 | end, 311 | 1801, 312 | "Arch S" 313 | ) 314 | 315 | -- Buttons 316 | function popup_pac() 317 | local pac_updates = "" 318 | local f = io.popen("pacman -Sup --dbpath /tmp/pacsync") 319 | if f then 320 | pac_updates = f:read("*a"):match(".*/(.*)-.*\n$") 321 | end 322 | f:close() 323 | 324 | if not pac_updates then pac_updates = "System is up to date" end 325 | 326 | naughty.notify { text = pac_updates } 327 | end 328 | pacwidget:buttons(awful.util.table.join(awful.button({ }, 1, popup_pac))) 329 | pacicon:buttons(pacwidget:buttons()) 330 | -- }}} 331 | 332 | -- {{{ Pianobar 333 | -- Icon 334 | mpdicon = wibox.widget.imagebox() 335 | mpdicon:set_image(beautiful.widget_mpd) 336 | 337 | -- Song info 338 | mpdwidget = wibox.widget.textbox() 339 | vicious.register(mpdwidget, vicious.widgets.mpd, 340 | function(widget, args) 341 | mpdicon:set_image(beautiful.widget_play) 342 | local bg = beautiful.bg_focus 343 | 344 | local italic = "" 345 | local like = "" 346 | local color = beautiful.fg_focus 347 | local f = io.popen("pgrep pianobar") 348 | 349 | if f:read("*line") then 350 | f = io.open(os.getenv("HOME") .. "/.config/pianobar/isplaying") 351 | play_or_pause = f:read("*line") 352 | f:close() 353 | 354 | -- Current song 355 | f = io.open(os.getenv("HOME") .. "/.config/pianobar/nowplaying") 356 | text = f:read("*line"):match("(.*)") 357 | f:close() 358 | 359 | -- Awaiting song 360 | if text:match(" - $") then text = "..." end 361 | 362 | -- Loved song 363 | if text:find("%(like%)") then like = "💕" end 364 | 365 | -- Ampersands 366 | if text:find("&") then text = text:gsub("&","and") end 367 | 368 | -- Paused 369 | if play_or_pause == "0" then 370 | if text:len() > 35 then mpdwidget.width = mpdwidth end 371 | italic = "font_style='italic'" 372 | mpdicon:set_image(beautiful.widget_pause) 373 | info = like .. awful.util.escape(text:gsub("%(like%)","")) 374 | else 375 | mpdwidget.width = 0 376 | local helpers = require("vicious.helpers") 377 | info = like .. awful.util.escape(helpers.scroll(text:gsub("%(like%)",""), 30, mpdwidget)) 378 | end 379 | else 380 | -- Stopped 381 | mpdwidget.width = 0 382 | mpdicon:set_image(beautiful.widget_mpd) 383 | bg = beautiful.bg_normal 384 | color = beautiful.fg_normal 385 | info = "..." 386 | end 387 | 388 | return "" .. info .. "" 390 | end, 391 | 3 392 | ) 393 | 394 | -- Buttons 395 | mpdwidget:buttons(awful.util.table.join( 396 | awful.button({ }, 1, 397 | function() 398 | local f = io.popen("pgrep pianobar") 399 | p = f:read("*a"):match("([0-9]*)") 400 | if p == "" then 401 | awful.util.spawn(pianobar_screen, false) 402 | else 403 | awful.util.spawn(pianobar_toggle, false) 404 | end 405 | end 406 | ), 407 | awful.button({ modkey }, 1, function() awful.util.spawn(pianobar_upcoming, false) end), 408 | awful.button({ }, 2, function() awful.util.spawn(pianobar_quit, false) end), 409 | awful.button({ }, 3, function() awful.util.spawn(pianobar_station, false) end), 410 | awful.button({ }, 4, function() awful.util.spawn(pianobar_next, false) end), 411 | awful.button({ }, 5, function() awful.util.spawn(pianobar_history, false) end) 412 | )) 413 | mpdicon:buttons(mpdwidget:buttons()) 414 | -- }}} 415 | 416 | -- {{{ Volume 417 | -- Cache 418 | vicious.cache(vicious.widgets.volume) 419 | 420 | -- Icon 421 | volicon = wibox.widget.imagebox() 422 | volicon:set_image(beautiful.widget_vol) 423 | 424 | -- Volume % 425 | volpct = wibox.widget.textbox() 426 | vicious.register(volpct, vicious.widgets.volume, "$1%", nil, "Master") 427 | 428 | -- Buttons 429 | volicon:buttons(awful.util.table.join( 430 | awful.button({ }, 1, 431 | function() awful.util.spawn("amixer -q set Master toggle", false) end 432 | ), 433 | awful.button({ }, 4, 434 | function() awful.util.spawn("amixer -q set Master 3+% unmute", false) end 435 | ), 436 | awful.button({ }, 5, 437 | function() awful.util.spawn("amixer -q set Master 3-% unmute", false) end 438 | ) 439 | )) 440 | volpct:buttons(volicon:buttons()) 441 | volspace:buttons(volicon:buttons()) 442 | -- }}} 443 | 444 | -- {{{ Battery 445 | -- Battery attributes 446 | local bat_state = "" 447 | local bat_charge = 0 448 | local bat_time = 0 449 | local blink = true 450 | 451 | -- Icon 452 | baticon = wibox.widget.imagebox() 453 | baticon:set_image(beautiful.widget_batfull) 454 | 455 | -- Charge % 456 | batpct = wibox.widget.textbox() 457 | vicious.register(batpct, vicious.widgets.bat, 458 | function(widget, args) 459 | bat_state = args[1] 460 | bat_charge = args[2] 461 | bat_time = args[3] 462 | 463 | if args[1] == "-" then 464 | if bat_charge > 70 then 465 | baticon:set_image(beautiful.widget_batfull) 466 | elseif bat_charge > 30 then 467 | baticon:set_image(beautiful.widget_batmed) 468 | elseif bat_charge > 10 then 469 | baticon:set_image(beautiful.widget_batlow) 470 | else 471 | baticon:set_image(beautiful.widget_batempty) 472 | end 473 | else 474 | baticon:set_image(beautiful.widget_ac) 475 | if args[1] == "+" then 476 | blink = not blink 477 | if blink then 478 | baticon:set_image(beautiful.widget_acblink) 479 | end 480 | end 481 | end 482 | 483 | return args[2] .. "%" 484 | end, 485 | nil, 486 | "BAT0" 487 | ) 488 | 489 | -- Buttons 490 | function popup_bat() 491 | local state = "" 492 | if bat_state == "↯" then 493 | state = "Full" 494 | elseif bat_state == "↯" then 495 | state = "Charged" 496 | elseif bat_state == "+" then 497 | state = "Charging" 498 | elseif bat_state == "-" then 499 | state = "Discharging" 500 | elseif bat_state == "⌁" then 501 | state = "Not charging" 502 | else 503 | state = "Unknown" 504 | end 505 | 506 | naughty.notify { 507 | text = "Charge : " .. bat_charge .. "%\nState : " .. state .. 508 | " (" .. bat_time .. ")", timeout = 5, hover_timeout = 0.5 509 | } 510 | end 511 | batpct:buttons(awful.util.table.join(awful.button({ }, 1, popup_bat))) 512 | baticon:buttons(batpct:buttons()) 513 | -- }}} 514 | 515 | -- vim: ft=lua ts=2 sts=2 sw=2 et 516 | --------------------------------------------------------------------------------