Commits

firefly  committed 03eeaf5 Merge

Merge with latest bitbucket head...

  • Participants
  • Parent commits a37aa8b, 695fc85

Comments (0)

Files changed (5)

 urxvt*scrollBar: false
 
 ! Pseudo transparency
-!urxvt*shading:     20
-!urxvt*transparent: true
+urxvt*shading:     20
+urxvt*transparent: true
 
 !mplus-1mn-light
 !urxvt.font: xft:OCRB:pixelsize=10
 urxvt.perl-ext-common: default,url-select
 
 urxvt.keysym.A-n:     perl:url-select:select_next
-!urxvt.urlLauncher:    firefox
-urxvt.urlLauncher:    luakit
+urxvt.urlLauncher:    firefox
 urxvt.underlineURLs:  true
 
-!-- Colours -------------------------------------
-
-!! FireFly's mix
-!urxvt.color1:  #CC2020
-!urxvt.color2:  #2A8C2A
-!urxvt.color3:  #D9A641
-!urxvt.color4:  #3E59BE
-!urxvt.color5:  #B037B0
-!urxvt.color6:  #66C3DE
-!! TODO: Figure out when 7,8,15,16 are used. black/white?
-!urxvt.color7:  #D3D7CF
-!urxvt.color8:  #555753
-!
-!urxvt.color9:  #E96060
-!urxvt.color10: #7ACA4A
-!urxvt.color11: #F9C64F
-!!urxvt.color11: #FCE94F
-!urxvt.color12: #5E79CC
-!urxvt.color13: #B037B0
-!urxvt.color14: #66E2E2
-!
-!urxvt.color15: #D4D4A4
-!urxvt.color16: #1E1EF8
-
-
-!! jellybeans colours -- https://github.com/nanotech/jellybeans.vim/blob/master/ansi-term-colors.txt
-urxvt.color0: #3b3b3b
-urxvt.color1: #cf6a4b
-urxvt.color2: #99ad6a
-urxvt.color3: #d8ad4c
-urxvt.color4: #597bc5
-urxvt.color5: #a037b0
-urxvt.color6: #71b9f8
-urxvt.color7: #adadad
+! Colours
+urxvt.color1:  #E96060
+urxvt.color2:  #2A8C2A
+urxvt.color3:  #D9A641
+urxvt.color4:  #4E69BE
+urxvt.color5:  #B037B0
+urxvt.color6:  #66C3DE
 
 urxvt.color9:  #E96060
-urxvt.color10: #7ACA4A
-urxvt.color11: #F9C64F
-urxvt.color12: #5E79CC
+urxvt.color10: #2A8C2A
+urxvt.color11: #D9A641
+urxvt.color12: #4E69BE
 urxvt.color13: #B037B0
-urxvt.color14: #66E2E2
-
-
-!! Paul Rogret's colours: http://www.reddit.com/r/archlinux/comments/ozh5a/my_archlinux_desktop_followup/c3ldr7d
-!urxvt.color1:  #CC0000
-!urxvt.color2:  #4E9A06
-!urxvt.color3:  #C4A000
-!urxvt.color4:  #3465A4
-!urxvt.color5:  #75507B
-!urxvt.color6:  #06989A
-!urxvt.color7:  #D3D7CF
-!urxvt.color8:  #555753
-
-!urxvt.color9:  #E96060
-!urxvt.color10: #8AE234
-!urxvt.color11: #FCE94F
-!urxvt.color12: #729FCF
-!urxvt.color13: #AD7FA8
-!urxvt.color14: #34E2E2
-!urxvt.color15: #D4D4A4
-!urxvt.color16: #1E1EF8
-
+urxvt.color14: #66C3DE
 
 ! -- xft settings ---------------------------------------------------
 !Xft.dpi:       124
 Xft.dpi:       114
 !Xft.dpi:       96
+
 !Xft.autohint:  0
 !Xft.lcdfilter: lcddefault
 !Xft.hintstyle: hintfull
 !Xft.hinting:   1
 Xft.antialias: 1
 Xft.rgba:      rgb
-
-!Xft.antialias: true
-!Xft.rgba:      rgb
-!Xft.lcdfilter: lcddefault
-!Xft.hinting:   true
-!Xft.hintstyle: hintfull
-
-# Check for an interactive session
-[ -z "$PS1" ] && return
+#
+# ~/.bashrc
+#
 
-source "${HOME}/.shellrc"
+# If not running interactively, don't do anything
+[[ $- != *i* ]] && return
 
-#### Setup prompt ###################################################
-color() {
-	case $1 in
-		white   ) echo 30; return ;;
-		red     ) echo 31; return ;;
-		green   ) echo 32; return ;;
-		yellow  ) echo 33; return ;;
-		blue    ) echo 34; return ;;
-		magenta ) echo 35; return ;;
-		cyan    ) echo 36; return ;;
-		*       ) echo  1; return ;; # bold → "something's wrong"
-	esac
-}
+alias ls='ls --color=auto'
+PS1='[\u@\h \W]\$ '
 
-prompt_format="\e[`color $prompt_color`m"
-
-PS1="[\[$prompt_format\]\u@\h\[\e[m\] \w]\$ "
-
-#### Setup autocompletion ###########################################
-man() {
-	env \
-		LESS_TERMCAP_mb=$(printf "\e[1;37m") \
-		LESS_TERMCAP_md=$(printf "\e[1;37m") \
-		LESS_TERMCAP_me=$(printf "\e[0m") \
-		LESS_TERMCAP_se=$(printf "\e[0m") \
-		LESS_TERMCAP_so=$(printf "\e[1;47;30m") \
-		LESS_TERMCAP_ue=$(printf "\e[0m") \
-		LESS_TERMCAP_us=$(printf "\e[0;36m") \
-			man "$@"
-}
-
-complete -cf man
-complete -cf sudo
-#source /usr/lib/node_modules/npm/lib/utils/completion.sh
-
-#export GTK_IM_MODULE=ibus
-#export XMODIFIERS=@im=ibus
-#export QT_IM_MODULE=ibus
-
+PATH="$PATH:$HOME/node_modules/.bin"

File config/awesome/rc.lua

 -- Notification library
 require("naughty")
 
--- XXX: Disable if necessary; used for extra widgets
 require("vicious")
 
 -- {{{ Variable definitions
 beautiful.init("/home/firefly/.config/awesome/themes/default-ff/theme.lua")
 
 -- This is used later as the default terminal and editor to run.
---terminal = "urxvt"
-terminal = "pangoterm"
-editor = os.getenv("EDITOR") or "vim"
+terminal = "urxvt"
+editor = os.getenv("EDITOR") or "nano"
 editor_cmd = terminal .. " -e " .. editor
 
-
 -- Default modkey.
 -- Usually, Mod4 is the key with a logo between Control and Alt.
 -- If you do not like this or do not have such a key,
 end
 -- }}}
 
+-- {{{ Menu
+-- Create a laucher widget and a main menu
+myawesomemenu = {
+   { "manual", terminal .. " -e man awesome" },
+   { "edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
+   { "restart", awesome.restart },
+   { "quit", awesome.quit }
+}
+
+mymainmenu = awful.menu({ items = { { "awesome", myawesomemenu, beautiful.awesome_icon },
+                                    { "open terminal", terminal }
+                                  }
+                        })
+
+mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
+                                     menu = mymainmenu })
+-- }}}
 
 -- {{{ Wibox
----- Custom widgets -------------------------------------------------
-
-local chars =
-  { shade = "▨"
-  , mail  = "⌧"
-  , clock = "⌚"
-  , music = "♪"
-  , cpu   = "❖"
-  , heat  = "♨"
-
-  , battery = string.char(0xE2, 0x8C, 0xB8)
-  , power   = string.char(0xE2, 0x9A, 0xA1)
---, music   = string.char(0xE2, 0x99, 0xAA)
-  }
-
-for k,v in pairs(chars) do
-  chars[k] = ('<span foreground="%s">%s</span>'):format(beautiful.fg_special, v)
-end
-
--- Emphasizes a string, optionally if a condition is met (the default is
--- `true` for condition, so that the string emphasized).
-local function emphasize(str, condition)
-  if condition == nil or condition then
-    return ('<span weight="bold" foreground="#c00" ' ..
-            'background="#f66">%s</span>'):format(str)
-  else
-    return str
-  end
-end
-
+-- Network usage widget
+netwidget = widget({ type = "textbox" })
+vicious.register(netwidget, vicious.widgets.net, '<span color="#CC9393">${wlan0 down_kb}</span> <span color="#7F9F7F">${wlan0 up_kb}</span>', 3)
 
 -- CPU widget
 cpuwidget = widget({ type = "textbox" })
+--vicious.register(cpuwidget, vicious.widgets.cpu, 'CPU: $1% ', 2)
 local blocks = {"▁", "▂", "▃", "▄", "▅", "▆", "▇", "█"}
-
+---[[
 vicious.register(cpuwidget, vicious.widgets.cpu, function (widget, args)
   local res = ""
 
   for i,v in ipairs(args) do
     if i == 1 then
-      res = chars.cpu .. " " .. res .. emphasize(tostring(v) .. "%", v > 70) .. " "
+      res = res .. "CPU: " .. tostring(v) .. "% "
     else
       local idx = math.floor(v / (100 / 7) + 1)
-      res = res .. tostring(blocks[idx])
+      res = res .. tostring(blocks[idx]) .. " "
     end
   end
+  
+  return res .. "| "
+end)
+--]]
 
-  return res
-end)
+ff_testwidget = awful.widget.progressbar()
+ff_testwidget:set_width(8)
+ff_testwidget:set_height(10)
+ff_testwidget:set_vertical(true)
+ff_testwidget:set_background_color('#494B4F')
+ff_testwidget:set_color('#FF5656')
+ff_testwidget:set_gradient_colors({ '#FF5656', '#88A175', '#AECF96' })
 
+ff_testwidget:set_value(0.8)
 
--- Temperature widget
-termwidget = widget({ type = "textbox" })
-vicious.register(termwidget, vicious.widgets.thermal, function(widget, args)
-  return chars.heat .. " " .. emphasize(tostring(args[1] .. '°C'), args[1] >= 75)
-end , 2, 'thermal_zone0')
+ff_2 = widget({ type = "textbox" })
+ff_2.text = "Hello"
 
-
--- Battery widget
-batwidget = widget({ type = "textbox" })
-vicious.register(batwidget, vicious.widgets.bat, function(widget, args)
-  local char = args[1] == "+" and chars.power or chars.battery
-  return ("%s %s [%s]"):format(char, emphasize(tostring(args[2]) .. "%",
-                                               args[2] < 20),
-                               args[3])
-end, 30, 'BAT1')
-
-
--- Now playing widget
-local musicwidget = widget({ type = "textbox" })
-
-vicious.register(musicwidget, vicious.widgets.mpd,
-                 function (widget, args)
-                   if     args["{state}"] == "N/A" then
-                     return ("%s [MPD off]"):format(chars.music)
-
-                   elseif args["{state}"] == "Stop" then
-                     return ("%s [stopped]"):format(chars.music)
-
-                   else
-                     return ("%s  %s - %s"):format(chars.music, args["{Artist}"],
-                                                                args["{Title}"])
-                   end
-                 end)
-
-
----- Default widgets ------------------------------------------------
 -- Create a textclock widget
-mytextclock = awful.widget.textclock({ align = "right" },
-                                     chars.clock .. " %d %H:%M")
+mytextclock = awful.widget.textclock({ align = "right" })
 
 -- Create a systray
 mysystray = widget({ type = "systray" })
     mypromptbox[s] = awful.widget.prompt({ layout = awful.widget.layout.horizontal.leftright })
     -- Create an imagebox widget which will contains an icon indicating which layout we're using.
     -- We need one layoutbox per screen.
-  mylayoutbox[s] = awful.widget.layoutbox(s)
+    mylayoutbox[s] = awful.widget.layoutbox(s)
     mylayoutbox[s]:buttons(awful.util.table.join(
-                           awful.button({ }, 1, function () awful.layout.inc(layouts,  1) end),
+                           awful.button({ }, 1, function () awful.layout.inc(layouts, 1) end),
                            awful.button({ }, 3, function () awful.layout.inc(layouts, -1) end),
-                           awful.button({ }, 4, function () awful.layout.inc(layouts,  1) end),
+                           awful.button({ }, 4, function () awful.layout.inc(layouts, 1) end),
                            awful.button({ }, 5, function () awful.layout.inc(layouts, -1) end)))
     -- Create a taglist widget
     mytaglist[s] = awful.widget.taglist(s, awful.widget.taglist.label.all, mytaglist.buttons)
             mypromptbox[s],
             layout = awful.widget.layout.horizontal.leftright
         },
+        mylayoutbox[s],
+        mytextclock,
+        netwidget,
+        cpuwidget,
+--        ff_2,
+--        ff_testwidget,
         s == 1 and mysystray or nil,
-        s == 1 and pad(pw)   or nil,
-
-        mytextclock,
-        pad(pw),
-        cpuwidget,
-        pad(pw),
-        termwidget, -- laptop only
-        pad(pw),
-        batwidget,
-        pad(pw),
-        musicwidget,
-        pad(10),
         mytasklist[s],
         layout = awful.widget.layout.horizontal.rightleft
     }
 
 -- {{{ Mouse bindings
 root.buttons(awful.util.table.join(
---    awful.button({ }, 3, function () mymainmenu:toggle() end),
+    awful.button({ }, 3, function () mymainmenu:toggle() end),
     awful.button({ }, 4, awful.tag.viewnext),
     awful.button({ }, 5, awful.tag.viewprev)
 ))
         local dropbox = "/home/firefly/Dropbox/Public"
         local dropurl = "http://dl.dropbox.com/u/24715905"
         local relname = "/screenshots/" .. os.date("%Y-%m-%d_%H-%M-%S.png")
-
+        
         local localname = dropbox .. relname
-        local webname   = dropurl .. relname
-
+        local webname = dropurl .. relname
+        
         awful.util.spawn("scrot " .. options .. " '" .. localname .. "' &")
-        awful.util.spawn("echo -n '" .. webname .. "' | xclip -i")
+        awful.util.spawn("echo '" .. webname .. "' | xclip -i")
     end
 end
-
+    
 -- {{{ Key bindings
 -- FireFly edits: svorakified keybindings
 globalkeys = awful.util.table.join(
     awful.key({ modkey,           }, "Right",  awful.tag.viewnext       ),
     awful.key({ modkey,           }, "Escape", awful.tag.history.restore),
 
-    -- Change focus
+	-- Change focus
     awful.key({ modkey,           }, "n",
         function ()
             awful.client.focus.byidx( 1)
         end),
     awful.key({ modkey,           }, "h", function () awful.screen.focus_relative( 1) end),
     awful.key({ modkey,           }, "s", function () awful.screen.focus_relative(-1) end),
-
+    
     awful.key({ modkey,           }, "w", function () mymainmenu:show({keygrabber=true}) end),
 
     -- Layout manipulation
 
     awful.key({ modkey, "Shift" }, "h",     function () awful.tag.incmwfact( 0.05)    end),
     awful.key({ modkey, "Shift" }, "s",     function () awful.tag.incmwfact(-0.05)    end),
-
+    
     awful.key({ modkey, "Control" }, "h",     function () awful.tag.incnmaster( 1)      end),
     awful.key({ modkey, "Control" }, "s",     function () awful.tag.incnmaster(-1)      end),
     awful.key({ modkey, "Control" }, "t",     function () awful.tag.incncol( 1)         end),
                   awful.util.eval, nil,
                   awful.util.getdir("cache") .. "/history_eval")
               end),
-
+    
     -- Screenshot
     awful.key({         }, "Print", function () awful.util.spawn("/usr/local/bin/dropscrot") end),
-    awful.key({ "Mod1"  }, "Print", function () awful.util.spawn("/usr/local/bin/dropscrot -s") end)
+    awful.key({ "Alt"   }, "Print", function () awful.util.spawn("/usr/local/bin/dropscrot -s") end)
 )
 
 clientkeys = awful.util.table.join(
     awful.key({ modkey,           }, "f",      function (c) c.fullscreen = not c.fullscreen  end),
-    awful.key({ modkey, "Shift"   }, "f",      awful.client.floating.toggle                     ),
     awful.key({ modkey, "Shift"   }, "c",      function (c) c:kill()                         end),
+    awful.key({ modkey, "Control" }, "space",  awful.client.floating.toggle                     ),
     awful.key({ modkey, "Control" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
     awful.key({ modkey,           }, "o",      awful.client.movetoscreen                        ),
     awful.key({ modkey, "Shift"   }, "r",      function (c) c:redraw()                       end),
---    awful.key({ modkey,           }, "t",      function (c) c.ontop = not c.ontop            end),
---    awful.key({ modkey,           }, "n",      function (c) c.minimized = not c.minimized    end),
+    awful.key({ modkey,           }, "t",      function (c) c.ontop = not c.ontop            end),
+    awful.key({ modkey,           }, "n",      function (c) c.minimized = not c.minimized    end),
     awful.key({ modkey,           }, "m",
         function (c)
             c.maximized_horizontal = not c.maximized_horizontal
       properties = { floating = true } },
     { rule = { class = "gimp" },
       properties = { floating = true } },
-    { rule = { class = "Screenkey" },
-      properties = { floating = true } },
     -- Set Firefox to always map on tags number 2 of screen 1.
     -- { rule = { class = "Firefox" },
     --   properties = { tag = tags[1][2] } },
-     { rule = { class = "Opera" },
-       properties = { tag = tags[1][2] } },
-
-     -- Fix problematic size of Notch's DCPU-16 emulator
-     { rule = { class = "computer-DCPU$1" },
-       properties = { width = 480, height = 386 } },
 }
-
--- Use different setups depending on whether multiple monitors are
--- available.
-if #tags >= 2 then
-  table.insert(awful.rules.rules,
-     { rule = { class = "Xchat" },
-       properties = { tag = tags[2][1] } })
-  table.insert(awful.rules.rules,
-     { rule = { class = "Firefox" },
-       except_any = { class = { "Firefox-aurora", "Firefox-nightly" } },
-       properties = { tag = tags[1][1] } })
-else
-  table.insert(awful.rules.rules,
-     { rule = { class = "Xchat" },
-       properties = { tag = tags[1][1] } })
-  table.insert(awful.rules.rules,
-     { rule = { class = "Firefox" },
-       except_any = { class = { "Firefox-aurora", "Firefox-nightly" } },
-       properties = { tag = tags[1][2] } })
-end
 -- }}}
 
 -- {{{ Signals
     end
 end)
 
-client.add_signal("focus",   function(c) c.border_color = beautiful.border_focus  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)
 -- }}}
 #  export TERM=xterm
 #  export TERM=rxvt-unicode-256color
 #fi
+if [ x$TERM = xscreen ]; then
+  export TERM=screen-256color
+fi
 
 export GREP_OPTIONS='--color=auto' # -P
 export GREP_COLORS='cx=37'
 # ~/.xinitrc
 #
 
-#(sleep 10 && dropboxd) &			# launch dropboxd as user.
-#(sleep 5 && xbindkeys) &            # xbindkeys (bind fn keys)
-#xcape                               # lets Ctrl act as Esc if not held.
-pulseaudio --start                  # mmm, pulseaudio
-#(sleep 5 && xcape) &
+(sleep 1 && dropboxd) &			# launch dropboxd as user.
 
-xbacklight = 0
-
-(sleep 5 &&
-  setxkbmap se-ff
-  xbindkeys
-  xcape
-) &
-
-#(sleep 10 && kmail) &
+# Feed xmodmap with my config
+(xmodmap ~/.Xmodmap) &
 
 # Enable QGtkStyle by exporting some env vars
 export GTK2_RC_FILES="$HOME/.gtkrc-2.0"