summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--public/.bashrc9
-rw-r--r--public/.config/git/config4
-rw-r--r--public/.config/zathura/zathurarc21
-rw-r--r--public/.inputrc7
-rwxr-xr-xpublic/.local/bin/laptop-backup.sh21
-rwxr-xr-xpublic/.local/bin/laptop-xinput_setup.sh8
-rw-r--r--public/.xbindkeysrc5
-rw-r--r--public/.xinitrc12
-rw-r--r--public/code/dwm/config.h8
-rw-r--r--public/code/st/config.h10
11 files changed, 71 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index f30701d..1275637 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
./sensitive/
./secret/
+public/.config/gtk-3.0/bookmarks
diff --git a/public/.bashrc b/public/.bashrc
index 9449af8..e942344 100644
--- a/public/.bashrc
+++ b/public/.bashrc
@@ -79,7 +79,7 @@ ds=(
"$HOME/code/tex-live-native/build/bin/x86_64-linux"
"$HOME/.local/share/gem/ruby/3.0.0/bin"
"$HOME/.local/bin"
- "$HOME/mahcode/dotfiles/public/.local/bin"
+ "$HOME/dotfiles/public/.local/bin"
)
for d in "${ds[@]}"; do
if ! echo $PATH | grep -qE "(^|:)$d($|:)"; then
@@ -104,9 +104,10 @@ export XDG_STATE_HOME="$HOME/.local/state"
#export XMODIFIERS=@im=fcitx
# less
-LESS="-i " # ignore case
-LESS+="-S " # don't chop long lines
-LESS+="--RAW-CONTROL-CHARS"
+LESS="-i" # ignore case
+LESS+=" -S" # don't chop long lines
+LESS+=" -j5" # Add 5 context lines
+LESS+=" --RAW-CONTROL-CHARS"
export LESS
# better `ls` (and other programs like `tree`) colors
diff --git a/public/.config/git/config b/public/.config/git/config
index ec672da..ede86d3 100644
--- a/public/.config/git/config
+++ b/public/.config/git/config
@@ -1,5 +1,5 @@
[user]
name = Mitsuo Tokumori
[diff]
# used with $ git difftool
@@ -8,7 +8,7 @@
[merge]
tool = nvim -d
[gitweb]
- owner = Mitsuo Tokumori <[email protected]>
+ owner = Mitsuo Tokumori <[email protected]>
[init]
defaultBranch = master
[pull]
diff --git a/public/.config/zathura/zathurarc b/public/.config/zathura/zathurarc
index 4d38c70..c033af9 100644
--- a/public/.config/zathura/zathurarc
+++ b/public/.config/zathura/zathurarc
@@ -1,17 +1,15 @@
-#########################
-# Configuracion Zathura #
-#########################
-#
-# para para saber que hace cada huevada
-# ver manpage zathurarc(5)
-#
+# $ man zathurarc.5
+# https://github.com/pwmt/zathura/blob/develop/doc/man/zathurarc.5.rst
# Default commented shit
# ======================
# zoom and scroll step size
# set zoom-setp 20
-# set scroll-setp 80
+# set scroll-setp 40
+
+# Show (s)tatus bar and (v)ertical scrollabar
+set guioptions sv
# copy selection to system clipboard
# set selection-clipboard clipboard
@@ -22,9 +20,10 @@
# mapings
# =======
-# TODO Button 3 is left mouse button, I want to map it to 'hold to pan document'
-# which is mapped to mouse 2 (middle button)
-#map Button3
+# TODO: map the right mouse button (Button2) to 'help to pan document' (which is
+# mapped to middle button (Button3)
+map <Button2> scroll down
+#map <Button2> feedkeys <Button3>
unmap [normal] <C-n>
map [normal] <C-g> toggle_statusbar
diff --git a/public/.inputrc b/public/.inputrc
index f40f4a2..fdff05d 100644
--- a/public/.inputrc
+++ b/public/.inputrc
@@ -1,10 +1,17 @@
# Set up "vi input mode" in bash
+$include /etc/inputrc
set editing-mode vi
$if mode=vi
+set show-mode-in-prompt on
+set vi-ins-mode-string \1\e[6 q\2
+set vi-cmd-mode-string \1\e[2 q\2
+
set keymap vi-command
Control-l: clear-screen
set keymap vi-insert
Control-l: clear-screen
+
+$endif
diff --git a/public/.local/bin/laptop-backup.sh b/public/.local/bin/laptop-backup.sh
index 0fcd0cd..64f39b0 100755
--- a/public/.local/bin/laptop-backup.sh
+++ b/public/.local/bin/laptop-backup.sh
@@ -1,6 +1,18 @@
#!/bin/bash
# Fast backup using rsync
+#
+# This script is meant to be executed manually every so often (weekly, monthly).
+# If an automatic solution where to be made (e.g., run daily via cron job).
+# Then make sure the rsync target is always the same (e.g., minipc:/mnt/backup)
+# and the `--delete` flag is NOT used (you'll need to figure out a way to
+# "purge" duplicated files in the backup storage every so often).
+#
+# Steps:
+# 1. Connect external storage device and get the block device path (`lsblk`)
+# 2. Run this script
+#
+# See also: http://wiki.pulse15/index.php?title=Backup
if [ $# -ne 2 ]; then
echo "Usage: $(basename "$0") /dev/sdX backup"
@@ -13,10 +25,14 @@ if [ "$(id -u)" -ne 0 ]; then
fi
rsync_options="-auvP --delete"
+# path of the device (block device file) (e.g., /dev/sda)
device=$1
+# cryptsetup name (e.g., backup)
name=$2
-# Note: `name` (nor `device`) should not contain spaces
+# FIXME
+# Everything breaks if `name` or `device` contain spaces. Exit if that's the
+# case.
cryptsetup open --type luks $device $name
if [ $? -ne 0 ]; then
@@ -24,7 +40,8 @@ if [ $? -ne 0 ]; then
exit 1
fi
mount /dev/mapper/$name /mnt/$name
-# TODO: stop backing up /var. Backup is just for Postgres and Mediawiki.
+# TODO
+# Stop backing up /var. Backup is just for Postgres and Mediawiki.
# `/var` is used by too many applications. Specialy pacman that clutters it
# with cached binaries.
rsync $rsync_options /var /mnt/$name # <10G
diff --git a/public/.local/bin/laptop-xinput_setup.sh b/public/.local/bin/laptop-xinput_setup.sh
index b707549..fcf1378 100755
--- a/public/.local/bin/laptop-xinput_setup.sh
+++ b/public/.local/bin/laptop-xinput_setup.sh
@@ -17,11 +17,15 @@ pulse15() {
# Mice
# 3-bit prop meanings for convenience (see libinput man for more info):
# * "profile": adaptive, flat, custom
+ # https://man.archlinux.org/man/libinput.4#libinput~2
# * "scroll method": twofinger, edge, button
+ # https://man.archlinux.org/man/libinput.4#libinput~22
+ # https://wiki.archlinux.org/title/Libinput#Scroll_with_mouse_by_holding_a_button
# Buffalo BSMBU19 (125 Hz)
xinput set-prop "HID 1bcf:08a0 Mouse" "libinput Accel Profile Enabled" 1 0 0
- xinput set-prop "HID 1bcf:08a0 Mouse" "libinput Accel Speed" .5
- xinput set-prop "HID 1bcf:08a0 Mouse" "libinput Scroll Method Enabled" 0 0 1
+ xinput set-prop "HID 1bcf:08a0 Mouse" "libinput Accel Speed" .9
+ xinput set-prop "HID 1bcf:08a0 Mouse" "libinput Scroll Method Enabled" 0 0 0
+ xinput set-prop "HID 1bcf:08a0 Mouse" "libinput Button Scrolling Button" 2
}
pulse15
diff --git a/public/.xbindkeysrc b/public/.xbindkeysrc
index 7171126..bfd8b27 100644
--- a/public/.xbindkeysrc
+++ b/public/.xbindkeysrc
@@ -132,9 +132,12 @@
"network_control.sh isolatetoggle"
Shift+Mod4 + b
-"stopwatch_control.sh 50"
+"stopwatch_control.sh 45"
Mod4 + p
+"stopwatch_control.sh -1"
+ Shift+Mod4 + p
+
"stopwatch_control.sh 5"
Mod4 + o
diff --git a/public/.xinitrc b/public/.xinitrc
index cee8050..8bd56ff 100644
--- a/public/.xinitrc
+++ b/public/.xinitrc
@@ -43,11 +43,13 @@ fi
# Thanks: https://bbs.archlinux.org/viewtopic.php?pid=1565341#p1565341
run_after_dwm() {
- # Bind the right Alt key to Mod4 (for DWM)
- # https://wiki.archlinux.org/title/Dwm#Bind_the_right_Alt_key_to_Mod4
- # xmodmap -pke | grep Alt_R
- xmodmap -e "keycode 108 = Super_L"
- xmodmap -e "remove mod1 = Super_L"
+ ## Bind the right Alt key to Mod4 (for DWM)
+ ## https://wiki.archlinux.org/title/Dwm#Bind_the_right_Alt_key_to_Mod4
+ ## xmodmap -pke | grep Alt_R
+ #xmodmap -e "keycode 108 = Super_L"
+ #xmodmap -e "remove mod1 = Super_L"
+ # update audio status bar info (idk why it isn't immediatly available)
+ audio_control.sh
}
# fcitx (CJK and emoji input method)
diff --git a/public/code/dwm/config.h b/public/code/dwm/config.h
index 895fced..bfb050f 100644
--- a/public/code/dwm/config.h
+++ b/public/code/dwm/config.h
@@ -32,8 +32,9 @@ static const Rule rules[] = {
*/
/* class instance title tags mask isfloating monitor */
{ "Gimp", NULL, NULL, 0, 1, -1 },
- { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
+ //{ "firefox", NULL, NULL, 1 << 8, 0, -1 },
{ "GoldenDict", NULL, NULL, 0, 1, -1 },
+ { "st", NULL, NULL, 0, 1, -1 },
};
/* layout(s) */
@@ -61,13 +62,13 @@ static const Layout layouts[] = {
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
/* commands */
-static const char *dmenucmd[] = { "dmenu_run", "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
+static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
+static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
static const char *termcmd[] = { "st", NULL };
static const Key keys[] = {
/* modifier key function argument */
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
- { MODKEY, XK_space, spawn, {.v = dmenucmd } },
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY, XK_j, focusstack, {.i = +1 } },
@@ -102,6 +103,7 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_q, quit, {0} },
// mitsuo
+ { MODKEY, XK_space, spawn, {.v = dmenucmd } },
{ MODKEY, XK_F4, killclient, {0} },
};
diff --git a/public/code/st/config.h b/public/code/st/config.h
index 267246f..64a4c90 100644
--- a/public/code/st/config.h
+++ b/public/code/st/config.h
@@ -5,7 +5,7 @@
*
* 1366x768: pixelsize=12
* 2560x1440: pixelsize=15
- * 2560x1440 (15.6"): pixelsize=16
+ * 2560x1440 (15.6"): pixelsize=20
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*
@@ -16,7 +16,7 @@
* which currently defaults to "Noto Sans Mono".
*/
//static char *font = "Liberation Mono:pixelsize=12:antialias=true:autohint=true";
-static char *font = "Hack:pixelsize=16:antialias=true:autohint=true";
+static char *font = "Hack:pixelsize=20:antialias=true:autohint=true";
static char *font2[] = {
/* libxft does not support color emoji. Thus st crashes if it encounters
* one and tries to render it with Noto Color Emoji Font. It existst a
@@ -25,10 +25,10 @@ static char *font2[] = {
//"PowerlineSymbols:pixelsize=16:antialias=true:autohint=true",
//"Source Han Sans JP:pixelsize=16:antialias=true:autohint=true",
//"Source Han Serif JP:pixelsize=16:antialias=true:autohint=true",
- "Noto Sans CJK JP:pixelsize=16:antialias=true:autohint=true",
- "Noto Color Emoji:pixelsize=14:antialias=true:autohint=true",
+ "Noto Sans CJK JP:pixelsize=20:antialias=true:autohint=true",
+ "Noto Color Emoji:pixelsize=18:antialias=true:autohint=true",
/* Fallback font */
- "Symbola:pixelsize=14:antialias=true:autohint=true",
+ "Symbola:pixelsize=18:antialias=true:autohint=true",
};
static int borderpx = 2;