Merge branch 'main' of git.sr.ht copy of dotfiles-modern

This commit is contained in:
~ajhalili2006 2023-05-19 01:20:36 +08:00
commit 5e73412137
Signed by: ajhalili2006
GPG Key ID: 67BFC91B3DA12BE8
27 changed files with 281 additions and 7 deletions

7
.bash_logout Normal file
View File

@ -0,0 +1,7 @@
# ~/.bash_logout: executed by bash(1) when login shell exits.
# when leaving the console clear the screen to increase privacy
if [ "$SHLVL" = 1 ]; then
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
fi

View File

@ -10,12 +10,12 @@
## This stage also initalizes oh-my-posh here. ##
if [[ $TERMUX ]]; then
export SSH_AGENT_=todo
else
elif command -v keychain >> /dev/null; then
export KEYCHAIN_PATh=$(command -v keychain)
eval $(keychain --agents gpg,ssh --eval)
fi
export GPG_TTY=$(tty)
# Tip: I don't want to f**k things up on POSIX-based stuff, I might try
# using
# TODO: Implement feature flag disabling this.
if command -v oh-my-posh >>/dev/null; then
eval "$(oh-my-posh init bash)"
fi

0
.byobu/.screenrc Normal file
View File

30
.byobu/.tmux.conf Normal file
View File

@ -0,0 +1,30 @@
# make sure we can magically source config changes via <prefix>+R shortcut.
bind r source-file ~/.byobu/.tmux.conf
# split to either horizontally or vertically
bind h splitw -h
bind v splitw -v
## Quick shortcuts btw for some tools as new windows ##
bind -n M-h new-window htop
bind -n M-m new-window mocp
bind -n M-l new-window lynx
# Since M-p is parked for something else, we add Ctrl before Alt/Meta as a workaround.
bind -n C-M-p new-window pamix
bind -n M-n new-window nano
# also works via the default <prefix>+c
bind -n M-z new-window
bind t select-layout tiled
# adopt some bloody shortcuts from Terminator
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
# activity monitoring
setw -g monitor-activity on
set -g visual-activity on
# use mouse on tmux, and a bit to tweaks, since I'm using an terminal emulator/gotty most of the time
set -g mouse on
#set -g mouse-select-pane on

View File

1
.byobu/backend Normal file
View File

@ -0,0 +1 @@
BYOBU_BACKEND=tmux

3
.byobu/color Normal file
View File

@ -0,0 +1,3 @@
BACKGROUND=k
FOREGROUND=w
MONOCHROME=0

4
.byobu/color.tmux Normal file
View File

@ -0,0 +1,4 @@
BYOBU_DARK="\#333333"
BYOBU_LIGHT="\#EEEEEE"
BYOBU_ACCENT="\#75507B"
BYOBU_HIGHLIGHT="\#DD4814"

2
.byobu/datetime.tmux Normal file
View File

@ -0,0 +1,2 @@
BYOBU_DATE="%Y-%m-%d "
BYOBU_TIME="%H:%M:%S"

1
.byobu/keybindings Normal file
View File

@ -0,0 +1 @@
source $BYOBU_PREFIX/share/byobu/keybindings/common

4
.byobu/keybindings.tmux Normal file
View File

@ -0,0 +1,4 @@
unbind-key -n C-a
set -g prefix ^A
set -g prefix2 F12
bind a send-prefix

1
.byobu/profile Normal file
View File

@ -0,0 +1 @@
source $BYOBU_PREFIX/share/byobu/profiles/common

1
.byobu/profile.tmux Normal file
View File

@ -0,0 +1 @@
source $BYOBU_PREFIX/share/byobu/profiles/tmux

1
.byobu/prompt Normal file
View File

@ -0,0 +1 @@
[ -r /usr/share/byobu/profiles/bashrc ] && . /usr/share/byobu/profiles/bashrc #byobu-prompt#

37
.byobu/status Normal file
View File

@ -0,0 +1,37 @@
# status - Byobu's default status enabled/disabled settings
#
# Override these in $BYOBU_CONFIG_DIR/status
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
# and $HOME/.byobu otherwise.
#
# Copyright (C) 2009-2011 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@byobu.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Status beginning with '#' are disabled.
# Screen has two status lines, with 4 quadrants for status
screen_upper_left="color"
screen_upper_right="color whoami hostname ip_address menu"
screen_lower_left="color logo distro release #arch session"
screen_lower_right="color network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk #time_utc date time"
# Tmux has one status line, with 2 halves for status
tmux_left="logo #distro release arch session"
# You can have as many tmux right lines below here, and cycle through them using Shift-F5
tmux_right="#network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail #users uptime #fan_speed #cpu_temp #battery #wifi_quality #processes load_average cpu_count cpu_freq memory #swap disk whoami hostname #ip_address #time_utc date time"
#tmux_right="network #disk_io #custom entropy raid reboot_required updates_available #apport #services #mail users uptime fan_speed cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk whoami hostname ip_address #time_utc date time"
#tmux_right="network #disk_io custom #entropy raid reboot_required updates_available #apport #services #mail users uptime #fan_speed #cpu_temp battery wifi_quality #processes load_average cpu_count cpu_freq memory #swap #disk #whoami #hostname ip_address #time_utc date time"
#tmux_right="#network disk_io #custom entropy #raid #reboot_required #updates_available #apport #services #mail #users #uptime fan_speed cpu_temp #battery #wifi_quality #processes #load_average #cpu_count #cpu_freq #memory #swap whoami hostname ip_address #time_utc disk date time"

78
.byobu/statusrc Normal file
View File

@ -0,0 +1,78 @@
# statusrc - Byobu's default status configurations
#
# Override these in $BYOBU_CONFIG_DIR/statusrc
# where BYOBU_CONFIG_DIR is XDG_CONFIG_HOME if defined,
# and $HOME/.byobu otherwise.
#
# Copyright (C) 2009-2011 Canonical Ltd.
#
# Authors: Dustin Kirkland <kirkland@byobu.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Configurations that you can override; if you leave these commented out,
# Byobu will try to auto-detect them.
# This should be auto-detected for most distro, but setting it here will save
# some call to lsb_release and the like.
#BYOBU_DISTRO=Ubuntu
# Default: depends on the distro (which is either auto-detected, either set
# via $DISTRO)
#LOGO="\o/"
# Abbreviate the release to N characters
# By default, this is disabled. But if you set RELEASE_ABBREVIATED=1
# and your lsb_release is "precise", only "p" will be displayed
#RELEASE_ABBREVIATED=1
# Default: /
#MONITORED_DISK=/
# Minimum disk throughput that triggers the notification (in kB/s)
# Default: 50
#DISK_IO_THRESHOLD=50
# Default: eth0
#MONITORED_NETWORK=eth0
# Unit used for network throughput (either bits per second or bytes per second)
# Default: bits
#NETWORK_UNITS=bytes
# Minimum network throughput that triggers the notification (in kbit/s)
# Default: 20
#NETWORK_THRESHOLD=20
# You can add an additional source of temperature here
#MONITORED_TEMP=/proc/acpi/thermal_zone/THM0/temperature
# Default: C
#TEMP=F
#SERVICES="eucalyptus-nc|NC eucalyptus-cloud|CLC eucalyptus-walrus eucalyptus-cc|CC eucalyptus-sc|SC"
#FAN=$(find /sys -type f -name fan1_input | head -n1)
# You can set this to 1 to report your external/public ip address
# Default: 0
#IP_EXTERNAL=0
# The users notification normally counts ssh sessions; set this configuration to '1'
# to instead count number of distinct users logged onto the system
# Default: 0
#USERS_DISTINCT=0
# Set this to zero to hide seconds int the time display
# Default 1
#TIME_SECONDS=0

0
.byobu/windows Normal file
View File

0
.byobu/windows.tmux Normal file
View File

35
.config/bash/aliases Normal file
View File

@ -0,0 +1,35 @@
# General
alias clear="printf '\033c'" # faster than ncurses clear by a lot
alias c='clear'
alias bashrc="vim ~/.bashrc && source ~/.bashrc"
# LS
alias ls='ls --color=auto -FAh'
alias ll='ls -l'
alias la='ls'
alias l.='ls | egrep "^\."'
alias l=ls
# GREP
alias grep='grep --color=auto'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
# GIT
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias lc='fc -nl $HISTCMD'
# CADDY
alias rc='caddy reload --config ~/Caddyfile'
alias ft='caddy fmt --overwrite ~/Caddyfile'
alias vt='caddy validate --config ~/Caddyfile'
# Navigation
alias ..='cd ..'
alias ...='cd ../../'
alias ....='cd ../../../'
alias .....='cd ../../../../'
# Readability
alias cp="cp -iv"
alias mv='mv -iv'
alias rm='rm -iv'
alias df='df -h'
alias free='free -m'
alias mkdir='mkdir -pv'

57
.config/bash/prompt.new Normal file
View File

@ -0,0 +1,57 @@
__sig() {
# Giant switch case for getting the name of the signal (`kill -l`)
a=0
for i in $@; do
a=$((a+1))
case $i in
126) printf ACCES ;;
127) printf NOENT ;;
129) printf HUP ;;
130) printf INT ;;
131) printf QUIT ;;
132) printf ILL ;;
133) printf TRAP ;;
134) printf ABRT ;;
135) printf BUS ;;
136) printf FPE ;;
137) printf KILL ;;
138) printf USR1 ;;
139) printf SEGV ;;
140) printf USR2 ;;
141) printf PIPE ;;
142) printf ALRM ;;
143) printf TERM ;;
144) printf STKFLT ;;
145) printf CHLD ;;
146) printf CONT ;;
147) printf STOP ;;
148) printf TSTP ;;
149) printf TTIN ;;
150) printf TTOU ;;
151) printf URG ;;
152) printf XCPU ;;
153) printf XFSZ ;;
154) printf VTALRM ;;
155) printf PROF ;;
156) printf WINCH ;;
157) printf IO ;;
158) printf PWR ;;
159) printf SYS ;;
16[3-9]|1[7-8][0-9]|19[0-2]) printf RT$(($i-128)) ;; # Savagery
*) printf $i ;; # Print exit code if not in list
esac
done
}
sig() {
PLC=(${PIPESTATUS[@]})
printf "$(__sig ${PLC[@]})"
}
NO_COLOUR="\[\033[0m\]"
# Bold Colours
RED="\[\033[01;31m\]"
GREEN="\[\033[01;32m\]"
YELLOW="\[\033[01;33m\]"
BLUE="\[\033[01;34m\]"
PS1="[${RED}\$(sig)${NO_COLOUR}] [\t] [${RED}\u${NO_COLOUR}@${GREEN}\h${NO_COLOUR}|${BLUE}\w${NO_COLOUR}] [${YELLOW}#\#${NO_COLOUR}] ${GREEN}\$ ${NO_COLOUR}"

View File

@ -11,5 +11,4 @@ StartLimitBurst=3
StartLimitInterval=90
[Install]
WantedBy=multi-user.target
WantedBy=default.target

View File

@ -8,5 +8,5 @@ StartLimitBurst=3
StartLimitInterval=60
[Install]
WantedBy=default.target
WantedBy=default.target tildeverse-vern-caddy.service

3
.env
View File

@ -43,3 +43,6 @@ then
export SAMUFLAGS="-j$nproc"
fi
##########################################################################################
# import aliases to shell too
. "$HOME/.config/bash/aliases"

View File

@ -1,6 +1,6 @@
[user]
name = Andrei Jiroh Halili
email = ajhalili2006@gmail.com
email = ajhalili2006@andreijiroh.eu.org
signingkey = 67BFC91B3DA12BE8
[commit]

View File

@ -15,6 +15,10 @@ source "$HOME/.env"
source "$HOME/.config/aliases"
export POSIX_PROFILE_SOURCED=true
# how about detecting local configs
if [ ! -f "$HOME/.config/localconfig.env" ]; then
. "$HOME/.config/localconfig.env"
fi
# Added by Toolbox App
export PATH="$PATH:/home/ajhalili2006/.local/share/JetBrains/Toolbox/scripts"

6
.ssh/authorized_keys Normal file
View File

@ -0,0 +1,6 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzMlrUe7qMA1P0lP56lq2dKTrwFU6CrVltQ9um+PhOMLkoi31kAlujHtWF6mqGRLXcK0Ao/0Wqug++r82Zu0u7dpAv8LCExtaRRMzagwPkEe4OOqUBOpS6mggfsik8mNA+1UtpkXJ+ZiB4cXtNKEZC0jtxWOTXSV67qgkSxuO+YBWB+7pnESkB0KorqwOoWGGUVfYQtbKUAt6VqM4s6dn7saXqwmN0tCPO6a+4L4mazkYjFD11HhktYsjP9dvnxYSOtMrSFb9JOXRST2LdiIJgwg+HTqBSWGO7aBRHMJaTF3ajlbMtKDQI/EcNQLyGgX6yFdjjzz9DRY+2oU0vPTytdqM2BKsfLlR0GVg7BVL7TZPaLJ1lgpCl4Z1oClW9FOzhnYJVT0W+IKPsnYsFPfv/BVgjWF7Yt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pIbNwm8oDW5RFTZIxfxHRl5ubnp+9HUTMiUQ== ajhalili2006-main-gpg
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDUnTexcVQTGT+UhX8MRPkMvM6FPuskbY2Dn0ScZ3+ot ~ajhalili2006 [passwordless key for sshfs]
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFrrYRVtV3OvgLzXMedNVITzoHnHd5wMVe53h16xxVWs ajhalili2006+passwordless@github.tailnet