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)
|
||||
|
||||
;; ide-skel
|
||||
(require 'tabbar)
|
||||
(require 'ide-skel)
|
||||
(global-set-key [f4] 'ide-skel-proj-find-files-by-regexp)
|
||||
(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 was added by Custom.
|
||||
|
|
|
@ -1481,7 +1481,7 @@ static char *close[] = {
|
|||
|
||||
(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
|
||||
root-path
|
||||
|
@ -3592,7 +3592,7 @@ Return a list of child widgets."
|
|||
|
||||
(defun ide-skel-proj-get-all-dirs (root-dir)
|
||||
(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)
|
||||
(error nil)))
|
||||
|
||||
|
|
|
@ -16,3 +16,5 @@
|
|||
(load-file "~/.emacs.d/autopair.el")
|
||||
(load-file "~/.emacs.d/auto-complete-config.el")
|
||||
(require 'auto-complete-config)
|
||||
(require 'tabbar)
|
||||
(require 'ide-skel)
|
|
@ -36,3 +36,31 @@
|
|||
(font-lock-variable-name-face ((t (:foreground "#18EFF2"))))
|
||||
(font-lock-warning-face ((t (:foreground "#FF0000" :bold t)))))))
|
||||
(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)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -2,3 +2,5 @@
|
|||
*session.*
|
||||
*\#*
|
||||
.emacs.d/ac-comphist.dat
|
||||
local_*
|
||||
rc2.lua
|
||||
|
|
134
awesome/rc.lua
134
awesome/rc.lua
|
@ -11,6 +11,49 @@ require("naughty")
|
|||
-- Themes define colours, icons, and wallpapers
|
||||
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.
|
||||
terminal = "urxvt"
|
||||
editor = "emacs"
|
||||
|
@ -46,7 +89,7 @@ layouts =
|
|||
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])
|
||||
tags[s] = awful.tag({ "Q", "W", "E", "A", "S", "D", "Z", "X", "C" }, s, layouts[1])
|
||||
end
|
||||
-- }}}
|
||||
|
||||
|
@ -231,7 +274,7 @@ globalkeys = awful.util.table.join(
|
|||
awful.client.focus.byidx(-1)
|
||||
if client.focus then client.focus:raise() end
|
||||
end),
|
||||
awful.key({ modkey, }, "w", function () mymainmenu:show(true) end),
|
||||
awful.key({ modkey, "Mod1" }, "w", function () mymainmenu:show(true) end),
|
||||
|
||||
-- Layout manipulation
|
||||
awful.key({ modkey, "Shift" }, "j", function () awful.client.swap.byidx( 1) end),
|
||||
|
@ -250,7 +293,7 @@ globalkeys = awful.util.table.join(
|
|||
-- Standard program
|
||||
awful.key({ modkey, }, "Return", function () awful.util.spawn(terminal) end),
|
||||
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({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end),
|
||||
|
@ -262,10 +305,51 @@ globalkeys = awful.util.table.join(
|
|||
awful.key({ modkey, }, "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
|
||||
awful.key({ modkey }, "r", function () mypromptbox[mouse.screen]:run() end),
|
||||
|
||||
awful.key({ modkey }, "x",
|
||||
awful.key({ modkey, "Mod1" }, "x",
|
||||
function ()
|
||||
awful.prompt.run({ prompt = "Run Lua code: " },
|
||||
mypromptbox[mouse.screen].widget,
|
||||
|
@ -276,7 +360,7 @@ globalkeys = awful.util.table.join(
|
|||
|
||||
clientkeys = awful.util.table.join(
|
||||
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" }, "Return", function (c) c:swap(awful.client.getmaster()) end),
|
||||
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));
|
||||
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(
|
||||
awful.button({ }, 1, function (c) client.focus = c; c:raise() end),
|
||||
awful.button({ modkey }, 1, awful.mouse.client.move),
|
||||
|
@ -352,6 +403,8 @@ awful.rules.rules = {
|
|||
properties = { floating = true } },
|
||||
{ rule = { class = "gimp" },
|
||||
properties = { floating = true } },
|
||||
{ rule = { class = "gwibber", name = "gwibber" },
|
||||
properties = { floating = true } },
|
||||
-- Set Firefox to always map on tags number 2 of screen 1.
|
||||
-- { rule = { class = "Firefox" },
|
||||
-- properties = { tag = tags[1][2] } },
|
||||
|
@ -395,5 +448,6 @@ client.add_signal("unfocus", function(c)
|
|||
end)
|
||||
-- }}}
|
||||
|
||||
awful.util.spawn_with_shell("xcompmgr")
|
||||
awful.util.spawn_with_shell("xscreensaver")
|
||||
if fexists(os.getenv("HOME") .. "/.config/awesome/local_rc.lua") then
|
||||
dofile(os.getenv("HOME") .. "/.config/awesome/local_rc.lua")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue