Clean up unused configs. This repo has bitrotted very badly.
This commit is contained in:
parent
8e69cd62c3
commit
8959303640
17 changed files with 28 additions and 681 deletions
|
@ -1,4 +1,4 @@
|
||||||
# config
|
# config
|
||||||
Various config files and small scripts I use.
|
Various config files and small scripts I use.
|
||||||
|
|
||||||
TODO: Set up some sort of orchestration so this can be quickly installed on new systems and such.
|
TODO: Set up some sort of orchestration so this can be quickly installed on new systems.
|
||||||
|
|
87
emacs/.emacs
87
emacs/.emacs
|
@ -1,87 +0,0 @@
|
||||||
;; Added by Package.el. This must come before configurations of
|
|
||||||
;; installed packages. Don't delete this line. If you don't want it,
|
|
||||||
;; just comment it out by adding a semicolon to the start of the line.
|
|
||||||
;; You may delete these explanatory comments.
|
|
||||||
(package-initialize)
|
|
||||||
(add-to-list
|
|
||||||
'package-archives
|
|
||||||
'("melpa" . "http://melpa.org/packages/")
|
|
||||||
t)
|
|
||||||
|
|
||||||
(custom-set-variables
|
|
||||||
;; custom-set-variables was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
'(c-basic-offset 2)
|
|
||||||
'(c-tab-always-indent t)
|
|
||||||
'(canlock-password "201dd6597717bea7c6569288a099ce4c838cd1a7")
|
|
||||||
'(case-fold-search t)
|
|
||||||
'(current-language-environment "English")
|
|
||||||
'(default-input-method "latin-1-prefix")
|
|
||||||
'(global-font-lock-mode t nil (font-lock))
|
|
||||||
'(make-backup-files nil)
|
|
||||||
'(package-selected-packages (quote (py-autopep8 lua-mode go-mode)))
|
|
||||||
'(pc-select-meta-moves-sexps t)
|
|
||||||
'(pc-select-selection-keys-only t)
|
|
||||||
'(pc-selection-mode t t)
|
|
||||||
'(php-file-patterns nil)
|
|
||||||
'(show-paren-mode t nil (paren))
|
|
||||||
'(transient-mark-mode t)
|
|
||||||
'(version-control (quote never)))
|
|
||||||
(custom-set-faces
|
|
||||||
;; custom-set-faces was added by Custom.
|
|
||||||
;; If you edit it by hand, you could mess it up, so be careful.
|
|
||||||
;; Your init file should contain only one such instance.
|
|
||||||
;; If there is more than one, they won't work right.
|
|
||||||
'(mmm-default-submode-face ((t nil))))
|
|
||||||
(put 'narrow-to-region 'disabled nil)
|
|
||||||
|
|
||||||
;; *** User-added stuff *** ;;
|
|
||||||
|
|
||||||
;; General custom variables
|
|
||||||
(setq require-final-newline 't)
|
|
||||||
(set-language-environment "UTF-8")
|
|
||||||
(setq inhibit-eol-conversion 't)
|
|
||||||
|
|
||||||
;; Kill GUI elements
|
|
||||||
(menu-bar-mode 0)
|
|
||||||
|
|
||||||
;; *** Programming
|
|
||||||
(global-set-key (kbd "C-x g") 'goto-line)
|
|
||||||
(define-key global-map (kbd "<f5>") 'vc-diff)
|
|
||||||
(define-key global-map (kbd "<f7>") 'compile)
|
|
||||||
(define-key global-map (kbd "<f8>") 'recompile)
|
|
||||||
(setq-default indent-tabs-mode nil)
|
|
||||||
(setq-default tab-width 4)
|
|
||||||
(setq-default python-indent-offset 2)
|
|
||||||
(setq-default css-indent-offset 2)
|
|
||||||
(setq js-indent-level 4)
|
|
||||||
(column-number-mode)
|
|
||||||
|
|
||||||
;; Use the right mode for Arduino sketches
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.ino\\'" . c++-mode))
|
|
||||||
|
|
||||||
(add-to-list 'load-path "~/.emacs.d/lisp")
|
|
||||||
(require 'yaml-mode)
|
|
||||||
(require 'slim-mode)
|
|
||||||
(require 'haml-mode)
|
|
||||||
|
|
||||||
;; Markdown support
|
|
||||||
(autoload 'markdown-mode "markdown-mode"
|
|
||||||
"Major mode for editing Markdown files" t)
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.text\\'" . markdown-mode))
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
|
|
||||||
|
|
||||||
(add-hook 'go-mode-hook
|
|
||||||
(lambda ()
|
|
||||||
(add-hook 'before-save-hook 'gofmt-before-save)
|
|
||||||
(setq tab-width 2)
|
|
||||||
(setq indent-tabs-mode 0)))
|
|
||||||
|
|
||||||
(require 'py-autopep8)
|
|
||||||
(add-hook 'python-mode-hook 'py-autopep8-enable-on-save)
|
|
||||||
|
|
||||||
;; (require 'kos-mode)
|
|
||||||
;; (setq kos-indent 2)
|
|
10
emacs/dotemacs
Executable file
10
emacs/dotemacs
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
(package-initialize)
|
||||||
|
|
||||||
|
(setq make-backup-files nil)
|
||||||
|
(setq require-final-newline 't)
|
||||||
|
(setq inhibit-eol-conversion 't)
|
||||||
|
|
||||||
|
(set-language-environment "UTF-8")
|
||||||
|
(menu-bar-mode 0)
|
||||||
|
(global-set-key (kbd "C-x g") 'goto-line)
|
||||||
|
(column-number-mode)
|
|
@ -1,325 +0,0 @@
|
||||||
;;; kos-mode.el --- KSP kOS KerboScript major mode
|
|
||||||
|
|
||||||
;; Author: Charlie Green
|
|
||||||
;; URL: https://github.com/charliegreen/kos-mode
|
|
||||||
;; Version: 0.2.1
|
|
||||||
|
|
||||||
;;; Commentary:
|
|
||||||
|
|
||||||
;; A major mode for editing KerboScript program files, from the Kerbal Space Program mod
|
|
||||||
;; kOS. I hope this is useful for someone!
|
|
||||||
|
|
||||||
;; TODO:
|
|
||||||
;; features:
|
|
||||||
;; * potentially add custom faces for strings/comments
|
|
||||||
;; * add AGn action group highlighting
|
|
||||||
;; * add useful interactive commands (eg electric braces)
|
|
||||||
;; other:
|
|
||||||
;; * yikes, clean up some of the regexes here....
|
|
||||||
|
|
||||||
;; TODO (long-term):
|
|
||||||
;; * make sure I got the syntax right and included all global functions and variables
|
|
||||||
;; * add some nice completion thing for completing fields of data structures (eg
|
|
||||||
;; SHIP:VELOCITY autofills ":SURFACE", which autofills ":MAG", etc)
|
|
||||||
;; * deal with highlighting function calls vs global variables, especially when they
|
|
||||||
;; have the same name (eg STAGE)
|
|
||||||
;; * add an optional auto-formatter
|
|
||||||
|
|
||||||
;;; Code:
|
|
||||||
|
|
||||||
(defgroup kos-mode ()
|
|
||||||
"Options for `kos-mode'."
|
|
||||||
:group 'languages)
|
|
||||||
|
|
||||||
(defgroup kos-mode-faces ()
|
|
||||||
"Faces used by `kos-mode'."
|
|
||||||
:group 'kos-mode)
|
|
||||||
|
|
||||||
(defcustom kos-indent (default-value 'tab-width)
|
|
||||||
"Basic indent increment for indenting kOS code."
|
|
||||||
:group 'kos-mode)
|
|
||||||
|
|
||||||
(defface kos-keyword-face
|
|
||||||
'((t :inherit (font-lock-keyword-face)))
|
|
||||||
"Face for keywords."
|
|
||||||
:group 'kos-mode-faces)
|
|
||||||
|
|
||||||
(defface kos-operator-face
|
|
||||||
'((t :inherit (font-lock-builtin-face)))
|
|
||||||
"Face for operators."
|
|
||||||
:group 'kos-mode-faces)
|
|
||||||
|
|
||||||
(defface kos-global-face
|
|
||||||
'((t :inherit (font-lock-constant-face)))
|
|
||||||
"Face for globally defined variables."
|
|
||||||
:group 'kos-mode-faces)
|
|
||||||
|
|
||||||
(defface kos-constant-face
|
|
||||||
'((t :inherit (font-lock-constant-face)))
|
|
||||||
"Face for constants."
|
|
||||||
:group 'kos-mode-faces)
|
|
||||||
|
|
||||||
(defface kos-function-name-face
|
|
||||||
'((t :inherit (font-lock-function-name-face)))
|
|
||||||
"Face for highlighting the names of functions in their definitions."
|
|
||||||
:group 'kos-mode-faces)
|
|
||||||
|
|
||||||
(defmacro kos--opt (keywords)
|
|
||||||
"Compile a regex matching any of KEYWORDS."
|
|
||||||
`(eval-when-compile
|
|
||||||
(regexp-opt ,keywords 'words)))
|
|
||||||
|
|
||||||
(eval-and-compile
|
|
||||||
(defconst kos-keywords
|
|
||||||
'("add" "all" "at" "batch" "break" "clearscreen" "compile" "copy" "declare"
|
|
||||||
"delete" "deploy" "do" "do" "edit" "else" "file" "for" "from" "from"
|
|
||||||
"function" "global" "if" "in" "is" "local" "lock" "log" "off" "on"
|
|
||||||
"once" "parameter" "preserve" "print" "reboot" "remove" "rename" "run"
|
|
||||||
"set" "shutdown" "stage" "step" "switch" "then" "to" "toggle" "unlock"
|
|
||||||
"unset" "until" "volume" "wait" "when" "return" "lazyglobal")))
|
|
||||||
|
|
||||||
(eval-and-compile
|
|
||||||
(defconst kos-globals
|
|
||||||
'("ship" "target" "hastarget" "heading" "prograde" "retrograde" "facing"
|
|
||||||
"maxthrust" "velocity" "geoposition" "latitude" "longitude" "up" "north"
|
|
||||||
"body" "angularmomentum" "angularvel" "angularvelocity" "mass"
|
|
||||||
"verticalspeed" "groundspeed" "surfacespeed" "airspeed" "altitude"
|
|
||||||
"apoapsis" "periapsis" "sensors" "srfprograde" "srfretrograde" "obt"
|
|
||||||
"status" "shipname"
|
|
||||||
|
|
||||||
"terminal" "core" "archive" "nextnode" "hasnode" "allnodes"
|
|
||||||
|
|
||||||
"liquidfuel" "oxidizer" "electriccharge" "monopropellant" "intakeair"
|
|
||||||
"solidfuel"
|
|
||||||
|
|
||||||
"alt" "eta" "encounter"
|
|
||||||
|
|
||||||
"sas" "rcs" "gear" "lights" "brakes" "abort" "legs" "chutes" "chutessafe"
|
|
||||||
"panels" "radiators" "ladders" "bays" "intakes" "deploydrills" "drills"
|
|
||||||
"fuelcells" "isru" "ag1" "ag2" "ag3" "ag4" "ag5" "ag6" "ag7" "ag8" "ag9"
|
|
||||||
"ag10"
|
|
||||||
|
|
||||||
"throttle" "steering" "wheelthrottle" "wheelsteering"
|
|
||||||
|
|
||||||
"missiontime" "version" "major" "minor" "build" "sessiontime"
|
|
||||||
"homeconnection" "controlconnection"
|
|
||||||
|
|
||||||
"kuniverse" "config" "warp" "warpmode" "mapview" "loaddistance"
|
|
||||||
"solarprimevector" "addons"
|
|
||||||
|
|
||||||
"red" "green" "blue" "yellow" "cyan" "magenta" "purple" "white" "black")))
|
|
||||||
|
|
||||||
(eval-and-compile
|
|
||||||
(defconst kos-functions
|
|
||||||
'("round" "mod" "abs" "ceiling" "floor" "ln" "log10" "max" "min" "random" "sqrt"
|
|
||||||
"char" "unchar" "sin" "cos" "tan" "arcsin" "arccos" "arctan" "arctan2"
|
|
||||||
|
|
||||||
"list" "rgb" "rgba" "hsv" "hsva"
|
|
||||||
"clearscreen" "stage" "constant" "profileresult")))
|
|
||||||
|
|
||||||
(eval-and-compile
|
|
||||||
(defconst kos-constants
|
|
||||||
'("pi" "e" "g" "c" "atmtokpa" "kpatoatm" "degtorad" "radtodeg")))
|
|
||||||
|
|
||||||
(defun kos--opt-nomember (keywords)
|
|
||||||
"Compile a regex matching any of KEYWORDS with no leading colon.
|
|
||||||
|
|
||||||
This is the same as `kos--opt', except it won't match any of
|
|
||||||
KEYWORDS if they are being accessed as a structure member (eg,
|
|
||||||
for `(kos--opt-nomember '(\"foo\"))`, 'foo' would be highlighted,
|
|
||||||
but 'bar:foo' would not)."
|
|
||||||
(concat "\\(?:^\\|[^:]\\)" (kos--opt keywords)))
|
|
||||||
|
|
||||||
(defconst kos-font-lock-keywords
|
|
||||||
;; aren't these regexes beautiful?
|
|
||||||
`((,(kos--opt-nomember kos-keywords) 1 'kos-keyword-face)
|
|
||||||
|
|
||||||
(,(kos--opt-nomember kos-globals) 1 'kos-global-face)
|
|
||||||
(,(kos--opt-nomember kos-constants) 1 'kos-constant-face)
|
|
||||||
|
|
||||||
;; for numbers; have this before operators so decimals are still highlighted
|
|
||||||
("\\b[[:digit:].]+\\(e[+-]?[:digit:]+\\)?\\b" . 'kos-constant-face)
|
|
||||||
|
|
||||||
;; ((rx (any ?+ ?- ?* ?/ ?^ ?( ?))) . 'kos-operator-face) ; arithmetic ops
|
|
||||||
("\\+\\|-\\|\\*\\|/\\|\\^\\|(\\|)" . 'kos-operator-face) ; arithmetic ops
|
|
||||||
|
|
||||||
;; ((rx word-boundary
|
|
||||||
;; (or "not" "and" "or" "true" "false" "<>" "<=" ">=" "=" ">" "<")
|
|
||||||
;; word-boundary) 1 'kos-operator-face) ; logical ops
|
|
||||||
("\\b\\(not\\|and\\|or\\|true\\|false\\|<>\\|<=\\|>=\\|=\\|>\\|<\\)\\b" ; logical ops
|
|
||||||
1 'kos-operator-face)
|
|
||||||
|
|
||||||
;;((rx (any ?{ ?} ?[ ?] ?, ?. ?: ?@)) . 'kos-operator-face) ; other ops
|
|
||||||
("{\\|}\\|\\[\\|\\]\\|,\\|\\.\\|:\\|@" . 'kos-operator-face) ; other ops
|
|
||||||
|
|
||||||
;; highlight function declarations
|
|
||||||
("\\bfunction\\s-+\\([[:alpha:]_][[:alnum:]_]*\\)" 1 'kos-function-name-face))
|
|
||||||
"Keyword highlighting specification for `kos-mode'.")
|
|
||||||
|
|
||||||
;; (defvar kos-mode-map
|
|
||||||
;; (let ((map (make-sparse-keymap)))
|
|
||||||
;; ;(define-key map [foo] 'kos-do-foo)
|
|
||||||
;; map)
|
|
||||||
;; "Keymap for `kos-mode'.")
|
|
||||||
|
|
||||||
(defvar kos-mode-syntax-table
|
|
||||||
(let ((st (make-syntax-table)))
|
|
||||||
(modify-syntax-entry ?/ ". 12" st) ; // starts comments
|
|
||||||
(modify-syntax-entry ?\n ">" st) ; newline ends comments
|
|
||||||
st)
|
|
||||||
"Syntax table for `kos-mode'.")
|
|
||||||
|
|
||||||
;; https://web.archive.org/web/20070702002238/http://two-wugs.net/emacs/mode-tutorial.html
|
|
||||||
(defun kos-indent-line ()
|
|
||||||
"Indent the current line of kOS code."
|
|
||||||
(interactive)
|
|
||||||
|
|
||||||
(require 'cl-lib)
|
|
||||||
|
|
||||||
(let ((not-indented t) cur-indent
|
|
||||||
(r-bob "^[^\n]*?{[^}]*$") ; beginning of block regex
|
|
||||||
(r-nl "\\(?:\n\\|\r\n\\|$\\)") ; an actual newline ($ was acting funky)
|
|
||||||
(ltss nil)) ; lines to start of (unterminated) statement; see `in-unterminated-p'
|
|
||||||
|
|
||||||
(cl-flet* ((get-cur-line ()
|
|
||||||
(save-excursion
|
|
||||||
(let ((start (progn (beginning-of-line) (point)))
|
|
||||||
(end (progn (end-of-line) (point))))
|
|
||||||
(buffer-substring-no-properties start end))))
|
|
||||||
|
|
||||||
(back-to-nonblank-line ()
|
|
||||||
(let ((cont t))
|
|
||||||
(while cont
|
|
||||||
(forward-line -1)
|
|
||||||
(if (or (bobp) (not (looking-at "^\\s-*$")))
|
|
||||||
(setq cont nil)))))
|
|
||||||
|
|
||||||
(set-indent (v &optional not-relative)
|
|
||||||
(setq cur-indent (if not-relative v
|
|
||||||
(+ (current-indentation)
|
|
||||||
(* v kos-indent))))
|
|
||||||
(setq not-indented nil))
|
|
||||||
|
|
||||||
(strip-text
|
|
||||||
(s) ;; remove strings and comments
|
|
||||||
(while (string-match
|
|
||||||
(rx (: ?\" (0+ (or (: ?\\ ?\")
|
|
||||||
(not (any ?\")))) ?\")) s)
|
|
||||||
(setq s (replace-match "" t t s)))
|
|
||||||
(while (string-match (concat "//.*" r-nl) s)
|
|
||||||
(setq s (replace-match "" t t s))) s)
|
|
||||||
|
|
||||||
(in-unterminated-p
|
|
||||||
()
|
|
||||||
;; Returns nil if in unterminated statement and the number of
|
|
||||||
;; lines back to the beginning of the statement otherwise
|
|
||||||
(setq ltss nil)
|
|
||||||
(save-excursion
|
|
||||||
(let ((loopp t) ; whether we should keep searching
|
|
||||||
(rettp nil) ; whether we'll return a positive value
|
|
||||||
(count 0) ; number of lines we've processed before
|
|
||||||
(found-end-p nil) ; whether we've found a terminating line
|
|
||||||
cur-line) ; the current line we're processing
|
|
||||||
(while (and loopp (not (bobp)))
|
|
||||||
(setq cur-line (strip-text (get-cur-line)))
|
|
||||||
(cond
|
|
||||||
;; found an unterminated statement
|
|
||||||
((string-match
|
|
||||||
(concat "^\\s-*" (kos--opt kos-keywords) "\\b\\s-*[^{.]*$")
|
|
||||||
cur-line)
|
|
||||||
(setq loopp nil rettp t))
|
|
||||||
|
|
||||||
;; found a block opener
|
|
||||||
((string-match "^\\s-*{[^}]*$" cur-line)
|
|
||||||
(setq loopp nil))
|
|
||||||
|
|
||||||
;; found a block closer (which counts as terminator,
|
|
||||||
;; since it presumably has an opener) or a line ending
|
|
||||||
;; with a dot
|
|
||||||
((or
|
|
||||||
(string-match ".*\\.\\s-*$" cur-line)
|
|
||||||
(string-match "^\\s-*}[^{]*$" cur-line))
|
|
||||||
|
|
||||||
;; check if count is zero so we don't indent whitespace
|
|
||||||
;; past the terminator
|
|
||||||
(if (and (not found-end-p) (zerop count))
|
|
||||||
(setq found-end-p t)
|
|
||||||
(setq loopp nil))))
|
|
||||||
|
|
||||||
;; at end of each loop, if we don't want to break, update
|
|
||||||
;; counter and move POINT to next line to process
|
|
||||||
(if loopp
|
|
||||||
(progn
|
|
||||||
(setq count (1+ count))
|
|
||||||
(forward-line -1))))
|
|
||||||
(if (not rettp) nil
|
|
||||||
(progn
|
|
||||||
(setq ltss count)
|
|
||||||
(not (= count 0)))))))
|
|
||||||
|
|
||||||
;; for "looking-at-line"
|
|
||||||
(lal (r) (string-match r (strip-text (get-cur-line)))))
|
|
||||||
|
|
||||||
(save-excursion
|
|
||||||
(beginning-of-line)
|
|
||||||
|
|
||||||
(cond ((bobp) (set-indent 0 t)) ; if at beginning of buffer, indent to 0
|
|
||||||
((lal "^[ \t]*}") ; if closing a block
|
|
||||||
(progn ; then indent one less than previous line
|
|
||||||
;; TODO: check if previous line is part of a line continuation
|
|
||||||
(back-to-nonblank-line)
|
|
||||||
(cond
|
|
||||||
((looking-at r-bob) (set-indent 0)) ; if closing empty block, match it
|
|
||||||
((in-unterminated-p) ; if last line unterminated, indent back two
|
|
||||||
(set-indent -2))
|
|
||||||
(t (set-indent -1))))) ; otherwise, indent back one
|
|
||||||
|
|
||||||
((lal "^[ \t]*{") ; if opening a block on a blank line
|
|
||||||
(progn ; then indent the same as last line
|
|
||||||
(back-to-nonblank-line)
|
|
||||||
(set-indent 0)))
|
|
||||||
|
|
||||||
((in-unterminated-p) ; if line part of unterminated statement
|
|
||||||
(progn ; then indent one more than beginning
|
|
||||||
(forward-line (- ltss))
|
|
||||||
(set-indent +1)))
|
|
||||||
|
|
||||||
(t (while not-indented ; else search backwards for clues
|
|
||||||
(back-to-nonblank-line)
|
|
||||||
(cond
|
|
||||||
((bobp) (setq not-indented nil)) ; perhaps we won't find anything
|
|
||||||
((lal "^[ \t]*}[^{]*$") (set-indent 0)) ; found the end of a block
|
|
||||||
((lal r-bob) (set-indent +1)))))))) ; found the beginning of a block
|
|
||||||
|
|
||||||
(if (not cur-indent) (setq cur-indent 0))
|
|
||||||
(if (< cur-indent 0) (setq cur-indent 0))
|
|
||||||
|
|
||||||
;; now actually indent to cur-indent
|
|
||||||
(if (save-excursion ; if within indentation
|
|
||||||
(let ((point (point))
|
|
||||||
(start (progn (beginning-of-line) (point)))
|
|
||||||
(end (progn (back-to-indentation) (point))))
|
|
||||||
(and (<= start point) (<= point end))))
|
|
||||||
(indent-line-to cur-indent) ; then indent line and move point
|
|
||||||
(save-excursion (indent-line-to cur-indent))))) ; else just indent line
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(define-derived-mode kos-mode prog-mode "KerboScript"
|
|
||||||
"Major mode for editing kOS program files, for the game Kerbal Space Program."
|
|
||||||
:syntax-table kos-mode-syntax-table
|
|
||||||
(make-local-variable 'comment-start)
|
|
||||||
(make-local-variable 'comment-start-skip)
|
|
||||||
(make-local-variable 'font-lock-defaults)
|
|
||||||
(make-local-variable 'indent-line-function)
|
|
||||||
(setq comment-start "// ")
|
|
||||||
(setq comment-start-skip "//+\\s-*")
|
|
||||||
(setq font-lock-defaults
|
|
||||||
'(kos-font-lock-keywords nil t)) ; t makes this case-insensitive
|
|
||||||
(setq indent-line-function 'kos-indent-line))
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.ks\\'" . kos-mode))
|
|
||||||
|
|
||||||
(provide 'kos-mode)
|
|
||||||
|
|
||||||
;;; kos-mode.el ends here
|
|
5
emacs/readme.md
Normal file
5
emacs/readme.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
mv dotemacs ~/.emacs
|
||||||
|
```
|
|
@ -1,12 +0,0 @@
|
||||||
[user]
|
|
||||||
name = Anna Wiggins
|
|
||||||
email = annabunches@gmail.com
|
|
||||||
signingkey = EFEF6022
|
|
||||||
[commit]
|
|
||||||
gpgsign = true
|
|
||||||
[gpg]
|
|
||||||
program = gpg2
|
|
||||||
[push]
|
|
||||||
default = simple
|
|
||||||
[alias]
|
|
||||||
graph = log --graph --oneline --decorate --all
|
|
7
git/dotgitconfig
Normal file
7
git/dotgitconfig
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[user]
|
||||||
|
name = Anna Rose Wiggins
|
||||||
|
email = annabunches@gmail.com
|
||||||
|
[init]
|
||||||
|
defaultBranch = main
|
||||||
|
[alias]
|
||||||
|
graph = log --graph --oneline --decorate --all
|
5
git/readme.md
Normal file
5
git/readme.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
mv dotgitconfig ~/.gitconfig
|
||||||
|
```
|
|
@ -1,6 +0,0 @@
|
||||||
# WIP
|
|
||||||
enable-ssh-support
|
|
||||||
pinentry-program /usr/bin/pinentry-curses
|
|
||||||
default-cache-ttl 60
|
|
||||||
max-cache-ttl 120
|
|
||||||
extra-socket ~/.gnupg/S.gpg-agent.forwarded
|
|
|
@ -1,3 +0,0 @@
|
||||||
[Command]
|
|
||||||
FileManager=pcmanfm %s
|
|
||||||
Terminal=lxterminal
|
|
|
@ -1,69 +0,0 @@
|
||||||
# lxpanel <profile> config file. Manually editing is not recommended.
|
|
||||||
# Use preference dialog in lxpanel to adjust config when you can.
|
|
||||||
|
|
||||||
Global {
|
|
||||||
edge=bottom
|
|
||||||
allign=right
|
|
||||||
margin=0
|
|
||||||
widthtype=percent
|
|
||||||
width=40
|
|
||||||
height=30
|
|
||||||
transparent=0
|
|
||||||
tintcolor=#000000
|
|
||||||
alpha=0
|
|
||||||
autohide=0
|
|
||||||
heightwhenhidden=2
|
|
||||||
setdocktype=1
|
|
||||||
setpartialstrut=1
|
|
||||||
usefontcolor=1
|
|
||||||
fontsize=10
|
|
||||||
fontcolor=#ffffff
|
|
||||||
usefontsize=0
|
|
||||||
background=1
|
|
||||||
backgroundfile=/usr/share/lxpanel/images/background.png
|
|
||||||
iconsize=24
|
|
||||||
loglevel=2
|
|
||||||
}
|
|
||||||
|
|
||||||
Plugin {
|
|
||||||
type = taskbar
|
|
||||||
expand=1
|
|
||||||
Config {
|
|
||||||
tooltips=1
|
|
||||||
IconsOnly=0
|
|
||||||
ShowAllDesks=0
|
|
||||||
UseMouseWheel=1
|
|
||||||
UseUrgencyHint=1
|
|
||||||
FlatButton=0
|
|
||||||
MaxTaskWidth=150
|
|
||||||
spacing=1
|
|
||||||
GroupedTasks=0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Plugin {
|
|
||||||
type = pager
|
|
||||||
}
|
|
||||||
|
|
||||||
Plugin {
|
|
||||||
type = tray
|
|
||||||
}
|
|
||||||
|
|
||||||
Plugin {
|
|
||||||
type = space
|
|
||||||
Config {
|
|
||||||
Size=2
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Plugin {
|
|
||||||
type = dclock
|
|
||||||
Config {
|
|
||||||
ClockFmt=%F %R
|
|
||||||
TooltipFmt=%A
|
|
||||||
BoldFont=0
|
|
||||||
IconOnly=0
|
|
||||||
CenterText=0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# Must be run as root / sudo
|
|
||||||
|
|
||||||
dnf -y install emacs git tmux gnupg2 dnf-plugins-core make go pinentry transmission-remote-cli
|
|
||||||
|
|
||||||
# docker
|
|
||||||
dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
|
|
||||||
dnf -y install docker-ce docker-ce-cli containerd.io
|
|
||||||
systemctl enable docker
|
|
||||||
systemctl start docker
|
|
||||||
|
|
||||||
# docker-machine
|
|
||||||
DOCKER_MACHINE_URL=https://github.com/docker/machine/releases/download/v0.16.0
|
|
||||||
curl -L $DOCKER_MACHINE_URL/docker-machine-$(uname -s)-$(uname -m) > /tmp/docker-machine
|
|
||||||
install /tmp/docker-machine /usr/local/bin/docker-machine
|
|
||||||
|
|
||||||
# docker-compose
|
|
||||||
DOCKER_COMPOSE_URL=https://github.com/docker/compose/releases/download/1.23.2
|
|
||||||
curl -L $DOCKER_COMPOSE_URL/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
|
|
||||||
chmod 755 /usr/local/bin/docker-compose
|
|
||||||
|
|
||||||
# Security
|
|
||||||
sed -i 's/^.*PubkeyAuthentication.*$/PubkeyAuthentication yes/' /etc/ssh/sshd_config
|
|
||||||
sed -i 's/^.*PasswordAuthentication.*$/PasswordAuthentication no/' /etc/ssh/sshd_config
|
|
||||||
service sshd restart
|
|
140
sawfish/rc
140
sawfish/rc
|
@ -1,140 +0,0 @@
|
||||||
(require 'sawfish.wm.defaults)
|
|
||||||
(require 'sawfish.wm.ext.match-window)
|
|
||||||
|
|
||||||
;;; Programs to run on startup
|
|
||||||
(system "setxkbmap dvorak")
|
|
||||||
(system "setxkbmap -option compose:caps")
|
|
||||||
(system "lxpanel &")
|
|
||||||
; (system "xscreensaver &")
|
|
||||||
|
|
||||||
;; For VMs
|
|
||||||
; (system "xset s off")
|
|
||||||
; (system "xset -dpms")
|
|
||||||
|
|
||||||
|
|
||||||
;;; Custom functions
|
|
||||||
|
|
||||||
(defun launch-app (app)
|
|
||||||
(case app
|
|
||||||
('chrome (system "google-chrome --disable-gpu-compositing &"))
|
|
||||||
('term-code (system "gnome-terminal --role code --geometry=120x34 &"))
|
|
||||||
('term-quick (system "gnome-terminal --role quick --geometry=80x24 &"))
|
|
||||||
('term-std (system "gnome-terminal --role terminal --geometry=100x28 &"))
|
|
||||||
('quassel (system "quasselclient &")) ))
|
|
||||||
|
|
||||||
; Note that the documentation for 'insert-workspace' is wrong, and we insert
|
|
||||||
; *after* the provided value, not before
|
|
||||||
(defun launch-app-in-new-workspace (app)
|
|
||||||
(progn
|
|
||||||
(select-workspace (insert-workspace (cdr (workspace-limits))))
|
|
||||||
(launch-app app) ))
|
|
||||||
|
|
||||||
(defun send-to-new-workspace ()
|
|
||||||
(progn
|
|
||||||
(set 'space current-workspace)
|
|
||||||
(set 'window (input-focus))
|
|
||||||
(move-window-to-workspace
|
|
||||||
window
|
|
||||||
space
|
|
||||||
(insert-workspace (cdr (workspace-limits)))
|
|
||||||
t )
|
|
||||||
(select-workspace (cdr (workspace-limits))) ))
|
|
||||||
|
|
||||||
(defun send-workspace-to-top ()
|
|
||||||
(move-workspace current-workspace (- (cdr (workspace-limits)) current-workspace)) )
|
|
||||||
|
|
||||||
(defun build-new-workspace ()
|
|
||||||
(progn
|
|
||||||
(launch-app-in-new-workspace 'chrome)
|
|
||||||
(launch-app 'term-code)))
|
|
||||||
|
|
||||||
(defun destroy-workspace ()
|
|
||||||
(progn
|
|
||||||
(mapcar
|
|
||||||
(lambda (win)
|
|
||||||
(if (not (equal "panel" win)) (destroy-window win)) )
|
|
||||||
(workspace-windows) )
|
|
||||||
(remove-workspace)
|
|
||||||
(previous-workspace 1) ))
|
|
||||||
|
|
||||||
|
|
||||||
;;; Keybinds
|
|
||||||
(define apps-keymap (make-keymap))
|
|
||||||
|
|
||||||
(bind-keys apps-keymap
|
|
||||||
"t" '(launch-app 'term-std)
|
|
||||||
"q" '(launch-app 'term-quick)
|
|
||||||
"o" '(launch-app 'term-code)
|
|
||||||
"c" '(launch-app 'chrome)
|
|
||||||
"i" '(launch-app 'quassel) )
|
|
||||||
|
|
||||||
(unbind-keys global-keymap
|
|
||||||
"W-Left"
|
|
||||||
"W-Right"
|
|
||||||
"M-Up"
|
|
||||||
"M-Down"
|
|
||||||
"C-Tab")
|
|
||||||
|
|
||||||
; Workspace bindings
|
|
||||||
(bind-keys global-keymap
|
|
||||||
"M-C-Delete" 'restart
|
|
||||||
"Super-Left" '(previous-workspace 1)
|
|
||||||
"Super-Right" '(next-workspace 1)
|
|
||||||
"Super-Up" '(select-workspace (cdr (workspace-limits))) ; top of stack
|
|
||||||
"Super-Down" '(select-workspace (car (workspace-limits))) ; bottom of stack
|
|
||||||
"Super-Next" 'move-workspace-forwards
|
|
||||||
"Super-Prior" 'move-workspace-backwards
|
|
||||||
"Super-Shift-Next" send-workspace-to-top
|
|
||||||
"Super-End" destroy-workspace
|
|
||||||
"M-F1" '(select-workspace 0)
|
|
||||||
"M-F2" '(select-workspace 1)
|
|
||||||
"M-F3" '(select-workspace 2)
|
|
||||||
"M-F4" '(select-workspace 3)
|
|
||||||
"M-F5" '(select-workspace 4)
|
|
||||||
"M-F6" '(select-workspace 5)
|
|
||||||
"M-F7" '(select-workspace 6)
|
|
||||||
"M-F8" '(select-workspace 7)
|
|
||||||
)
|
|
||||||
|
|
||||||
; Window-specific workspace bindings
|
|
||||||
(bind-keys window-keymap
|
|
||||||
"Super-Shift-Left" 'send-to-previous-workspace
|
|
||||||
"Super-Shift-Right" 'send-to-next-workspace
|
|
||||||
"Super-Shift-Up" send-to-new-workspace )
|
|
||||||
|
|
||||||
; General bindings
|
|
||||||
(bind-keys global-keymap
|
|
||||||
"M-TAB" 'cycle-windows
|
|
||||||
"M-Shift-TAB" 'cycle-windows-backward
|
|
||||||
"Super-l" '(system "xscreensaver-command -lock")
|
|
||||||
"Super-x" apps-keymap
|
|
||||||
"Super-n" build-new-workspace
|
|
||||||
)
|
|
||||||
|
|
||||||
; Given a list of paired letter-command items, returns a new list of paired
|
|
||||||
; letter-function items, where each anonymous function calls the passed
|
|
||||||
; function with the original string as its argument
|
|
||||||
; 'function' should be a function, 'map' should be a list of strings
|
|
||||||
;
|
|
||||||
; This is currently unused, because my needs changed, but it's an excellent idea.
|
|
||||||
(defun funcmap (function map)
|
|
||||||
(mapcar
|
|
||||||
(lambda (item)
|
|
||||||
(if (= (length item) 1)
|
|
||||||
item
|
|
||||||
(lambda () (function item)) ))
|
|
||||||
map) )
|
|
||||||
|
|
||||||
|
|
||||||
;;; Custom variables
|
|
||||||
(set 'lock-first-workspace nil)
|
|
||||||
|
|
||||||
;;; Hooks
|
|
||||||
(add-hook 'idle-hook delete-empty-workspaces)
|
|
||||||
|
|
||||||
;;; Window Matching
|
|
||||||
(add-window-matcher '((WM_WINDOW_ROLE . "^code|terminal$"))
|
|
||||||
'((position . south-east)) )
|
|
||||||
|
|
||||||
(add-window-matcher '((WM_WINDOW_ROLE . "^quick$"))
|
|
||||||
'((position . north-east)) )
|
|
2
screenrc
2
screenrc
|
@ -1,2 +0,0 @@
|
||||||
defhstatus "^ES"
|
|
||||||
caption always "%w"
|
|
|
@ -1,3 +0,0 @@
|
||||||
Makes all your stderr messages red!
|
|
||||||
|
|
||||||
To install, just run `install.sh`.
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
if ! grep 'stderred.so' ~/.bash_profile; then
|
|
||||||
echo 'export LD_PRELOAD=$LD_PRELOAD:"~/.local/lib64/stderred.so"' >> ~/.bash_profile
|
|
||||||
fi
|
|
||||||
mkdir -p ~/.local/lib64
|
|
||||||
cp stderred.so ~/.local/lib64/
|
|
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue