Skip to content
Browse files

New updates. Switch to XMonad.

  • Loading branch information...
0 parents commit 53dce766570f4b274a9450e8518f81369d3c837b @JackH79 committed Apr 24, 2012
Showing with 3,119 additions and 0 deletions.
  1. +33 −0 .Xresources
  2. +55 −0 .bashrc
  3. +473 −0 .bin/LS_COLORS
  4. +2 −0 .bin/backup_home
  5. +17 −0 .bin/colourcodes
  6. +26 −0 .bin/colours
  7. +63 −0 .bin/colours256
  8. +2 −0 .bin/edtodo
  9. +2 −0 .bin/reb
  10. BIN .bin/remind_bang.png
  11. +3 −0 .bin/remind_call
  12. +56 −0 .bin/remind_colour.lua
  13. +7 −0 .bin/scrmax
  14. +27 −0 .bin/scroff
  15. +2 −0 .bin/shut
  16. +7 −0 .bin/writing
  17. +17 −0 .bin/wt
  18. +28 −0 .config/Xcolours/jack
  19. +136 −0 .config/awesome/bindings.lua
  20. +119 −0 .config/awesome/calendar2.lua
  21. +19 −0 .config/awesome/coloursday.lua
  22. +19 −0 .config/awesome/coloursnight.lua
  23. +98 −0 .config/awesome/creation.lua
  24. +53 −0 .config/awesome/menu.lua
  25. +31 −0 .config/awesome/rc.lua
  26. +26 −0 .config/awesome/remind.lua
  27. +1 −0 .config/awesome/shifty
  28. +12 −0 .config/awesome/signals.lua
  29. +68 −0 .config/awesome/tags.lua
  30. +38 −0 .config/awesome/themeday.lua
  31. +38 −0 .config/awesome/themenight.lua
  32. +25 −0 .config/awesome/themes.lua
  33. BIN .config/awesome/themes/day/spacer.png
  34. BIN .config/awesome/themes/day/submenu.png
  35. BIN .config/awesome/themes/day/taglist/squarefw.png
  36. BIN .config/awesome/themes/day/taglist/squarew.png
  37. BIN .config/awesome/themes/day/tasklist/floatingw.png
  38. +38 −0 .config/awesome/themes/day/theme.lua
  39. +20 −0 .config/awesome/themes/day/worldmap.vim
  40. BIN .config/awesome/themes/night/spacer.png
  41. BIN .config/awesome/themes/night/submenu.png
  42. BIN .config/awesome/themes/night/taglist/squarefw.png
  43. BIN .config/awesome/themes/night/taglist/squarew.png
  44. BIN .config/awesome/themes/night/tasklist/floatingw.png
  45. +40 −0 .config/awesome/themes/night/theme.lua
  46. +20 −0 .config/awesome/themes/night/worldmap.vim
  47. 0 .config/awesome/themes/theme_to_use
  48. +195 −0 .config/awesome/widgetsbottom.lua
  49. +99 −0 .config/awesome/widgetstop.lua
  50. +2 −0 .config/remind/banner
  51. +19 −0 .config/remind/birthdays
  52. +19 −0 .config/remind/colours
  53. +31 −0 .config/remind/holidays
  54. +15 −0 .config/remind/miscellaneous
  55. +4 −0 .config/remind/recurring
  56. +6 −0 .config/remind/todo
  57. +125 −0 .keynavrc
  58. +363 −0 .ncmpcpp/config
  59. +7 −0 .reminders
  60. +6 −0 .vim/.netrwhist
  61. +26 −0 .vim/colors/jack.vim
  62. +3 −0 .vim/filetype.vim
  63. +385 −0 .vim/syntax/tjp.vim
  64. +127 −0 .vimrc
  65. +53 −0 .xinitrc
  66. BIN clean.png
  67. BIN dirty.png
  68. +13 −0 gitconfig
33 .Xresources
@@ -0,0 +1,33 @@
+! !URXVT
+URxvt.termName: rxvt
+URxvt.scrollBar: false
+URxvt.buffered: true
+URxvt.font: -*-terminus-*-*-*-*-12-*-*-*-*-*-*-*
+!URxvt*font: xft:terminus:pixelsize=12
+!!!For true transparency (with e.g. xcompmgr)
+URxvt.depth: 32
+URxvt.background: rgba:1a00/1a00/1a00/ef00
+!!!For native transparency
+!URxvt.transparent: true
+!URxvt.shading: 20
+!!! URL cut'n'paste
+URxvt.perl-ext-common: default,url-select
+URxvt.keysym.M-u: perl:url-select:select_next
+URxvt.urlLauncher: opera
+URxvt.underlineURLs: true
+
+!XTERM
+!xterm.geometry: 80x25
+!xterm.faceName: terminus:pixelsize=12
+xterm.font: -*-terminus-*-*-*-*-12-*-*-*-*-*-*-*
+xterm.dynamicColors: true
+xterm.utf8: 2
+xterm.eightBitInaput: true
+xterm.saveLines: 512
+xterm.scrollTtyKeypress: true
+xterm.scrollTtyOutput: false
+xterm.toolBar: false
+xterm.scrollBar: false
+
+!COLOUR THEME
+#include "/home/jack/.config/Xcolours/jack"
55 .bashrc
@@ -0,0 +1,55 @@
+### PROPMPT
+PS1='\[\e[1;32m\]\D{%I:%M%P}\[\e[1;34m\]>>\w\[\e[m\] '
+PS2='\[\e[1;33m\]contd.\[\e[1;34m\]>\[\e[m\] '
+
+### SET USER BIN PATH
+PATH="${PATH}:$HOME/.bin"
+
+### SET DIRCOLORS
+eval $( dircolors -b $HOME/.bin/LS_COLORS )
+
+### SET TERMNAME
+if [[ "$TERM" == 'rxvt-256color' ]] || [[ "$TERM" == 'xterm' ]]; then
+ export TERM=xterm
+else
+ export TERM=linux
+fi
+
+### BASH/SUDO COMPLETION
+if [[ -f /etc/bash_completion ]]; then
+ . /etc/bash_completion
+ which sudo &>/dev/null && complete -cf sudo
+fi
+
+### ALIASES
+alias ls='ls -ohF --group-directories-first --color=always'
+alias grep='grep --color=auto'
+alias sleep='sudo pm-suspend'
+alias dvd='mplayer -channels 6 -af hrtf /dev/sr0'
+alias copy='rsync -aP'
+#alias todo='remind /home/jack/.reminders'
+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 m1='udisks --mount /dev/sdb1'
+alias m2='udisks --mount /dev/sdc1'
+alias um='udisks --unmount'
+alias um1='udisks --unmount /dev/sdb1'
+alias um2='udisks --unmount /dev/sdc1'
+### 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;36m'
+
+### BROWSERS
+if [ -n "$DISPLAY" ]; then
+ BROWSER=opera
+else
+ BROWSER=links
+fi
473 .bin/LS_COLORS
@@ -0,0 +1,473 @@
+# LS_COLORS
+# Maintainer: Magnus Woldrich <m@japh.se>
+# URL: https://github.com/trapd00r/LS_COLORS
+# Version: 0.224
+# Updated: 2011-10-02 11:08:07
+#
+# This is a collection of extension:color mappings, suitable to use as your
+# LS_COLORS environment variable. Most of them use the extended color map,
+# described in the ECMA-48 document; in other words, you'll need a terminal
+# with capabilities of displaying 256 colors.
+#
+# As of this writing, around 300 different filetypes/extensions is supported.
+# That's indeed a lot of extensions, but there's a lot more! Therefore I need
+# your help.
+#
+# Fork this project on github, add the extensions you are missing, and send me
+# a pull request.
+#
+# For files that usually ends up next to each other, like html, css and js,
+# try to pick colors that fit nicely together. Filetypes with multiple
+# possible extensions, like htm and html, should have the same color.
+#
+# To install and use this file, put something like this is your shell resource
+# file:
+#
+# eval( dircolors -b $HOME/.dircolors )
+#
+# where .dircolors is this file.
+
+
+BLK 38;5;68
+CAPABILITY 38;5;17
+CHR 38;5;113;1
+DIR 38;5;30
+DOOR 38;5;127
+EXEC 38;5;166;1
+FIFO 38;5;126
+FILE 38;5;253
+LINK target
+MULTIHARDLINK 38;5;220;1
+NORMAL 38;5;254
+ORPHAN 48;5;196;38;5;232;1
+OTHER_WRITABLE 38;5;33;1
+SETGID 38;5;137;1
+SETUID 38;5;137
+SOCK 38;5;197
+STICKY 48;5;235;38;5;118;1
+STICKY_OTHER_WRITABLE 48;5;235;38;5;139;1
+
+
+# code, text, documents {{{
+.BAT 38;5;108
+.PL 38;5;160
+.asm 38;5;240;1
+.awk 38;5;148;1
+.bash 38;5;173
+.bat 38;5;108
+.c 38;5;110
+.cfg 1
+.coffee 38;5;94;1
+.conf 1
+.cpp 38;5;24;1
+.cs 38;5;74;1
+.css 38;5;91
+.csv 38;5;78
+.ctp 38;5;95
+.diff 48;5;197;38;5;232
+.enc 38;5;192;3
+.eps 38;5;192
+.etx 38;5;172
+.ex 38;5;148;1
+.example 38;5;225;1
+.git 38;5;197
+.gitignore 38;5;240
+.go 38;5;36;1
+.h 38;5;81
+.hs 38;5;155;1
+.htm 38;5;125;1
+.html 38;5;125;1
+.info 38;5;101
+.ini 38;5;122
+.java 38;5;142;1
+.jhtm 38;5;125;1
+.js 38;5;42
+.jsm 38;5;42
+.jsm 38;5;42
+.json 38;5;199
+.jsp 38;5;45
+.lisp 38;5;204;1
+.log 38;5;190
+.lua 38;5;34;1
+.map 38;5;58;3
+.markdown 38;5;184
+.md 38;5;184
+.mf 38;5;220;3
+.mfasl 38;5;73
+.mi 38;5;124
+.mkd 38;5;184
+.mtx 38;5;36;3
+.nfo 38;5;220
+.o 38;5;240
+.pacnew 38;5;33
+.patch 48;5;197;38;5;232;1
+.pc 38;5;100
+.pfa 38;5;43
+.php 38;5;93
+.pid 38;5;160
+.pl 38;5;214
+.pm 38;5;197;1
+.pod 38;5;172;1
+.py 38;5;41
+.rb 38;5;192
+.rdf 38;5;144
+.rst 38;5;67
+.ru 38;5;142
+.sed 38;5;130;1
+.sfv 38;5;197
+.sh 38;5;113
+.signature 38;5;206
+.sql 38;5;222
+.srt 38;5;116
+.sty 38;5;58
+.sug 38;5;44
+.t 38;5;28;1
+.tcl 38;5;64;1
+.tdy 38;5;214
+.tex 38;5;172
+.textile 38;5;106
+.tfm 38;5;64
+.tfnt 38;5;140
+.theme 38;5;109
+.txt 38;5;192
+.urlview 38;5;85
+.vim 1
+.viminfo 38;5;240;1
+.xml 38;5;199
+.yml 38;5;208
+.zsh 38;5;173
+
+# Build stuff
+.1 38;5;196;1
+.1p 38;5;160
+.3p 38;5;160
+.am 38;5;242
+.in 38;5;242
+.old 38;5;242
+.out 38;5;46;1
+
+
+
+
+#}}}
+# pictures, icons {{{
+.bmp 38;5;62
+.cdr 38;5;59
+.gif 38;5;72
+.ico 38;5;73
+.jpeg 38;5;66
+.jpg 38;5;66
+.JPG 38;5;66
+.png 38;5;68;1
+.svg 38;5;24;1
+.xpm 38;5;36
+#}}}
+# Emulator roms, emulator savegames {{{
+.32x 38;5;137
+.A64 38;5;82
+.a00 38;5;11
+.a52 38;5;112
+.a64 38;5;82
+.a78 38;5;112
+.adf 38;5;35
+.atr 38;5;213
+.cdi 38;5;124
+.fm2 38;5;35
+.gb 38;5;203
+.gba 38;5;205
+.gbc 38;5;204
+.gel 38;5;83
+.gg 38;5;138
+.ggl 38;5;83
+.j64 38;5;102
+.nds 38;5;193
+.nes 38;5;160
+.rom 38;5;59;1
+.sav 38;5;220
+.sms 38;5;33
+.st 38;5;208;1
+#}}}
+# images {{{
+.iso 38;5;124
+.nrg 38;5;124
+.qcow 38;5;141
+#}}}
+# video {{{
+.MOV 38;5;42
+.avi 38;5;114
+.flv 38;5;131
+.mkv 38;5;202
+.mov 38;5;42
+.mp4 38;5;124
+.mpg 38;5;38
+.mpeg 38;5;38
+.ogm 38;5;97
+.ogv 38;5;94
+.rmvb 38;5;112
+.sample 38;5;130;1
+.ts 38;5;39
+.webm 38;5;132
+.wmv 38;5;113
+#}}}
+# music, audio {{{
+.S3M 38;5;71;1
+.cue 38;5;112
+.dat 38;5;165
+.fcm 38;5;41
+.flac 38;5;166;1
+.m3u 38;5;172
+.m4 38;5;196;3
+.m4a 38;5;137;1
+.mid 38;5;102
+.midi 38;5;102
+.mod 38;5;72
+.mp3 38;5;191
+.oga 38;5;95
+.ogg 38;5;96
+.s3m 38;5;71;1
+.sid 38;5;69;1
+.spl 38;5;173
+.wv 38;5;149
+.wvc 38;5;149
+#}}}
+# fonts {{{
+.afm 38;5;58
+.pfb 38;5;58
+.pfm 38;5;58
+.ttf 48;5;1
+.pcf 38;5;65
+.psf 38;5;64
+#}}}
+# backups, undo files, tempfiles {{{
+.bak 38;5;41;1
+.bin 38;5;249
+.swo 38;5;236
+.swp 38;5;241
+.tmp 38;5;244
+.un~ 38;5;240
+.zcompdump 38;5;240
+.zwc 38;5;240
+#}}}
+# databases {{{
+.db 38;5;60
+.dump 38;5;119
+.sqlite 38;5;60
+.typelib 38;5;60
+
+#}}}
+# (compressed) archives {{{
+.7z 38;5;40
+.a 38;5;46
+.arj 38;5;41
+.bz2 38;5;44
+.ipk 38;5;117
+.jad 38;5;50
+.jar 38;5;51
+.part 38;5;240;1
+.r00 38;5;235
+.r01 38;5;235
+.r02 38;5;235
+.r03 38;5;236
+.r04 38;5;237
+.r05 38;5;238
+.r06 38;5;239
+.r07 38;5;240
+.r08 38;5;241
+.r09 38;5;242
+.r10 38;5;243
+.r100 38;5;244
+.r101 38;5;240
+.r102 38;5;241
+.r103 38;5;242
+.r104 38;5;243
+.r105 38;5;244
+.r106 38;5;245
+.r107 38;5;246
+.r108 38;5;247
+.r109 38;5;248
+.r11 38;5;244
+.r110 38;5;249
+.r111 38;5;250
+.r112 38;5;251
+.r113 38;5;252
+.r114 38;5;253
+.r115 38;5;254
+.r116 38;5;255
+.r12 38;5;245
+.r13 38;5;246
+.r14 38;5;247
+.r15 38;5;248
+.r16 38;5;249
+.r17 38;5;250
+.r18 38;5;251
+.r19 38;5;252
+.r20 38;5;253
+.r21 38;5;254
+.r22 38;5;255
+.r25 38;5;255
+.r26 38;5;254
+.r27 38;5;253
+.r28 38;5;252
+.r29 38;5;251
+.r30 38;5;250
+.r31 38;5;249
+.r32 38;5;248
+.r33 38;5;247
+.r34 38;5;246
+.r35 38;5;245
+.r36 38;5;244
+.r37 38;5;243
+.r38 38;5;242
+.r39 38;5;241
+.r40 38;5;240
+.r41 38;5;239
+.r42 38;5;238
+.r43 38;5;237
+.r44 38;5;236
+.r45 38;5;235
+.r46 38;5;235
+.r47 38;5;235
+.r48 38;5;235
+.r49 38;5;235
+.r50 38;5;236
+.r51 38;5;237
+.r52 38;5;238
+.r53 38;5;239
+.r54 38;5;240
+.r55 38;5;241
+.r56 38;5;242
+.r57 38;5;243
+.r58 38;5;244
+.r59 38;5;245
+.r60 38;5;246
+.r61 38;5;247
+.r62 38;5;248
+.r63 38;5;249
+.r64 38;5;250
+.r65 38;5;251
+.r66 38;5;252
+.r67 38;5;253
+.r68 38;5;254
+.r69 38;5;255
+.r69 38;5;255
+.r70 38;5;254
+.r71 38;5;253
+.r72 38;5;252
+.r73 38;5;251
+.r74 38;5;250
+.r75 38;5;249
+.r76 38;5;248
+.r77 38;5;247
+.r78 38;5;246
+.r79 38;5;245
+.r80 38;5;244
+.r81 38;5;243
+.r82 38;5;242
+.r83 38;5;241
+.r84 38;5;240
+.r85 38;5;239
+.r86 38;5;238
+.r87 38;5;237
+.r88 38;5;236
+.r89 38;5;235
+.r90 38;5;235
+.r91 38;5;235
+.r92 38;5;236
+.r93 38;5;237
+.r94 38;5;238
+.r95 38;5;239
+.r96 38;5;240
+.r97 38;5;241
+.r98 38;5;242
+.r99 38;5;243
+.rar 38;5;106;1
+.tar 38;5;118
+.tar.gz 38;5;34
+.tgz 38;5;35;1
+.xz 38;5;118
+.zip 38;5;41
+#}}}
+# really compressed archives, but mostly used for documents, comics (and {{{
+# documentation on MS Windows)
+.pdf 38;5;203
+.djvu 38;5;141
+.cbr 38;5;140
+.cbz 38;5;140
+.chm 38;5;144
+#}}}
+# open document formats {{{
+.odt 38;5;111
+.ods 38;5;112
+.odp 38;5;166
+.odb 38;5;161
+#}}}
+# /etc/hosts.{deny,allow} {{{
+.allow 38;5;112
+.deny 38;5;196
+#}}}
+# other {{{
+.SKIP 38;5;244
+.def 38;5;136
+.directory 38;5;83
+.err 38;5;160;1
+.error 38;5;160;1
+.pi 38;5;126
+.properties 38;5;197;1
+.torrent 38;5;58
+.gp3 38;5;114
+.gp4 38;5;115
+.tg 38;5;99
+#}}}
+
+TERM Eterm
+TERM ansi
+TERM color-xterm
+TERM con132x25
+TERM con132x30
+TERM con132x43
+TERM con132x60
+TERM con80x25
+TERM con80x28
+TERM con80x30
+TERM con80x43
+TERM con80x50
+TERM con80x60
+TERM cons25
+TERM console
+TERM cygwin
+TERM dtterm
+TERM eterm-color
+TERM gnome
+TERM gnome-256color
+TERM jfbterm
+TERM konsole
+TERM kterm
+TERM linux
+TERM linux-c
+TERM mach-color
+TERM mlterm
+TERM putty
+TERM rxvt
+TERM rxvt-256color
+TERM rxvt-cygwin
+TERM rxvt-cygwin-native
+TERM rxvt-unicode
+TERM rxvt-unicode-256color
+TERM rxvt-unicode256
+TERM screen
+TERM screen-256color
+TERM screen-256color-bce
+TERM screen-bce
+TERM screen-w
+TERM screen.rxvt
+TERM screen.linux
+TERM terminator
+TERM vt100
+TERM xterm
+TERM xterm-16color
+TERM xterm-256color
+TERM xterm-88color
+TERM xterm-color
+TERM xterm-debian
+
+# vim: ft=dircolors:
2 .bin/backup_home
@@ -0,0 +1,2 @@
+#!/bin/bash
+rsync -a --delete /home/jack/Documents /media/FULLBACKUP/BACKUP.NEW &> /dev/null
17 .bin/colourcodes
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+# first 8 colors
+for FG in {0..7}; do
+ echo -en "\e[0;3${FG}m[0;3${FG}\t\e[1;3${FG}m[1;3${FG}\t\n"
+# [ $((++FG%6)) -eq 0 ] && echo
+done
+echo
+
+[ "$1" != "-l" ] && exit
+
+# up to 256
+for FG in {9..255}; do
+ echo -en "\e[0;38;5;${FG}m[0;38;5;${FG}m\t"
+ [ $((++FG%6)) -eq 0 ] && echo
+done
+echo
26 .bin/colours
@@ -0,0 +1,26 @@
+#!/usr/bin/env bash
+#
+# This file echoes a bunch of color codes to the
+# terminal to demonstrate what's available. Each
+# line is the color code of one forground color,
+# out of 17 (default + 16 escapes), followed by a
+# test use of that color on all nine background
+# colors (default + 8 escapes).
+#
+
+T='gYw' # The test text
+
+echo -e "\n 40m 41m 42m 43m\
+ 44m 45m 46m 47m";
+
+for FGs in ' m' ' 1m' ' 30m' '1;30m' ' 31m' '1;31m' ' 32m' \
+ '1;32m' ' 33m' '1;33m' ' 34m' '1;34m' ' 35m' '1;35m' \
+ ' 36m' '1;36m' ' 37m' '1;37m';
+ do FG=${FGs// /}
+ echo -en " $FGs \033[$FG $T "
+ for BG in 40m 41m 42m 43m 44m 45m 46m 47m;
+ do echo -en "$EINS \033[$FG\033[$BG $T \033[0m";
+ done
+ echo;
+done
+echo
63 .bin/colours256
@@ -0,0 +1,63 @@
+#!/usr/bin/perl
+# Author: Todd Larason <jtl@molehill.org>
+# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
+
+# use the resources for colors 0-15 - usually more-or-less a
+# reproduction of the standard ANSI colors, but possibly more
+# pleasing shades
+
+# colors 16-231 are a 6x6x6 color cube
+for ($red = 0; $red < 6; $red++) {
+ for ($green = 0; $green < 6; $green++) {
+ for ($blue = 0; $blue < 6; $blue++) {
+ printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
+ 16 + ($red * 36) + ($green * 6) + $blue,
+ ($red ? ($red * 40 + 55) : 0),
+ ($green ? ($green * 40 + 55) : 0),
+ ($blue ? ($blue * 40 + 55) : 0));
+ }
+ }
+}
+
+# colors 232-255 are a grayscale ramp, intentionally leaving out
+# black and white
+for ($gray = 0; $gray < 24; $gray++) {
+ $level = ($gray * 10) + 8;
+ printf("\x1b]4;%d;rgb:%2.2x/%2.2x/%2.2x\x1b\\",
+ 232 + $gray, $level, $level, $level);
+}
+
+
+# display the colors
+
+# first the system ones:
+print "System colors:\n";
+for ($color = 0; $color < 8; $color++) {
+ print "\x1b[48;5;${color}m ";
+}
+print "\x1b[0m\n";
+for ($color = 8; $color < 16; $color++) {
+ print "\x1b[48;5;${color}m ";
+}
+print "\x1b[0m\n\n";
+
+# now the color cube
+print "Color cube, 6x6x6:\n";
+for ($green = 0; $green < 6; $green++) {
+ for ($red = 0; $red < 6; $red++) {
+ for ($blue = 0; $blue < 6; $blue++) {
+ $color = 16 + ($red * 36) + ($green * 6) + $blue;
+ print "\x1b[48;5;${color}m ";
+ }
+ print "\x1b[0m ";
+ }
+ print "\n";
+}
+
+
+# now the grayscale ramp
+print "Grayscale ramp:\n";
+for ($color = 232; $color < 256; $color++) {
+ print "\x1b[48;5;${color}m ";
+}
+print "\x1b[0m\n";
2 .bin/edtodo
@@ -0,0 +1,2 @@
+#! /bin/bash
+vim /home/jack/.config/remind/todo
2 .bin/reb
@@ -0,0 +1,2 @@
+#!/bin/bash
+dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Restart
BIN .bin/remind_bang.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 .bin/remind_call
@@ -0,0 +1,3 @@
+#! /bin/bash
+rem=`lua /home/jack/.bin/remind_colour.lua`
+notify-send -t 15000 "$rem" -i '/home/jack/.bin/remind_bang.png'
56 .bin/remind_colour.lua
@@ -0,0 +1,56 @@
+local colour = 0
+
+if colour == 0 then
+ -- STRIP COLOURS
+ local function cal_gett()
+ local fp = io.popen("remind /home/jack/.reminders")
+ local rem = fp:read("*a")
+ fp:close()
+ rem = string.gsub(rem, "\027%[0m", "")
+ rem = string.gsub(rem, "\027%[0;30m", "")
+ rem = string.gsub(rem, "\027%[0;31m", "")
+ rem = string.gsub(rem, "\027%[0;32m", "")
+ rem = string.gsub(rem, "\027%[0;33m", "")
+ rem = string.gsub(rem, "\027%[0;34m", "")
+ rem = string.gsub(rem, "\027%[0;35m", "")
+ rem = string.gsub(rem, "\027%[0;36m", "")
+ rem = string.gsub(rem, "\027%[0;37m", "")
+ rem = string.gsub(rem, "\027%[1;30m", "")
+ rem = string.gsub(rem, "\027%[1;31m", "")
+ rem = string.gsub(rem, "\027%[1;32m", "")
+ rem = string.gsub(rem, "\027%[1;33m", "")
+ rem = string.gsub(rem, "\027%[1;34m", "")
+ rem = string.gsub(rem, "\027%[1;35m", "")
+ rem = string.gsub(rem, "\027%[1;36m", "")
+ rem = string.gsub(rem, "\027%[1;37m", "")
+ return rem
+ end
+
+ print (cal_gett())
+else
+ -- PANGO
+ local function cal_gett()
+ local fp = io.popen("remind /home/jack/.reminders")
+ local rem = fp:read("*a")
+ fp:close()
+ rem = string.gsub(rem, "\027%[0m", "</span>")
+ rem = string.gsub(rem, "\027%[0;30m", "<span color='#262626'>")
+ rem = string.gsub(rem, "\027%[0;31m", "<span color='#b23535'>")
+ rem = string.gsub(rem, "\027%[0;32m", "<span color='#60801f'>")
+ rem = string.gsub(rem, "\027%[0;33m", "<span color='#be6e00'>")
+ rem = string.gsub(rem, "\027%[0;34m", "<span color='#1f6080'>")
+ rem = string.gsub(rem, "\027%[0;35m", "<span color='#8f46b2'>")
+ rem = string.gsub(rem, "\027%[0;36m", "<span color='#73afb4'>")
+ rem = string.gsub(rem, "\027%[0;37m", "<span color='#b2b2b2'>")
+ rem = string.gsub(rem, "\027%[1;30m", "<span color='#333333'>")
+ rem = string.gsub(rem, "\027%[1;31m", "<span color='#ff4b4b'>")
+ rem = string.gsub(rem, "\027%[1;32m", "<span color='#9bcd32'>")
+ rem = string.gsub(rem, "\027%[1;33m", "<span color='#d79b1e'>")
+ rem = string.gsub(rem, "\027%[1;34m", "<span color='#329bcd'>")
+ rem = string.gsub(rem, "\027%[1;35m", "<span color='#cd64ff'>")
+ rem = string.gsub(rem, "\027%[1;36m", "<span color='#9bcdff'>")
+ rem = string.gsub(rem, "\027%[1;37m", "<span color='#ffffff'>")
+ return rem
+ end
+ print (cal_gett())
+end
7 .bin/scrmax
@@ -0,0 +1,7 @@
+#!/bin/bash
+#
+# Jack Holborn 2012
+#
+# Only use external monitor
+
+xrandr --output VGA-0 --preferred --output LVDS --off
27 .bin/scroff
@@ -0,0 +1,27 @@
+#!/bin/bash
+#
+# Jack Holborn 2012
+#
+# turn off all screen-/power-saver features and turn off caps lock
+
+# Print error messages
+errorout() { echo "error $*" >&2; exit 1; }
+
+# Use 'xset' only in X
+if [ -n "$DISPLAY" ]; then
+ xset -dpms
+ xset s off
+ xset s noblank
+ xset s noexpose
+ xset r rate 340 25
+ setterm -blank 0
+ setterm -powerdown 0
+ xmodmap -e "remove Lock = Caps_Lock"
+ xmodmap -e "keysym Caps_Lock = Shift_L"
+else
+ setterm -blank 0
+ setterm -powerdown 0
+fi
+
+# Print confirmation
+printf "\nDONE\n\n"
2 .bin/shut
@@ -0,0 +1,2 @@
+#!/bin/bash
+dbus-send --system --print-reply --dest='org.freedesktop.ConsoleKit' /org/freedesktop/ConsoleKit/Manager org.freedesktop.ConsoleKit.Manager.Stop
7 .bin/writing
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+exec "focuswriter" &
+exec "artha"&
+exec "gaiksaurus" &
+cd /home/jack/Documents/programs/coed11/
+exec wine coed11.exe &
17 .bin/wt
@@ -0,0 +1,17 @@
+#!/bin/bash
+echo 'Australia :' `date +"%a, %R %z"`
+export TZ=Pacific/Auckland
+echo 'New Zealand :' `date +"%a, %R %z"`
+export TZ=Pacific/Rarotonga
+echo 'Cook Islands:' `date +"%a, %R %z"`
+echo ''
+export TZ=Europe/Berlin
+echo 'Europe :' `date +"%a, %R %z"`
+export TZ=Europe/London
+echo 'UK :' `date +"%a, %R %z"`
+echo ''
+export TZ=America/Los_Angeles
+echo 'USA West :' `date +"%a, %R %z"`
+export TZ=America/New_York
+echo 'USA East :' `date +"%a, %R %z"`
+unset TZ
28 .config/Xcolours/jack
@@ -0,0 +1,28 @@
+!COLOURS JACK
+!!! Fore- / Background
+*background: #1a1a1a
+*foreground: #b2b2b2
+!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
136 .config/awesome/bindings.lua
@@ -0,0 +1,136 @@
+-- BINDINGS
+-- Mouse bindings
+root.buttons(awful.util.table.join(
+ awful.button({ }, 3, function () mainmenu:toggle() end),
+ awful.button({ }, 4, awful.tag.viewnext),
+ awful.button({ }, 5, awful.tag.viewprev))
+)
+
+-- Key bindings
+-- Global
+globalkeys = awful.util.table.join(
+ -- Awesome
+ -- start/stop
+ awful.key({ modkey, "Shift" }, "q", awesome.quit ),
+ awful.key({ modkey, "Shift" }, "r", awesome.restart ),
+ -- theme switcher
+ 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 ),
+ -- 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.client.focus.byidx( 1)
+ if client.focus then
+ client.focus:raise()
+ end
+ end),
+ 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),
+ -- layouts
+ 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, "Shift" }, "Right", function () awful.client.swap.byidx( 1) end),
+ awful.key({ modkey, "Shift" }, "Left", function () awful.client.swap.byidx( -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.prompt.run({ prompt = "Run Lua code: " },
+ mypromptbox[mouse.screen].widget,
+ awful.util.eval, nil,
+ awful.util.getdir("cache") .. "/history_eval"))
+ end),
+ -- Programs
+ -- launchers
+ awful.key({ modkey, }, "w", function () mainmenu: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),
+ -- miscellaneous
+ awful.key({ modkey, "Shift" }, "x", function () awful.util.spawn("xkill") end),
+ awful.key({ modkey, "Control" }, "r", function () naughty.notify({ text = cal_gett(), border_color = "#1a1a1a", 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),
+ -- web
+ awful.key({ modkey }, "f", function () awful.util.spawn("firefox") end),
+ awful.key({ modkey }, "k", function () awful.util.spawn("kontact") end),
+ -- file managers
+ awful.key({ modkey, }, "r", function () awful.util.spawn(terminal .. " -e ranger") end),
+ awful.key({ modkey, }, "d", function () awful.util.spawn("dolphin") end)
+)
+
+-- Clients
+clientkeys = awful.util.table.join(
+ awful.key({ modkey, "Shift" }, "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
+ end),
+ awful.key({ modkey, "Shift" }, "f", function (c)
+ c.maximized_horizontal = not c.maximized_horizontal c.maximized_vertical = not c.maximized_vertical
+ end))
+
+-- WORKSPACES
+-- shifty:
+for i=1,9 do
+ globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey }, i, function ()
+ local t = awful.tag.viewonly(shifty.getpos(i))
+ end))
+ globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey, "Control" }, i, function ()
+ local t = shifty.getpos(i)
+ t.selected = not t.selected
+ end))
+ globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey, "Control", "Shift" }, i, function ()
+ if client.focus then
+ awful.client.toggletag(shifty.getpos(i))
+ end
+ end))
+ globalkeys = awful.util.table.join(globalkeys, awful.key({ modkey, "Shift" }, i, function ()
+ if client.focus then
+ local t = shifty.getpos(i)
+ awful.client.movetotag(t)
+ awful.tag.viewonly(t)
+ end
+ end))
+end
+
+-- Set keys
+root.keys(globalkeys)
+shifty.config.globalkeys = globalkeys
+shifty.config.clientkeys = clientkeys
119 .config/awesome/calendar2.lua
@@ -0,0 +1,119 @@
+-- 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
19 .config/awesome/coloursday.lua
@@ -0,0 +1,19 @@
+-- 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"
19 .config/awesome/coloursnight.lua
@@ -0,0 +1,19 @@
+-- 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"
98 .config/awesome/creation.lua
@@ -0,0 +1,98 @@
+-- CREATION
+-- SYSTRAY
+mysystray = widget({ type = "systray" })
+
+-- WIBOXES
+mywibox = {}
+infobox = {}
+mypromptbox = {}
+-- taglist
+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)
+ )
+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])
+ end
+ client.focus = c
+ c:raise()
+ end),
+ awful.button({ }, 3, function ()
+ if instance then
+ instance:hide()
+ instance = nil
+ else
+ instance = awful.menu.clients({ width=250 })
+ end
+ end),
+ awful.button({ }, 4, function ()
+ awful.client.focus.byidx(1)
+ if client.focus then
+ client.focus:raise()
+ end
+ end),
+ awful.button({ }, 5, function ()
+ awful.client.focus.byidx(-1)
+ if client.focus then
+ client.focus:raise()
+ end
+ end)
+)
+-- 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
+ 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
+ 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
+end
53 .config/awesome/menu.lua
@@ -0,0 +1,53 @@
+-- MENU
+networkmenu = {
+ { "firefox", "firefox" },
+ { "ktorrent", "ktorrent" }
+}
+officemenu = {
+ { "kontact", "kontact" },
+ { "abiword", "abiword" },
+ { "writer", "libreoffice -writer" },
+ { "calc", "libreoffice -calc" },
+ { "impress", "libreoffice -impress" },
+ { "kcalc", "kcalc" },
+ { "r", terminal .. " -e R" }
+}
+editorsmenu = {
+ { "vim", terminal .. " -e vim" },
+ { "kate", "kate" }
+}
+graphicsmenu = {
+ { "gimp", "gimp" },
+ { "gwenview", "gwenview" }
+}
+mediamenu = {
+ { "vlc", "vlc" },
+ { "ncmpcpp", terminal .. " -e ncmpcpp" },
+ { "audacity", "audacity" }
+}
+utilitiesmenu = {
+ { "k3b", "k3b" },
+ { "truecrypt", "truecrypt" }
+}
+systemmenu = {
+ { "htop", terminal .. " -e htop" },
+ { "kill", "xkill" }
+}
+awesomemenu = {
+ { "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 }
+ }
+})
31 .config/awesome/rc.lua
@@ -0,0 +1,31 @@
+-- RC
+-- General helpers
+require("awful")
+require("awful.autofocus")
+require("beautiful")
+require("naughty")
+require("vicious")
+require("shifty")
+require("calendar2")
+
+-- Defaults
+terminal = "urxvt"
+editor = os.getenv("EDITOR") or "vim"
+editor_cmd = terminal .. " -e " .. editor
+browser = "luakit"
+modkey = "Mod4"
+altkey = "Mod1"
+
+-- Configs
+require("themes")
+require("tags")
+require("menu")
+require("widgetstop")
+require("widgetsbottom")
+require("creation")
+require("bindings")
+require("signals")
+
+os.execute"dex -a"
+-- awful.util.spawn_with_shell ("kde4")
+-- awful.util.spawn_with_shell ("qdbus org.kde.kded /kded loadModule powerdevil")
26 .config/awesome/remind.lua
@@ -0,0 +1,26 @@
+-- REMIND
+require("themes")
+
+function cal_gett()
+ local fp = io.popen("remind /home/jack/.reminders")
+ local rem = fp:read("*a")
+ fp:close()
+ rem = string.gsub(rem, "\027%[0m", "</span>")
+ rem = string.gsub(rem, "\027%[0;30m", "<span color='" .. blk .. "'>") --black #1a1a1a
+ rem = string.gsub(rem, "\027%[0;31m", "<span color='" .. red .. "'>") --red #b23535
+ rem = string.gsub(rem, "\027%[0;32m", "<span color='" .. gre .. "'>") --green #60801f
+ rem = string.gsub(rem, "\027%[0;33m", "<span color='" .. yel .. "'>") --yellow #be6e00
+ rem = string.gsub(rem, "\027%[0;34m", "<span color='" .. blu .. "'>") --blue #1f6080
+ rem = string.gsub(rem, "\027%[0;35m", "<span color='" .. mag .. "'>") --magenta #8f46b2
+ rem = string.gsub(rem, "\027%[0;36m", "<span color='" .. cya .. "'>") --cyan #73afb4
+ rem = string.gsub(rem, "\027%[0;37m", "<span color='" .. whi .. "'>") --white #b2b2b2
+ rem = string.gsub(rem, "\027%[1;30m", "<span color='" .. brblk .. "'>") --br-black #4c4c4c
+ rem = string.gsub(rem, "\027%[1;31m", "<span color='" .. brred .. "'>") --br-red #ff4b4b
+ rem = string.gsub(rem, "\027%[1;32m", "<span color='" .. brgre .. "'>") --br-green #9bcd32
+ rem = string.gsub(rem, "\027%[1;33m", "<span color='" .. bryel .. "'>") --br-yellow #d79b1e
+ rem = string.gsub(rem, "\027%[1;34m", "<span color='" .. brblu .. "'>") --br-blue #329bcd
+ rem = string.gsub(rem, "\027%[1;35m", "<span color='" .. brmag .. "'>") --br-magenta #cd64ff
+ rem = string.gsub(rem, "\027%[1;36m", "<span color='" .. brcya .. "'>") --br-cyan #9bcdff
+ rem = string.gsub(rem, "\027%[1;37m", "<span color='" .. brwhi .. "'>") --br-white #ffffff
+ return rem
+end
1 .config/awesome/shifty
@@ -0,0 +1 @@
+Subproject commit ae5792e3a87604b935e2afdc5549e1676cfd0f30
12 .config/awesome/signals.lua
@@ -0,0 +1,12 @@
+-- SIGNALS
+client.add_signal("manage", function (c, startup)
+ if not startup then
+ if not c.size_hints.user_position and not c.size_hints.program_position then
+ awful.placement.no_overlap(c)
+ awful.placement.no_offscreen(c)
+ end
+ end
+end)
+
+client.add_signal("focus", function(c) c.border_color = beautiful.border_focus end)
+client.add_signal("unfocus", function(c) c.border_color = beautiful.border_normal end)
68 .config/awesome/tags.lua
@@ -0,0 +1,68 @@
+-- TAGS + TAG MATCHING
+-- layouts
+layouts = {
+ awful.layout.suit.fair,
+ awful.layout.suit.fair.horizontal,
+ awful.layout.suit.tile,
+ awful.layout.suit.tile.left,
+ awful.layout.suit.tile.bottom,
+ awful.layout.suit.tile.top,
+ awful.layout.suit.max,
+ awful.layout.suit.floating,
+}
+
+-- 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 },
+}
+
+-- shifty: tags matching and client rules
+shifty.config.apps = {
+ -- web
+ { match = { "Firefox", "luakit" }, tag = "2-web", },
+ -- communications
+ { match = { "kontact" }, tag = "3-com", },
+ --office
+ { match = { "VCLSalFrame", "griffith" }, tag = "4-office", },
+ { match = { "kate" }, tag = "4-office", },
+ { match = { "Okular" }, tag = "5-pdf", },
+ -- 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 },
+ --video
+ { match = { "MPlayer", "Vlc", "Audacity" }, tag = "7-video", },
+ { match = { "MPlayer" }, geometry = {0,15,nil,nil}, float = true },
+ -- music
+ { match = { "ncmpcpp" }, tag = "8-music", },
+ -- miscellaneous
+ { match = { "ktorrent" }, tag = "torrent", },
+ { match = { "Gwenview", "sxiv", "feh", "qiv" }, tag = "picture", },
+
+ -- client manipulation
+ { match = { "" },
+ honorsizehints = false,
+ buttons = awful.util.table.join (
+ awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
+ awful.button({ modkey }, 1, awful.mouse.client.move),
+ awful.button({ modkey }, 3, awful.mouse.client.resize))
+ },
+}
+
+-- shifty: defaults
+shifty.config.defaults = {
+ layout = awful.layout.suit.max,
+}
+shifty.config.layouts = layouts
+shifty.init()
38 .config/awesome/themeday.lua
@@ -0,0 +1,38 @@
+-- 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 .. "'>"
38 .config/awesome/themenight.lua
@@ -0,0 +1,38 @@
+-- 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 .. "'>"
25 .config/awesome/themes.lua
@@ -0,0 +1,25 @@
+-- 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 >= "08" and tod <="18" 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()
BIN .config/awesome/themes/day/spacer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/day/submenu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/day/taglist/squarefw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/day/taglist/squarew.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/day/tasklist/floatingw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 .config/awesome/themes/day/theme.lua
@@ -0,0 +1,38 @@
+-- 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 = brblu
+theme.fg_urgent = trwhi
+theme.fg_minimize = brwhi
+
+theme.border_width = "1"
+theme.border_normal = trwhi
+theme.border_focus = brblu
+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/.backgrounds/dandelion.png" }
+return theme
20 .config/awesome/themes/day/worldmap.vim
@@ -0,0 +1,20 @@
+
+ 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
BIN .config/awesome/themes/night/spacer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/night/submenu.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/night/taglist/squarefw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/night/taglist/squarew.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN .config/awesome/themes/night/tasklist/floatingw.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 .config/awesome/themes/night/theme.lua
@@ -0,0 +1,40 @@
+-- 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 = blu
+theme.border_marked = yel
+
+-- 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/.backgrounds/background0155.jpg" }
+return theme
20 .config/awesome/themes/night/worldmap.vim
@@ -0,0 +1,20 @@
+
+ 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
0 .config/awesome/themes/theme_to_use
No changes.
195 .config/awesome/widgetsbottom.lua
@@ -0,0 +1,195 @@
+-- WIDGETS BOTTOM
+-- RIGHT
+-- CPU widget
+cputwidget = widget({ type = "textbox" })
+ vicious.register(cputwidget, vicious.widgets.cpu,
+ function (widget, args)
+ if args[1] >= 50 and args[1] <80 then
+ return "" .. colyel .. "cpu " .. coldef .. colbyel .. args[1] .. "% (" .. args[2] .. "%/" .. args[3] .. "%) " .. coldef .. ""
+ elseif args[1] >= 80 then
+ return "" .. colred .. "cpu " .. coldef .. colbred .. args[1] .. "% (" .. args[2] .. "%/" .. args[3] .. "%) " .. coldef .. ""
+ else
+ return "" .. colblk .. "cpu " .. coldef .. colbblk .. args[1] .. "% (" .. args[2] .. "%/" .. args[3] .. "%) " .. 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, {"coretemp.0", "core"} )
+
+-- 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 avail) " .. 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 avail) " .. 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}"] .. "% (only " .. args["{/ avail_gb}"] .. " GiB avail) " .. coldef .. ""
+ else
+ infoswitch = 0
+ return "" .. colblk .. "/ " .. coldef .. colbblk .. args["{/ used_p}"] .. "% (" .. args["{/ avail_gb}"] .. " GiB avail) " .. 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)
+
+-- Net widgets
+-- eth
+netupwidget = widget({ type = "textbox" })
+ vicious.cache(vicious.widgets.net)
+ vicious.register(netupwidget, vicious.widgets.net, "" .. colblk .. "up " .. coldef .. colbblk .. "${eth0 up_kb} " .. coldef .. "")
+
+netdownwidget = widget({ type = "textbox" })
+ vicious.register(netdownwidget, vicious.widgets.net, "" .. colblk .. "down " ..coldef .. colbblk .. "${eth0 down_kb} " .. coldef .. "")
+
+netwidget = widget({ type = "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
+ if ip_addr() == nil then
+ netdownwidget.visible = false
+ netupwidget.visible = false
+ return ""
+ else
+ netdownwidget.visible = true
+ netupwidget.visible = true
+ return "" .. colblk .. "eth0 " .. coldef .. colbblk .. 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 = widget({ type = "textbox" })
+ vicious.register(wifidownwidget, vicious.widgets.net, "" .. colblk .. "down " .. coldef .. colbblk .. "${wlan0 down_kb} " .. coldef .. "")
+
+wifiwidget = widget({ type = "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
+ if args["{link}"] == 0 then
+ wifidownwidget.visible = false
+ wifiupwidget.visible = false
+ return ""
+ else
+ 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 .. " "
+ 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 .. " "
+ 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 .. " "
+ end
+ end
+ end, refresh_delay, "wlan0" )
+
+-- Battery widget
+ batwidget = widget({ type = "textbox" })
+ vicious.register(batwidget, vicious.widgets.bat,
+ function (widget, args)
+ if args[2] >= 20 and args[2] < 30 then
+ return "" .. colyel .. "bat " .. coldef .. colbyel .. args[2] .. "% " .. coldef .. ""
+ elseif args[2] >= 10 and args[2] < 20 then
+ return "" .. colred .. "bat " .. coldef .. colbred .. 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] < 10 then
+ return "" .. colred .. "bat " .. coldef .. colbred .. args[2] .. "% " .. coldef .. ""
+ else
+ return "" .. colblk .. "bat " .. coldef .. colbblk .. args[2] .. "% " .. coldef .. ""
+ end
+ end, 236, "BAT0" )
+
+-- Volume widget
+volwidget = widget({ type = "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 .. ""
+ else
+ return "" .. colblk .. "vol " .. coldef .. colbblk .. args[1] .. "% " .. coldef .. ""
+ end
+ end, 2, "Master" )
+ volwidget:buttons(
+ awful.util.table.join(
+ awful.button({ }, 1, function () awful.util.spawn("amixer -q sset Master toggle") end),
+ awful.button({ }, 3, function () awful.util.spawn( terminal .. " -e alsamixer") end),
+ awful.button({ }, 4, function () awful.util.spawn("amixer -q sset Master 2dB+") end),
+ 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)
+ )
+ )
99 .config/awesome/widgetstop.lua
@@ -0,0 +1,99 @@
+-- WIDGETS TOP
+-- Calendar widget
+calwidget = widget({ type = "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>"
+ elseif osd == "02" or osd == "22" then
+ return "<span font='proggytiny 7'><sup>nd</sup></span>"
+ elseif osd == "03" or osd == "23" then
+ return "<span font='proggytiny 7'><sup>rd</sup></span>"
+ else
+ return "<span font='proggytiny 7'><sup>th</sup></span>"
+ end
+ end
+ vicious.register(calwidget, vicious.widgets.date, "" .. colbyel .. " %a, %d" .. dayth() .. " %B" .. coldef .. "")
+ calendar2.addCalendarToWidget(calwidget, "" .. colbyel .. "%s" .. coldef .. "")
+
+-- Clock widget
+local function fuzzyclock()
+ -- Get variables
+ local hr = os.date("%H")
+ local min = os.date("%M")
+ -- set daytime switch
+ if hr >= "00" and hr <= "03" then dt = 5
+ elseif hr >= "04" and hr <= "06" then dt = 1
+ elseif hr >= "07" and hr <= "11" then dt = 2
+ 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
+ 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
+ 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
+ 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
+ local clock = "N/A"
+ local tod = ""
+
+ -- 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] .. ""
+ elseif min >= "03" and min <= "07" and nm == "00" then min = 2 clock = "" .. minutes[min] .. " past " .. hours[14] .. ""
+ elseif min >= "03" and min <= "07" then min = 2 clock = "" .. minutes[min] .. " past " .. hours[hr] .. "" tod = "" .. daytime[dt] .. ""
+ elseif min >= "08" and min <= "12" and nm == "00" then min = 3 clock = "" .. minutes[min] .. " past " .. hours[14] .. ""
+ elseif min >= "08" and min <= "12" then min = 3 clock = "" .. minutes[min] .. " past " .. hours[hr] .. "" tod = "" .. daytime[dt] .. ""
+ elseif min >= "13" and min <= "17" and nm == "00" then min = 4 clock = "" .. minutes[min] .. " past " .. hours[14] .. ""
+ elseif min >= "13" and min <= "17" then min = 4 clock = "a " .. minutes[min] .. " past " .. hours[hr] .. "" tod = "" .. daytime[dt] .. ""
+ elseif min >= "18" and min <= "22" and nm == "00" then min = 5 clock = "" .. minutes[min] .. " past " .. hours[14] .. ""
+ elseif min >= "18" and min <= "22" then min = 5 clock = "" .. minutes[min] .. " past " .. hours[hr] .. "" tod = "" .. daytime[dt] .. ""
+ elseif min >= "23" and min <= "27" and nm == "00" then min = 6 clock = "" .. minutes[min] .. " past " .. hours[14] .. ""
+ 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" then min = 6 clock = "" .. minutes[min] .. " to " .. hours[hrp] ..