all repos — dotfiles @ 0c24f03e03c6d88ff9d620d308a778bcbde8dc77

my *nix dotfiles

More things
Anirudh Oppiliappan x@icyphox.sh
Sat, 15 Jan 2022 12:30:03 +0530
commit

0c24f03e03c6d88ff9d620d308a778bcbde8dc77

parent

ccd2786efc5751772a29ce82e9cb8731eea7e856

M bash/.bashrc.d/99-prompt.bashbash/.bashrc.d/99-prompt.bash

@@ -1,52 +1,52 @@

-red="\e[31m" -grn="\e[32m" -ylw="\e[33m" -cyn="\e[36m" -blu="\e[34m" -prp="\e[35m" -bprp="\e[35;1m" -gry="\e[94m" -rst="\e[0m" - -git_branch() { - [[ -d "$PWD/.git" ]] && { - local git_status="$(git status 2> /dev/null)" - local on_branch="On branch ([^${IFS}]*)" - local on_commit="HEAD detached at ([^${IFS}]*)" - status="$(git status --porcelain 2> /dev/null)" - local exit="$?" - color="" - - if [[ "$exit" -eq 0 ]]; then - if [[ "${#status}" -eq 0 ]]; then - color="${grn}" - else - color="${red}" - fi - else - printf '' - fi - - - if [[ $git_status =~ $on_branch ]]; then - local branch=${BASH_REMATCH[1]} - printf '%b' "($color$branch$rst)" - elif [[ $git_status =~ $on_commit ]]; then - local commit=${BASH_REMATCH[1]} - printf '%b' "($color$commit$rst)" - fi - - } -} - -prompt_pwd() { - printf '%b' "\001${cyn}\002$(dirs +0)\001${rst}\002" -} - -rootornot() { - [[ "$(id -u)" -eq 0 ]] && - printf '%b' "\001${red}\002#\001${rst}\002" -} +# red="\e[31m" +# grn="\e[32m" +# ylw="\e[33m" +# cyn="\e[36m" +# blu="\e[34m" +# prp="\e[35m" +# bprp="\e[35;1m" +# gry="\e[94m" +# rst="\e[0m" +# +# git_branch() { +# [[ -d "$PWD/.git" ]] && { +# local git_status="$(git status 2> /dev/null)" +# local on_branch="On branch ([^${IFS}]*)" +# local on_commit="HEAD detached at ([^${IFS}]*)" +# status="$(git status --porcelain 2> /dev/null)" +# local exit="$?" +# color="" +# +# if [[ "$exit" -eq 0 ]]; then +# if [[ "${#status}" -eq 0 ]]; then +# color="${grn}" +# else +# color="${red}" +# fi +# else +# printf '' +# fi +# +# +# if [[ $git_status =~ $on_branch ]]; then +# local branch=${BASH_REMATCH[1]} +# printf '%b' "($color$branch$rst)" +# elif [[ $git_status =~ $on_commit ]]; then +# local commit=${BASH_REMATCH[1]} +# printf '%b' "($color$commit$rst)" +# fi +# +# } +# } +# +# prompt_pwd() { +# printf '%b' "\001${cyn}\002$(dirs +0)\001${rst}\002" +# } +# +# rootornot() { +# [[ "$(id -u)" -eq 0 ]] && +# printf '%b' "\001${red}\002#\001${rst}\002" +# } -PS1='\n$(prompt_pwd) $(git_branch)\n▲$(rootornot) ' +PS1='$(prompt) ' PS2="> "
M bin/abin/a

@@ -10,7 +10,7 @@ fi

if ! pgrep -x acme > /dev/null then - acme -a -f /mnt/font/SFMono-Regular/14a/font $1 + ~/code/acme/o.acme -a -f /mnt/font/SFMonoLigaturized-Regular/12a/font $1 else editinacme $1 fi
A bin/setup-gpg

@@ -0,0 +1,9 @@

+#!/bin/sh +# unlock gpg key on login + +pw="$(ssh-askpass 'Unlock your GPG key')" +keygrip=$(gpg-connect-agent -q 'keyinfo --list' /bye | awk '/KEYINFO/ { print $3 }') + +for k in $keygrip; do + echo "$pw" | /usr/local/libexec/gpg-preset-passphrase --preset $k +done
M bin/zatheme.shbin/zatheme.sh

@@ -6,22 +6,22 @@ echo 'set incremental-search true

set recolor "true" -set default-bg "'$( get_xres color0 )'" -set default-fg "'$( get_xres color7 )'" +set default-bg "'$( xres color0 )'" +set default-fg "'$( xres color7 )'" -set completion-bg "'$( get_xres color0 )'" -set completion-fg "'$( get_xres color7 )'" -set completion-highlight-bg "'$( get_xres color4 )'" -set completion-highlight-fg "'$( get_xres color7 )'" +set completion-bg "'$( xres color0 )'" +set completion-fg "'$( xres color7 )'" +set completion-highlight-bg "'$( xres color4 )'" +set completion-highlight-fg "'$( xres color7 )'" -set statusbar-bg "'$( get_xres color4 )'" -set statusbar-fg "'$( get_xres color0 )'" +set statusbar-bg "'$( xres color4 )'" +set statusbar-fg "'$( xres color0 )'" -set inputbar-bg "'$( get_xres color0 )'" -set inputbar-fg "'$( get_xres color7 )'" +set inputbar-bg "'$( xres color0 )'" +set inputbar-fg "'$( xres color7 )'" -set recolor-darkcolor "'$( get_xres color7 )'" -set recolor-lightcolor "'$( get_xres color0 )'" +set recolor-darkcolor "'$( xres color7 )'" +set recolor-lightcolor "'$( xres color0 )'" set window-height "800" set window-width "600"
M home/.Xresourceshome/.Xresources

@@ -39,3 +39,9 @@ xterm.termName: xterm-256color

xterm.vt100.translations: #override \n\ Ctrl Shift <Key>C: copy-selection(CLIPBOARD) \n\ Ctrl Shift <Key>V: insert-selection(CLIPBOARD) + +! ssh-askpass +*Dialog.font: SF Mono:style=Regular:size=12:antialias=true +*shadowThickness: 0 +*borderWidth: 0 +*?.background: rgb:f4/f4/f4
M home/.tmux.confhome/.tmux.conf

@@ -21,6 +21,10 @@ bind -n M-n select-pane -D

bind -n M-e select-pane -U bind -n M-y select-pane -L bind -n M-o select-pane -R +bind -n M-Up resize-pane -U 5 +bind -n M-Down resize-pane -D 5 +bind -n M-Left resize-pane -L 5 +bind -n M-Right resize-pane -R 5 # window binds bind -n C-M-y previous-window

@@ -30,6 +34,9 @@ bind-key v new-window -c "#{pane_current_path}"

bind-key s choose-session bind-key ) swap-window -t +2 bind-key ( swap-window -t -1 + +unbind -T copy-mode MouseDragEnd1Pane +bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" bind-key -T copy-mode-vi v send-keys -X begin-selection bind-key -T copy-mode-vi y send-keys -X copy-pipe "xclip -i -sel p -f | xclip -i -sel c " bind-key -T copy-mode-vi r send-keys -X rectangle-toggle

@@ -42,8 +49,8 @@ # statusline on top

set-option -g status-position top # statusline hide / unhide -bind -n M-down set -q status off -bind -n M-up set -q status on +bind -n C-down set -q status off +bind -n C-up set -q status on bind P paste-buffer bind E command-prompt -p "Command:" \
M prompt/git.goprompt/git.go

@@ -50,6 +50,6 @@ n, _ := sl.EntryCount()

if n != 0 { return "×" } else { - return "・" + return "•" } }