Added ide-skel keybinds to .emacs, changed awesome rc
This commit is contained in:
parent
fd31357144
commit
7f6575ca7a
6 changed files with 153 additions and 62 deletions
9
.emacs
9
.emacs
|
@ -51,8 +51,13 @@
|
||||||
(ac-config-default)
|
(ac-config-default)
|
||||||
|
|
||||||
;; ide-skel
|
;; ide-skel
|
||||||
(require 'tabbar)
|
(global-set-key [f4] 'ide-skel-proj-find-files-by-regexp)
|
||||||
(require 'ide-skel)
|
(global-set-key [f5] 'ide-skel-proj-grep-files-by-regexp)
|
||||||
|
(global-set-key [f10] 'ide-skel-toggle-left-view-window)
|
||||||
|
(global-set-key [f11] 'ide-skel-toggle-bottom-view-window)
|
||||||
|
(global-set-key [f12] 'ide-skel-toggle-right-view-window)
|
||||||
|
(global-set-key [C-next] 'tabbar-backward)
|
||||||
|
(global-set-key [C-prior] 'tabbar-forward)
|
||||||
|
|
||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
;; custom-set-variables was added by Custom.
|
;; custom-set-variables was added by Custom.
|
||||||
|
|
|
@ -1481,7 +1481,7 @@ static char *close[] = {
|
||||||
|
|
||||||
(defvar ide-skel-dir-buffer nil)
|
(defvar ide-skel-dir-buffer nil)
|
||||||
|
|
||||||
(defconst ide-skel-cvs-dir-regexp "\\(\\.svn\\|CVS\\)$")
|
(defconst ide-skel-cvs-dir-regexp "\\(\\.svn\\|CVS\\|\\.git\\)$")
|
||||||
|
|
||||||
(defstruct ide-skel-project
|
(defstruct ide-skel-project
|
||||||
root-path
|
root-path
|
||||||
|
@ -3592,7 +3592,7 @@ Return a list of child widgets."
|
||||||
|
|
||||||
(defun ide-skel-proj-get-all-dirs (root-dir)
|
(defun ide-skel-proj-get-all-dirs (root-dir)
|
||||||
(condition-case err
|
(condition-case err
|
||||||
(split-string (shell-command-to-string (format "find %s -type d | grep -v '/CVS\\|/\\.svn'" root-dir))
|
(split-string (shell-command-to-string (format "find %s -type d | grep -v '/CVS\\|/\\.svn\\|/\\.git'" root-dir))
|
||||||
"\n" t)
|
"\n" t)
|
||||||
(error nil)))
|
(error nil)))
|
||||||
|
|
||||||
|
|
|
@ -15,4 +15,6 @@
|
||||||
"~/.emacs.d/rainbow-mode.el" "A Minor mode for showing colors inline" t)
|
"~/.emacs.d/rainbow-mode.el" "A Minor mode for showing colors inline" t)
|
||||||
(load-file "~/.emacs.d/autopair.el")
|
(load-file "~/.emacs.d/autopair.el")
|
||||||
(load-file "~/.emacs.d/auto-complete-config.el")
|
(load-file "~/.emacs.d/auto-complete-config.el")
|
||||||
(require 'auto-complete-config)
|
(require 'auto-complete-config)
|
||||||
|
(require 'tabbar)
|
||||||
|
(require 'ide-skel)
|
|
@ -36,3 +36,31 @@
|
||||||
(font-lock-variable-name-face ((t (:foreground "#18EFF2"))))
|
(font-lock-variable-name-face ((t (:foreground "#18EFF2"))))
|
||||||
(font-lock-warning-face ((t (:foreground "#FF0000" :bold t)))))))
|
(font-lock-warning-face ((t (:foreground "#FF0000" :bold t)))))))
|
||||||
(provide 'color-theme-weirdness)
|
(provide 'color-theme-weirdness)
|
||||||
|
|
||||||
|
;; ryrobes color theme
|
||||||
|
(defun color-theme-vibrant-ink ()
|
||||||
|
(interactive)
|
||||||
|
(color-theme-install
|
||||||
|
'(color-theme-ryrobes
|
||||||
|
((background-color . "#000000")
|
||||||
|
(background-mode . dark)
|
||||||
|
(border-color . "#000000")
|
||||||
|
(cursor-color . "#FFFFFF")
|
||||||
|
(foreground-color . "#FFFFFF")
|
||||||
|
(mouse-color . "#FFFFFF"))
|
||||||
|
(font-lock-comment-face ((t (:foreground "#9933CC" :italic t))))
|
||||||
|
(font-lock-keyword-face ((t (:foreground "#FF6600"))))
|
||||||
|
(font-lock-type-face ((t (:foreground "#FFCC00"))))
|
||||||
|
(font-lock-string-face ((t (:foreground "#66FF00")))))))
|
||||||
|
(provide 'color-theme-vibrant-ink)
|
||||||
|
(provide 'color-theme-ryrobes)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -1,4 +1,6 @@
|
||||||
*~
|
*~
|
||||||
*session.*
|
*session.*
|
||||||
*\#*
|
*\#*
|
||||||
.emacs.d/ac-comphist.dat
|
.emacs.d/ac-comphist.dat
|
||||||
|
local_*
|
||||||
|
rc2.lua
|
||||||
|
|
166
awesome/rc.lua
166
awesome/rc.lua
|
@ -11,6 +11,49 @@ require("naughty")
|
||||||
-- Themes define colours, icons, and wallpapers
|
-- Themes define colours, icons, and wallpapers
|
||||||
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/default/theme.lua")
|
beautiful.init(os.getenv("HOME") .. "/.config/awesome/themes/default/theme.lua")
|
||||||
|
|
||||||
|
-- Functions
|
||||||
|
function switch_tag (i)
|
||||||
|
local screen = mouse.screen
|
||||||
|
if tags[screen][i] then
|
||||||
|
awful.tag.viewonly(tags[screen][i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function toggle_tag (i)
|
||||||
|
local screen = mouse.screen
|
||||||
|
if tags[screen][i] then
|
||||||
|
awful.tag.viewtoggle(tags[screen][i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function move_to_tag (i)
|
||||||
|
if client.focus and tags[client.focus.screen][i] then
|
||||||
|
awful.client.movetotag(tags[client.focus.screen][i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function toggle_client_tag (i)
|
||||||
|
if client.focus and tags[client.focus.screen][i] then
|
||||||
|
awful.client.toggletag(tags[client.focus.screen][i])
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function fexists(n)
|
||||||
|
local f = io.open(n)
|
||||||
|
|
||||||
|
print(f)
|
||||||
|
print(f == nil)
|
||||||
|
|
||||||
|
if f == nil then
|
||||||
|
print("returning false")
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
print("returning true")
|
||||||
|
io.close(f)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
-- This is used later as the default terminal and editor to run.
|
-- This is used later as the default terminal and editor to run.
|
||||||
terminal = "urxvt"
|
terminal = "urxvt"
|
||||||
editor = "emacs"
|
editor = "emacs"
|
||||||
|
@ -46,7 +89,7 @@ layouts =
|
||||||
tags = {}
|
tags = {}
|
||||||
for s = 1, screen.count() do
|
for s = 1, screen.count() do
|
||||||
-- Each screen has its own tag table.
|
-- 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({ "Q", "W", "E", "A", "S", "D", "Z", "X", "C" }, s, layouts[1])
|
||||||
end
|
end
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
|
@ -217,21 +260,21 @@ root.buttons(awful.util.table.join(
|
||||||
|
|
||||||
-- {{{ Key bindings
|
-- {{{ Key bindings
|
||||||
globalkeys = awful.util.table.join(
|
globalkeys = awful.util.table.join(
|
||||||
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
|
awful.key({ modkey, }, "Left", awful.tag.viewprev ),
|
||||||
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
|
awful.key({ modkey, }, "Right", awful.tag.viewnext ),
|
||||||
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
|
awful.key({ modkey, }, "Escape", awful.tag.history.restore),
|
||||||
|
|
||||||
awful.key({ modkey, }, "j",
|
awful.key({ modkey, }, "j",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx( 1)
|
awful.client.focus.byidx( 1)
|
||||||
if client.focus then client.focus:raise() end
|
if client.focus then client.focus:raise() end
|
||||||
end),
|
end),
|
||||||
awful.key({ modkey, }, "k",
|
awful.key({ modkey, }, "k",
|
||||||
function ()
|
function ()
|
||||||
awful.client.focus.byidx(-1)
|
awful.client.focus.byidx(-1)
|
||||||
if client.focus then client.focus:raise() end
|
if client.focus then client.focus:raise() end
|
||||||
end),
|
end),
|
||||||
awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
|
awful.key({ modkey, "Mod1" }, "w", function () mymainmenu:show(true) end),
|
||||||
|
|
||||||
-- Layout manipulation
|
-- Layout manipulation
|
||||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
||||||
|
@ -248,24 +291,65 @@ globalkeys = awful.util.table.join(
|
||||||
end),
|
end),
|
||||||
|
|
||||||
-- Standard program
|
-- Standard program
|
||||||
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
||||||
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
awful.key({ modkey, "Control" }, "r", awesome.restart),
|
||||||
awful.key({ modkey, "Shift" }, "q", awesome.quit),
|
awful.key({ modkey, "Mod1" }, "q", awesome.quit),
|
||||||
awful.key({ "Mod1", "Control" }, "l", function () awful.util.spawn("i3lock -c 000000") end),
|
awful.key({ "Mod1", "Control" }, "l", function () awful.util.spawn("i3lock -c 000000") end),
|
||||||
|
|
||||||
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
||||||
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
|
awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end),
|
||||||
awful.key({ modkey, "Shift" }, "h", function () awful.tag.incnmaster( 1) end),
|
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, "Shift" }, "l", function () awful.tag.incnmaster(-1) end),
|
||||||
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
|
awful.key({ modkey, "Control" }, "h", function () awful.tag.incncol( 1) end),
|
||||||
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
|
awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1) end),
|
||||||
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
|
awful.key({ modkey, }, "space", function () awful.layout.inc(layouts, 1) end),
|
||||||
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
|
awful.key({ modkey, "Shift" }, "space", function () awful.layout.inc(layouts, -1) end),
|
||||||
|
|
||||||
|
-- Extra tag bindings
|
||||||
|
awful.key({ modkey, }, "q", function () switch_tag(1) end),
|
||||||
|
awful.key({ modkey, }, "w", function () switch_tag(2) end),
|
||||||
|
awful.key({ modkey, }, "e", function () switch_tag(3) end),
|
||||||
|
awful.key({ modkey, }, "a", function () switch_tag(4) end),
|
||||||
|
awful.key({ modkey, }, "s", function () switch_tag(5) end),
|
||||||
|
awful.key({ modkey, }, "d", function () switch_tag(6) end),
|
||||||
|
awful.key({ modkey, }, "z", function () switch_tag(7) end),
|
||||||
|
awful.key({ modkey, }, "x", function () switch_tag(8) end),
|
||||||
|
awful.key({ modkey, }, "c", function () switch_tag(9) end),
|
||||||
|
|
||||||
|
awful.key({ modkey, "Control" }, "q", function () toggle_tag(1) end),
|
||||||
|
awful.key({ modkey, "Control" }, "w", function () toggle_tag(2) end),
|
||||||
|
awful.key({ modkey, "Control" }, "e", function () toggle_tag(3) end),
|
||||||
|
awful.key({ modkey, "Control" }, "a", function () toggle_tag(4) end),
|
||||||
|
awful.key({ modkey, "Control" }, "s", function () toggle_tag(5) end),
|
||||||
|
awful.key({ modkey, "Control" }, "d", function () toggle_tag(6) end),
|
||||||
|
awful.key({ modkey, "Control" }, "z", function () toggle_tag(7) end),
|
||||||
|
awful.key({ modkey, "Control" }, "x", function () toggle_tag(8) end),
|
||||||
|
awful.key({ modkey, "Control" }, "c", function () toggle_tag(9) end),
|
||||||
|
|
||||||
|
awful.key({ modkey, "Shift" }, "q", function () move_to_tag(1) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "w", function () move_to_tag(2) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "e", function () move_to_tag(3) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "a", function () move_to_tag(4) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "s", function () move_to_tag(5) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "d", function () move_to_tag(6) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "z", function () move_to_tag(7) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "x", function () move_to_tag(8) end),
|
||||||
|
awful.key({ modkey, "Shift" }, "c", function () move_to_tag(9) end),
|
||||||
|
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "q", function () toggle_cleint_tag(1) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "w", function () toggle_cleint_tag(2) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "e", function () toggle_cleint_tag(3) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "a", function () toggle_cleint_tag(4) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "s", function () toggle_cleint_tag(5) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "d", function () toggle_cleint_tag(6) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "z", function () toggle_cleint_tag(7) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "x", function () toggle_cleint_tag(8) end),
|
||||||
|
awful.key({ modkey, "Control", "Shift" }, "c", function () toggle_cleint_tag(9) end),
|
||||||
|
|
||||||
-- Prompt
|
-- Prompt
|
||||||
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
|
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
|
||||||
|
|
||||||
awful.key({ modkey }, "x",
|
awful.key({ modkey, "Mod1" }, "x",
|
||||||
function ()
|
function ()
|
||||||
awful.prompt.run({ prompt = "Run Lua code: " },
|
awful.prompt.run({ prompt = "Run Lua code: " },
|
||||||
mypromptbox[mouse.screen].widget,
|
mypromptbox[mouse.screen].widget,
|
||||||
|
@ -276,7 +360,7 @@ globalkeys = awful.util.table.join(
|
||||||
|
|
||||||
clientkeys = awful.util.table.join(
|
clientkeys = awful.util.table.join(
|
||||||
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
|
awful.key({ modkey, }, "f", function (c) c.fullscreen = not c.fullscreen end),
|
||||||
awful.key({ modkey, "Shift" }, "c", function (c) c:kill() end),
|
awful.key({ modkey, "Mod1" }, "c", function (c) c:kill() end),
|
||||||
awful.key({ modkey, "Control" }, "space", awful.client.floating.toggle ),
|
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" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
|
||||||
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
|
awful.key({ modkey, }, "o", awful.client.movetoscreen ),
|
||||||
|
@ -295,39 +379,6 @@ for s = 1, screen.count() do
|
||||||
keynumber = math.min(9, math.max(#tags[s], keynumber));
|
keynumber = math.min(9, math.max(#tags[s], keynumber));
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Bind all key numbers to tags.
|
|
||||||
-- Be careful: we use keycodes to make it works on any keyboard layout.
|
|
||||||
-- This should map on the top row of your keyboard, usually 1 to 9.
|
|
||||||
for i = 1, keynumber do
|
|
||||||
globalkeys = awful.util.table.join(globalkeys,
|
|
||||||
awful.key({ modkey }, "#" .. i + 9,
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
if tags[screen][i] then
|
|
||||||
awful.tag.viewonly(tags[screen][i])
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, "Control" }, "#" .. i + 9,
|
|
||||||
function ()
|
|
||||||
local screen = mouse.screen
|
|
||||||
if tags[screen][i] then
|
|
||||||
awful.tag.viewtoggle(tags[screen][i])
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, "Shift" }, "#" .. i + 9,
|
|
||||||
function ()
|
|
||||||
if client.focus and tags[client.focus.screen][i] then
|
|
||||||
awful.client.movetotag(tags[client.focus.screen][i])
|
|
||||||
end
|
|
||||||
end),
|
|
||||||
awful.key({ modkey, "Control", "Shift" }, "#" .. i + 9,
|
|
||||||
function ()
|
|
||||||
if client.focus and tags[client.focus.screen][i] then
|
|
||||||
awful.client.toggletag(tags[client.focus.screen][i])
|
|
||||||
end
|
|
||||||
end))
|
|
||||||
end
|
|
||||||
|
|
||||||
clientbuttons = awful.util.table.join(
|
clientbuttons = awful.util.table.join(
|
||||||
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
||||||
awful.button({ modkey }, 1, awful.mouse.client.move),
|
awful.button({ modkey }, 1, awful.mouse.client.move),
|
||||||
|
@ -352,6 +403,8 @@ awful.rules.rules = {
|
||||||
properties = { floating = true } },
|
properties = { floating = true } },
|
||||||
{ rule = { class = "gimp" },
|
{ rule = { class = "gimp" },
|
||||||
properties = { floating = true } },
|
properties = { floating = true } },
|
||||||
|
{ rule = { class = "gwibber", name = "gwibber" },
|
||||||
|
properties = { floating = true } },
|
||||||
-- Set Firefox to always map on tags number 2 of screen 1.
|
-- Set Firefox to always map on tags number 2 of screen 1.
|
||||||
-- { rule = { class = "Firefox" },
|
-- { rule = { class = "Firefox" },
|
||||||
-- properties = { tag = tags[1][2] } },
|
-- properties = { tag = tags[1][2] } },
|
||||||
|
@ -395,5 +448,6 @@ client.add_signal("unfocus", function(c)
|
||||||
end)
|
end)
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
awful.util.spawn_with_shell("xcompmgr")
|
if fexists(os.getenv("HOME") .. "/.config/awesome/local_rc.lua") then
|
||||||
awful.util.spawn_with_shell("xscreensaver")
|
dofile(os.getenv("HOME") .. "/.config/awesome/local_rc.lua")
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in a new issue