summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Xresources-pincer76
-rwxr-xr-xbin/kj-publish.sh2
-rw-r--r--config/fish/functions/fish_prompt.fish177
-rw-r--r--nixos/configuration.nix35
-rw-r--r--nixos/pincer.nix36
-rw-r--r--spacemacs2
-rwxr-xr-xxsession4
7 files changed, 196 insertions, 136 deletions
diff --git a/Xresources-pincer b/Xresources-pincer
index 93f706c..23e1128 100644
--- a/Xresources-pincer
+++ b/Xresources-pincer
@@ -1,5 +1,6 @@
-urxvt*font: xft:dejavu sans mono:size=13:antialias=true
-!urxvt*font: xft:inconsolata:size=14:antialias=true
+*customization: -color
+urxvt*font: xft:fira code:pixelsize=20:antialias=true
+urxvt*font: xft:inconsolata:size=14:antialias=true
urxvt*scrollBar: false
URxvt*termName: xterm-256color
Xterm*termName: xterm-256color
@@ -7,22 +8,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 +28,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..64fda3a 100644
--- a/nixos/configuration.nix
+++ b/nixos/configuration.nix
@@ -25,6 +25,11 @@
# 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;
# List packages installed in system profile. To search by name, run:
@@ -53,7 +58,7 @@
pasystray
pavucontrol
powertop
- kde4.digikam
+ # kde4.digikam
emacs25
sshfsFuse
xorg.xbacklight
@@ -77,10 +82,36 @@
myWine
mumble
wdfs
-
+ dnsutils
# fonts
source-code-pro
inconsolata
+ wirelesstools
+ xbindkeys
+ imagemagick
+ ghc
+ net_snmp
+ #rxvt-unicode-with-perl-with-unicode3-with-plugins
+ unzip
+ linssid
+ lxc
+ gnupg1
+ nix-repl
+ youtube-dl
+ vlc
+ unrar
+ mosh
+ tldr
+ fira-code
+ haskellPackages.hledger
+ haskellPackages.hledger-ui
+ haskellPackages.hledger-web
+ haskellPackages.hledger-vty
+ moreutils
+
+ #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/spacemacs b/spacemacs
index c86fccc..09a613f 100644
--- a/spacemacs
+++ b/spacemacs
@@ -104,7 +104,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
diff --git a/xsession b/xsession
index 085b572..c20fe9b 100755
--- a/xsession
+++ b/xsession
@@ -18,8 +18,8 @@ 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
fi
[[ -f /etc/nixos/configuration.nix ]] || \
redshift -l 40:-70 -r -t 5500:3700 &