Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Major spring clean. 'New' setup on a new laptop. New setup on a new l…

…aptop.

Signed-off-by: Jack Holborn <holborn79@gmail.com>
  • Loading branch information...
commit 2ac3db19eb7e1d21f1f646c8e7654af52722e42a 1 parent fe42fe4
@JackH79 authored
Showing with 833 additions and 3,501 deletions.
  1. +0 −29 .Xdefaults
  2. +0 −1  .Xmodmap
  3. BIN  .background/bgday.png
  4. BIN  .background/bgnight.png
  5. +24 −14 .bashrc
  6. +0 −1  .config/Xcolours/colours
  7. +0 −27 .config/Xcolours/night
  8. +69 −131 .config/awesome/bindings.lua
  9. +0 −119 .config/awesome/calendar2.lua
  10. +0 −19 .config/awesome/coloursday.lua
  11. +0 −19 .config/awesome/coloursnight.lua
  12. +72 −69 .config/awesome/creation.lua
  13. +27 −59 .config/awesome/menu.lua
  14. +41 −11 .config/awesome/rc.lua
  15. +1 −2  .config/awesome/remind.lua
  16. +10 −3 .config/awesome/signals.lua
  17. +37 −38 .config/awesome/tags.lua
  18. +0 −38 .config/awesome/themeday.lua
  19. +0 −38 .config/awesome/themenight.lua
  20. +0 −25 .config/awesome/themes.lua
  21. BIN  .config/awesome/themes/day/spacer.png
  22. BIN  .config/awesome/themes/day/submenu.png
  23. BIN  .config/awesome/themes/day/taglist/squarefw.png
  24. BIN  .config/awesome/themes/day/taglist/squarew.png
  25. BIN  .config/awesome/themes/day/tasklist/floatingw.png
  26. +0 −38 .config/awesome/themes/day/theme.lua
  27. +0 −20 .config/awesome/themes/day/worldmap.vim
  28. BIN  .config/awesome/themes/night/spacer.png
  29. BIN  .config/awesome/themes/night/submenu.png
  30. BIN  .config/awesome/themes/night/taglist/squarefw.png
  31. BIN  .config/awesome/themes/night/taglist/squarew.png
  32. BIN  .config/awesome/themes/night/tasklist/floatingw.png
  33. +0 −40 .config/awesome/themes/night/theme.lua
  34. +0 −20 .config/awesome/themes/night/worldmap.vim
  35. 0  .config/awesome/themes/theme_to_use
  36. +132 −135 .config/awesome/widgetsbottom.lua
  37. +24 −25 .config/awesome/widgetstop.lua
  38. +0 −308 .config/luakit/binds.lua
  39. +0 −111 .config/luakit/globals.lua
  40. +0 −149 .config/luakit/modes.lua
  41. +0 −113 .config/luakit/rc.lua
  42. +0 −69 .config/luakit/theme.lua
  43. +0 −370 .config/luakit/webview.lua
  44. +0 −836 .config/luakit/window.lua
  45. +185 −60 .config/ranger/apps.py
  46. +96 −3 .config/ranger/commands.py
  47. +20 −4 .config/ranger/options.py
  48. +0 −2  .gtkrc-2.0.mine
  49. +0 −24 .msmtprc
  50. +0 −27 .mutt/256colors.muttrc
  51. +0 −73 .mutt/colours.muttrc
  52. +0 −16 .mutt/gmail.muttrc
  53. +0 −16 .mutt/gmailhol.muttrc
  54. +0 −1  .mutt/macros
  55. +0 −16 .mutt/sidebar.muttrc
  56. +0 −156 .muttrc
  57. +12 −12 .ncmpcpp/config
  58. +0 −33 .offlineimaprc
  59. +40 −74 .reminders
  60. +10 −3 .vimrc
  61. +32 −3 .xinitrc
  62. +0 −99 .zshrc
  63. +1 −2  README
  64. BIN  cleanday.png
  65. BIN  cleannight.png
  66. BIN  dirtyday.png
  67. BIN  dirtynight.png
View
29 .Xdefaults
@@ -1,29 +0,0 @@
-!URXVT
-URxvt*termName: rxvt
-URxvt*scrollBar: false
-URxvt*urlLauncher: firefox
-URxvt*buffered: true
-URxvt*font: xft:terminus:pixelsize=12
-!URxvt*font: -*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*
-!URxvt*boldFont: -*-terminus-bold-*-*-*-12-*-*-*-*-*-*-*
-!URxvt*italicFont: -*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*
-!URxvt*boldItalicFont: -*-terminus-bold-*-*-*-12-*-*-*-*-*-*-*
-URxvt*transparent: true
-URxvt*shading: 100
-URxvt.perl-ext-common: default,url-select
-URxvt.keysym.M-u: perl:url-select:select_next
-URxvt.urlLauncher: luakit
-URxvt.underlineURLs: true
-
-!XTERM
-xterm*toolBar: false
-xterm*scrollBar: false
-xterm*background: #1a1918
-xterm*foreground: #a4a4a4
-xterm*font: -*-terminus-medium-*-*-*-12-*-*-*-*-*-*-*
-
-!COLOUR THEME
-#include "/home/jack/.config/Xcolours/colours"
-
-!XSCREENSAVER
-#include "/home/jack/.config/Xcolours/xscreendark"
View
1  .Xmodmap
@@ -1 +0,0 @@
-keycode 135 = Super_L
View
BIN  .background/bgday.png
Deleted file not rendered
View
BIN  .background/bgnight.png
Deleted file not rendered
View
38 .bashrc
@@ -1,26 +1,36 @@
-#PS1='\[\033[00;32m\]\u\[\033[00m\]@\[\033[00;32m\]\w\[\033[00;34m\]\n\[\033[00;34m\]└─\[\033[01;34m\]\$\[\033[00m\] '
-PS1='\[\e[0;32m\]\u\[\e[m\]@\[\e[0;32m\]\h \[\e[1;32m\]\w\[\e[m\] '
-export PATH="$PATH:/home/jack/bin"
+PS1='\[\e[0;34m\]\D{%I:%M%P}>>\[\e[1;34m\]\w\[\e[m\] '
-#ALIASES
+### ADD USER'S BIN PATH TO ENVIRONMENT
+PATH="${PATH}:$HOME/.bin"
+
+### USE DIRCOLOURS IN LS
+eval $( dircolors -b $HOME/.bin/LS_COLORS )
+
+### ALIASES
alias ls='ls -ohF --group-directories-first --color=always'
-alias remc='remind -cc+4 -m /home/jack/.reminders'
-alias :q='exit'
alias grep='grep --color=auto'
-alias ping='ping -c 3'
-alias dvd='mplayer -channels 6 -af hrtf dvd://'
+alias sleep='sudo pm-suspend'
+alias dvd='mplayer -channels 6 -af hrtf /dev/sr0'
alias copy='rsync -aP'
-#COLOURS IN MAN
-export LESS_TERMCAP_mb=$'\E[00;32m'
-export LESS_TERMCAP_md=$'\E[01;32m'
+alias rem='remind /home/jack/.reminders'
+alias remc='remind -m -cuc+2 /home/jack/.reminders'
+alias aw='wiki-search'
+alias :q='exit'
+alias m='udisks --mount'
+alias um='udisks --unmount'
+
+### COLOURS IN MAN
+export LESS_TERMCAP_mb=$'\E[00;34m'
+export LESS_TERMCAP_md=$'\E[01;34m'
export LESS_TERMCAP_me=$'\E[0m'
export LESS_TERMCAP_se=$'\E[0m'
export LESS_TERMCAP_so=$'\E[01;44;33m'
export LESS_TERMCAP_ue=$'\E[0m'
-export LESS_TERMCAP_us=$'\E[01;31m'
+export LESS_TERMCAP_us=$'\E[01;36m'
+### Browsers
if [ -n "$DISPLAY" ]; then
- BROWSER=luakit
+ BROWSER=opera
else
- BROWSER=w3m
+ BROWSER=links
fi
View
1  .config/Xcolours/colours
@@ -1 +0,0 @@
-#include "/home/jack/.config/Xcolours/night"
View
27 .config/Xcolours/night
@@ -1,27 +0,0 @@
-!NIGHT
-*background: #1a1918
-*foreground: #807b76
-!black
-*color0 : #1a1a1a
-*color8 : #4c4c4c
-!red
-*color1 : #b23535
-*color9 : #ff4b4b
-!green
-*color2 : #60801f
-*color10: #9bcd32
-!yellow
-*color3 : #be6e00
-*color11: #d79b1e
-!blue
-*color4 : #1f6080
-*color12: #329bcd
-!magenta
-*color5 : #8f46b2
-*color13: #cd64ff
-!cyan
-*color6 : #73afb4
-*color14: #9bcdff
-!white
-*color7 : #b2b2b2
-*color15: #FFFFFF
View
200 .config/awesome/bindings.lua
@@ -1,176 +1,114 @@
-- BINDINGS
--- helpers for world clock
-local function time_cet()
- local time = os.time()
- time2 = time - (8*3600)
- local new_time = os.date("%a, %I:%M%P", time2)
- return new_time
-end
-local function time_utc()
- local time = os.time()
- time2 = time - (9*3600)
- local new_time = os.date("%a, %I:%M%P", time2)
- return new_time
-end
-local function time_nzst()
- local time = os.time()
- time2 = time + (2*3600)
- local new_time = os.date("%a, %I:%M%P", time2)
- return new_time
-end
-local function time_ckt()
- local time = os.time()
- time2 = time - (20*3600)
- local new_time = os.date("%a, %I:%M%P", time2)
- return new_time
-end
-local function time_pst()
- local time = os.time()
- time2 = time - (17*3600)
- local new_time = os.date("%a, %I:%M%P", time2)
- return new_time
-end
-local function time_est()
- local time = os.time()
- time2 = time - (14*3600)
- local new_time = os.date("%a, %I:%M%P", time2)
- return new_time
-end
-
--- Mouse bindings
+-- Rat rules
root.buttons(awful.util.table.join(
- awful.button({ }, 3, function () mainmenu:toggle() end),
+ awful.button({ }, 3, function () mymainmenu:toggle() end),
awful.button({ }, 4, awful.tag.viewnext),
- awful.button({ }, 5, awful.tag.viewprev))
-)
+ awful.button({ }, 5, awful.tag.viewprev)
+))
+
+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))
--- Key bindings
-- Global
globalkeys = awful.util.table.join(
-- Awesome
- awful.key({ modkey, "Shift" }, "q", awesome.quit ),
- awful.key({ modkey, "Shift" }, "r", awesome.restart ),
- awful.key({ modkey, "Shift" }, "F11", function ()
- d = io.open("/home/jack/.config/awesome/themes/theme_to_use", "w")
- d:write("day")
- d:close()
- end, awesome.restart ),
- awful.key({ modkey, "Shift" }, "F12", function ()
- n = io.open("/home/jack/.config/awesome/themes/theme_to_use", "w")
- n:write("night")
- n:close()
- end, awesome.restart ),
+ awful.key({ modkey, "Shift" }, "q", awesome.quit ),
+ awful.key({ modkey, "Shift" }, "r", awesome.restart ),
+ awful.key({ modkey, }, "w", function () mymainmenu:show({keygrabber=true, coords={x=0, y=14} }) end),
-- Tags
- awful.key({ modkey, }, "Prior", awful.tag.viewprev ),
- awful.key({ modkey, }, "Next", awful.tag.viewnext ),
- awful.key({ modkey, "Shift" }, "Prior", shifty.shift_prev ),
- awful.key({ modkey, "Shift" }, "Next", shifty.shift_next ),
- awful.key({ modkey }, "z", shifty.del ),
- awful.key({ modkey, }, "Escape", awful.tag.history.restore),
- awful.key({ modkey, }, "Right", function ()
+ awful.key({ modkey, }, "Prior", awful.tag.viewprev ),
+ awful.key({ modkey, }, "Next", awful.tag.viewnext ),
+ awful.key({ modkey, "Shift" }, "Prior", shifty.shift_prev ),
+ awful.key({ modkey, "Shift" }, "Next", shifty.shift_next ),
+ awful.key({ modkey }, "z", shifty.del ),
+ awful.key({ modkey, }, "Escape", awful.tag.history.restore),
+ awful.key({ modkey, }, "Right", function ()
awful.client.focus.byidx( 1)
if client.focus then
client.focus:raise()
end
end),
- awful.key({ modkey, }, "Left", function ()
+ awful.key({ modkey, }, "Left", function ()
awful.client.focus.byidx(-1)
if client.focus then
client.focus:raise()
end
end),
- awful.key({ modkey, "Control" }, "Right", function () awful.tag.incmwfact( 0.05) end),
- awful.key({ modkey, "Control" }, "Left", function () awful.tag.incmwfact(-0.05) end),
+ awful.key({ modkey, }, "Tab", function ()
+ awful.client.focus.byidx( 1)
+ if client.focus then
+ client.focus:raise()
+ end
+ end),
+ awful.key({ modkey, "Control" }, "Right", function () awful.tag.incmwfact( 0.05) end),
+ awful.key({ modkey, "Control" }, "Left", function () awful.tag.incmwfact(-0.05) end),
-- Programs
-- launchers
- awful.key({ modkey, }, "w", function () mainmenu:show({keygrabber=true, coords={x=0, y=14} }) end),
- awful.key({ }, "XF86PowerOff", function () leavemenu:show({keygrabber=true, coords={x=0, y=14} }) end),
- awful.key({ modkey, }, "p", function () awful.util.spawn("dmenu_run -fn 'terminus' -nb '#000000' -nf '#4c4c4c' -sb '#000000' -sf '#be6e00'") end),
- awful.key({ modkey, "Shift" }, "Return", function () awful.util.spawn(terminal) end),
+ awful.key({ modkey, }, "p", function () awful.util.spawn("dmenu_run -fn -*-terminus-*-*-*-*-12-*-*-*-*-*-*-* -nb '#1a1a1a' -nf '#b2b2b2' -sb '#1a1a1a' -sf '#2222ff'") end),
+ awful.key({ modkey, }, "Return", function () awful.util.spawn("urxvtc -e tmux") end),
-- miscellaneous
- awful.key({ }, "Print", function () awful.util.spawn("scrot -b") end),
- awful.key({ }, "XF86Calculator", function () awful.util.spawn("speedcrunch") end),
- awful.key({ modkey, "Shift" }, "x", function () awful.util.spawn("xkill") end),
- awful.key({ modkey, "Shift" }, "l", function () awful.util.spawn(terminal .. " -e slock") end),
- awful.key({ modkey }, "F8", function () awful.util.spawn("truecrypt") end),
- awful.key({ modkey, "Shift" }, "t", function () naughty.notify({ text = "" .. colbyel .. "────────────────────────────────── World Clock ─────────────────────────────────" .. coldef .. colblk .."\nOOO OOOO OO OOOOO OOOOOOOO\nOO " .. coldef .. colyel .. "London" .. coldef .. colblk .. " O OOOOOOOOOOO O OOOO O OO O OOOOOO\n O" .. coldef .. colbyel .. time_utc() .. coldef .. colblk .. "OO OO OOOOOOOOOOOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOO OO OO\n OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO O OOO OOOOOOOOOO OOO\n OOOOO" .. coldef .. colyel .. "Düsseldorf" .. coldef .. colblk .. "OOOOOOOOOOOOOOOOOO " .. coldef .. colyel .. "Vancouver" .. coldef .. colblk .. "OOOOOOOOOO\n OOOOO " .. coldef .. colbyel .. time_cet() .. coldef .. colblk .. "OOOOOOOOOOOOOOOO O " .. coldef .. colbyel .. time_pst() .. coldef .. colblk .. "OOO\n OO OOOOOOOOOOOOOOOOOOO O O OOOOOOOO" .. coldef .. colyel .. "Woods Hole" .. coldef .. colblk .. "\n OOOOOOOOOOOOOOOOOOOOOOOOOOOOO OOOO " .. coldef .. colbyel .. time_est() .. coldef .. colblk .. "\n OOOOOOOOOOOO OOOO OOOO OOOOO OO\n OOOOOOOOOOOOO O O OO OO\n OOOOOOOOOOOOO O OOOO\n OOOOO O O OOO OOOOOOO\n OOOOOO O OO " .. coldef .. colyel .. "Rarotonga" .. coldef .. colblk .. " OOOOOOOOO\n OOOOOO O O " .. coldef .. colbyel .. time_ckt() .. coldef .. colblk .. " OOOOOOOO\n OOOOO O OOOOOOOO OOOOOO\n OOO OOOOOOOOO OOOO\n O OO " .. coldef .. colyel .. "Tauranga" .. coldef .. colblk .. " OOOO\n " .. coldef .. colbyel .. time_nzst() .. coldef .. colblk .. " OO\n O" .. coldef .. "", border_color = "#1a1a1a", timeout = 20, hover_timeout = 0.5 }) end),
- awful.key({ modkey, "Control" }, "r", function () naughty.notify({ text = cal_gett(), border_color = "#1a1a1a", timeout = 20, hover_timeout = 0.5 }) end),
+ awful.key({ modkey, "Shift" }, "x", function () awful.util.spawn("xkill") end),
+ awful.key({ modkey, "Shift" }, "l", function () awful.util.spawn(terminal .. " -e slock") end),
+ awful.key({ modkey, }, "grave", function () awful.util.spawn(terminal .. " -e htop") end),
+ -- remind output
+ awful.key({ modkey, "Control" }, "r", function () naughty.notify({ text = cal_gett(), border_color = brblk, timeout = 20, hover_timeout = 0.5 }) end),
-- volume + mpd
- awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q sset Master 2dB-") end),
- awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q sset Master 2dB+") end),
- awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpc stop") end),
- awful.key({ }, "XF86AudioPlay", function () awful.util.spawn("mpc toggle") end),
- awful.key({ }, "XF86AudioNext", function () awful.util.spawn("mpc next") end),
- awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
- awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer -q sset Master toggle") end),
- awful.key({ modkey, }, "m", function () awful.util.spawn(terminal .. " -e ncmpcpp") end),
- -- office
- awful.key({ modkey, }, "F2", function () awful.util.spawn("libreoffice -writer") end),
- awful.key({ modkey, }, "F3", function () awful.util.spawn("libreoffice -calc") end),
- awful.key({ modkey, }, "F4", function () awful.util.spawn("libreoffice -impress") end),
- awful.key({ modkey, }, "a", function () awful.util.spawn("abiword") end),
- awful.key({ modkey, }, "s", function () awful.util.spawn("gnumeric") end),
+ awful.key({ }, "XF86AudioLowerVolume", function () awful.util.spawn("amixer -q sset Master 2dB-") end),
+ awful.key({ }, "XF86AudioRaiseVolume", function () awful.util.spawn("amixer -q sset Master 2dB+") end),
+ awful.key({ }, "XF86AudioStop", function () awful.util.spawn("mpc stop") end),
+ awful.key({ }, "XF86AudioPlay", function () awful.util.spawn("mpc toggle") end),
+ awful.key({ }, "XF86AudioNext", function () awful.util.spawn("mpc next") end),
+ awful.key({ }, "XF86AudioPrev", function () awful.util.spawn("mpc prev") end),
+ awful.key({ }, "XF86AudioMute", function () awful.util.spawn("amixer -q sset Master toggle") end),
+ awful.key({ modkey, }, "m", function () awful.util.spawn(terminal .. " -e ncmpcpp") end),
-- web
- awful.key({ modkey }, "XF86HomePage", function () awful.util.spawn("firefox") end),
- awful.key({ }, "XF86HomePage", function () awful.util.spawn("luakit") end),
- awful.key({ }, "XF86Mail", function () awful.util.spawn(terminal .. " -e mutt") end),
- awful.key({ modkey, }, "i", function () awful.util.spawn(terminal .. " -e irssi") end),
- awful.key({ modkey, }, "d", function () awful.util.spawn(terminal .. " -e wicd-curses") end),
--- awful.key({ modkey, "Shift" }, "d", function () awful.util.spawn(terminal .. " -e sudo wvdial optus") end),
- awful.key({ modkey, }, "F12", function () awful.util.spawn(terminal .. " -e rtorrent") end),
- awful.key({ modkey, }, "c", function () awful.util.spawn(terminal .. " -e canto -u") end),
+ awful.key({ modkey }, "o", function () awful.util.spawn("opera") end),
+ awful.key({ modkey }, "f", function () awful.util.spawn("firefox") end),
+ awful.key({ modkey, }, "d", function () awful.util.spawn(terminal .. " -e wicd-curses") end),
-- file managers
- awful.key({ modkey, }, "r", function () awful.util.spawn(terminal .. " -e ranger") end),
- awful.key({ modkey, }, "t", function () awful.util.spawn("thunar") end),
+ awful.key({ modkey, }, "r", function () awful.util.spawn(terminal .. " -e ranger") end),
-- Layouts
- awful.key({ modkey, "Shift" }, "Right", function () awful.client.swap.byidx( 1) end),
- awful.key({ modkey, "Shift" }, "Left", function () awful.client.swap.byidx( -1) end),
--- awful.key({ modkey, "Control" }, "Right", function () awful.screen.focus_relative( 1) end),
--- awful.key({ modkey, "Control" }, "Left", function () awful.screen.focus_relative(-1) end),
- awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
+ awful.key({ modkey, "Shift" }, "Right", function () awful.client.swap.byidx( 1) end),
+ awful.key({ modkey, "Shift" }, "Left", function () awful.client.swap.byidx( -1) end),
+ awful.key({ modkey, }, "u", awful.client.urgent.jumpto),
-- Awesome
- awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
- awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
+ awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
+ awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
-- Prompts
- awful.key({ modkey, "Control", "Shift" }, "r", function () mypromptbox[mouse.screen]:run() end),
- awful.key({ modkey, "Shift" }, "x", function ()
- awful.prompt.run({ prompt = "Run Lua code: " },
- mypromptbox[mouse.screen].widget,
+ awful.key({ modkey, "Control", "Shift" }, "r", function () mypromptbox[mouse.screen]:run() end),
+ awful.key({ modkey, "Control", "Shift" }, "x", function ()
awful.prompt.run({ prompt = "Run Lua code: " },
mypromptbox[mouse.screen].widget,
awful.util.eval, nil,
- awful.util.getdir("cache") .. "/history_eval"))
+ awful.util.getdir("cache") .. "/history_eval")
end)
)
-- Clients
clientkeys = awful.util.table.join(
- awful.key({ modkey, }, "o", 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, "Control" }, "o", awful.client.movetoscreen ),
- awful.key({ modkey, }, "n", function (c) c.minimized = not c.minimized end),
- awful.key({ modkey, "Shift" }, "n", function ()
- local allclients = client.get(mouse.screen)
- for _,c in ipairs(allclients) do
- if c.minimized and c:tags()[mouse.screen] == awful.tag.selected(mouse.screen) then
- c.minimized = false client.focus = c c:raise()
- return
- end
- end
+ awful.key({ modkey, "Shift" }, "f", function (c) c.fullscreen = not c.fullscreen end),
+ awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
+ awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
+ awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
+ awful.key({ modkey, }, "o", awful.client.movetoscreen ),
+ awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
+ awful.key({ modkey, }, "n", function (c)
+ c.minimized = true
end),
- awful.key({ modkey, }, "f", function (c)
- c.maximized_horizontal = not c.maximized_horizontal c.maximized_vertical = not c.maximized_vertical
- end))
+ awful.key({ modkey, }, "m", function (c)
+ c.maximized_horizontal = not c.maximized_horizontal
+ c.maximized_vertical = not c.maximized_vertical
+ end)
+)
--- WORKSPACES
--- shifty:
+-- Shifty tag manipulation
for i=1,9 do
globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey }, i, function ()
local t = awful.tag.viewonly(shifty.getpos(i))
View
119 .config/awesome/calendar2.lua
@@ -1,119 +0,0 @@
--- original code made by Bzed and published on http://awesome.naquadah.org/wiki/Calendar_widget
--- modified by Marc Dequènes (Duck) <Duck@DuckCorp.org> (2009-12-29), under the same licence,
--- and with the following changes:
--- + transformed to module
--- + the current day formating is customizable
-
-local string = string
---local print = print
-local tostring = tostring
-local os = os
-local capi = {
- mouse = mouse,
- screen = screen
-}
-local awful = require("awful")
-local naughty = require("naughty")
-module("calendar2")
-
-local calendar = {}
-local current_day_format = "<u>%s</u>"
-
-function displayMonth(month,year,weekStart)
- local t,wkSt=os.time{year=year, month=month+1, day=0},weekStart or 1
- local d=os.date("*t",t)
- local mthDays,stDay=d.day,(d.wday-d.day-wkSt+1)%7
-
- --print(mthDays .."\n" .. stDay)
- local lines = " "
-
- for x=0,6 do
- lines = lines .. os.date("<span color='#60801f'>%a</span> ",os.time{year=2006,month=1,day=x+wkSt})
- end
-
- lines = lines .. "\n" .. os.date("<span color='#1a1918'> %V</span>",os.time{year=year,month=month,day=1})
-
- local writeLine = 1
- while writeLine < (stDay + 1) do
- lines = lines .. " "
- writeLine = writeLine + 1
- end
-
- for d=1,mthDays do
- local x = d
- local t = os.time{year=year,month=month,day=d}
- if writeLine == 8 then
- writeLine = 1
- lines = lines .. "\n" .. os.date("<span color='#1a1918'> %V</span>",t)
- end
- if os.date("%Y-%m-%d") == os.date("%Y-%m-%d", t) then
- x = string.format(current_day_format, d)
- end
- if (#(tostring(d)) == 1) then
- x = " " .. x
- end
- lines = lines .. " " .. x
- writeLine = writeLine + 1
- end
- local header = os.date("<span color='#be6e00'>─────────── Calendar ──────────\n</span><span color='#1f6080'>%B %Y</span>",os.time{year=year,month=month,day=1})
-
- return header .. "\n" .. lines
-end
-
-function switchNaughtyMonth(switchMonths)
- if (#calendar < 3) then return end
- local swMonths = switchMonths or 1
- calendar[1] = calendar[1] + swMonths
- calendar[3].box.widgets[2].text = string.format('<span font_desc="%s">%s</span>', "Terminus", displayMonth(calendar[1], calendar[2], 2))
-end
-
-function addCalendarToWidget(mywidget, custom_current_day_format)
- if custom_current_day_format then current_day_format = custom_current_day_format end
-
-mywidget:add_signal('mouse::enter', function ()
-local month, year = os.date('%m'), os.date('%Y')
- calendar = { month, year, naughty.notify({
- text = string.format('<span font_desc="%s">%s</span>', "Terminus", displayMonth(month, year, 2)),
- border_color = "#1a1918",
- timeout = 0,
- hover_timeout = 0.5,
- }) }
-end )
---awful.key({ modkey, "Control" }, "c", function ()
---local month, year = os.date('%m'), os.date('%Y')
--- calendar = { month, year, naughty.notify({
--- text = string.format('<span font_desc="%s">%s</span>', "Terminus", displayMonth(month, year, 2)),
--- border_color = "#1a1918",
--- timeout = 20,
--- hover_timeout = 0.5,
---}) } end )
-
-mywidget:add_signal('mouse::leave', function () naughty.destroy(calendar[3]) end)
-
- mywidget:buttons(awful.util.table.join(
- awful.button({ }, 1, function()
- switchNaughtyMonth(-1)
- end),
- awful.button({ }, 3, function()
- switchNaughtyMonth(1)
- end),
- awful.button({ }, 4, function()
- switchNaughtyMonth(-1)
- end),
- awful.button({ }, 5, function()
- switchNaughtyMonth(1)
- end),
- awful.button({ 'Shift' }, 1, function()
- switchNaughtyMonth(-12)
- end),
- awful.button({ 'Shift' }, 3, function()
- switchNaughtyMonth(12)
- end),
- awful.button({ 'Shift' }, 4, function()
- switchNaughtyMonth(-12)
- end),
- awful.button({ 'Shift' }, 5, function()
- switchNaughtyMonth(12)
- end)
- ))
-end
View
19 .config/awesome/coloursday.lua
@@ -1,19 +0,0 @@
--- COLOURSDAY
-blk = "#777777"
-red = "#b22222"
-gre = "#37451e"
-yel = "#886100"
-blu = "#00457f"
-mag = "#8800cc"
-cya = "#007f7f"
-whi = "#cccccc"
-brblk = "#919191"
-brred = "#ff4e3b"
-brgre = "#739925"
-bryel = "#daa520"
-brblu = "#0055ed"
-brmag = "#da00d2"
-brcya = "#00cbcb"
-brwhi = "#888888"
-trblk = "#000000"
-trwhi = "#ebebdc"
View
19 .config/awesome/coloursnight.lua
@@ -1,19 +0,0 @@
--- COLOURSNIGHT
-blk = "#262626"
-red = "#b23535"
-gre = "#60801f"
-yel = "#be6e00"
-blu = "#1f6080"
-mag = "#8f46b2"
-cya = "#73afb4"
-whi = "#b2b2b2"
-brblk = "#333333"
-brred = "#ff4b4b"
-brgre = "#9bcd32"
-bryel = "#d79b1e"
-brblu = "#329bcd"
-brmag = "#cd64ff"
-brcya = "#9bcdff"
-brwhi = "#ffffff"
-trblk = "#0d0d0d"
-trwhi = "#ffffff"
View
141 .config/awesome/creation.lua
@@ -1,31 +1,33 @@
-- CREATION
--- SYSTRAY
-mysystray = widget({ type = "systray" })
-
--- WIBOXES
+-- WIBOX
mywibox = {}
infobox = {}
mypromptbox = {}
--- taglist
+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)
- )
+ 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)
+ )
shifty.taglist = mytaglist
--- tasklist
+
mytasklist = {}
mytasklist.buttons = awful.util.table.join(
awful.button({ }, 1, function (c)
- if not c:isvisible() then
- awful.tag.viewonly(c:tags()[1])
+ if c == client.focus then
+ c.minimized = true
+ else
+ if not c:isvisible() then
+ awful.tag.viewonly(c:tags()[1])
+ end
+ -- This will also un-minimize the client, if needed
+ client.focus = c
+ c:raise()
end
- client.focus = c
- c:raise()
end),
awful.button({ }, 3, function ()
if instance then
@@ -37,62 +39,63 @@ mytasklist.buttons = awful.util.table.join(
end),
awful.button({ }, 4, function ()
awful.client.focus.byidx(1)
- if client.focus then
- client.focus:raise()
- end
+ 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)
-)
--- Create for each screen
+ if client.focus then client.focus:raise() end
+ end))
+
+-- Create for each screen ...
for s = 1, screen.count() do
- mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
- mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
--- mytasklist[s] = awful.widget.tasklist(
--- function(c)
--- return awful.widget.tasklist.label.currenttags(c, s)
--- end,
--- mytasklist.buttons
--- )
- mytasklist[s] = awful.widget.tasklist(
- function(c)
- local text, bg, status_image, icon = awful.widget.tasklist.label.currenttags(c, s)
- return text, bg, status_image, nil
- end,
- mytasklist.buttons
- )
- -- top box
+ -- a promptbox
+ mypromptbox[s] = awful.widget.prompt()
+ -- a taglist widget
+ mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.filter.all, mytaglist.buttons)
+ -- a tasklist widget
+ mytasklist[s] = awful.widget.tasklist(s, awful.widget.tasklist.filter.currenttags, mytasklist.buttons)
+ -- create wiboxes
+ -- top
mywibox[s] = awful.wibox({ position = "top", height = "14", screen = s })
- mywibox[s].widgets = { {
- mytaglist[s], spacerwidget,
- mypromptbox[s], layout = awful.widget.layout.horizontal.leftright },
- clockwidget,
- calwidget,
- weatherwidget,
- spacerwidget,
- s == 1 and mysystray or nil,
- mytasklist[s],
- layout = awful.widget.layout.horizontal.rightleft }
- -- bottom box
+ -- widgets left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(mytaglist[s])
+ left_layout:add(mypromptbox[s])
+ -- widgets right
+ local right_layout = wibox.layout.fixed.horizontal()
+ if s == 1 then right_layout:add(wibox.widget.systray()) end
+ right_layout:add(weatherwidget)
+ right_layout:add(calwidget)
+ right_layout:add(clockwidget)
+ -- combine above elements
+ local layout = wibox.layout.align.horizontal()
+ layout:set_left(left_layout)
+ layout:set_middle(mytasklist[s])
+ layout:set_right(right_layout)
+ mywibox[s]:set_widget(layout)
+ -- bottom
infobox[s] = awful.wibox({ position = "bottom", height = "14", screen = s })
- infobox[s].widgets = { {
- mpdwidget, layout = awful.widget.layout.horizontal.leftright },
- volwidget,
- batwidget,
- netupwidget, netdownwidget, netwidget,
- wifiupwidget, wifidownwidget, wifiwidget,
- fshwidget, fsrwidget,
- memwidget,
- tempwidget,
- cputwidget,
- layout = awful.widget.layout.horizontal.rightleft }
--- if infoswitch == 0 then
--- infobox[s].visible = false
--- else
--- infobox[s].visible = true
--- end
+ -- widgets left
+ local left_layout = wibox.layout.fixed.horizontal()
+ left_layout:add(mpdwidget)
+ -- widgets right
+ local right_layout = wibox.layout.fixed.horizontal()
+-- right_layout:add(netdownwidget)
+-- right_layout:add(netupwidget)
+ right_layout:add(netwidget)
+-- right_layout:add(wifidownwidget)
+-- right_layout:add(wifiupwidget)
+ right_layout:add(wifiwidget)
+ right_layout:add(cpuwidget)
+-- right_layout:add(tempwidget)
+ right_layout:add(memwidget)
+ right_layout:add(fsrwidget)
+ right_layout:add(fshwidget)
+ right_layout:add(batwidget)
+ right_layout:add(volwidget)
+ -- combine above elements
+ local layout = wibox.layout.align.horizontal()
+ layout:set_left(left_layout)
+ layout:set_right(right_layout)
+ infobox[s]:set_widget(layout)
end
View
86 .config/awesome/menu.lua
@@ -1,76 +1,44 @@
-- MENU
+-- sub menus
networkmenu = {
- { "luakit", "luakit" },
- { "firefox", "firefox" },
- { "mutt", terminal .. " -e mutt" },
- { "irssi", terminal .. " -e irssi" },
- { "wicd", terminal .. " -e wicd-curses" },
- { "wvdial", terminal .. " -e sudo wvdial optus" },
- { "rtorrent", terminal .. " -e rtorrent" }
+ { "opera", "opera" },
+ { "firefox", "firefox" }
}
officemenu = {
- { "abiword", "abiword" },
- { "writer", "libreoffice -writer" },
- { "gnumeric", "gnumeric" },
- { "calc", "libreoffice -calc" },
- { "impress", "libreoffice -impress" },
- { "galculator", "galculator" },
- { "r", terminal .. " -e R" }
+ { "writer", "libreoffice -writer" },
+ { "calc", "libreoffice -calc" },
+ { "impress", "libreoffice -impress" },
+ { "converter", "convertall" },
+ { "calculator", "kcalc" }
}
editorsmenu = {
- { "vim", terminal .. " -e vim" },
- { "geany", "geany" }
+ { "kate", "kate" }
}
graphicsmenu = {
- { "gimp", "gimp" },
- { "sxiv", "sxiv" },
- { "geeqie", "geeqie" }
-}
-mediamenu = {
- { "vlc", "vlc" },
- { "ncmpcpp", terminal .. " -e ncmpcpp" },
- { "audacity", "audacity" },
- { "avidemux", "avidemux2_gtk" }
+ { "gimp", "gimp" },
+ { "gwenview", "gwenview" },
+ { "digikam", "digikam" }
}
utilitiesmenu = {
- { "xfburn", "xfburn" },
- { "truecrypt", "truecrypt" }
-}
-monitormenu = {
- { "scroff", "xrandr --output LVDS --off" },
- { "scron", "xrandr --output LVDS --auto" },
- { "scrmax", "xrandr --output VGA-0 --preferred" }
-}
-systemmenu = {
- { "monitor", monitormenu },
- { "htop", terminal .. " -e htop" },
- { "kill", "xkill" }
+ { "truecrypt", "truecrypt" }
}
awesomemenu = {
- { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
- { "restart", awesome.restart },
- { "lock", terminal .. " -e xscreensaver-command --lock" },
- { "quit", awesome.quit },
- { "reboot", terminal .. " -e reboot" },
- { "shutdown", terminal .. " -e shutdown" }
+ { "lock", terminal .. " -e slock" },
+ { "restart", awesome.restart },
+ { "quit", awesome.quit },
+ { "reboot", terminal .. " -e dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart" },
+ { "shutdown", terminal .. " -e dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop" }
}
-mainmenu = awful.menu({
- items = {
- { "network", networkmenu },
- { "office", officemenu },
- { "editors", editorsmenu },
- { "graphics", graphicsmenu },
- { "media", mediamenu },
- { "utilities", utilitiesmenu },
- { "sytem", systemmenu },
- { "awesome", awesomemenu }
- }
-})
-leavemenu = awful.menu({
+-- main menu
+mymainmenu = awful.menu({
items = {
- { "quit", awesome.quit },
- { "reboot", terminal .. " -e dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart" },
- { "shutdown", terminal .. " -e dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop" }
+ { "network", networkmenu },
+ { "office", officemenu },
+ { "editors", editorsmenu },
+ { "graphics", graphicsmenu },
+ { "utilities", utilitiesmenu },
+ { "awesome", awesomemenu },
+ { "terminal", terminal }
}
})
View
52 .config/awesome/rc.lua
@@ -1,23 +1,53 @@
--- RC
--- General helpers
+-- LIBRARIES
require("awful")
require("awful.autofocus")
+require("awful.rules")
+require("wibox")
require("beautiful")
require("naughty")
require("vicious")
require("shifty")
-require("calendar2")
--- Defaults
-terminal = "urxvtc"
-editor = os.getenv("EDITOR") or "vim"
+--ERRORS
+-- Startup error handling
+if awesome.startup_errors then
+ naughty.notify({
+ preset = naughty.config.presets.critical,
+ title = "There were errors during startup!",
+ text = awesome.startup_errors
+ })
+end
+
+-- Runtime errors after startup
+do local in_error = false
+ awesome.connect_signal("debug::error",
+ function (err)
+ -- Make sure we don't go into an endless error loop
+ if in_error then return end
+ in_error = true
+ naughty.notify({
+ preset = naughty.config.presets.critical,
+ title = "An error occurred!",
+ text = err
+ })
+ in_error = false
+ end)
+end
+
+-- DEFAULTS
+terminal = "urxvtc"
+editor = os.getenv("EDITOR") or "vim"
editor_cmd = terminal .. " -e " .. editor
-browser = "luakit"
-modkey = "Mod4"
-altkey = "Mod1"
+browser = "opera"
+modkey = "Mod4"
+altkey = "Mod1"
+
+-- THEME
+beautiful.init("/home/jack/.config/awesome/themes/default/theme.lua")
--- Configs
-require("themes")
+-- CONFIGS
+require("colours")
+require("remind")
require("tags")
require("menu")
require("widgetstop")
View
3  .config/awesome/remind.lua
@@ -1,6 +1,5 @@
-- REMIND
-require("themes")
-require(themeset)
+require("colours")
function cal_gett()
local fp = io.popen("remind /home/jack/.reminders")
View
13 .config/awesome/signals.lua
@@ -1,5 +1,12 @@
-- SIGNALS
-client.add_signal("manage", function (c, startup)
+client.connect_signal("manage", function (c, startup)
+-- -- uncomment for sloppy focus (focus follows mouse)
+-- c:connect_signal("mouse::enter", function(c)
+-- if awful.layout.get(c.screen) ~= awful.layout.suit.magnifier
+-- and awful.client.focus.filter(c) then
+-- client.focus = c
+-- end
+-- end)
if not startup then
if not c.size_hints.user_position and not c.size_hints.program_position then
awful.placement.no_overlap(c)
@@ -8,5 +15,5 @@ client.add_signal("manage", function (c, startup)
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)
+client.connect_signal("focus", function(c) c.border_color = beautiful.border_focus end)
+client.connect_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
View
75 .config/awesome/tags.lua
@@ -1,6 +1,7 @@
--- TAGS + TAG MATCHING
--- layouts
-layouts = {
+-- TAGS
+-- Layouts
+layouts =
+{
awful.layout.suit.fair,
awful.layout.suit.fair.horizontal,
awful.layout.suit.tile,
@@ -8,51 +9,49 @@ layouts = {
awful.layout.suit.tile.bottom,
awful.layout.suit.tile.top,
awful.layout.suit.max,
- awful.layout.suit.floating,
+ awful.layout.suit.floating
}
--- shifty: predefined tags
+-- Shifty: predefined tags
shifty.config.tags = {
- ["1"] = { init = true, position = 1, layout = awful.layout.suit.tile },
- ["2-web"] = { position = 2, layout = awful.layout.suit.max, spawn = "luakit" },
- ["3-com"] = { position = 3, layout = awful.layout.suit.max, spawn = terminal .. " -e mutt" },
- ["4-office"] = { position = 4, layout = awful.layout.suit.tile.bottom },
- ["5-pdf"] = { position = 5, layout = awful.layout.suit.tile.bottom },
- ["6-gimp"] = { position = 6, layout = awful.layout.suit.floating, spawn = "gimp" },
- ["7-video"] = { position = 7, layout = awful.layout.suit.floating },
- ["8-music"] = { position = 8, layout = awful.layout.suit.tile.bottom },
- ["torrent"] = { layout = awful.layout.suit.max },
- ["picture"] = { layout = awful.layout.suit.max },
- ["dial"] = { layout = awful.layout.suit.max },
-}
+ ["1"] = { init = true, position = 1, layout = awful.layout.suit.tile },
+ ["2-net"] = { position = 2, layout = awful.layout.suit.max, spawn = "opera" },
+ ["3-office"] = { position = 3, layout = awful.layout.suit.max },
+ ["4-video"] = { position = 4, layout = awful.layout.suit.floating },
+ ["5-music"] = { position = 5, layout = awful.layout.suit.tile.bottom },
+ ["6-gimp"] = { position = 6, layout = awful.layout.suit.floating, spawn = "gimp" },
+ ["7"] = { position = 7, layout = awful.layout.suit.max },
+ ["8"] = { position = 8, layout = awful.layout.suit.max },
+ ["9"] = { position = 9, layout = awful.layout.suit.max },
+ ["torrent"] = { layout = awful.layout.suit.max },
+ ["picture"] = { layout = awful.layout.suit.max },
+ ["dial"] = { layout = awful.layout.suit.max },
+ }
--- shifty: tags matching and client rules
+-- Shifty: tags matching and client rules
shifty.config.apps = {
- -- web
- { match = { "Firefox", "luakit" }, tag = "2-web", },
- -- communications
- { match = { "mutt", "Lanikai" }, tag = "3-com", },
- { match = { "canto" }, tag = "3-com", },
- { match = { "irssi" }, tag = "3-com", },
+ -- net
+ { match = { "Opera", "Firefox" }, tag = "2-net", },
+ { match = { "mutt" }, tag = "2-net", },
+ { match = { "irssi" }, tag = "2-net", },
--office
- { match = { "VCLSalFrame", "abiword", "Gnumeric" }, tag = "4-office", },
- { match = { "geany" }, tag = "4-office", },
- { match = { "Zathura" }, tag = "5-pdf", },
+ { match = { "VCLSalFrame", "Zathura" }, tag = "3-office", },
+ { match = { "coed11.exe", "Artha" }, tag = "3-office", },
-- gimp
- { match = { "Gimp" }, tag = "6-gimp", },
- { match = { "gimp%-image%-window" }, geometry = {175,15,930,770}, border_width = 0 },
- { match = { "^gimp%-toolbox$" }, geometry = {0,15,175,770}, slave = true, border_width = 0 },
- { match = { "^gimp%-dock$" }, geometry = {1105,15,175,770}, slave = true, border_width = 0 },
+ { match = { "Gimp" }, tag = "6-gimp", },
+ { match = { "gimp%-image%-window" }, geometry = {176,15,929,800}, border_width = 0 },
+ { match = { "^gimp%-toolbox$" }, geometry = {0,15,175,800}, slave = true, border_width = 0 },
+ { match = { "^gimp%-dock$" }, geometry = {930,15,1280,800}, slave = true, border_width = 0 },
--video
- { match = { "MPlayer", "Vlc", "Audacity" }, tag = "7-video", },
- { match = { "MPlayer" }, geometry = {0,15,nil,nil}, float = true },
+ { match = { "MPlayer", "Vlc" }, tag = "4-video", geometry = {15,30,nil,nil}, float = true },
-- music
- { match = { "ncmpcpp" }, tag = "8-music", },
+ { match = { "ncmpcpp" }, tag = "5-music", },
-- miscellaneous
- { match = { "rtorrent" }, tag = "torrent", },
- { match = { "Geeqie", "sxiv", "feh", "qiv" }, tag = "picture", },
- { match = { "wicd%-curses", "wvdial" }, tag = "dial", },
-
+ { match = { "rtorrent" }, tag = "torrent", },
+ { match = { "sxiv" }, tag = "picture", },
+ { match = { "wicd%-curses" }, tag = "dial", },
+ { match = { "Convertall", "Kcalc" }, float = true },
+
-- client manipulation
{ match = { "" },
honorsizehints = false,
View
38 .config/awesome/themeday.lua
@@ -1,38 +0,0 @@
--- THEMEDAY
--- background
-beautiful.init("/home/jack/.config/awesome/themes/day/theme.lua")
-
--- xdefaults
-local x = io.open("/home/jack/.config/Xcolours/colours", "w")
-x:write('#include "/home/jack/.config/Xcolours/day"')
-x:close()
-
--- gtk
-local t = io.open("/home/jack/.gtkrc-2.0.mine", "w")
-t:write('gtk-theme-name="ACYL_Day"\ngtk-icon-theme-name="ACYL_Icons_Day"')
-t:close()
-
--- Spacer widget
-spacerwidget = widget({ type = "imagebox" })
- spacerwidget.image = image("/home/jack/.config/awesome/themes/day/spacer.png")
-
--- colours
-require("coloursday")
-
-coldef = "</span>"
-colblk = "<span color='" .. blk .. "'>"
-colred = "<span color='" .. red .. "'>"
-colgre = "<span color='" .. gre .. "'>"
-colyel = "<span color='" .. yel .. "'>"
-colblu = "<span color='" .. blu .. "'>"
-colmag = "<span color='" .. mag .. "'>"
-colcya = "<span color='" .. cya .. "'>"
-colwhi = "<span color='" .. whi .. "'>"
-colbblk = "<span color='" .. brblk .. "'>"
-colbred = "<span color='" .. brred .. "'>"
-colbgre = "<span color='" .. brgre .. "'>"
-colbyel = "<span color='" .. bryel .. "'>"
-colbblu = "<span color='" .. brblu .. "'>"
-colbmag = "<span color='" .. brmag .. "'>"
-colbcya = "<span color='" .. brcya .. "'>"
-colbwhi = "<span color='" .. brwhi .. "'>"
View
38 .config/awesome/themenight.lua
@@ -1,38 +0,0 @@
--- THEMENIGHT
--- background
-beautiful.init("/home/jack/.config/awesome/themes/night/theme.lua")
-
--- xdefaults
-local x = io.open("/home/jack/.config/Xcolours/colours", "w")
-x:write('#include "/home/jack/.config/Xcolours/night"')
-x:close()
-
--- gtk
-local t = io.open("/home/jack/.gtkrc-2.0.mine", "w")
-t:write('gtk-theme-name="ACYL_Night"\ngtk-icon-theme-name="ACYL_Icons_Night"')
-t:close()
-
--- Spacer widget
-spacerwidget = widget({ type = "imagebox" })
- spacerwidget.image = image("/home/jack/.config/awesome/themes/night/spacer.png")
-
--- colours
-require("coloursnight")
-
-coldef = "</span>"
-colblk = "<span color='" .. blk .. "'>"
-colred = "<span color='" .. red .. "'>"
-colgre = "<span color='" .. gre .. "'>"
-colyel = "<span color='" .. yel .. "'>"
-colblu = "<span color='" .. blu .. "'>"
-colmag = "<span color='" .. mag .. "'>"
-colcya = "<span color='" .. cya .. "'>"
-colwhi = "<span color='" .. whi .. "'>"
-colbblk = "<span color='" .. brblk .. "'>"
-colbred = "<span color='" .. brred .. "'>"
-colbgre = "<span color='" .. brgre .. "'>"
-colbyel = "<span color='" .. bryel .. "'>"
-colbblu = "<span color='" .. brblu .. "'>"
-colbmag = "<span color='" .. brmag .. "'>"
-colbcya = "<span color='" .. brcya .. "'>"
-colbwhi = "<span color='" .. brwhi .. "'>"
View
25 .config/awesome/themes.lua
@@ -1,25 +0,0 @@
--- THEMES
-local f = io.open("/home/jack/.config/awesome/themes/theme_to_use", "r")
-local r = f:read("*a")
-if r == "day" then
- themeset = "themeday"
- f:close()
-elseif r == "night" then
- themeset = "themenight"
- f:close()
-else
- local tod = os.date("%H")
- if tod >= "07" and tod <="17" then
- themeset = "themeday"
- else
- themeset = "themenight"
- end
- f:close()
-end
-
-require(themeset)
-
--- reset switch
-local f = io.open("/home/jack/.config/awesome/themes/theme_to_use", "w")
- f:write("")
- f:close()
View
BIN  .config/awesome/themes/day/spacer.png
Deleted file not rendered
View
BIN  .config/awesome/themes/day/submenu.png
Deleted file not rendered
View
BIN  .config/awesome/themes/day/taglist/squarefw.png
Deleted file not rendered
View
BIN  .config/awesome/themes/day/taglist/squarew.png
Deleted file not rendered
View
BIN  .config/awesome/themes/day/tasklist/floatingw.png
Deleted file not rendered
View
38 .config/awesome/themes/day/theme.lua
@@ -1,38 +0,0 @@
--- THEME DAY
-require("coloursday")
-
-theme = {}
-
-theme.font = "terminus 8"
-
-theme.bg_normal = trwhi
-theme.bg_focus = trwhi
-theme.bg_urgent = brred
-theme.bg_minimize = trwhi
-
-theme.fg_normal = brblk
-theme.fg_focus = brgre
-theme.fg_urgent = trwhi
-theme.fg_minimize = brwhi
-
-theme.border_width = "1"
-theme.border_normal = trwhi
-theme.border_focus = brgre
-theme.border_marked = red
-
--- TAGLIST
-theme.taglist_squares_sel = "/home/jack/.config/awesome/themes/day/taglist/squarefw.png"
-theme.taglist_squares_unsel = "/home/jack/.config/awesome/themes/day/taglist/squarew.png"
-
--- TASKLIST
-theme.tasklist_floating_icon = "/home/jack/.config/awesome/themes/day/tasklist/floatingw.png"
-
--- MENU
-theme.menu_submenu_icon = "/home/jack/.config/awesome/themes/day/submenu.png"
-theme.menu_border_color = brwhi
-theme.menu_height = "14"
-theme.menu_width = "90"
-
--- WALLPAPER
-theme.wallpaper_cmd = { "imlibsetroot -s /home/jack/.background/bgday.png" }
-return theme
View
20 .config/awesome/themes/day/worldmap.vim
@@ -1,20 +0,0 @@
-
- OOOOO OOOOOOOOOO O O OO
- OOOO O OO O OOOOOOO O OOOOOOOOOOO O
- OOOOOOOOOOOOOOOOOOO OO OO OO OO OO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
- O OOOOOOOOOO OOO O OOOOOOOOOOOOOOOOOOOOOOOOOO O
- OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
- OOOOOOOOOOOO OOOOO OO OOOOOOOOOOOOOOOOOOOOO O
- OOOOOOOOOO OO OOOOOOOOOOOOOOOOOOO O O
- OOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOO
- OO OOOOOOOOOOOO OOOO OOOO OOOOO
- OO OOOOOOOOOOOOO O O OO
- OOOO OOOOOOOOOOOOO O
- OOOOOOO OOOOO O O OOO
- OOOOOOOOO OOOOOO O OO
- OOOOOOOO OOOOOO O O
- OOOOOO OOOOO O OOOOOOOO
- OOOO OOO OOOOOOOOO
- OOOO OO O
- OO O
- O
View
BIN  .config/awesome/themes/night/spacer.png
Deleted file not rendered
View
BIN  .config/awesome/themes/night/submenu.png
Deleted file not rendered
View
BIN  .config/awesome/themes/night/taglist/squarefw.png
Deleted file not rendered
View
BIN  .config/awesome/themes/night/taglist/squarew.png
Deleted file not rendered
View
BIN  .config/awesome/themes/night/tasklist/floatingw.png
Deleted file not rendered
View
40 .config/awesome/themes/night/theme.lua
@@ -1,40 +0,0 @@
--- THEME NIGHT
-
-require("coloursnight")
-
-theme = {}
-
-theme.font = "terminus 8"
-
-theme.bg_normal = trblk
-theme.bg_focus = trblk
-theme.bg_urgent = red
-theme.bg_minimize = trblk
-
-theme.fg_normal = brblk
-theme.fg_focus = yel
-theme.fg_urgent = trwhi
-theme.fg_minimize = blk
-
-theme.border_width = "1"
-theme.border_normal = trblk
-theme.border_focus = brblk
-theme.border_marked = blu
-
--- TAGLIST
-theme.taglist_squares_sel = "/home/jack/.config/awesome/themes/night/taglist/squarefw.png"
-theme.taglist_squares_unsel = "/home/jack/.config/awesome/themes/night/taglist/squarew.png"
-
--- TASKLIST
-theme.tasklist_floating_icon = "/home/jack/.config/awesome/themes/night/tasklist/floatingw.png"
-
--- MENU
-theme.menu_submenu_icon = "/home/jack/.config/awesome/themes/night/submenu.png"
-theme.menu_border_color = blk
-theme.menu_height = "14"
-theme.menu_width = "90"
-
--- WALLPAPER
---theme.wallpaper_cmd = { "awsetbg /home/jack/.background/bg.png" }
-theme.wallpaper_cmd = { "imlibsetroot -s /home/jack/.background/bgnight.png" }
-return theme
View
20 .config/awesome/themes/night/worldmap.vim
@@ -1,20 +0,0 @@
-
- OOOOO OOOOOOOOOO O O OO
- OOOO O OO O OOOOOOO O OOOOOOOOOOO O
- OOOOOOOOOOOOOOOOOOO OO OO OO OO OO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
- O OOOOOOOOOO OOO O OOOOOOOOOOOOOOOOOOOOOOOOOO O
- OOOOOOOOOOOOOOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
- OOOOOOOOOOOO OOOOO OO OOOOOOOOOOOOOOOOOOOOO O
- OOOOOOOOOO OO OOOOOOOOOOOOOOOOOOO O O
- OOOO OOOOOOOOOOOOOOOOOOOOOOOOOOOOO
- OO OOOOOOOOOOOO OOOO OOOO OOOOO
- OO OOOOOOOOOOOOO O O OO
- OOOO OOOOOOOOOOOOO O
- OOOOOOO OOOOO O O OOO
- OOOOOOOOO OOOOOO O OO
- OOOOOOOO OOOOOO O O
- OOOOOO OOOOO O OOOOOOOO
- OOOO OOO OOOOOOOOO
- OOOO OO O
- OO O
- O
View
0  .config/awesome/themes/theme_to_use
No changes.
View
267 .config/awesome/widgetsbottom.lua
@@ -1,95 +1,46 @@
-- WIDGETS BOTTOM
--- RIGHT
--- CPU widget
-cputwidget = widget({ type = "textbox" })
- vicious.register(cputwidget, vicious.widgets.cpu,
- function (widget, args)
- if args[1] == 50 then
- return "" .. colyel .. "cpu " .. coldef .. colbyel .. args[1] .. "% " .. coldef .. ""
- elseif args[1] >= 50 then
- return "" .. colred .. "cpu " .. coldef .. colbred .. args[1] .. "% " .. coldef .. ""
- else
- return "" .. colblk .. "cpu " .. coldef .. colbblk .. args[1] .. "% " .. coldef .. ""
- end
- end )
-cputwidget:buttons(awful.util.table.join(awful.button({}, 1, function () awful.util.spawn ( terminal .. " -e htop --sort-key PERCENT_CPU") end ) ) )
-
--- CPU temp widget
-tempwidget = widget({ type = "textbox" })
- vicious.register(tempwidget, vicious.widgets.thermal,
- function (widget, args)
- if args[1] >= 65 and args[1] < 75 then
- return "" .. colyel .. "temp " .. coldef .. colbyel .. args[1] .. "°C " .. coldef .. ""
- elseif args[1] >= 75 and args[1] < 80 then
- return "" .. colred .. "temp " .. coldef .. colbred .. args[1] .. "°C " .. coldef .. ""
- elseif args[1] > 80 then
- naughty.notify({ title = "Temperature Warning", text = "Running hot! " .. args[1] .. "°C!\nTake it easy.", timeout = 10, position = "top_right", fg = beautiful.fg_urgent, bg = beautiful.bg_urgent })
- return "" .. colred .. "temp " .. coldef .. colbred .. args[1] .. "°C " .. coldef .. ""
- else
- return "" .. colblk .. "temp " .. coldef .. colbblk .. args[1] .. "°C " .. coldef .. ""
- end
- end, 19, "thermal_zone0" )
-
--- Ram widget
-memwidget = widget({ type = "textbox" })
- vicious.cache(vicious.widgets.mem)
- vicious.register(memwidget, vicious.widgets.mem, "" .. colblk .. "ram " .. coldef .. colbblk .. "$1% ($2 MiB) " .. coldef .. "", 59)
-
--- Filesystem widgets
--- root
-fsrwidget = widget({ type = "textbox" })
- vicious.register(fsrwidget, vicious.widgets.fs,
- function (widget, args)
- if args["{/ used_p}"] >= 93 and args["{/ used_p}"] < 97 then
- infoswitch = 1
- return "" .. colyel .. "/ " .. coldef .. colbyel .. args["{/ used_p}"] .. "% (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
- elseif args["{/ used_p}"] >= 97 and args["{/ used_p}"] < 99 then
- infoswitch = 1
- return "" .. colred .. "/ " .. coldef .. colbred .. args["{/ used_p}"] .. "% (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
- elseif args["{/ used_p}"] >= 99 and args["{/ used_p}"] <= 100 then
- naughty.notify({ title = "Hard drive Warning", text = "No space left on root!\nMake some room.", timeout = 10, position = "top_right", fg = beautiful.fg_urgent, bg = beautiful.bg_urgent })
- infoswitch = 1
- return "" .. colred .. "/ " .. coldef .. colbred .. args["{/ used_p}"] .. "% (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
- else
- infoswitch = 0
- return "" .. colblk .. "/ " .. coldef .. colbblk .. args["{/ used_p}"] .. "% (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
- end
- end, 621)
--- /home
-fshwidget = widget({ type = "textbox" })
- vicious.register(fshwidget, vicious.widgets.fs,
- function (widget, args)
- if args["{/home used_p}"] >= 97 and args["{/home used_p}"] < 98 then
- return "" .. colyel .. "/home " .. coldef .. colbyel .. args["{/home used_p}"] .. "% (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
- elseif args["{/home used_p}"] >= 98 and args["{/home used_p}"] < 99 then
- return "" .. colred .. "/home " .. coldef .. colbred .. args["{/home used_p}"] .. "% (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
- elseif args["{/home used_p}"] >= 99 and args["{/home used_p}"] <= 100 then
--- naughty.notify({ title = "Hard drive Warning", text = "No space left on /home!\nMake some room.", timeout = 10, position = "top_right", fg = beautiful.fg_urgent, bg = beautiful.bg_urgent })
- return "" .. colred .. "/home " .. coldef .. colbred .. args["{/home used_p}"] .. "% (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
- else
- return "" .. colblk .. "/home " .. coldef .. colbblk .. args["{/home used_p}"] .. "% (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
- end
- end, 622)
+-- Left
+-- MPD widget
+mpdwidget = wibox.widget.textbox()
+ vicious.register(mpdwidget, vicious.widgets.mpd,
+ function (widget, args)
+ if args["{state}"] == "Stop" then
+ return ""
+ elseif args["{state}"] == "Play" then
+ return "" .. colcya .. "mpd " .. coldef .. colbwhi .. args["{Artist}"] .. " - " .. args["{Album}"] .. " - " .. args["{Title}"] .. coldef .. ""
+ elseif args["{state}"] == "Pause" then
+ return "" .. colcya .. "mpd " .. coldef .. colbyel .. "paused" .. coldef .. ""
+ end
+ end, refresh_delay )
+ mpdwidget:buttons(
+ awful.util.table.join(
+ awful.button({}, 1, function () awful.util.spawn("mpc toggle", false) end),
+ awful.button({}, 2, function () awful.util.spawn( terminal .. " -e ncmpcpp") end),
+ awful.button({}, 4, function () awful.util.spawn("mpc prev", false) end),
+ awful.button({}, 5, function () awful.util.spawn("mpc next", false) end)
+ )
+ )
+-- Right (from left to right)
-- Net widgets
-- eth
-netupwidget = widget({ type = "textbox" })
+netdownwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.net)
- vicious.register(netupwidget, vicious.widgets.net, "" .. colblk .. "up " .. coldef .. colbblk .. "${eth0 up_kb} " .. coldef .. "")
+ vicious.register(netdownwidget, vicious.widgets.net, "" .. colcya .. "down " ..coldef .. colbwhi .. "${eth0 down_kb} " .. coldef .. "")
-netdownwidget = widget({ type = "textbox" })
- vicious.register(netdownwidget, vicious.widgets.net, "" .. colblk .. "down " ..coldef .. colbblk .. "${eth0 down_kb} " .. coldef .. "")
+netupwidget = wibox.widget.textbox()
+ vicious.register(netupwidget, vicious.widgets.net, "" .. colcya .. "up " .. coldef .. colbwhi .. "${eth0 up_kb} " .. coldef .. "")
-netwidget = widget({ type = "textbox" })
+netwidget = wibox.widget.textbox()
vicious.register(netwidget, vicious.widgets.net,
function (widget, args)
- function ip_addr()
- local ip = io.popen("ip addr show eth0 | grep 'inet '")
- local addr = ip:read("*a")
- ip:close()
- addr = string.match(addr, "%d+.%d+.%d+.%d+")
- return addr
- end
+ function ip_addr()
+ local ip = io.popen("ip addr show eth0 | grep 'inet '")
+ local addr = ip:read("*a")
+ ip:close()
+ addr = string.match(addr, "%d+.%d+.%d+.%d+")
+ return addr
+ end
if ip_addr() == nil then
netdownwidget.visible = false
netupwidget.visible = false
@@ -97,27 +48,27 @@ netwidget = widget({ type = "textbox" })
else
netdownwidget.visible = true
netupwidget.visible = true
- return "" .. colblk .. "eth0 " .. coldef .. colbblk .. ip_addr() .. coldef .. " "
+ return "" .. colcya .. "eth0 " .. coldef .. colbwhi .. ip_addr() .. coldef .. " "
end
end, refresh_delay, "eth0")
-- wlan
-wifiupwidget = widget({ type = "textbox" })
- vicious.register(wifiupwidget, vicious.widgets.net, "" .. colblk .. "up " .. coldef .. colbblk .. "${wlan0 up_kb} " .. coldef .. "")
+wifidownwidget = wibox.widget.textbox()
+ vicious.register(wifidownwidget, vicious.widgets.net, "" .. colcya .. "down " .. coldef .. colbwhi .. "${wlan0 down_kb} " .. coldef .. "")
-wifidownwidget = widget({ type = "textbox" })
- vicious.register(wifidownwidget, vicious.widgets.net, "" .. colblk .. "down " .. coldef .. colbblk .. "${wlan0 down_kb} " .. coldef .. "")
+wifiupwidget = wibox.widget.textbox()
+ vicious.register(wifiupwidget, vicious.widgets.net, "" .. colcya .. "up " .. coldef .. colbwhi .. "${wlan0 up_kb} " .. coldef .. "")
-wifiwidget = widget({ type = "textbox" })
+wifiwidget = wibox.widget.textbox()
vicious.register(wifiwidget, vicious.widgets.wifi,
function (widget, args)
- function ip_addr()
- local ip = io.popen("ip addr show wlan0 | grep 'inet '")
- local addr = ip:read("*a")
- ip:close()
- addr = string.match(addr, "%d+.%d+.%d+.%d+")
- return addr
- end
+ function ip_addr()
+ local ip = io.popen("ip addr show wlan0 | grep 'inet '")
+ local addr = ip:read("*a")
+ ip:close()
+ addr = string.match(addr, "%d+.%d+.%d+.%d+")
+ return addr
+ end
if args["{link}"] == 0 then
wifidownwidget.visible = false
wifiupwidget.visible = false
@@ -126,41 +77,109 @@ wifiwidget = widget({ type = "textbox" })
wifidownwidget.visible = true
wifiupwidget.visible = true
if args["{link}"]/70*100 <= 50 then
- return "" .. colblk .. "wlan " .. coldef .. colbblk .. ip_addr() .. coldef .. colblk .. " on " .. coldef .. colbblk .. args["{ssid}"] .. coldef .. colred .. " at " .. coldef .. colbred .. string.format("[%i%%]", args["{link}"]/70*100) .. coldef .. " "
+ return "" .. colcya .. "wlan " .. coldef .. colbwhi .. ip_addr() .. coldef .. colwhi .. " on " .. coldef .. colbwhi .. args["{ssid}"] .. coldef .. colred .. " at " .. coldef .. colbred .. string.format("[%i%%]", args["{link}"]/70*100) .. coldef .. " "
elseif args["{link}"]/70*100 > 50 and args["{link}"]/70*100 <=75 then
- return "" .. colblk .. "wlan " .. coldef .. colbblk .. ip_addr() .. coldef .. colblk .. " on " .. coldef .. colbblk .. args["{ssid}"] .. coldef .. colyel .. " at " .. coldef .. colbyel .. string.format("[%i%%]", args["{link}"]/70*100) .. coldef .. " "
+ return "" .. colcya .. "wlan " .. coldef .. colbwhi .. ip_addr() .. coldef .. colwhi .. " on " .. coldef .. colbwhi .. args["{ssid}"] .. coldef .. colyel .. " at " .. coldef .. colbyel .. string.format("[%i%%]", args["{link}"]/70*100) .. coldef .. " "
else
- return "" .. colblk .. "wlan " .. coldef .. colbblk .. ip_addr() .. coldef .. colblk .. " on " .. coldef .. colbblk .. args["{ssid}"] .. coldef .. colblk .. " at " .. coldef .. colbblk .. string.format("[%i%%]", args["{link}"]/70*100) .. coldef .. " "
+ return "" .. colcya .. "wlan " .. coldef .. colbwhi .. ip_addr() .. coldef .. colwhi .. " on " .. coldef .. colbwhi .. args["{ssid}"] .. coldef .. colwhi .. " at " .. coldef .. colbwhi .. string.format("[%i%%]", args["{link}"]/70*100) .. coldef .. " "
end
end
end, refresh_delay, "wlan0" )
+-- CPU widget
+cpuwidget = wibox.widget.textbox()
+ vicious.register(cpuwidget, vicious.widgets.cpu,
+ function (widget, args)
+ if args[1] >= 50 and args[1] <= 75 then
+ return "" .. colyel .. "cpu " .. coldef .. colbyel .. args[1] .. "% " .. coldef .. ""
+ elseif args[1] > 75 then
+ return "" .. colred .. "cpu " .. coldef .. colbred .. args[1] .. "% " .. coldef .. ""
+ else
+ return "" .. colcya .. "cpu " .. coldef .. colbwhi .. args[1] .. "% " .. coldef .. ""
+ end
+ end )
+cpuwidget:buttons(awful.util.table.join(awful.button({}, 1, function () awful.util.spawn ( terminal .. " -e htop --sort-key PERCENT_CPU") end ) ) )
+
+-- -- CPU temp widget
+-- tempwidget = wibox.widget.textbox()
+-- vicious.register(tempwidget, vicious.widgets.thermal,
+-- function (widget, args)
+-- if args[1] >= 65 and args[1] < 75 then
+-- return "" .. colyel .. "temp " .. coldef .. colbyel .. args[1] .. "°C " .. coldef .. ""
+-- elseif args[1] >= 75 and args[1] < 80 then
+-- return "" .. colred .. "temp " .. coldef .. colbred .. args[1] .. "°C " .. coldef .. ""
+-- elseif args[1] > 80 then
+-- naughty.notify({ title = "Temperature Warning", text = "Running hot! " .. args[1] .. "°C!\nTake it easy.", timeout = 10, position = "top_right", fg = beautiful.fg_urgent, bg = beautiful.bg_urgent })
+-- return "" .. colred .. "temp " .. coldef .. colbred .. args[1] .. "°C " .. coldef .. ""
+-- else
+-- return "" .. colcya .. "temp " .. coldef .. colbwhi .. args[1] .. "°C " .. coldef .. ""
+-- end
+-- end, 19, "cooling_device0" )
+
+-- Ram widget
+memwidget = wibox.widget.textbox()
+ vicious.cache(vicious.widgets.mem)
+ vicious.register(memwidget, vicious.widgets.mem, "" .. colcya .. "ram " .. coldef .. colbwhi .. "$1% ($2 MiB) " .. coldef .. "", 59)
+
+-- Filesystem widgets
+-- root
+fsrwidget = wibox.widget.textbox()
+ vicious.register(fsrwidget, vicious.widgets.fs,
+ function (widget, args)
+ if args["{/ used_p}"] >= 93 and args["{/ used_p}"] < 97 then
+ return "" .. colyel .. "root " .. coldef .. colbyel .. args["{/ used_p}"] .. "% used (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
+ elseif args["{/ used_p}"] >= 97 and args["{/ used_p}"] < 99 then
+ return "" .. colred .. "root " .. coldef .. colbred .. args["{/ used_p}"] .. "% used (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
+ elseif args["{/ used_p}"] >= 99 and args["{/ used_p}"] <= 100 then
+ naughty.notify({ title = "Hard drive Warning", text = "No space left on root!\nMake some room.", timeout = 10, position = "top_right", fg = beautiful.fg_urgent, bg = beautiful.bg_urgent })
+ return "" .. colred .. "root " .. coldef .. colbred .. args["{/ used_p}"] .. "% used (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
+ else
+ return "" .. colcya .. "root " .. coldef .. colbwhi .. args["{/ used_p}"] .. "% used (" .. args["{/ avail_gb}"] .. " GiB free) " .. coldef .. ""
+ end
+ end, 621)
+
+-- /home
+fshwidget = wibox.widget.textbox()
+ vicious.register(fshwidget, vicious.widgets.fs,
+ function (widget, args)
+ if args["{/home used_p}"] >= 97 and args["{/home used_p}"] < 98 then
+ return "" .. colyel .. "/home " .. coldef .. colbyel .. args["{/home used_p}"] .. "% used (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
+ elseif args["{/home used_p}"] >= 98 and args["{/home used_p}"] < 99 then
+ return "" .. colred .. "/home " .. coldef .. colbred .. args["{/home used_p}"] .. "% used (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
+ elseif args["{/home used_p}"] >= 99 and args["{/home used_p}"] <= 100 then
+ naughty.notify({ title = "Hard drive Warning", text = "No space left on /home!\nMake some room.", timeout = 10, position = "top_right", fg = beautiful.fg_urgent, bg = beautiful.bg_urgent })
+ return "" .. colred .. "/home " .. coldef .. colbred .. args["{/home used_p}"] .. "% used (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
+ else
+ return "" .. colcya .. "/home " .. coldef .. colbwhi .. args["{/home used_p}"] .. "% used (" .. args["{/home avail_gb}"] .. " GiB free) " .. coldef .. ""
+ end
+ end, 622)
+
-- Battery widget
-batwidget = widget({ type = "textbox" })
+batwidget = wibox.widget.textbox()
vicious.register(batwidget, vicious.widgets.bat,
function (widget, args)
- if args[2] >= 50 and args[2] < 75 then
- return "" .. colyel .. "bat " .. coldef .. colbyel .. args[2] .. "% " .. coldef .. ""
- elseif args[2] >= 20 and args[2] < 50 then
- return "" .. colred .. "bat " .. coldef .. colbred .. args[2] .. "% " .. coldef .. ""
- elseif args[2] < 20 and args[1] == "-" then
+ if args[2] >= 20 and args[2] < 30 and args[1] == "-" then
+ return "" .. colyel .. "bat " .. coldef .. colbyel .. args[1] .. " " .. args[2] .. "% " .. coldef .. ""
+ elseif args[2] >= 10 and args[2] < 20 and args[1] == "-" then
+ return "" .. colred .. "bat " .. coldef .. colbred .. args[1] .. " " .. args[2] .. "% " .. coldef .. ""
+ elseif args[2] < 10 and args[1] == "-" then
naughty.notify({ title = "Battery Warning", text = "Battery low! "..args[2].."% left!\nBetter get some power.", timeout = 10, position = "top_right", fg = beautiful.fg_urgent, bg = beautiful.bg_urgent })
- return "" .. colred .. "bat " .. coldef .. colbred .. args[2] .. "% " .. coldef .. ""
- elseif args[2] < 20 then
- return "" .. colred .. "bat " .. coldef .. colbred .. args[2] .. "% " .. coldef .. ""
+ return "" .. colred .. "bat " .. coldef .. colbred .. args[1] .. " " .. args[2] .. "% " .. coldef .. ""
+ elseif args[2] < 10 then
+ return "" .. colred .. "bat " .. coldef .. colbred .. args[1] .. " " .. args[2] .. "% " .. coldef .. ""
else
- return "" .. colblk .. "bat " .. coldef .. colbblk .. args[2] .. "% " .. coldef .. ""
+ return "" .. colcya .. "bat " .. coldef .. colbwhi .. args[1] .. " " .. args[2] .. "% " .. coldef .. ""
end
- end, 236, "BAT1" )
+ end, 236, "BAT0" )
-- Volume widget
-volwidget = widget({ type = "textbox" })
+volwidget = wibox.widget.textbox()
vicious.register(volwidget, vicious.widgets.volume,
function (widget, args)
if args[1] == 0 or args[2] == "" then
- return "" .. colblk .. "vol " .. coldef .. colbred .. "mute" .. coldef .. ""
+ return "" .. colcya .. "vol " .. coldef .. colbred .. "mute" .. coldef .. ""
else
- return "" .. colblk .. "vol " .. coldef .. colbblk .. args[1] .. "% " .. coldef .. ""
+ return "" .. colcya .. "vol " .. coldef .. colbwhi .. args[1] .. "% " .. coldef .. ""
end
end, 2, "Master" )
volwidget:buttons(
@@ -171,25 +190,3 @@ volwidget = widget({ type = "textbox" })
awful.button({ }, 5, function () awful.util.spawn("amixer -q sset Master 2dB-") end)
)
)
-
--- LEFT
--- MPD widget
-mpdwidget = widget({ type = 'textbox' })
- vicious.register(mpdwidget, vicious.widgets.mpd,
- function (widget, args)
- if args["{state}"] == "Stop" then
- return ""
- elseif args["{state}"] == "Play" then
- return "" .. colblk .. "mpd " .. coldef .. colbblk .. args["{Artist}"] .. " - " .. args["{Album}"] .. " - " .. args["{Title}"] .. coldef .. ""
- elseif args["{state}"] == "Pause" then
- return "" .. colblk .. "mpd " .. coldef .. colbyel .. "paused" .. coldef .. ""
- end
- end, refresh_delay )
- mpdwidget:buttons(
- awful.util.table.join(
- awful.button({}, 1, function () awful.util.spawn("mpc toggle", false) end),
- awful.button({}, 2, function () awful.util.spawn( terminal .. " -e ncmpcpp") end),
- awful.button({}, 4, function () awful.util.spawn("mpc prev", false) end),
- awful.button({}, 5, function () awful.util.spawn("mpc next", false) end)
- )
- )
View
49 .config/awesome/widgetstop.lua
@@ -1,24 +1,24 @@
-- WIDGETS TOP
+-- Right
-- Calendar widget
-calwidget = widget({ type = "textbox" })
+calwidget = wibox.widget.textbox()
function dayth()
local osd = os.date("%d")
if osd == "01" or osd == "21" or osd == "31" then
- return "<span font='proggytiny 7'><sup>st</sup></span>"
+ return "<span font='profont 6'><sup>st</sup></span>"
elseif osd == "02" or osd == "22" then
- return "<span font='proggytiny 7'><sup>nd</sup></span>"
+ return "<span font='profont 6'><sup>nd</sup></span>"
elseif osd == "03" or osd == "23" then
- return "<span font='proggytiny 7'><sup>rd</sup></span>"
+ return "<span font='profont 6'><sup>rd</sup></span>"
else
- return "<span font='proggytiny 7'><sup>th</sup></span>"
+ return "<span font='profont 6'><sup>th</sup></span>"
end
end
- vicious.register(calwidget, vicious.widgets.date, "" .. colyel .. " %a, %d" .. dayth() .. " %B" .. coldef .. "")
- calendar2.addCalendarToWidget(calwidget, "" .. colyel .. "%s" .. coldef .. "")
+vicious.register(calwidget, vicious.widgets.date, "" .. colcya .. " %a, %d" .. dayth() .. " %B" .. coldef .. "")
-- Clock widget
local function fuzzyclock()
- -- Get variables
+ -- get variables
local hr = os.date("%H")
local min = os.date("%M")
-- set daytime switch
@@ -28,25 +28,25 @@ local function fuzzyclock()
elseif hr >= "12" and hr <= "17" then dt = 3
elseif hr >= "18" and hr <= "21" then dt = 4
elseif hr >= "22" and hr <= "23" then dt = 5 end
- -- 24 hr clock needed for noon and midnight
+ -- keep 24 hr clock to distinguish between noon and midnight
local nm = hr
-- to do some easy math
local hr = tonumber(hr)
-- only need 12 hr clock for calling of time
if hr >= 13 then hr = hr - 12 end
- -- midnight is twelve
+ -- midnight is twelve, not zero
if hr == 00 then hr = 12 end
-- times that are 'to' the hour need a plus one
if hr >= 00 and hr <= 11 then hrp = hr + 1 else hrp = hr - 11 end
- -- Get words
+ -- get words
local hours = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "noon", "midnight" }
local minutes = { "o'clock", "five", "ten", "quarter", "twenty", "twenty-five", "half" }
local daytime = { "in the early morning", "in the morning", "in the afternoon", "in the evening", "at night" }
- -- Set vars local
+ -- set vars local
local clock = "N/A"
local tod = ""
- -- Set the words according to time of the hour and day
+ -- set the words according to time of the hour and day
if min >= "00" and min <= "02" and nm == "00" then clock = "" .. hours[14] .. ""
elseif min >= "00" and min <= "02" and nm == "12" then clock = "" .. hours[13] .. ""
elseif min >= "00" and min <= "02" then min = 1 clock = "" .. hours[hr] .. " " .. minutes[min] .. "" tod = "" .. daytime[dt] .. ""
@@ -62,15 +62,15 @@ local function fuzzyclock()
elseif min >= "23" and min <= "27" then min = 6 clock = "" .. minutes[min] .. " past " .. hours[hr] .. "" tod = "" .. daytime[dt] .. ""
elseif min >= "28" and min <= "32" and nm == "00" then min = 7 clock = "" .. minutes[min] .. " past " .. hours[14] .. ""
elseif min >= "28" and min <= "32" then min = 7 clock = "" .. minutes[min] .. " " .. hours[hr] .. "" tod = "" .. daytime[dt] .. ""
- elseif min >= "33" and min <= "37" and nm == "23" then min = 6 clock = "" .. minutes[min] .. " till " .. hours[14] .. ""
+ elseif min >= "33" and min <= "37" and nm == "23" then min = 6 clock = "" .. minutes[min] .. " to " .. hours[14] .. ""
elseif min >= "33" and min <= "37" then min = 6 clock = "" .. minutes[min] .. " to " .. hours[hrp] .. "" tod = "" .. daytime[dt] .. ""
- elseif min >= "38" and min <= "42" and nm == "23" then min = 5 clock = "" .. minutes[min] .. " till " .. hours[14] .. ""
+ elseif min >= "38" and min <= "42" and nm == "23" then min = 5 clock = "" .. minutes[min] .. " to " .. hours[14] .. ""
elseif min >= "38" and min <= "42" then min = 5 clock = "" .. minutes[min] .. " to " .. hours[hrp] .. "" tod = "" .. daytime[dt] .. ""
- elseif min >= "43" and min <= "47" and nm == "23" then min = 4 clock = "" .. minutes[min] .. " till " .. hours[14] .. ""
+ elseif min >= "43" and min <= "47" and nm == "23" then min = 4 clock = "" .. minutes[min] .. " to " .. hours[14] .. ""
elseif min >= "43" and min <= "47" then min = 4 clock = "a " .. minutes[min] .. " to " .. hours[hrp] .. "" tod = "" .. daytime[dt] .. ""
- elseif min >= "48" and min <= "52" and nm == "23" then min = 3 clock = "" .. minutes[min] .. " till " .. hours[14] .. ""
+ elseif min >= "48" and min <= "52" and nm == "23" then min = 3 clock = "" .. minutes[min] .. " to " .. hours[14] .. ""
elseif min >= "48" and min <= "52" then min = 3 clock = "" .. minutes[min] .. " to " .. hours[hrp] .. "" tod = "" .. daytime[dt] .. ""
- elseif min >= "53" and min <= "57" and nm == "23" then min = 2 clock = "" .. minutes[min] .. " till " .. hours[14] .. ""
+ elseif min >= "53" and min <= "57" and nm == "23" then min = 2 clock = "" .. minutes[min] .. " to " .. hours[14] .. ""
elseif min >= "53" and min <= "57" then min = 2 clock = "" .. minutes[min] .. " to " .. hours[hrp] .. "" tod = "" .. daytime[dt] .. ""
elseif min >= "58" and min <= "59" and nm == "23" then clock = "" .. hours[14] .. ""
elseif min >= "58" and min <= "59" and nm == "11" then clock = "" .. hours[13] .. ""
@@ -78,14 +78,13 @@ local function fuzzyclock()
end
return { clock, tod }
end
-clockwidget = widget({ type = "textbox" })
- vicious.register(clockwidget, fuzzyclock, "" .. colbblk .. " at " .. coldef .. colyel .. "$1 $2" .. coldef .. "")
- require("remind")
- clockwidget:add_signal('mouse::enter', function () cal_remt = { naughty.notify({ text = cal_gett(), border_color = "" .. blk .. "", timeout = 0 }) } end)
- clockwidget:add_signal('mouse::leave', function () naughty.destroy(cal_remt[1]) end)
+clockwidget = wibox.widget.textbox()
+ vicious.register(clockwidget, fuzzyclock, "" .. colwhi .. " at " .. coldef .. colbblu .. "$1 " .. coldef .. colwhi .. "$2" .. coldef .. "")
+ clockwidget:connect_signal('mouse::enter', function () cal_remt = { naughty.notify({ text = cal_gett(), border_color = "" .. blk .. "", timeout = 0 }) } end)
+ clockwidget:connect_signal('mouse::leave', function () naughty.destroy(cal_remt[1]) end)
-- Weather widget
-weatherwidget = widget({ type = "textbox" })
+weatherwidget = wibox.widget.textbox()
vicious.register(weatherwidget, vicious.widgets.weather,
function (widget, args)
if args["{tempc}"] == "N/A" then
@@ -93,7 +92,7 @@ weatherwidget = widget({ type = "textbox" })
else
-- weatherwidget:add_signal('mouse::enter', function () weather_n = { naughty.notify({ title = "" .. colblu .. "───────────── Weather ─────────────" .. coldef .. "", text = "" .. colbblu .. "Wind : " .. args["{windkmh}"] .. " km/h " .. args["{wind}"] .. "\nHumidity: " .. args["{humid}"] .. " %\nPressure: " .. args["{press}"] .. " hPa" .. coldef .. "", border_color = "#1a1a1a" }) } end)
-- weatherwidget:add_signal('mouse::leave', function () naughty.destroy(weather_n[1]) end)
- return "" .. colblu .. " weather " .. coldef .. colbblu .. string.lower(args["{sky}"]) .. ", " .. args["{tempc}"] .. "°C" .. coldef .. ""
+ return "" .. colcya .. " weather " .. coldef .. colwhi .. string.lower(args["{sky}"]) .. ", " .. args["{tempc}"] .. "°C" .. coldef .. ""
end
end, 1200, "YBTL" )
weatherwidget:buttons(awful.util.table.join(awful.button({}, 3, function () awful.util.spawn ( browser .. " http://www.weatherzone.com.au/qld/lower-burdekin/townsville") end)))
View
308 .config/luakit/binds.lua
@@ -1,308 +0,0 @@
------------------
--- Keybindings --
------------------
-
--- Binding aliases
-local key, buf, but = lousy.bind.key, lousy.bind.buf, lousy.bind.but
-local cmd, any = lousy.bind.cmd, lousy.bind.any
-
--- Util aliases
-local match, join = string.match, lousy.util.table.join
-local strip, split = lousy.util.string.strip, lousy.util.string.split
-
--- Globals or defaults that are used in binds
-local scroll_step = globals.scroll_step or 20
-local more, less = "+"..scroll_step.."px", "-"..scroll_step.."px"
-local zoom_step = globals.zoom_step or 0.1
-local homepage = globals.homepage or "http://luakit.org"
-
--- Add binds to a mode
-function add_binds(mode, binds, before)
- assert(binds and type(binds) == "table", "invalid binds table type: " .. type(binds))
- mode = type(mode) ~= "table" and {mode} or mode
- for _, m in ipairs(mode) do
- local mdata = get_mode(m)
- if mdata and before then
- mdata.binds = join(binds, mdata.binds or {})
- elseif mdata then
- mdata.binds = mdata.binds or {}
- for _, b in ipairs(binds) do table.insert(mdata.binds, b) end
- else
- new_mode(m, { binds = binds })
- end
- end
-end
-
--- Add commands to command mode
-function add_cmds(cmds, before)
- add_binds("command", cmds, before)
-end
-
--- Adds the default menu widget bindings to a mode
-menu_binds = {
- -- Navigate items
- key({}, "j", function (w) w.menu:move_down() end),
- key({}, "k", function (w) w.menu:move_up() end),
-