Personal dotfiles for Linux, mostly for Nixpkgs/NixOS-based and Termux setups. Mirrored using GitLab's push mirroring feature. gitlab.com/andreijiroh-dev/dotfiles
linux dotfiles
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Iron out gpg and gpg-agent config, among other things

Also in this commit:
* Added handle-pinentry wrapper script to exec right pinentry
based on environment.
* Add VS Code config for stuff like GitLens settings and recommended
extensions.

Signed-off-by: Andrei Jiroh Halili <ajhalili2006@andreijiroh.eu.org>

+114 -35
+10 -34
.config/htop/htoprc
··· 1 1 # Beware! This file is rewritten by htop when settings are changed in the interface. 2 2 # The parser is also very primitive, and not human-friendly. 3 - htop_version=3.2.1 4 - config_reader_min_version=3 5 3 fields=0 48 17 18 38 39 40 2 46 47 49 1 4 + sort_key=46 5 + sort_direction=-1 6 + tree_sort_key=47 7 + tree_sort_direction=-1 6 8 hide_kernel_threads=1 7 9 hide_userland_threads=0 8 10 shadow_other_users=1 9 11 show_thread_names=0 10 12 show_program_path=1 11 13 highlight_base_name=1 12 - highlight_deleted_exe=1 13 14 highlight_megabytes=1 14 15 highlight_threads=1 15 16 highlight_changes=0 ··· 17 18 find_comm_in_cmdline=1 18 19 strip_exe_from_cmdline=1 19 20 show_merged_command=1 21 + tree_view=1 22 + tree_view_always_by_pid=0 20 23 header_margin=1 21 - screen_tabs=1 22 24 detailed_cpu_time=1 23 25 cpu_count_from_one=1 24 26 show_cpu_usage=1 ··· 30 32 color_scheme=0 31 33 enable_mouse=1 32 34 delay=5 35 + left_meters=AllCPUs Memory Swap 36 + left_meter_modes=1 1 1 37 + right_meters=Tasks LoadAverage Uptime 38 + right_meter_modes=2 2 2 33 39 hide_function_bar=0 34 - header_layout=three_25_25_50 35 - column_meters_0=CPU Memory Swap ZFSARC ZFSCARC 36 - column_meter_modes_0=1 1 1 2 2 37 - column_meters_1=DiskIO NetworkIO LoadAverage Tasks Battery 38 - column_meter_modes_1=1 1 1 1 1 39 - column_meters_2=PressureStallIOFull PressureStallMemoryFull Hostname DateTime Uptime 40 - column_meter_modes_2=1 1 2 2 2 41 - tree_view=1 42 - sort_key=46 43 - tree_sort_key=47 44 - sort_direction=-1 45 - tree_sort_direction=1 46 - tree_view_always_by_pid=0 47 - all_branches_collapsed=0 48 - screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command 49 - .sort_key=PERCENT_CPU 50 - .tree_sort_key=PERCENT_MEM 51 - .tree_view=1 52 - .tree_view_always_by_pid=0 53 - .sort_direction=-1 54 - .tree_sort_direction=1 55 - .all_branches_collapsed=0 56 - screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE 57 - .sort_key=IO_RATE 58 - .tree_sort_key=PID 59 - .tree_view=0 60 - .tree_view_always_by_pid=0 61 - .sort_direction=-1 62 - .tree_sort_direction=1 63 - .all_branches_collapsed=0
+12
.gnupg/gnupg.conf
··· 1 + # Documentation is available online at https://www.gnupg.org/documentation/manuals/gnupg/GPG-Configuration-Options.html#gpg_002doption-_002d_002doptions 2 + 3 + # Make sure to use my new PGP key instead of the old one. 4 + # TODO: Schedule key expiration for the old one soonish. 1 5 default-key 4D5E631758CB9CC45941B1CE67BFC91B3DA12BE8 6 + 2 7 # Go abit like Keybase, but keep the WoT parts. 3 8 trust-model tofu+pgp 9 + 4 10 # use keys.openpgp.org instead of keyserver.ubuntu.com or whatever 5 11 keyserver hkps://keys.openpgp.org 12 + 13 + # long fpr + 0x prefix 14 + keyid-format 0xlong 15 + 16 + # From the docs: This is dummy option. gpg always requires the agent. 17 + #use-agent
+12
.gnupg/gpg-agent.conf
··· 1 + # Cache passphrases for 15m by default up to 3 hours. 2 + default-cache-ttl 900 3 + max-cache-ttl 10800 4 + default-cache-ttl-ssh 900 5 + max-cache-ttl-ssh 10800 6 + 7 + # Let's be serious about our password hygenine 8 + min-passphrase-len 12 9 + min-passphrase-nonalpha 3 10 + 11 + # Use our bloody pinentry handler for that. 12 + pinentry-program ~/bin/handle-pinentry
+5
.vscode/extensions.json
··· 1 + { 2 + "recommendations": [ 3 + "mads-hartmann.bash-ide-vscode" 4 + ] 5 + }
+17
.vscode/settings.json
··· 1 + { 2 + "git.alwaysSignOff": true, 3 + "gitlens.remotes": [ 4 + { 5 + "domain": "mau.dev", 6 + "type": "GitLab" 7 + }, 8 + { 9 + "domain": "tildegit.com", 10 + "type": "Gitea" 11 + }, 12 + { 13 + "domain": "git.vern.cc", 14 + "type": "Gitea" 15 + } 16 + ] 17 + }
+54
bin/handle-pinentry
··· 1 + #!/usr/bin/env bash 2 + # SPDX-License-Identifier: MIT AND MPL-2.0 3 + # This is bit chaotic at best, per https://unix.stackexchange.com/a/116694. 4 + # Maybe we should aggressively detect more desktop environments, even non-DEs 5 + # as per https://askubuntu.com/a/227669. 6 + 7 + set -e 8 + if [[ $DEBUG != "" ]]; then 9 + set -x 10 + fi 11 + 12 + GPG_TTY=$(tty) 13 + 14 + error() { 15 + echo "error: $*" 16 + } 17 + 18 + warn() { 19 + echo "warn: $*" 20 + } 21 + 22 + detect_env() { 23 + if [ "$XDG_CURRENT_DESKTOP" = "" ] 24 + then 25 + desktop=$(echo "$XDG_DATA_DIRS" | sed 's/.*\(xfce\|kde\|gnome\).*/\1/') 26 + else 27 + desktop=$XDG_CURRENT_DESKTOP 28 + fi 29 + desktop=${desktop,,} # convert to lower case 30 + } 31 + 32 + path_detection() { 33 + if [[ $desktop == "kde" ]]; then 34 + if command -v pinentry-qt >> /dev/null; then 35 + target_bin=pinentry-qt 36 + else 37 + error "pinentry-qt isn't installed on your system or not found on PATH" 38 + exit 1 39 + fi 40 + else 41 + warn "environment can't be detected ($desktop), using pinentry-curses" 42 + if command -v pinentry-curses >> /dev/null; then 43 + target_bin=pinentry-curses 44 + else 45 + error "pinentry-curses isn't installed on your system or not found on PATH" 46 + exit 1 47 + fi 48 + fi 49 + } 50 + 51 + detect_env 52 + path_detection 53 + export GPG_TTY 54 + exec $target_bin "$@"
+4 -1
bin/setup-chroot
··· 1 1 #!/usr/bin/bash 2 + # SPDX-License-Identifier: MPL-2.0 3 + # A mini scirpt to handle chrooting into different environments, 4 + # especially for Alpine Linux devenv on chroots instead of containers/VMs. 2 5 3 6 # Chroot command is optional and assume login binary 4 7 CHROOT_COMMAND=${2:-"/usr/bin/login"} ··· 33 36 34 37 echo "===> Teleporting to the chroot environment in 3 seconds..." 35 38 sleep 3 36 - exec chroot "$TARGET_DIR" ${CHROOT_COMMAND} 39 + exec chroot "$TARGET_DIR" "${CHROOT_COMMAND}"