Created
January 6, 2013 20:30
-
-
Save xatier/4470017 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13a14,17 | |
> -- vicious widgets library | |
> local vicious = require("vicious") | |
> | |
> | |
41c45 | |
< beautiful.init("/usr/share/awesome/themes/default/theme.lua") | |
--- | |
> beautiful.init("/home/xatierlike/.config/awesome/themes/default/theme.lua") | |
43,45c47,49 | |
< -- This is used later as the default terminal and editor to run. | |
< terminal = "xterm" | |
< editor = os.getenv("EDITOR") or "nano" | |
--- | |
> -- default terminal and editor | |
> terminal = "urxvt" | |
> editor = os.getenv("EDITOR") or "vim" | |
47,52c51 | |
< | |
< -- 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, | |
< -- I suggest you to remap Mod4 to another key using xmodmap or other tools. | |
< -- However, you can use another modifier like Mod1, but it may interact with others. | |
--- | |
> -- modkey | |
54a54,57 | |
> | |
> | |
> | |
> | |
58,69c61,73 | |
< awful.layout.suit.floating, | |
< awful.layout.suit.tile, | |
< awful.layout.suit.tile.left, | |
< awful.layout.suit.tile.bottom, | |
< awful.layout.suit.tile.top, | |
< awful.layout.suit.fair, | |
< awful.layout.suit.fair.horizontal, | |
< awful.layout.suit.spiral, | |
< awful.layout.suit.spiral.dwindle, | |
< awful.layout.suit.max, | |
< awful.layout.suit.max.fullscreen, | |
< awful.layout.suit.magnifier | |
--- | |
> -- delete useless layouts | |
> awful.layout.suit.tile, -- 1 (tile.right) | |
> awful.layout.suit.tile.left, -- 2 | |
> awful.layout.suit.tile.bottom, -- 3 | |
> -- awful.layout.suit.tile.top, -- | |
> -- awful.layout.suit.fair, -- | |
> -- awful.layout.suit.fair.horizontal, -- | |
> -- awful.layout.suit.spiral, -- | |
> -- awful.layout.suit.spiral.dwindle, -- | |
> awful.layout.suit.max, -- 4 | |
> -- awful.layout.suit.max.fullscreen, -- | |
> -- awful.layout.suit.magnifier, -- | |
> awful.layout.suit.floating -- 5 | |
73a78 | |
> beautiful.wallpaper = "/home/xatierlike/Pictures/goodbye.jpg" | |
82c87 | |
< -- Define a tag table which hold all screen tags. | |
--- | |
> -- Each screen has its own tag table. | |
85,86c90,97 | |
< -- Each screen has its own tag table. | |
< tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1]) | |
--- | |
> tags[s] = awful.tag( | |
> {"⌨", "☠", "☢", "☣", "☮", "✈", "✍", "♺", "(._.?)"}, | |
> s, | |
> { layouts[2], layouts[2], layouts[2], | |
> layouts[2], layouts[2], layouts[2], | |
> layouts[5], layouts[5], layouts[2] | |
> } | |
> ) | |
87a99 | |
> | |
112,113c124,142 | |
< -- Create a textclock widget | |
< mytextclock = awful.widget.textclock() | |
--- | |
> | |
> -- network usage | |
> netwidget = wibox.widget.textbox() | |
> vicious.register(netwidget, vicious.widgets.net, '<span color="#CC9090">⇩${eth0 down_kb}</span> <span color="#7F9F7F">⇧${eth0 up_kb}</span>', 3) | |
> | |
> -- clock | |
> mytextclock = awful.widget.textclock(" %a %b %d %H:%M:%S ", 1) | |
> | |
> -- CPU usage | |
> cpuwidget = wibox.widget.textbox() | |
> vicious.register(cpuwidget, vicious.widgets.cpu, '<span color="#CC0000">$1% </span>[$2:$3:$4:$5]' , 2) | |
> | |
> -- memory usage | |
> memwidget = wibox.widget.textbox() | |
> vicious.register(memwidget, vicious.widgets.mem, '$2MB/$3MB (<span color="#00EE00">$1%</span>)', 5) | |
> | |
> -- widget separator | |
> separator = wibox.widget.textbox() | |
> separator.text = " | " | |
190a220,221 | |
> | |
> -- only display systray on screen 1 | |
191a223,230 | |
> | |
> -- add my widgets | |
> right_layout:add(netwidget) | |
> right_layout:add(separator) | |
> right_layout:add(cpuwidget) | |
> right_layout:add(separator) | |
> right_layout:add(memwidget) | |
> right_layout:add(separator) | |
232,233c271,274 | |
< awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), | |
< awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), | |
--- | |
> -- these two lines are useless for me XD | |
> -- awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end), | |
> -- awful.key({ modkey, "Shift" }, "k", function () awful.client.swap.byidx( -1) end), | |
> | |
245a287 | |
> -- spawn a new terminal | |
249a292 | |
> -- resize the client (on the focus) | |
252,255c295,302 | |
< awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), | |
< awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), | |
< awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), | |
< awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), | |
--- | |
> | |
> -- what the fuck? | |
> -- awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end), | |
> -- awful.key({ modkey, "Shift" }, "l", function () awful.tag.incnmaster(-1) end), | |
> -- awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end), | |
> -- awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end), | |
> | |
> -- change window layouts | |
258a306,318 | |
> -- i can move and click my mouse with hotkeys!! | |
> awful.key({ modkey, "Shift" }, "h", function () local mc = mouse.coords() | |
> mouse.coords({x = mc.x-15, y = mc.y}) end), | |
> awful.key({ modkey, "Shift" }, "j", function () local mc = mouse.coords() | |
> mouse.coords({x = mc.x, y = mc.y+15}) end), | |
> awful.key({ modkey, "Shift" }, "k", function () local mc = mouse.coords() | |
> mouse.coords({x = mc.x, y = mc.y-15}) end), | |
> awful.key({ modkey, "Shift" }, "l", function () local mc = mouse.coords() | |
> mouse.coords({x = mc.x+15, y = mc.y}) end), | |
> awful.key({ modkey, "Shift" }, "u", function () awful.util.spawn("xdotool click 1") end), | |
> awful.key({ modkey, "Shift" }, "i", function () awful.util.spawn("xdotool click 3") end), | |
> | |
> -- restore the minimized client | |
263a324 | |
> -- run a piece of lua code | |
270a332 | |
> | |
272c334,341 | |
< awful.key({ modkey }, "p", function() menubar.show() end) | |
--- | |
> awful.key({ modkey }, "p", function() menubar.show() end), | |
> | |
> -- lock my screen | |
> awful.key({ modkey }, "F12", function () awful.util.spawn("xscreensaver-command -lock") end), | |
> | |
> -- shutter as printscreen tools http://shutter-project.org/ | |
> awful.key({ }, "Print", function () awful.util.spawn("/opt/shutter/bin/shutter") end) | |
> | |
358,360d426 | |
< -- Set Firefox to always map on tags number 2 of screen 1. | |
< -- { rule = { class = "Firefox" }, | |
< -- properties = { tag = tags[1][2] } }, | |
428a495,496 | |
> | |
> -- vim:set fdm=marker: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment