summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2018-01-10 19:38:58 -0500
committerLuke Shumaker <lukeshu@lukeshu.com>2018-01-10 19:38:58 -0500
commita2cd9d788f7b39e9f17d1fa2dc1382bd2f98e2c1 (patch)
treef2f5c900f0c9aded26d3d9ca0c25e9a6029a7a9e
parent75a63c7e7b3b055198884f31c0d7c516eaf9d32e (diff)
parent971e265cac74976670da2a87805b644e90826b95 (diff)
Merge branch 'master' into build64-par/master
-rw-r--r--.config/X11/modmap39
-rw-r--r--.config/X11/resources2
-rw-r--r--.config/bash/rc.d/10_aliases.sh14
-rw-r--r--.config/bash/rc.d/10_hist.sh2
-rw-r--r--.config/emacs/init.el31
-rw-r--r--.config/login.d/00_path.sh11
-rw-r--r--.config/login.d/10_gpg.sh2
-rw-r--r--.config/lxpanel/default/panels/panel71
-rw-r--r--.config/pacman/makepkg.conf40
-rw-r--r--.config/wmii-hg/.gitignore1
-rw-r--r--.config/wmii-hg/Makefile10
-rwxr-xr-x.config/wmii-hg/rbar_clock16
-rw-r--r--.config/wmii-hg/rbar_clock.go29
-rw-r--r--.config/wmii-hg/rbar_util/main.go76
-rw-r--r--.config/wmii-hg/rbar_util/util.go49
-rwxr-xr-x.config/wmii-hg/wmiirc2
16 files changed, 298 insertions, 97 deletions
diff --git a/.config/X11/modmap b/.config/X11/modmap
index b332204..22d2ac6 100644
--- a/.config/X11/modmap
+++ b/.config/X11/modmap
@@ -1,14 +1,41 @@
! -*- Mode: Xmodmap -*-
+! Notes on the syntax:
+! - The RHS of keycode/keysym commands is:
+! normal [Shift [Mode_switch [Shift+Mode_switch]]]
+! - The modifiers are (non-caps sensitive):
+! 0: Shift
+! 1: Lock
+! 2: Control
+! 3-7: Mod{1-5}
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
! My desktop doesn't have a super key, so I map Caps_Lock to Super_L
! Also, use Caps_Lock for the compose key
-remove lock = Caps_Lock
+!
+! Don't bother `remove lock = Caps_Lock`; it will get reset
+! approprately by the modifier reset below.
keysym Caps_Lock = Super_L Multi_key
-! All of these are my "super". Silly I have so many...
-clear mod4
-add mod4 = Super_L Super_R Hyper_L Hyper_R Menu
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+! The default modifier list is dumb. Wipe it and do something
+! sensible.
+clear shift
+clear lock
+clear control
+clear mod1
+clear mod2
+clear mod3
+clear mod4
+clear mod5
-! Note to future me:
-! The modifiers are: << Shift, Lock, Control, Mod{1..5} >> and are NOT case sensitive
+add shift = Shift_L Shift_R
+add lock = Caps_Lock
+add control = Control_L Control_R
+add mod1 = Num_Lock
+add mod2 = Alt_L Alt_R Meta_L Meta_R
+add mod3 = ISO_Level3_Shift
+add mod4 = Super_L Super_R
+add mod5 = Hyper_L Hyper_R
diff --git a/.config/X11/resources b/.config/X11/resources
index fca1914..bcc6c80 100644
--- a/.config/X11/resources
+++ b/.config/X11/resources
@@ -23,3 +23,5 @@ URxvt.scrollWithBuffer: true
URxvt.perl-ext-common: default,matcher
URxvt.url-launcher: v-www-browser
URxvt.matcher.button: 1
+
+*TkTheme: clam
diff --git a/.config/bash/rc.d/10_aliases.sh b/.config/bash/rc.d/10_aliases.sh
index c3766da..9d008e2 100644
--- a/.config/bash/rc.d/10_aliases.sh
+++ b/.config/bash/rc.d/10_aliases.sh
@@ -3,9 +3,15 @@
######################################################################
# Set up colors and settings for all the things #
######################################################################
-if [ -x "`which dircolors`" ]; then
- eval "$(dircolors -p | cat - "${XDG_CONFIG_HOME}/dir_colors" |
- dircolors -b -)"
+if type dircolors &>/dev/null; then
+ eval "$(
+ {
+ dircolors -p
+ if [[ -f "${XDG_CONFIG_HOME}/dir_colors" ]]; then
+ cat "${XDG_CONFIG_HOME}/dir_colors"
+ fi
+ } | dircolors -b -
+ )"
alias ls='ls -1v --color=auto'
alias dir='dir -v --color=auto'
alias vdir='vdir -v --color=auto'
@@ -63,7 +69,7 @@ if [ -x "`which dircolors`" ]; then
}
diff() {
- if [[ -t 1 ]]; then
+ if [[ -t 1 ]] && type colordiff &>/dev/null; then
(
set -o pipefail
command diff "$@" | colordiff
diff --git a/.config/bash/rc.d/10_hist.sh b/.config/bash/rc.d/10_hist.sh
index 6b2c4f1..3d34d6e 100644
--- a/.config/bash/rc.d/10_hist.sh
+++ b/.config/bash/rc.d/10_hist.sh
@@ -4,6 +4,6 @@
HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
HISTFILE=${XDG_DATA_HOME}/bash/history
HISTTIMEFORMAT='[%Y-%m-%d %H:%M] '
-HISTSIZE=5000
+HISTSIZE=50000
shopt -s histappend # append to the history file, don't overwrite it
mkdir -p "${HISTFILE%/*}"
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 1a5d719..4d6543b 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -90,12 +90,31 @@
(set (make-local-variable 'tab-width) 2)
(set (make-local-variable 'indent-tabs-mode) nil)
)))
+(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\\'"))
+(use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'"))
+(use-package go-mode :mode "\\.go\\'")
(use-package graphviz-dot-mode
:mode ("\\.dot\\'" "\\.gv\\'")
:config (add-hook 'graphviz-dot-mode-hook
'(lambda ()
(set (make-local-variable 'graphviz-dot-auto-indent-on-semi) nil)
)))
+(use-package haml-mode :mode "\\.haml\\'")
+(use-package less-css-mode :mode "\\.less\\'")
+(use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'"))
+(use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'"))
+(use-package php-mode
+ :mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")
+ :interpreter "php\\(?:-?[3457]\\(?:\\.[0-9]+\\)*\\)?")
+(use-package scss-mode :mode "\\.scss\\'")
+(use-package typescript-mode :mode "\\.ts\\'")
+(use-package vue-mode :mode "\\.vue\\'")
+(use-package yaml-mode :mode "\\.\\(e?ya?\\|ra\\)ml\\'")
+
+;;(use-package nxhtml) ; nxhtml is invasive, only enable if actively using
+
+;; IDK? I guess I decided that plain php-mode had improved?
+;;
;;(use-package php-mode-improved
;; :mode (("\\.php[s34]?\\'" . php-mode)
;; ("\\.phtml\\'" . php-mode)
@@ -104,18 +123,6 @@
;; '(lambda ()
;; (c-set-offset 'cpp-macro 0)
;; )))
-(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\\'"))
-(use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'"))
-(use-package go-mode :mode "\\.go\\'")
-(use-package haml-mode :mode "\\.haml\\'")
-(use-package less-css-mode :mode "\\.less\\'")
-(use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'"))
-(use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'"))
-(use-package php-mode :mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'"))
-(use-package scss-mode :mode "\\.scss\\'")
-(use-package yaml-mode :mode "\\.e?ya?ml\\'")
-
-;;(use-package nxhtml) ; nxhtml is invasive, only enable if actively using
(if (file-exists-p "~/Maildir")
;;'(apel flim semi wanderlust)
diff --git a/.config/login.d/00_path.sh b/.config/login.d/00_path.sh
index ae2e8db..aa62f75 100644
--- a/.config/login.d/00_path.sh
+++ b/.config/login.d/00_path.sh
@@ -1,12 +1,7 @@
#!/hint/sh
-eval "$(
if type config-path &>/dev/null; then
- config_path=config-path
-else
+ eval "$(config-path | sed 's/^/export /')"
+elif [[ -x "$HOME/.local/bin/config-path" ]]; then
# Bootstrap finding config-path
- config_path="$HOME/.local/bin/config-path"
+ eval "$("$HOME/.local/bin/config-path" | sed 's/^/export /')"
fi
-IFS=$'\n'
-lines=($("$config_path"))
-printf -- 'export %s\n' "${lines[@]}"
-)"
diff --git a/.config/login.d/10_gpg.sh b/.config/login.d/10_gpg.sh
index 83e4203..01fcbe2 100644
--- a/.config/login.d/10_gpg.sh
+++ b/.config/login.d/10_gpg.sh
@@ -1,4 +1,4 @@
#!/hint/sh
-if [ -z "$GPGKEY" -a -f "${HOME}/.gnupg/gpg.conf" ]; then
+if [ -z "$GPGKEY" -a -f "${GNUPG_HOME:-${HOME}/.gnupg}/gpg.conf" ]; then
export GPGKEY=`sed -nr 's/^\s*default-key\s+//p' "${GNUPG_HOME:-${HOME}/.gnupg}/gpg.conf"`
fi
diff --git a/.config/lxpanel/default/panels/panel b/.config/lxpanel/default/panels/panel
index 93bdb61..ccde93c 100644
--- a/.config/lxpanel/default/panels/panel
+++ b/.config/lxpanel/default/panels/panel
@@ -1,52 +1,47 @@
-# lxpanel <profile> config file. Manually editing is not recommended.
-# Use preference dialog in lxpanel to adjust config when you can.
-
Global {
- edge=top
- allign=right
- margin=0
- widthtype=percent
- width=100
- height=16
- transparent=1
- tintcolor=#555753
- alpha=255
- autohide=0
- heightwhenhidden=2
- setdocktype=1
- setpartialstrut=1
- usefontcolor=1
- fontsize=10
- fontcolor=#eeeeec
- usefontsize=0
- background=0
- backgroundfile=/usr/share/lxpanel/images/background.png
- iconsize=16
- loglevel=2
+ monitor=-1
+ edge=top
+ setdocktype=1
+ setpartialstrut=1
+
+ widthtype=percent
+ width=100
+
+ height=16
+ iconsize=16
+
+ transparent=1
+ tintcolor=#555753
+ alpha=255
+
+ loglevel=2
}
Plugin {
- type = menu
- Config {
- image=/usr/share/lxpanel/images/my-computer.png
- system {
- }
- }
+ type=menu
+ Config {
+ # If we don't explicitly give the menu a list of
+ # things to contain, it will default to
+ # system{}/separator{}/item{command=run}/separator{}/item{command=logout}
+ system {
+ }
+ }
}
Plugin {
- type = space
- expand=1
- Config {
- Size=2
- }
+ type=space
+ expand=1
+ Config {
+ # The default ("natural") size is 1, but the min size
+ # is 2, so we have to set that here.
+ Size=2
+ }
}
Plugin {
- type = tray
+ type=tray
}
Plugin {
- type = volumealsa
+ type=volumealsa
}
-
diff --git a/.config/pacman/makepkg.conf b/.config/pacman/makepkg.conf
index 2e627b8..fe64828 100644
--- a/.config/pacman/makepkg.conf
+++ b/.config/pacman/makepkg.conf
@@ -9,16 +9,36 @@ PACKAGER="Luke Shumaker <lukeshu@sbcglobal.net>"
MAKEFLAGS="-j$(($(nproc)+1))"
-if type ccache &>/dev/null; then
- f=false
+lukeshu_set_BUILDENV() {
+ local thing=$1
+ local i
for i in "${!BUILDENV[@]}"; do
- if [[ "${BUILDENV[$i]}" == '!ccache' ]]; then
- BUILDENV[$i]='ccache'
- f=true
- fi
+ case "${BUILDENV[$i]}" in
+ "!${thing#!}"|"${thing#!}")
+ BUILDENV[$i]=$thing
+ return
+ ;;
+ esac
+ done
+ BUILDENV+=("$thing")
+}
+
+lukeshu_set_OPTIONS() {
+ local thing=$1
+ local i
+ for i in "${!OPTIONS[@]}"; do
+ case "${OPTIONS[$i]}" in
+ "!${thing#!}"|"${thing#!}")
+ OPTIONS[$i]=$thing
+ return
+ ;;
+ esac
done
- if [[ $f == false ]]; then
- BUILDENV+=('ccache')
- fi
- unset f i
+ OPTIONS+=("$thing")
+}
+
+lukeshu_set_OPTIONS debug
+
+if type ccache &>/dev/null; then
+ lukeshu_set_BUILDENV ccache
fi
diff --git a/.config/wmii-hg/.gitignore b/.config/wmii-hg/.gitignore
new file mode 100644
index 0000000..455b2ee
--- /dev/null
+++ b/.config/wmii-hg/.gitignore
@@ -0,0 +1 @@
+/rbar_clock \ No newline at end of file
diff --git a/.config/wmii-hg/Makefile b/.config/wmii-hg/Makefile
new file mode 100644
index 0000000..4ba64a3
--- /dev/null
+++ b/.config/wmii-hg/Makefile
@@ -0,0 +1,10 @@
+all: rbar_clock
+.PHONY: all
+
+%: %.go
+ go build -o $@ $<
+
+rbar_clock: rbar_util $(wildcard rbar_util/*)
+
+.SECONDARY:
+.DELETE_ON_ERROR:
diff --git a/.config/wmii-hg/rbar_clock b/.config/wmii-hg/rbar_clock
deleted file mode 100755
index c66b21e..0000000
--- a/.config/wmii-hg/rbar_clock
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/env bash
-
-update() {
- id=$1
- setup_trap "$id"
-
- while true; do
- {
- printf 'label '
- date +'%a %F %T %Z(%:::z)'
- } | write "$id"
- sleep .5
- done
-}
-
-. "$(dirname "$0")/rbar.sh"
diff --git a/.config/wmii-hg/rbar_clock.go b/.config/wmii-hg/rbar_clock.go
new file mode 100644
index 0000000..247dd3a
--- /dev/null
+++ b/.config/wmii-hg/rbar_clock.go
@@ -0,0 +1,29 @@
+package main
+
+import (
+ "time"
+
+ "./rbar_util"
+)
+
+func main() {
+ rbar_util.Main(rbar_util.Impl{
+ Update: func(id string) error {
+ defer rbar_util.Remove(rbar_util.GlobEscape(id))
+
+ now := time.Now()
+ start := now.Truncate(time.Second).Add(time.Second)
+ time.Sleep(start.Sub(now))
+
+ clock := time.NewTicker(1*time.Second)
+ defer clock.Stop()
+ for now := range clock.C {
+ err := rbar_util.Write(id, now.Format("label Mon 2006-01-02 15:04:05 MST(-07)"))
+ if err != nil {
+ return err
+ }
+ }
+ panic("not reached")
+ },
+ })
+}
diff --git a/.config/wmii-hg/rbar_util/main.go b/.config/wmii-hg/rbar_util/main.go
new file mode 100644
index 0000000..5fccd7e
--- /dev/null
+++ b/.config/wmii-hg/rbar_util/main.go
@@ -0,0 +1,76 @@
+package rbar_util
+
+import (
+ "os"
+ "io"
+ "fmt"
+)
+
+
+type Impl struct {
+ LeftClick func() error
+ MiddleClick func() error
+ RightClick func() error
+ ScrollUp func() error
+ ScrollDown func() error
+ Update func(tag string) error
+}
+
+func gerror(status int, err error, format string, a ...interface{}) {
+ msg := fmt.Sprintf(format, a...)
+ if err == nil {
+ fmt.Fprintf(os.Stderr, "%s: %s", os.Args[0], msg)
+ } else {
+ fmt.Fprintf(os.Stderr, "%s: %s: %v", os.Args[0], msg, err)
+ }
+ if status != 0 {
+ os.Exit(status)
+ }
+}
+
+func errusage(fmt string, a ...interface{}) {
+ gerror(0, nil, fmt, a...)
+ usage(os.Stderr)
+ os.Exit(2)
+}
+
+func usage(w io.Writer) {
+ fmt.Fprintf(w, "Usage: %[1]v NN_LABEL\n or: %[1]v BTN_ID\n or: %[1]v -h\n", os.Args[0])
+}
+
+func Main(impl Impl) {
+ if len(os.Args) != 2 {
+ errusage("exactly 1 argument expected, got %d", len(os.Args)-1)
+ }
+ var fn func() error
+ switch os.Args[1] {
+ case "-h":
+ usage(os.Stdout)
+ os.Exit(0)
+ case "1": fn = impl.LeftClick;
+ case "2": fn = impl.MiddleClick;
+ case "3": fn = impl.RightClick;
+ case "4": fn = impl.ScrollUp;
+ case "5": fn = impl.ScrollDown;
+ default:
+ arg := os.Args[1]
+ if len(arg) > 3 && '0' <= arg[0] && arg[0] <= '9' && '0' <= arg[1] && arg[1] <= '9' && arg[2] == '_' {
+ if impl.Update != nil {
+ fn = func() error { return impl.Update(arg) }
+ }
+ } else {
+ errusage("invalid argument: %s\n", os.Args[1])
+ }
+ }
+ if fn == nil {
+ fn = func() error { return nil }
+ }
+ if os.Getenv("XDG_RUNTIME_DIR") == "" {
+ gerror(6, nil, "XDG_RUNTIME_DIR isn't set")
+ }
+ err := fn()
+ if err != nil && err != NoRbar{
+ gerror(1, err, "")
+ }
+ os.Exit(0)
+}
diff --git a/.config/wmii-hg/rbar_util/util.go b/.config/wmii-hg/rbar_util/util.go
new file mode 100644
index 0000000..9e5d622
--- /dev/null
+++ b/.config/wmii-hg/rbar_util/util.go
@@ -0,0 +1,49 @@
+package rbar_util
+
+import (
+ "os"
+ "io"
+ "path/filepath"
+ "strings"
+ "errors"
+
+ "fmt"
+)
+
+func GlobEscape(lit string) string {
+ glob := lit
+ glob = strings.Replace(glob, "\\", "\\\\", -1)
+ glob = strings.Replace(glob, "*", "\\*", -1)
+ glob = strings.Replace(glob, "?", "\\?", -1)
+ glob = strings.Replace(glob, "[", "\\[", -1)
+ return glob
+}
+
+var NoRbar = errors.New("no WMII rbars found")
+
+func Write(filename string, msg string) error {
+ dirnames, _ := filepath.Glob(GlobEscape(os.Getenv("XDG_RUNTIME_DIR"))+"/wmii*/rbar")
+ if len(dirnames) == 0 {
+ return NoRbar
+ }
+ for _, dirname := range dirnames {
+ file, err := os.OpenFile(filepath.Join(dirname, filename), os.O_WRONLY| os.O_APPEND|os.O_CREATE, 0666)
+ if err != nil {
+ continue
+ }
+ io.WriteString(file, msg)
+ file.Close()
+ }
+ return nil
+}
+
+func Remove(glob string) {
+ fmt.Println("remove", glob);
+ fullglob := GlobEscape(os.Getenv("XDG_RUNTIME_DIR"))+"/wmii*/rbar/"+glob
+ fmt.Println("glob", fullglob)
+ filenames, err := filepath.Glob(fullglob)
+ fmt.Println("globerr", err)
+ for _, filename := range filenames {
+ os.Remove(filename)
+ }
+}
diff --git a/.config/wmii-hg/wmiirc b/.config/wmii-hg/wmiirc
index c6e05bf..f96642b 100755
--- a/.config/wmii-hg/wmiirc
+++ b/.config/wmii-hg/wmiirc
@@ -15,5 +15,5 @@ systemd-notify --ready || true
trap "Event Quit" EXIT
while read -r event; do
- Event $event
+ Event $event <&-
done < <(wmiir read /event 2>/dev/null)