summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaïm Favier <n@monade.li>2020-09-13 03:22:49 +0200
committerNaïm Favier <n@monade.li>2020-09-13 03:22:49 +0200
commit597efc557b508a55ff3db64a62b1a7e14cb65bf4 (patch)
tree7ea1938e2ac393990ba1081e9b8cacc0f563ea8a
parent9560d65d2ca0bc0996be358d498f478b2ac474f0 (diff)
You will be the victim of a bizarre joke.
-rw-r--r--Makefile4
-rw-r--r--bash/aliases2
-rw-r--r--bash/bashrc4
-rw-r--r--bash/functions15
-rwxr-xr-xbspwm/bspwmrc1
-rw-r--r--firefox/userChrome.css.template4
-rw-r--r--fontconfig/fonts.conf9
-rw-r--r--git/gitconfig11
-rw-r--r--login/bash_profile4
-rwxr-xr-xscripts/details4
-rwxr-xr-xscripts/le5
-rwxr-xr-xscripts/refresh2
-rwxr-xr-xscripts/theme16
-rw-r--r--vim/vimrc4
-rw-r--r--weechat/scripts/emoji.py2
-rw-r--r--x/Xresources7
16 files changed, 62 insertions, 32 deletions
diff --git a/Makefile b/Makefile
index 610b33a..5ca8cfa 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,8 @@ here: $(shell hostname)
.PHONY: functor
functor: station
-.PHONY: monoid
-monoid: station
+.PHONY: mo
+mo: station
.PHONY: sigma
sigma: server
diff --git a/bash/aliases b/bash/aliases
index 35d7c98..4e6a8f1 100644
--- a/bash/aliases
+++ b/bash/aliases
@@ -16,7 +16,7 @@ alias la='ls -lah'
alias ll='ls -lh'
alias ls='ls --color=auto --group-directories-first -h'
alias lsblk='lsblk -o NAME,TYPE,FSTYPE,LABEL,UUID,SIZE,MOUNTPOINT'
-alias mosh='LANG=en_US.UTF-8 MOSH_TITLE_NOPREFIX=y mosh --no-init'
+alias mosh='LANG=en_US.UTF-8 MOSH_TITLE_NOPREFIX=y mosh'
alias mv='mv -i'
alias o='xdg-open'
alias ocaml='rlwrap ocaml'
diff --git a/bash/bashrc b/bash/bashrc
index cc699fb..e40035a 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -43,7 +43,9 @@ command_not_found_handle() {
tmux=${BASH_REMATCH[2]}
session=${BASH_REMATCH[3]}
if [[ $tmux ]]; then
- ssh -t "$target" "tmux -u attach${session:+ -t ${session@Q}}"
+ mosh "$target" -- tmux -u attach${session:+ -t "$session"}
+ elif (( $# == 1 )); then
+ mosh "$target"
else
ssh -t "$target" "${@:2}"
fi
diff --git a/bash/functions b/bash/functions
index 47ee5b7..0b00dea 100644
--- a/bash/functions
+++ b/bash/functions
@@ -38,7 +38,7 @@ cd() {
else
path_escaped=${path@Q}
fi
- ssh -qt "$host" "cd $path_escaped && BASH_STARTUP=ls exec -l bash"
+ mosh "$host" -- bash -c "cd $path_escaped && BASH_STARTUP=ls exec -l bash"
else
builtin cd "$@" && ls
fi
@@ -201,7 +201,7 @@ irc() {
grep)
local where=$1
shift
- ssh monade.li "cd ~/.weechat/logs && grep --color=always ${*@Q} $where.weechatlog" | less -FR;;
+ ssh monade.li "cd ~/.weechat/logs && rg -Np --color always ${*@Q} $where.weechatlog" | less -FR;;
*)
echo "Unknown action $cmd" >&2
return 1;;
@@ -245,6 +245,17 @@ wg-toggle() {
fi
}
+wg-whitelist() {
+ local arg=$1
+ if [[ $arg != +([0-9]).+([0-9]).+([0-9]).+([0-9]) ]]; then
+ arg=($(dig +short "$arg"))
+ fi
+ for ip in "${arg[@]}"; do
+ sudo ip rule add from "$ip" lookup main
+ sudo ip rule add to "$ip" lookup main
+ done
+}
+
# Misc
args() {
diff --git a/bspwm/bspwmrc b/bspwm/bspwmrc
index e4795a8..4769101 100755
--- a/bspwm/bspwmrc
+++ b/bspwm/bspwmrc
@@ -32,7 +32,6 @@ bspc rule -a Pcmanfm desktop=files follow=on
bspc rule -a Thunar desktop=files follow=on
bspc rule -a URxvt:editor follow=on
bspc rule -a teeworlds state=fullscreen
-bspc rule -a DDNet state=fullscreen
[[ -x ~/.config/bspwm/rules ]] && bspc config external_rules_command ~/.config/bspwm/rules
# Bar
diff --git a/firefox/userChrome.css.template b/firefox/userChrome.css.template
index 168273f..8d0128d 100644
--- a/firefox/userChrome.css.template
+++ b/firefox/userChrome.css.template
@@ -147,9 +147,9 @@
/* background: var(--bg-active) !important; */
/* } */
- #urlbar:not(.megabar), #urlbar.megabar > #urlbar-background, #searchbar {
+ #urlbar-background, #searchbar {
background-color: var(--bg) !important;
- border: none !important;
+ /* border: none !important; */
}
.urlbarView-tags, .urlbarView-url, .urlbarView-title:not(:empty) ~ .urlbarView-action {
diff --git a/fontconfig/fonts.conf b/fontconfig/fonts.conf
index 0f419b9..1bf42a4 100644
--- a/fontconfig/fonts.conf
+++ b/fontconfig/fonts.conf
@@ -36,4 +36,13 @@
<family>Source Serif Pro</family>
</prefer>
</alias>
+ <alias binding="same">
+ <family>bitmap</family>
+ <prefer>
+ <family>Dina</family>
+ <family>lucy tewi</family>
+ <family>Biwidth</family>
+ <family>Symbola</family>
+ </prefer>
+ </alias>
</fontconfig>
diff --git a/git/gitconfig b/git/gitconfig
index 14fed62..bb98f90 100644
--- a/git/gitconfig
+++ b/git/gitconfig
@@ -6,13 +6,10 @@
[user]
name = Naïm Favier
- email = fnaim42@gmail.com
+ email = n@monade.li
-[sendemail]
- smtpEncryption = tls
- smtpServer = smtp.gmail.com
- smtpUser = fnaim42@gmail.com
- smtpServerPort = 587
+[commit]
+ gpgsign = true
[color "status"]
added = green bold
@@ -43,7 +40,7 @@
r = reset
p = push
pa = push --all
- pl = pull --rebase
+ pl = pull --rebase --autostash
cl = clone
cl1 = clone --depth=1
l = log --graph --oneline
diff --git a/login/bash_profile b/login/bash_profile
index 21ea245..55dacf2 100644
--- a/login/bash_profile
+++ b/login/bash_profile
@@ -16,7 +16,11 @@ export GTK_IM_MODULE=fcitx
export QT_IM_MODULE=fcitx
export XMODIFIERS='@im=fcitx'
export XLOGFD
+export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
export GHCFLAGS='-dynamic'
+export CM_LAUNCHER=rofi
+export GPG_TTY=$(tty)
+export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
[[ -f ~/.dircolors ]] && . <(dircolors ~/.dircolors)
diff --git a/scripts/details b/scripts/details
index d70e8e4..b865caf 100755
--- a/scripts/details
+++ b/scripts/details
@@ -13,11 +13,11 @@ sep=' '
bold=$(tput bold) reset=$(tput sgr0)
print() {
- [[ $2 ]] && printf '%s%*s%s%s%s\n' "$bold" "$space" "$1" "$reset" "${3:-$sep}" "$2"
+ [[ $2 ]] && printf '%s%*s%s%s%s\n' "$bold" "$space" "$1" "$reset" "$sep" "$2"
}
echo
-print "$USER" "$HOSTNAME" @
+printf '%*s@%s\n' "$space" "$USER" "$HOSTNAME"
echo
(. /etc/os-release && print os "$ID")
diff --git a/scripts/le b/scripts/le
index 696286b..45b3b77 100755
--- a/scripts/le
+++ b/scripts/le
@@ -18,7 +18,7 @@ case $1 in
urxvt &
;;
chat|irc)
- focus urxvt -i chat || { LANG=en_US.UTF-8 MOSH_TITLE_NOPREFIX=y urxvt -name chat -title chat -e mosh monade.li -- tmux attach -t weechat & }
+ focus urxvt -i chat || { LANG=en_US.UTF-8 MOSH_TITLE_NOPREFIX=y urxvt -name chat -title chat -e mosh monade.li -- tmux -u attach -t weechat & }
;;
text|editor)
focus urxvt -n '* - vim' || { urxvt -name editor -e vim & }
@@ -27,7 +27,7 @@ case $1 in
focus urxvt -i wifi || { urxvt -name wifi -title wifi -geometry 50x25 -e sudo wifi-menu & }
;;
info|details)
- BASH_STARTUP='details' urxvt -name info -geometry 23x19 &
+ BASH_STARTUP='details' urxvt -name info -geometry 23x12 &
;;
web|browser)
focus firefox || { firefox & }
@@ -36,7 +36,6 @@ case $1 in
xdg-open 'https://mail.google.com/' &
;;
files)
- # focus urxvt -i files || { urxvt -name files -e ranger & }
focus thunar || { thunar & }
;;
video)
diff --git a/scripts/refresh b/scripts/refresh
index dd639b6..de9fd93 100755
--- a/scripts/refresh
+++ b/scripts/refresh
@@ -51,7 +51,7 @@ refresh_terminals() {
refresh_firefox() {
local port=6642 profile=default fifo line len json
- [[ -L ~/.mozilla/firefox/$profile/lock ]] || return
+ pgrep -f /usr/lib/firefox/firefox > /dev/null || return
fifo=$(mktemp -u) &&
mkfifo "$fifo" &&
firefox --start-debugger-server "$port" || return 1
diff --git a/scripts/theme b/scripts/theme
index 1bd706b..3b61cb2 100755
--- a/scripts/theme
+++ b/scripts/theme
@@ -1,9 +1,9 @@
#!/bin/bash
-color0='#000507'
+color0='#000000'
color8='#404040'
-color1='#ff00dd'
+color1='#ff00cc'
color9=$color1
-color2='#20f0df'
+color2='#4bdbdf'
color10=$color2
color3=$color1
color11=$color1
@@ -19,15 +19,15 @@ color15='#ffffff'
dark=0
if (( dark )); then
- color7='#303030'
- color8='#555555'
+ color7='#222222'
+ color8='#666666'
background=$color0
foreground=$color15
background_alt=$color7
foreground_alt=$color8
else
- color7='#aaaaaa'
- color8='#e9e9e9'
+ color7='#cccccc'
+ color8='#eeeeee'
background=$color15
foreground=$color0
background_alt=$color8
@@ -37,7 +37,7 @@ fi
font='Dina'
font_size=10
-X_font="xft:$font:pixelsize=$font_size, xft:lucy tewi:10, xft:Biwidth:pixelsize=12, xft:Symbola:pixelsize=12"
+X_font="xft:$font:pixelsize=$font_size, xft:lucy tewi:pixelsize=10, xft:Biwidth:pixelsize=12, xft:Symbola:pixelsize=12"
bar_font=("siji:pixelsize=10" "$font:pixelsize=$font_size" "$font:bold:pixelsize=$font_size" "lucy tewi:pixelsize=10" "Biwidth:pixelsize=12")
rofi_font='DinaOTB 8'
firefox_font="'$font', Biwidth"
diff --git a/vim/vimrc b/vim/vimrc
index 198e4ef..2e7141e 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -35,6 +35,8 @@ try
let vim_markdown_math = 1
let vim_markdown_frontmatter = 1
let vim_markdown_new_list_item_indent = 0
+
+ Plug 'LnL7/vim-nix'
call plug#end()
catch
endtry
@@ -63,7 +65,7 @@ set smartindent
set softtabstop=4
set splitbelow
set splitright
-set suffixes+=.hi,.dyn_hi,.dyn_o,.cmi,.cmo
+set suffixes+=.hi,.dyn_hi,.dyn_o,.cmi,.cmo,.bcf,.fdb_latexmk,.fls,.pdf,.xdv,.aux,.blg,.bbl,.run.xml
set tabstop=4
set title
set ttimeoutlen=10
diff --git a/weechat/scripts/emoji.py b/weechat/scripts/emoji.py
index f050c08..c62508a 100644
--- a/weechat/scripts/emoji.py
+++ b/weechat/scripts/emoji.py
@@ -12,7 +12,7 @@ def emoji_cb(data, modifier, modifier_data, string):
unicode(string, 'utf-8'))
if weechat.register("emoji",
- "Naïm Favier <fnaim42@gmail.com>",
+ "Naïm Favier <n@monade.li>",
"0.0", "",
"Replace emojis with their :text_codes: in incoming messages",
"", ""):
diff --git a/x/Xresources b/x/Xresources
index 80afcf1..f773036 100644
--- a/x/Xresources
+++ b/x/Xresources
@@ -50,6 +50,13 @@ URxvt.keysym.Control-Right: \033[1;5C
URxvt.secondaryScreen: 1
URxvt.secondaryScroll: 0
+! st
+st.font: Dina:pixelsize=10,Biwidth:pixelsize=12
+st.borderless: 1
+st.borderpx: 16
+st.cursorshape: 1
+st.cursorblinkontype: 0
+
! rofi
rofi.modi: run,drun,window,ssh
rofi.sidebar-mode: true