summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKJ Ørbekk <orbekk@google.com>2017-02-22 11:07:55 -0500
committerKJ Ørbekk <orbekk@google.com>2017-02-22 11:07:55 -0500
commit1164367688527858866defdc62347a3b934ac23c (patch)
tree0df2488f10f5e6b5dc18f4740ee7794e56f5f557
parent9e128a3d6da7a276541f5ce5c1ac9f86ec60cb78 (diff)
parent86c0b0cfaac82cc4de2d69c92e279a094d21b678 (diff)
Merge branches 'master' and 'master' of sabaki.orbekk.com:/storage/projects/dotfiles
-rw-r--r--Xresources-pincer80
-rwxr-xr-xbin/kj-publish.sh2
-rw-r--r--config/fish/functions/fish_prompt.fish177
-rw-r--r--nixos/configuration.nix50
-rw-r--r--nixos/pincer.nix36
-rw-r--r--nixos/shell.nix8
-rw-r--r--nixos/vlc-nightly.nix13
-rw-r--r--spacemacs11
-rw-r--r--xmonad/xmonad.hs2
-rwxr-xr-xxsession5
10 files changed, 246 insertions, 138 deletions
diff --git a/Xresources-pincer b/Xresources-pincer
index 93f706c..82ccf4a 100644
--- a/Xresources-pincer
+++ b/Xresources-pincer
@@ -1,5 +1,10 @@
-urxvt*font: xft:dejavu sans mono:size=13:antialias=true
-!urxvt*font: xft:inconsolata:size=14:antialias=true
+*customization: -color
+! urxvt*font: xft:dejavu sans mono:pixelsize=22:antialias=true
+!urxvt*font: xft:DejaVu Sans Mono:pixelsize=20:antialias=true:hinting=true
+urxvt*font: xft:fira code:pixelsize=20:antialias=true:hinting=true
+!urxvt*letterSpace: -5
+!urxvt*font: xft:fira code:pixelsize=22:antialias=true
+!urxvt*font: xft:inconsolata:size=18:antialias=true
urxvt*scrollBar: false
URxvt*termName: xterm-256color
Xterm*termName: xterm-256color
@@ -7,22 +12,13 @@ Xterm*termName: xterm-256color
urxvt*foreground: white
urxvt*background: black
-*color0: #2E3436
-*color1: #a40000
-*color2: #4E9A06
-*color3: #C4A000
-*color4: #3465A4
-*color5: #75507B
-*color6: #ce5c00
-*color7: #babdb9
-*color8: #555753
-*color9: #EF2929
-*color10: #8AE234
-*color11: #FCE94F
-*color12: #729FCF
-*color13: #AD7FA8
-*color14: #fcaf3e
-*color15: #EEEEEC
+Xft.lcdfilter: lcddefault
+Xft.dpi: 96
+Xft.antialias: true
+Xft.rgba: rgb
+Xft.hinting: true
+Xft.hintstyle: hintslight
+
URxvt.keysym.M-c: perl:clipboard:copy
URxvt.keysym.M-v: perl:clipboard:paste
@@ -36,3 +32,51 @@ URxvt.iso14755: false
URxvt.iso14755_52: false
URxvt.url-launcher: /usr/bin/xdg-open
URxvt.matcher.button: 1
+
+#define base00 #272822
+#define base01 #383830
+#define base02 #49483e
+#define base03 #75715e
+#define base04 #a59f85
+#define base05 #f8f8f2
+#define base06 #f5f4f1
+#define base07 #f9f8f5
+#define base08 #f92672
+#define base09 #fd971f
+#define base0A #f4bf75
+#define base0B #a6e22e
+#define base0C #a1efe4
+#define base0D #66d9ef
+#define base0E #ae81ff
+#define base0F #cc6633
+
+*.foreground: base05
+*.background: base00
+*.cursorColor: base05
+
+*.color0: base00
+*.color1: base08
+*.color2: base0B
+*.color3: base0A
+*.color4: base0D
+*.color5: base0E
+*.color6: base0C
+*.color7: base05
+
+*.color8: base03
+*.color9: base08
+*.color10: base0B
+*.color11: base0A
+*.color12: base0D
+*.color13: base0E
+*.color14: base0C
+*.color15: base07
+
+! Note: colors beyond 15 might not be loaded (e.g., xterm, urxvt),
+! use 'shell' template to set these if necessary
+*.color16: base09
+*.color17: base0F
+*.color18: base01
+*.color19: base02
+*.color20: base04
+*.color21: base06
diff --git a/bin/kj-publish.sh b/bin/kj-publish.sh
index 867f5ba..e65716d 100755
--- a/bin/kj-publish.sh
+++ b/bin/kj-publish.sh
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
-ssh orbekk@tesuji.6.orbekk.com ./build/org-publisher/publish.sh
+ssh orbekk@sabaki.orbekk.com ./build/org-publisher/publish.sh
diff --git a/config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish
index c45066c..bd142dd 100644
--- a/config/fish/functions/fish_prompt.fish
+++ b/config/fish/functions/fish_prompt.fish
@@ -1,110 +1,69 @@
-# vim: set ft=sh:
-
-# Pure
-# by Rafael Rinaldi
-# https://github.com/rafaelrinaldi/pure
-# MIT License
-
-# Whether or not is a fresh session
-set -g fresh_session 1
-
-# Symbols
-
-set -g symbol_prompt "❯"
-set -g symbol_git_down_arrow "⇣"
-set -g symbol_git_up_arrow "⇡"
-set -g symbol_git_dirty "*"
-set -g symbol_horizontal_bar "—"
-
-# Colors
-
-set -g color_red (set_color red)
-set -g color_green (set_color green)
-set -g color_blue (set_color blue)
-set -g color_yellow (set_color yellow)
-set -g color_cyan (set_color cyan)
-set -g color_gray (set_color 93A1A1)
-set -g color_normal (set_color normal)
-
-function fish_prompt
- # Save previous exit code
- set -l exit_code $status
-
- # Set default color symbol to green meaning it's all good!
- set -l color_symbol $color_green
-
- # Template
-
- set -l current_folder (__parse_current_folder)
- set -l git_branch_name ""
- set -l git_dirty ""
- set -l git_arrows ""
- set -l command_duration ""
- set -l prompt ""
-
- # Do not add a line break to a brand new session
- if test $fresh_session -eq 0
- set prompt $prompt "\n"
- end
-
- # Prompt failed command execution duration
- set command_duration (__format_time $CMD_DURATION)
-
- # Format current folder on prompt output
- set prompt $prompt "$color_yellow$command_duration$color_blue$current_folder$color_normal "
-
- # Handle previous failed command
- if test $exit_code -ne 0
- # Symbol color is red when previous command fails
- set color_symbol $color_red
-
- set prompt $prompt "$color_yellow$command_duration$color_normal"
- end
-
- # Exit with code 1 if git is not available
- if not which git >/dev/null
- return 1
- end
-
- # Check if is on a Git repository
- set -l is_git_repository (command git rev-parse --is-inside-work-tree ^/dev/null)
-
- if test -n "$is_git_repository"
- set git_branch_name (__parse_git_branch)
-
- # Check if there are files to commit
- set -l is_git_dirty (command git status --porcelain --ignore-submodules ^/dev/null)
-
- if test -n "$is_git_dirty"
- set git_dirty $symbol_git_dirty
- end
-
- # Check if there is an upstream configured
- command git rev-parse --abbrev-ref '@{upstream}' >/dev/null ^&1; and set -l has_upstream
- if set -q has_upstream
- set -l git_status (command git rev-list --left-right --count 'HEAD...@{upstream}' | sed "s/[[:blank:]]/ /" ^/dev/null)
-
- # Resolve Git arrows by treating `git_status` as an array
- set -l git_arrow_left (command echo $git_status | cut -c 1 ^/dev/null)
- set -l git_arrow_right (command echo $git_status | cut -c 3 ^/dev/null)
-
- # If arrow is not "0", it means it's dirty
- if test $git_arrow_left -ne "0"
- set git_arrows $symbol_git_up_arrow
- end
-
- if test $git_arrow_right -ne "0"
- set git_arrows $git_arrows$symbol_git_down_arrow
- end
- end
-
- # Format Git prompt output
- set prompt $prompt "$color_gray$git_branch_name$git_dirty$color_normal\t$color_cyan$git_arrows$color_normal"
- end
-
- set prompt $prompt "\n$color_symbol$symbol_prompt$color_normal "
-
- echo -e -s $prompt
-
- set fresh_session 0
+function fish_prompt --description 'Write out the prompt'
+ set -l last_status $status
+
+ # Just calculate this once, to save a few cycles when displaying the prompt
+ if not set -q __fish_prompt_hostname
+ set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+ end
+
+ set -l normal (set_color normal)
+
+ # Hack; fish_config only copies the fish_prompt function (see #736)
+ if not set -q -g __fish_classic_git_functions_defined
+ set -g __fish_classic_git_functions_defined
+
+ function __fish_repaint_user --on-variable fish_color_user --description "Event handler, repaint when fish_color_user changes"
+ if status --is-interactive
+ commandline -f repaint ^/dev/null
+ end
+ end
+
+ function __fish_repaint_host --on-variable fish_color_host --description "Event handler, repaint when fish_color_host changes"
+ if status --is-interactive
+ commandline -f repaint ^/dev/null
+ end
+ end
+
+ function __fish_repaint_status --on-variable fish_color_status --description "Event handler; repaint when fish_color_status changes"
+ if status --is-interactive
+ commandline -f repaint ^/dev/null
+ end
+ end
+
+ function __fish_repaint_bind_mode --on-variable fish_key_bindings --description "Event handler; repaint when fish_key_bindings changes"
+ if status --is-interactive
+ commandline -f repaint ^/dev/null
+ end
+ end
+
+ # initialize our new variables
+ if not set -q __fish_classic_git_prompt_initialized
+ set -qU fish_color_user; or set -U fish_color_user -o green
+ set -qU fish_color_host; or set -U fish_color_host -o cyan
+ set -qU fish_color_status; or set -U fish_color_status red
+ set -U __fish_classic_git_prompt_initialized
+ end
+ end
+
+ set -l color_cwd
+ set -l prefix
+ switch $USER
+ case root toor
+ if set -q fish_color_cwd_root
+ set color_cwd $fish_color_cwd_root
+ else
+ set color_cwd $fish_color_cwd
+ end
+ set suffix '#'
+ case '*'
+ set color_cwd $fish_color_cwd
+ set suffix '>'
+ end
+
+ set -l prompt_status
+ if test $last_status -ne 0
+ set prompt_status ' ' (set_color $fish_color_status) "[$last_status]" "$normal"
+ end
+
+ echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $fish_color_host) "$__fish_prompt_hostname" $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (__fish_vcs_prompt) $normal $prompt_status "> "
end
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
index 80570d0..c65ff35 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -4,6 +4,8 @@
hardware.bluetooth.enable = true;
hardware.pulseaudio.enable = true;
hardware.pulseaudio.package = pkgs.pulseaudioFull;
+ hardware.pulseaudio.tcp.enable = true;
+ hardware.pulseaudio.tcp.anonymousClients.allowAll = true;
hardware.enableAllFirmware = true;
boot.cleanTmpDir = true;
@@ -25,8 +27,19 @@
# Set your time zone.
time.timeZone = "America/New_York";
+ # security.grsecurity.enable = true;
+ # security.grsecurity.lockTunables = false;
+ # # Needed when using chromium with grsecurity.
+ # security.chromiumSuidSandbox.enable = true;
+
nixpkgs.config.allowUnfree = true;
+ fonts = {
+ fonts = with pkgs; [
+ fira-code
+ ];
+ };
+
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs;
@@ -53,7 +66,7 @@
pasystray
pavucontrol
powertop
- kde4.digikam
+ # kde4.digikam
emacs25
sshfsFuse
xorg.xbacklight
@@ -77,10 +90,45 @@
myWine
mumble
wdfs
+ whois
+ dhcpcd
+ haskellPackages.idris
+ dnsutils
# fonts
source-code-pro
inconsolata
+ wirelesstools
+ xbindkeys
+ imagemagick
+ ghc
+ net_snmp
+ #rxvt-unicode-with-perl-with-unicode3-with-plugins
+ unzip
+ linssid
+ lxc
+ nix-repl
+ youtube-dl
+ vlc
+ unrar
+ mosh
+ tldr
+ fira-code
+ haskellPackages.hledger
+ haskellPackages.hledger-ui
+ haskellPackages.hledger-web
+ haskellPackages.hledger-iadd
+ moreutils
+ ledger
+ xorg.xhost
+ binutils
+ pandoc
+
+ # (callPackage ./stardew-valley.nix {})
+
+ #temporary
+ debootstrap
+ wget
# haskellPackages.xmonad
# haskellPackages.xmonad-contrib
diff --git a/nixos/pincer.nix b/nixos/pincer.nix
index 8d83954..449ee68 100644
--- a/nixos/pincer.nix
+++ b/nixos/pincer.nix
@@ -5,8 +5,8 @@
./configuration.nix
];
networking.hostName = "pincer";
- networking.firewall.allowedTCPPorts = [5201];
- networking.firewall.allowedUDPPorts = [5201];
+ networking.firewall.allowedTCPPorts = [5201 34196 34197 5556 5558];
+ networking.firewall.allowedUDPPorts = [5201 34196 34197];
hardware.opengl.driSupport32Bit = true;
boot.loader.systemd-boot.enable = true;
@@ -53,7 +53,37 @@
myMinecraft = minecraft.override {
jre = oraclejre8;
};
- in [ myMinecraft ];
+ pwFactorio = factorio.override {
+ username = "kjetil.orbekk@gmail.com";
+ password = "6F[$~/v6I9HlGoiriI!q";
+ releaseType = "alpha";
+ };
+ myFactorio = pwFactorio.overrideDerivation (o: {
+ version = "0.14.20";
+ src = requireFile {
+ name = "factorio_alpha_x64_0.14.20.tar.gz";
+ url = "test";
+ sha256 = "c7955fdb19895a38d02a536e0bb225ac3bbbc434fcf9c4968fbb4bd5c49329ae";
+ };
+ });
+ in [
+ myMinecraft
+ myFactorio
+ tpacpi-bat
+ ];
+
+ systemd.services.battery_threshold = {
+ description = "Set battery charging thresholds.";
+ path = [ pkgs.tpacpi-bat ];
+ after = [ "basic.target" ];
+ wantedBy = [ "multi-user.target" ];
+ script = ''
+ tpacpi-bat -s ST 1 39
+ tpacpi-bat -s ST 2 39
+ tpacpi-bat -s SP 1 80
+ tpacpi-bat -s SP 2 80
+ '';
+ };
services.tlp.enable = true;
services.tlp.extraConfig = ''
diff --git a/nixos/shell.nix b/nixos/shell.nix
new file mode 100644
index 0000000..654ec78
--- /dev/null
+++ b/nixos/shell.nix
@@ -0,0 +1,8 @@
+{ nixpkgs ? <nixpkgs>, ...}:
+
+with import nixpkgs {};
+
+{
+ vlc-nightly = callPackage ./vlc-nightly.nix {};
+ stardew-valley = callPackage ./stardew-valley.nix {};
+}
diff --git a/nixos/vlc-nightly.nix b/nixos/vlc-nightly.nix
new file mode 100644
index 0000000..6ae95b4
--- /dev/null
+++ b/nixos/vlc-nightly.nix
@@ -0,0 +1,13 @@
+{vlc, autoconf, automake, libtool, stdenv, fetchurl, gettext, m4}:
+
+with stdenv.lib;
+
+vlc.overrideDerivation (o: rec {
+ buildInputs = [autoconf automake libtool gettext m4] ++ o.buildInputs;
+ version = "3.0.0-20161224-0237";
+ preConfigure = ''export BUILDCC=gcc; libtoolize && ./bootstrap; '' + o.preConfigure;
+ src = fetchurl {
+ url = "https://nightlies.videolan.org/build/source/vlc-${version}-git.tar.xz";
+ sha256 = "0hbn2psqpr4cg9hhphdn4sqm7k5syfi7yflhf9ag33cl7zrqd83x";
+ };
+})
diff --git a/spacemacs b/spacemacs
index c86fccc..dca8c52 100644
--- a/spacemacs
+++ b/spacemacs
@@ -35,6 +35,8 @@ values."
markdown
haskell
git
+ idris
+ finance
rust
markdown
org
@@ -91,9 +93,8 @@ values."
;; List of themes, the first of the list is loaded when spacemacs starts.
;; Press <SPC> T n to cycle to the next theme in the list (works great
;; with 2 themes variants, one dark and one light)
- dotspacemacs-themes '(wheatgrass
+ dotspacemacs-themes '(spacemacs-dark wheatgrass
monokai
- spacemacs-dark
base16-bright-dark
spacemacs-light
solarized-light
@@ -104,7 +105,7 @@ values."
dotspacemacs-colorize-cursor-according-to-state t
;; Default font. `powerline-scale' allows to quickly tweak the mode-line
;; size to make separators look not too crappy.
- dotspacemacs-default-font '("Source Code Pro"
+ dotspacemacs-default-font '("Fira Code"
:size 20
:weight normal
:width normal
@@ -210,6 +211,8 @@ user code."
;; bind ctrl-w to backwards-kill-word when no region is selected
(global-set-key (kbd "C-w") 'backward-kill-word-or-kill-region)
+ (setq-default exec-path-from-shell-variables '())
+
(defun backward-kill-word-or-kill-region (&optional arg)
(interactive "p")
(if (region-active-p)
@@ -308,7 +311,7 @@ layers configuration. You are free to put any user code."
;; If there is more than one, they won't work right.
'(package-selected-packages
(quote
- (toml-mode racer rust-mode smeargle orgit magit-gitflow helm-gitignore request gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger evil-magit magit magit-popup git-commit with-editor xterm-color ws-butler window-numbering web-mode web-beautify volatile-highlights vi-tilde-fringe toc-org tern tagedit spacemacs-theme spaceline powerline smooth-scrolling slim-mode shm shell-pop scss-mode sass-mode restart-emacs rainbow-delimiters popwin persp-mode pcre2el paradox hydra spinner page-break-lines org-repo-todo org-present org-pomodoro alert log4e gntp org-plus-contrib org-bullets open-junk-file nyan-mode neotree multi-term move-text mmm-mode markdown-toc markdown-mode macrostep lorem-ipsum linum-relative leuven-theme less-css-mode json-mode json-snatcher json-reformat js2-refactor multiple-cursors s js2-mode js-doc jade-mode info+ indent-guide ido-vertical-mode hungry-delete htmlize hl-todo hindent highlight-parentheses highlight-numbers parent-mode highlight-indentation help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flyspell helm-flx helm-descbinds helm-css-scss helm-ag haskell-snippets yasnippet haml-mode google-translate golden-ratio gnuplot ghc haskell-mode gh-md flx-ido flx fill-column-indicator fancy-battery expand-region exec-path-from-shell evil-visualstar evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-args evil-anzu anzu eval-sexp-fu highlight eshell-prompt-extras esh-help emmet-mode elisp-slime-nav disaster define-word coffee-mode cmm-mode cmake-mode clean-aindent-mode clang-format buffer-move bracketed-paste auto-highlight-symbol auto-dictionary auto-compile packed dash aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async quelpa package-build use-package which-key bind-key bind-map evil monokai-theme))))
+ (idris-mode prop-menu ledger-mode toml-mode racer rust-mode smeargle orgit magit-gitflow helm-gitignore request gitignore-mode gitconfig-mode gitattributes-mode git-timemachine git-messenger evil-magit magit magit-popup git-commit with-editor xterm-color ws-butler window-numbering web-mode web-beautify volatile-highlights vi-tilde-fringe toc-org tern tagedit spacemacs-theme spaceline powerline smooth-scrolling slim-mode shm shell-pop scss-mode sass-mode restart-emacs rainbow-delimiters popwin persp-mode pcre2el paradox hydra spinner page-break-lines org-repo-todo org-present org-pomodoro alert log4e gntp org-plus-contrib org-bullets open-junk-file nyan-mode neotree multi-term move-text mmm-mode markdown-toc markdown-mode macrostep lorem-ipsum linum-relative leuven-theme less-css-mode json-mode json-snatcher json-reformat js2-refactor multiple-cursors s js2-mode js-doc jade-mode info+ indent-guide ido-vertical-mode hungry-delete htmlize hl-todo hindent highlight-parentheses highlight-numbers parent-mode highlight-indentation help-fns+ helm-themes helm-swoop helm-projectile helm-mode-manager helm-make projectile pkg-info epl helm-flyspell helm-flx helm-descbinds helm-css-scss helm-ag haskell-snippets yasnippet haml-mode google-translate golden-ratio gnuplot ghc haskell-mode gh-md flx-ido flx fill-column-indicator fancy-battery expand-region exec-path-from-shell evil-visualstar evil-tutor evil-surround evil-search-highlight-persist evil-numbers evil-nerd-commenter evil-mc evil-matchit evil-lisp-state smartparens evil-indent-plus evil-iedit-state iedit evil-exchange evil-escape evil-args evil-anzu anzu eval-sexp-fu highlight eshell-prompt-extras esh-help emmet-mode elisp-slime-nav disaster define-word coffee-mode cmm-mode cmake-mode clean-aindent-mode clang-format buffer-move bracketed-paste auto-highlight-symbol auto-dictionary auto-compile packed dash aggressive-indent adaptive-wrap ace-window ace-link ace-jump-helm-line helm avy helm-core popup async quelpa package-build use-package which-key bind-key bind-map evil monokai-theme))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
diff --git a/xmonad/xmonad.hs b/xmonad/xmonad.hs
index 6b8e0f3..b12ee14 100644
--- a/xmonad/xmonad.hs
+++ b/xmonad/xmonad.hs
@@ -10,6 +10,7 @@ import qualified Data.Map as M
import System.Exit
import XMonad.Hooks.EwmhDesktops
import Control.Applicative ((<$>), pure)
+import XMonad.Hooks.SetWMName
main = do
config <- xmobar myConfig
@@ -24,6 +25,7 @@ myConfig =
, borderWidth = 2
, normalBorderColor = "#000000"
, workspaces = pure <$> "\"<>PYFAOEU"
+ , startupHook = setWMName "LG3D"
}
muteCommand = "pactl set-sink-mute @DEFAULT_SINK@ toggle"
diff --git a/xsession b/xsession
index 085b572..8877e81 100755
--- a/xsession
+++ b/xsession
@@ -18,8 +18,9 @@ trayer --edge top --align right --SetDockType true --SetPartialStrut true --expa
[[ $(hostname) == kikashi ]] && \
xinput set-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.5
if [[ $(hostname) == pincer ]]; then
- xinput set-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.5
- xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Constant Deceleration" 0.5
+ # xinput set-prop "TPPS/2 IBM TrackPoint" "Device Accel Constant Deceleration" 0.5
+ # xinput set-prop "SynPS/2 Synaptics TouchPad" "Device Accel Constant Deceleration" 0.5
+ true
fi
[[ -f /etc/nixos/configuration.nix ]] || \
redshift -l 40:-70 -r -t 5500:3700 &