diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 98b21af9..b15721e0 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -24,7 +24,7 @@ local naughty = require("naughty") --naughty.notify({ preset = naughty.config.presets.critical, -- title = "aze", -- text = err }) - + if ostype == "Linux" then vicious = require("vicious") end @@ -43,7 +43,7 @@ end -- Handle runtime errors after startup do local in_error = false - awesome.connect_signal("debug::error", + awesome.connect_signal("debug::error", function (err) -- Make sure we don't go into an endless error loop if in_error then return end @@ -55,7 +55,7 @@ do in_error = false end) end - + -------------------------------------------------------------------------------- -- Themes define colours, icons, and wallpapers -------------------------------------------------------------------------------- @@ -128,7 +128,7 @@ if ostype == "Linux" then -- Net -- CHECK: not sure if args["{".. device .." carrier}"] may have values below 0. What do values of the args table mean? local networks = { "eth0", "wlan0" } - vicious.register(netwidget, vicious.widgets.net, + vicious.register(netwidget, vicious.widgets.net, function (widget, args) for _,device in pairs(networks) do value = tonumber(args["{".. device .." carrier}"]) @@ -151,7 +151,7 @@ if ostype == "Linux" then volpwidget = wibox.widget.textbox() vicious.register(volpwidget, vicious.widgets.volume, "PCM $1%", 1, "PCM") end - + -- Battery local batf = io.popen("ls '/sys/class/power_supply' 2>/dev/null") local batl = batf:read("*a") @@ -161,7 +161,7 @@ if ostype == "Linux" then -- vicious.register(batwidget, vicious.widgets.bat, '$2%$1$3 | ', 60, "BAT0") --{{ Complex version (time warning) -- This functions changes the status color when batlimit is reached. - vicious.register(batwidget, vicious.widgets.bat, + vicious.register(batwidget, vicious.widgets.bat, function (widget, args) -- We check if time is displayed (otherwise it's 'N/A'), and if minutes are less than limit. if args[1] == "-" @@ -487,7 +487,7 @@ clientkeys = awful.util.table.join( -- awful.key({ modkey, "Shift" }, "r", function (c) c:redraw() end), awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end), - + -- Floating clients move awful.key({ modkey }, "j", function () awful.client.moveresize( 0, 20, 0, 0) end), awful.key({ modkey }, "k", function () awful.client.moveresize( 0, -20, 0, 0) end), diff --git a/.emacs.d/modes.el b/.emacs.d/modes.el index ce4642c0..faf92ffe 100644 --- a/.emacs.d/modes.el +++ b/.emacs.d/modes.el @@ -26,12 +26,19 @@ ;; Mutt support. (setq auto-mode-alist (append '(("/tmp/mutt.*" . mail-mode)) auto-mode-alist)) -;; Arch Linux PKGBUILD +;; Arch Linux PKGBUILD. (setq auto-mode-alist (append '(("PKGBUILD" . sh-mode)) auto-mode-alist)) ;; README files. (setq auto-mode-alist (append '(("README" . text-mode)) auto-mode-alist)) +;; Lex/Flex + Yacc/Bison mode. +(setq auto-mode-alist (append '(("\\.l\\'" . flex-mode)) auto-mode-alist)) +(setq auto-mode-alist (append '(("\\.yy?\\'" . bison-mode)) auto-mode-alist)) + +;; Subtitles support. +(setq auto-mode-alist (append '(("\\.srt\\'" . text-mode)) auto-mode-alist)) + ;;============================================================================== ;; Auto-Insert ;;============================================================================== diff --git a/.emacs.d/plugins.el b/.emacs.d/plugins.el index 7400f0bd..5186df17 100644 --- a/.emacs.d/plugins.el +++ b/.emacs.d/plugins.el @@ -147,6 +147,12 @@ (if (require 'xclip nil t) (turn-on-xclip)) +;;============================================================================== +;; Bison +;;============================================================================== +(require 'bison-mode nil t) +;;(autoload 'bison-mode "bison-mode.el") + ;;============================================================================== ;; Multiple-Cursors ;;============================================================================== diff --git a/.emacs.d/snippets/latex-mode/tem.yasnippet b/.emacs.d/snippets/latex-mode/tem.yasnippet index 4c295afe..5b6001ea 100644 --- a/.emacs.d/snippets/latex-mode/tem.yasnippet +++ b/.emacs.d/snippets/latex-mode/tem.yasnippet @@ -4,4 +4,4 @@ # group: font # name: \emph{...} # -- -\emph{$1}$0 +\emph{$1}$0 \ No newline at end of file