Emacs: flex+Bison.
parent
a83de20153
commit
593d3fdf0f
|
@ -24,7 +24,7 @@ local naughty = require("naughty")
|
||||||
--naughty.notify({ preset = naughty.config.presets.critical,
|
--naughty.notify({ preset = naughty.config.presets.critical,
|
||||||
-- title = "aze",
|
-- title = "aze",
|
||||||
-- text = err })
|
-- text = err })
|
||||||
|
|
||||||
if ostype == "Linux" then
|
if ostype == "Linux" then
|
||||||
vicious = require("vicious")
|
vicious = require("vicious")
|
||||||
end
|
end
|
||||||
|
@ -43,7 +43,7 @@ end
|
||||||
-- Handle runtime errors after startup
|
-- Handle runtime errors after startup
|
||||||
do
|
do
|
||||||
local in_error = false
|
local in_error = false
|
||||||
awesome.connect_signal("debug::error",
|
awesome.connect_signal("debug::error",
|
||||||
function (err)
|
function (err)
|
||||||
-- Make sure we don't go into an endless error loop
|
-- Make sure we don't go into an endless error loop
|
||||||
if in_error then return end
|
if in_error then return end
|
||||||
|
@ -55,7 +55,7 @@ do
|
||||||
in_error = false
|
in_error = false
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
-- Themes define colours, icons, and wallpapers
|
-- Themes define colours, icons, and wallpapers
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -128,7 +128,7 @@ if ostype == "Linux" then
|
||||||
-- Net
|
-- Net
|
||||||
-- CHECK: not sure if args["{".. device .." carrier}"] may have values below 0. What do values of the args table mean?
|
-- CHECK: not sure if args["{".. device .." carrier}"] may have values below 0. What do values of the args table mean?
|
||||||
local networks = { "eth0", "wlan0" }
|
local networks = { "eth0", "wlan0" }
|
||||||
vicious.register(netwidget, vicious.widgets.net,
|
vicious.register(netwidget, vicious.widgets.net,
|
||||||
function (widget, args)
|
function (widget, args)
|
||||||
for _,device in pairs(networks) do
|
for _,device in pairs(networks) do
|
||||||
value = tonumber(args["{".. device .." carrier}"])
|
value = tonumber(args["{".. device .." carrier}"])
|
||||||
|
@ -151,7 +151,7 @@ if ostype == "Linux" then
|
||||||
volpwidget = wibox.widget.textbox()
|
volpwidget = wibox.widget.textbox()
|
||||||
vicious.register(volpwidget, vicious.widgets.volume, "PCM $1%", 1, "PCM")
|
vicious.register(volpwidget, vicious.widgets.volume, "PCM $1%", 1, "PCM")
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Battery
|
-- Battery
|
||||||
local batf = io.popen("ls '/sys/class/power_supply' 2>/dev/null")
|
local batf = io.popen("ls '/sys/class/power_supply' 2>/dev/null")
|
||||||
local batl = batf:read("*a")
|
local batl = batf:read("*a")
|
||||||
|
@ -161,7 +161,7 @@ if ostype == "Linux" then
|
||||||
-- vicious.register(batwidget, vicious.widgets.bat, '<span color="#73A9CD">$2%$1$3</span> | ', 60, "BAT0")
|
-- vicious.register(batwidget, vicious.widgets.bat, '<span color="#73A9CD">$2%$1$3</span> | ', 60, "BAT0")
|
||||||
--{{ Complex version (time warning)
|
--{{ Complex version (time warning)
|
||||||
-- This functions changes the status color when batlimit is reached.
|
-- 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)
|
function (widget, args)
|
||||||
-- We check if time is displayed (otherwise it's 'N/A'), and if minutes are less than limit.
|
-- We check if time is displayed (otherwise it's 'N/A'), and if minutes are less than limit.
|
||||||
if args[1] == "-"
|
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, "Shift" }, "r", function (c) c:redraw() end),
|
||||||
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
|
awful.key({ modkey, }, "t", function (c) c.ontop = not c.ontop end),
|
||||||
|
|
||||||
|
|
||||||
-- Floating clients move
|
-- Floating clients move
|
||||||
awful.key({ modkey }, "j", function () awful.client.moveresize( 0, 20, 0, 0) end),
|
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),
|
awful.key({ modkey }, "k", function () awful.client.moveresize( 0, -20, 0, 0) end),
|
||||||
|
|
|
@ -26,12 +26,19 @@
|
||||||
;; Mutt support.
|
;; Mutt support.
|
||||||
(setq auto-mode-alist (append '(("/tmp/mutt.*" . mail-mode)) auto-mode-alist))
|
(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))
|
(setq auto-mode-alist (append '(("PKGBUILD" . sh-mode)) auto-mode-alist))
|
||||||
|
|
||||||
;; README files.
|
;; README files.
|
||||||
(setq auto-mode-alist (append '(("README" . text-mode)) auto-mode-alist))
|
(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
|
;; Auto-Insert
|
||||||
;;==============================================================================
|
;;==============================================================================
|
||||||
|
|
|
@ -147,6 +147,12 @@
|
||||||
(if (require 'xclip nil t)
|
(if (require 'xclip nil t)
|
||||||
(turn-on-xclip))
|
(turn-on-xclip))
|
||||||
|
|
||||||
|
;;==============================================================================
|
||||||
|
;; Bison
|
||||||
|
;;==============================================================================
|
||||||
|
(require 'bison-mode nil t)
|
||||||
|
;;(autoload 'bison-mode "bison-mode.el")
|
||||||
|
|
||||||
;;==============================================================================
|
;;==============================================================================
|
||||||
;; Multiple-Cursors
|
;; Multiple-Cursors
|
||||||
;;==============================================================================
|
;;==============================================================================
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
# group: font
|
# group: font
|
||||||
# name: \emph{...}
|
# name: \emph{...}
|
||||||
# --
|
# --
|
||||||
\emph{$1}$0
|
\emph{$1}$0
|
Loading…
Reference in New Issue