Exaos Lee avatar Exaos Lee committed 7a84fe5

...

Comments (0)

Files changed (1)

misc/awesome/rc-debian.lua

 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,
--- 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 = "Mod4"
 
 -- Table of layouts to cover with awful.layout.inc, order matters.
 -- }}}
 
 -- {{{ Tags
--- Define a tag table which hold all screen tags.
--- tags = {}
--- for s = 1, screen.count() do
---    -- Each screen has its own tag table.
---    tags[s] = awful.tag({ 1, 2, 3, 4, 5, 6, 7, 8, 9 }, s, layouts[1])
--- end
 tags = {
    names = { "file", 2, "net", 4, "emacs", 6, "doc", 8, "misc" },
    layout = { layouts[1], layouts[1], layouts[1], layouts[1], layouts[2],
    { "Manual", terminal .. " -e man awesome" },
    { "Edit config", editor_cmd .. " " .. awful.util.getdir("config") .. "/rc.lua" },
    { "Restart", awesome.restart },
-   { "Quit", awesome.quit },
+   { "Quit",    awesome.quit },
    { "GDM Switch",  "gdmflexiserver", "/usr/share/pixmaps/gdm.png"},
 }
 
 mycommons = {
-   -- {"Emacs 23",     "emacs23",       "/usr/share/pixmaps/gnome-emacs.png" },
-   {"Emacs23 Client", "emacsclient.emacs23 -nc", "/usr/share/pixmaps/gnome-emacs.png" },
+   {"Emacs Client", "emacsclient -a emacs -nc", "/usr/share/pixmaps/gnome-emacs.png" },
    {"ipython", terminal .. " -e ipython" },
+   {"spyder", "spyder", os.getenv("HOME") .. "/.icons/spyder.png"},
    {"bpython", terminal .. " -e bpython", "/usr/share/pixmaps/python.xpm" },
    {"bpython-gtk", "bpython-gtk", "/usr/share/pixmaps/bpython.png" },
-   -- { "File Manager", "pcmanfm",    "/usr/share/pixmaps/gnome-folder.png" },
    {"Dolphin", "dolphin", "/usr/share/icons/oxygen/64x64/places/folder.png"},
    {"Nautilus","nautilus --no-desktop","/usr/share/pixmaps/gnome-folder.png" },
    {"VirtualBox",   "VirtualBox",    "/usr/share/pixmaps/VBox.png" },
    {"Google Chrome","google-chrome", "/opt/google/chrome/product_logo_64.png" },
-   -- { "Iceweasel",    "iceweasel",  "/usr/share/pixmaps/iceweasel.png" },
-   -- { "Pidgin",       "pidgin",     "/usr/share/pixmaps/pidgin-menu.xpm" },
 }
 
 mymainmenu = awful.menu(
-   {
-      items = {
-	 {"Awesome", myawesomemenu, beautiful.awesome_icon },
-	 {"Debian", debian.menu.Debian_menu.Debian,
+   { items = {
+	{ "Awesome", myawesomemenu, beautiful.awesome_icon },
+	{ "Debian",  debian.menu.Debian_menu.Debian,
 	  "/usr/share/pixmaps/debian-logo.png" },
-	 {"My Apps", mycommons, myicon },
-	 {"Open Term", terminal, "/usr/share/pixmaps/gnome-xterm.png" },
-   }})
+	{ "My Apps", mycommons, myicon },
+	{ "Open Term", terminal, "/usr/share/pixmaps/gnome-xterm.png" },
+  }})
 
 mylauncher = awful.widget.launcher({ image = image(beautiful.awesome_icon),
                                      menu = mymainmenu })
 -- }}}
 
 -- {{{ Mouse bindings
-root.buttons(awful.util.table.join(
-		awful.button({ }, 3, function () mymainmenu:toggle() end),
-		awful.button({ }, 4, awful.tag.viewnext),
-		awful.button({ }, 5, awful.tag.viewprev)
-	  ))
+root.buttons(
+   awful.util.table.join(
+      awful.button({ }, 3, function () mymainmenu:toggle() end),
+      awful.button({ }, 4, awful.tag.viewnext),
+      awful.button({ }, 5, awful.tag.viewprev)
+))
 -- }}}
 
 -- {{{ Key bindings
 -- }}}
 
 -- {{{ Rules
+-- use `xprop` to get class and other identifiers of clients
 awful.rules.rules = {
    -- All clients will match this rule.
    { rule = { },
 		    focus = true,
 		    keys = clientkeys,
 		    buttons = clientbuttons } },
-   { rule = { class = "MPlayer" },
-     properties = { floating = true } },
-   { rule = { class = "Gimp" },
-     properties = { floating = true } },
+   ---------------------------------------------------------------------
    -- Set file-browser to tag 1: pcmanfm
-   { rule = { class = "Pcmanfm" },
-     properties = { tag = tags[1][1] } },
+   -- { rule = { class = "Pcmanfm" }, properties = { tag = tags[1][1] } },
    -- Set emacs to tag 5: Emacs
-   -- { rule = { class = "Emacs" },
-   --   properties = { tag = tags[1][5] } },
-   -- Set chrome to always map on tags number 4 of screen 1.
-   { rule = { class = "Google-chrome" },
-     properties = { tag = tags[1][3], floating = true } },
-   -- Set Firefox to always map on tags number 5 of screen 1.
-   { rule = { class = "Firefox" },
-     properties = { tag = tags[1][2], floating = true } },
-   ---------------------------------------------------------
-   -- my settings: goldendict
-   { rule = { class = "Goldendict" },
-     properties = { floating = true } },
+   -- { rule = { class = "Emacs" }, properties = { tag = tags[1][5] } },
+   ---------------------------------------------------------------------
+   { rule = { class = "MPlayer" }, properties = { floating = true } },
+   { rule = { class = "Goldendict" }, properties = { floating = true } },
+   { rule = { class = "Google-chrome" }, properties = { floating = true } },
+   { rule = { class = "Firefox" }, properties = { floating = true } },
+   { rule = { class = "Gimp" }, properties = { floating = true } },
+   { rule = { class = "Zim" },  properties = { floating = true } },
 }
 -- }}}
 
    function (c, startup)
       -- Add a titlebar
       -- awful.titlebar.add(c, { modkey = modkey })
-
       -- Enable sloppy focus
       c:add_signal(
 	 "mouse::enter",
 	 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)
+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)
 -- }}}
 
-
 -- Autorun programs
-autorun = true
-autorunApps = {
-   "xrdb -load " .. os.getenv("HOME") .. "/.Xdefaults",
-   "gnome-settings-daemon",
-   "goldendict",
-   "xscreensaver -nosplash",
-}
-if autorun then
+do
+   local autorunApps = {
+      "xrdb -load " .. os.getenv("HOME") .. "/.Xdefaults",
+      "gnome-settings-daemon",
+      "goldendict",
+      "xscreensaver -nosplash",
+   }
    for app = 1, #autorunApps do
       awful.util.spawn(autorunApps[app])
    end
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.