~ajhalili2006/dotfiles-legacy

c06229dc4aeef37074187d17ca9dbce784341575 — RecapTimeBot 10 months ago 4932864 main
Backing up everything from the legacy dotfiles codebase

'coz I'm gonna nuke the old /home partition and start over after
the switch to KDE Neon.

Co-authored-by: @ajhalili2006 <ajhalili2006@andreijiroh.eu.org>
Signed-off-by: RecapTimeBot <service-accounts+github@crew.recaptime.eu.org>
A .builds/bootstrap-scirpts-ci.yml => .builds/bootstrap-scirpts-ci.yml +18 -0
@@ 0,0 1,18 @@
# yaml-language-server: $schema=https://cdn.recaptime.eu.org/schema/builds.sr.ht
image: "alpine/edge"
sources:
  - https://git.sr.ht/~ajhalili2006/dotfiles
packages:
  # linting chores
  - shellcheck
  - bash
  - coreutils
  - docker # for running tests related to env detection
environment: 
  DOTFILES_HOME: "$HOME/dotfiles"
tasks:
  - lint: |
      cd dotfiles
      shellcheck --severity=warning bootstrap tools/bootstrap-utils/*.sh
  - run_script: |
      bash ./dotfiles/bootstrap

A .dotfiles.kdev4 => .dotfiles.kdev4 +4 -0
@@ 0,0 1,4 @@
[Project]
CreatedFrom=
Manager=KDevGenericManager
Name=~ajhalili2006 dotfiles

M .gitignore => .gitignore +7 -0
@@ 1,5 1,7 @@
## general ##
.envrc
.env*
!.env.example
# used by ctags for code indexing in some tools
# or via "ctags -R ."
tags


@@ 10,6 12,7 @@ secrets
## kate and other editors ##
*~
*-swp
*.save

## Doplhin ##
.directory


@@ 19,3 22,7 @@ secrets
*.BASE.*
*.LOCAL.*
*.REMOTE.*


## other secrets ##
config/aerc/accounts.conf
\ No newline at end of file

A .kdev4/.dotfiles.kdev4 => .kdev4/.dotfiles.kdev4 +5 -0
@@ 0,0 1,5 @@
[Buildset]
BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00,\x00~\x00a\x00j\x00h\x00a\x00l\x00i\x00l\x00i\x002\x000\x000\x006\x00 \x00d\x00o\x00t\x00f\x00i\x00l\x00e\x00s)

[Project]
VersionControlSupport=kdevgit

A .mailmap => .mailmap +4 -0
@@ 0,0 1,4 @@
Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com> Andrei Jiroh Eugenio Halili <andreijiroh@Madebythepins.tk>
Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com> Andrei Jiroh Halili <ajhalili2006@recaptime.tk>
Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com> Andrei Jiroh Halili <andreijiroh@madebythepins.tk>
Andrei Jiroh Eugenio Halili <ajhalili2006@gmail.com> Andrei Jiroh Halili <ajhalili2006@recaptime.eu.org>
\ No newline at end of file

M README.md => README.md +44 -38
@@ 10,8 10,10 @@ working at Recap Time Squad (formerly The Pins Team), see [our dotfiles][df-gl] 

While the clone URLs use GitLab SaaS as the canonical Git repository URL, you can still clone the repository from the following URLs:

* GitLab self-hosted instances: `https://mau.dev/ajhalili2006/dotfiles`
* SourceHut (official instance): `https://git.sr.ht/~ajhalili2006/dotfiles` (SSH: `git@git.sr.ht:~ajhalili2006/dotfiles)
* GitLab self-hosted instances: `https://mau.dev/ajhalili2006/dotfiles`[^1]
* SourceHut (official instance): `https://git.sr.ht/~ajhalili2006/dotfiles` (SSH: `git@git.sr.ht:~ajhalili2006/dotfiles`)

[^1]: mau.dev will be my GitLab instance homeserver due to changes to the SaaS free plan, but I'll stay the GitLab SaaS repo on as an mirror.

To get started, run the bootstrap script which handles the repository cloning/pulling for you and then sets things up for you.



@@ 29,41 31,45 @@ $(command -v curl>>/dev/null && echo curl -o- || echo wget -q0-) https://gitlab.

```bash
$ date && echo && tree -d .
Saturday, 10 September, 2022 11:41:26 PM PST

.
|-- bash-wakatime # TODO: Migrate to tools directory
|-- bin # Scripts go here.
|-- config # Configuration files, mostly not per distro, with exception of Termux and WSL2.
|   |-- bashrc
|   |-- byobu
|   |-- gitconfig
|   |-- konsole
|   |-- nanorc
|   |   |-- config
|   |   `-- highlighting
|   |-- ssh-client
|   |-- systemd
|   |   `-- system
|   |-- tmux
|   `-- zshrc
|-- docs # Markdown versions of my dotfiles docs at my Miraheze-hosted wiki
|   |-- additional-tools
|   `-- os-installation
|-- gnupg # TODO: Migrate to config directory
|-- nixos # TODO: Migrate to config directory
|-- systemd -> config/systemd # TODO: Remove symlink soon
|-- tests # Testing bootstrap scripts across distros
|   |-- alpine
|   |-- common
|   |   `-- bin
|   `-- ubuntu
|-- tools # A bit of homegrown tools and some other stuff I use
|   |-- bootstrap-utils
|   `-- setup-scripts
`-- update-golang # TODO: Migrate to tools directory, might be deprecated due to usage of asdf/other tools

30 directories
# Monday, 31 October, 2022 11:39:54 PM PST
#
# .
# |-- bash-wakatime # TODO: Migrate to tools directory
# |-- bin # Handmade and third-party scripts go here. (binaries should be in ~/.local/bin instead)
# |-- config # Configuration files, mostly not per distro, with exception of Termux and WSL2 in some cases.
# |   |-- aerc
# |   |   `-- templates
# |   |-- bashrc
# |   |-- byobu
# |   |-- gitconfig
# |   |-- konsole
# |   |-- nanorc
# |   |   |-- config
# |   |   `-- highlighting
# |   |-- ssh-client
# |   |-- systemd
# |   |   `-- system
# |   |-- tmux
# |   `-- zshrc
# |-- docs # Markdown versions of my dotfiles docs at my Miraheze-hosted wiki
# |   |-- additional-tools
# |   `-- os-installation
# |-- gnupg # TODO: Migrate to config directory
# |-- nixos # TODO: Migrate to config directory
# |-- systemd -> config/systemd # TODO: Remove symlink soon
# |-- tests # Testing bootstrap scripts across distros
# |   |-- alpine
# |   |-- common
# |   |   `-- bin
# |   `-- ubuntu
# |-- tools # A bit of homegrown tools and some other stuff I use
# |   |-- archive
# |   |   `-- scripts
# |   |-- bootstrap-utils
# |   `-- setup-scripts
# `-- update-golang # TODO: Migrate to tools directory, might be deprecated due to usage of asdf/other tools

34 directories
```

### Documentation


@@ 73,7 79,7 @@ Available documentation for the on/offboarding processes I do for devices + othe
## License and contributions

Code is licensed under [the MPL-2.0](LICENSE) license, while docs on my MediaWiki-powered wiki + here in this repository are licensed
under [CC BY-SA 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/legalcode).
under [CC BY-SA 4.0 International](https://creativecommons.org/licenses/by-sa/4.0/legalcode) license.

Patches (either via GitLab merge requests or email patches via
`~ajhalili2006/public-inbox@lists.sr.ht`) are welcome, but technical

M bootstrap => bootstrap +127 -8
@@ 1,18 1,137 @@
#!/usr/bin/env bash
# shellcheck disable=SC2034

# SPDX-License-Identifier: MPL-2.0
# The holy grail for all the Linux setup.

{

if ! command -v git >>/dev/null; then
  
fi
# Make sure to bail out when something went wrong in any steps.
set -e

DOTFILES_HOME=${DOTFILES_HOME:-"$HOME/.odtfiles"}
DOTFILES_GIT_MIRROR=${DOTFILES_GIT_MIRROR:-"https://gitlab.com/ajhalili2006/dotfiles"}
# Enable shell debugging if $DEBUG is set
if [[ $DEBUG != "" ]]; then
  set -x
fi

if [[ ! -d "$DOTFILES_HOME" ]]; then
  git clone "$DOTFILES_GIT_MIRROR" "$DOTFILES_HOME"
# Adding colors to some text in termnial based on envvar checks
# NO_COLOR: https://no-color.org/
if [ -t 1 ] && [[ "$NO_COLOR" == "" ]]; then
  RED=$(printf '\033[31m')
  GREEN=$(printf '\033[32m')
  YELLOW=$(printf '\033[33m')
  BLUE=$(printf '\033[34m')
  MAGENTA=$(printf '\033[35m')
  BOLD=$(printf '\033[1m')
  RESET=$(printf '\033[m')
else
  git -C "$DOTFILES_HOME" pull
  RED=""
  GREEN=""
  YELLOW=""
  BLUE=""
  MAGENTA=""
  BOLD=""
  RESET=""
fi

error() {
  echo "${RED}error: $*${RESET}"
}

success() {
  echo "${GREEN}success: $*${RESET}"
}

warn() {
  echo "${YELLOW}warning: $*${RESET}"
}

info() {
  echo "${BOLD}info: $*${RESET}"
}

stage() {
  echo "${BOLD}==> $*${RESET}"
}

if ! command -v git >>/dev/null; then
  error "Git is required to setup the dotfiles and other configurations."
  exit 1
fi

osCheck() {
  # This step is required for different actions, like installing deps from system-wide package managers
  # among other sorts of shitfuckery. We may need to also run tests through the CI to ensure nothing breaks.
  if echo "$OSTYPE" | grep -qE "linux-android.*"; then
      export DOTFILES_OS_NAME=android-termux
  elif echo "$OSTYPE" | grep -qE '^linux-gnu.*'; then
      if [ "$(lsb_release -is)" == "Debian" ]; then
        export DOTFILES_OS_NAME=debian
          if  [ -d '/google/devshell' ] && [ -f '/google/devshell/bashrc.google' ]; then
            export GOOGLE_CLOUD_SHELL=true
          fi
      elif [ "$(lsb_release -is)" == "Ubuntu" ]; then
        export DOTFILES_OS_NAME=ubuntu
      fi
  else
      error "Script unsupported for this specific distro. If this was an downstream fork of"
      error "another repo, you could override the DOTFILES_OS_NAME variable (and enabling the"
      error "FF_DISABLE_OS_DETECTION flag)"
      exit 1
  fi
}

checkEnv() {
  stage "Checking environment for some possible issues"
  if [[ $CODESPACES == "true" ]]; then
    warn "GitHub Codespace environment detected, fixing..."
    export DOTFILES_PATH="/workspaces/.codespaces/.persistedshare/dotfiles"
    export PASSWORD_STORE_DIR="/workspaces/.codespaces/.presistedshare/password-store"
  elif [[ $GITPOD_INSTANCE_ID != "" ]]; then
    warn "Gitpod workspace detected, fixing..."
    export PASSWORD_STORE_DIR="/workspace/.password-store"
  fi
}

dotfilesInit() {
  DOTFILES_HOME=${DOTFILES_HOME:-"$HOME/.dotfiles"}
  DOTFILES_GIT_MIRROR=${DOTFILES_GIT_MIRROR:-"https://mau.dev/ajhalili2006/dotfiles"}
  DOTFILES_GIT_BRANCH=${DOTFILES_GIT_BRANCH:-"main"}

  if [[ $DOTFILES_HOME != "$HOME/.dotfiles" ]]; then
    echo "DOTFILES_HOME=${DOTFILES_HOME}" > ~/.dotfilescfg.env
  fi

  if [[ ! -d "$DOTFILES_HOME" ]]; then
    git clone --verbose "$DOTFILES_GIT_MIRROR" "$DOTFILES_HOME" --branch "$DOTFILES_GIT_BRANCH" --recursive
  else
    git remote set-url origin "$DOTFILES_GIT_MIRROR"
    git -C "$DOTFILES_HOME" fetch --all --verbose
    git -C "$DOTFILES_HOME" switch "$DOTFILES_GIT_BRANCH"
    git -C "$DOTFILES_HOME" pull "$DOTFILES_GIT_BRANCH"
  fi
}

passwdstoreInit() {
  PASSWORD_STORE_DIR=${PASSWORD_STORE_DIR:-"~/.password-store"}
}

runBootstrapScripts() {
  for script_stage in "$DOTFILES_HOME"/tools/bootstrap-utils/*.sh; do
    if [[ "$script_stage" != "$DOTFILES_HOME/tools/bootstrap-utils/00-script-library.sh" ]]; then
       bash "$script_stage"
    else
       continue
    fi
  done
}

main() {
  checkEnv
  osCheck
  dotfilesInit
}

main "$@"

}
\ No newline at end of file

A config/aerc/.gitkeep => config/aerc/.gitkeep +0 -0
A config/aerc/accounts-template.conf => config/aerc/accounts-template.conf +16 -0
@@ 0,0 1,16 @@
# Gmail address for development-related stuff
[gmail.andreijiroh.dev]
source        = imaps://ajhalili2006%40gmail.com:${GMAIL_APP_PASSWORD}@imap.gmail.com:993
outgoing      = smtp+plain://ajhalili2006%40gmail.com:${GMAIL_APP_PASSWORD}@smtp.gmail.com:587
default       = INBOX
smtp-starttls = yes
from          = Andrei Jiroh Halili <ajhalili2006@gmail.com>
copy-to       = Sent

# crew mail
[recaptime.dev]
source        = imaps://ajhalili2006%40recaptime.eu.org:${YANDEX_MAIL_PASSWORD}@
outgoing      = smtp+plain://ajhalili2006%40recaptime.eu.org:${YANDEX_MAIL_PASSWORD}@
smtp-starttls = yes
from          = "~ajhalili2006 [RecapTime.dev] <ajhalili2006@recaptime.eu.org>"
copy-to       = Sent
\ No newline at end of file

A config/aerc/aerc.conf => config/aerc/aerc.conf +163 -0
@@ 0,0 1,163 @@
#
# aerc main configuration

[ui]
#
# Describes the format for each row in a mailbox view. This field is compatible
# with mutt's printf-like syntax.
#
# Default:
index-format=%D %-17.17n %s

#
# See time.Time#Format at https://godoc.org/time#Time.Format
#
# Default: 2006-01-02 03:04 PM (ISO 8601 + 12 hour time)
timestamp-format=2006-01-02 03:04 PM

#
# Width of the sidebar, including the border.
#
# Default: 20
sidebar-width=20

#
# Message to display when viewing an empty folder.
#
# Default: (no messages)
empty-message=(no messages)

# Message to display when no folders exists or are all filtered
#
# Default: (no folders)
empty-dirlist=(no folders)

# Enable mouse events in the ui, e.g. clicking and scrolling with the mousewheel
#
# Default: false
mouse-enabled=true

#
# Ring the bell when new messages are received
#
# Default: yes
new-message-bell=true

# Describes the format string to use for the directory list
#
# Default: %n %>r
dirlist-format=%n %>r

# List of space-separated criteria to sort the messages by, see *sort*
# command in *aerc*(1) for reference. Prefixing a criterion with "-r "
# reverses that criterion.
#
# Example: "from -r date"
#
# Default: ""
sort=

# Moves to next message when the current message is deleted
#
# Default: false
next-message-on-delete=true

[viewer]
#
# Specifies the pager to use when displaying emails. Note that some filters
# may add ANSI codes to add color to rendered emails, so you may want to use a
# pager which supports ANSI codes.
#
# Default: less -R
pager=less -R

#
# If an email offers several versions (multipart), you can configure which
# mimetype to prefer. For example, this can be used to prefer plaintext over
# html emails.
#
# Default: text/plain,text/html
alternatives=text/plain,text/html

#
# Default setting to determine whether to show full headers or only parsed
# ones in message viewer.
#
# Default: false
show-headers=false

#
# Layout of headers when viewing a message. To display multiple headers in the
# same row, separate them with a pipe, e.g. "From|To". Rows will be hidden if
# none of their specified headers are present in the message.
#
# Default: From|To,Cc|Bcc,Date,Subject
header-layout=From|To,Cc|Bcc,Date,Subject

# Whether to always show the mimetype of an email, even when it is just a single part
#
# Default: false
always-show-mime=true

[compose]
#
# Specifies the command to run the editor with. It will be shown in an embedded
# terminal, though it may also launch a graphical window if the environment
# supports it. Defaults to $EDITOR, or vi.
#
# Tip: Pratice using Vim a bit more. :)
editor=vi

#
# Default header fields to display when composing a message. To display
# multiple headers in the same row, separate them with a pipe, e.g. "To|From".
#
# Default: To|From,Subject
header-layout=To|From,Subject

[filters]
#
# Filters allow you to pipe an email body through a shell command to render
# certain emails differently, e.g. highlighting them with ANSI escape codes.
#
# The first filter which matches the email's mimetype will be used, so order
# them from most to least specific.
#
# You can also match on non-mimetypes, by prefixing with the header to match
# against (non-case-sensitive) and a comma, e.g. subject,text will match a
# subject which contains "text". Use header,~regex to match against a regex.
subject,~^\[PATCH=awk -f /usr/share/aerc/filters/hldiff
#text/html=/usr/share/aerc/filters/html
text/*=awk -f /usr/share/aerc/filters/plaintext
#image/*=catimg -w $(tput cols) -

[triggers]
#
# Triggers specify commands to execute when certain events occur.
#
# Example:
# new-email=exec notify-send "New email from %n" "%s"<Enter>

#
# Executed when a new email arrives in the selected folder
new-email=

[templates]
# Templates are used to populate email bodies automatically.
#

# The directories where the templates are stored. It takes a colon-separated
# list of directories.
#
# default: /usr/share/aerc/templates/
template-dirs=/usr/share/aerc/templates/:/home/ajhalili2006/.dotfiles/config/aerc/templates

# The template to be used for quoted replies.
#
# default: quoted_reply
quoted-reply=quoted_reply

# The template to be used for forward as body.
#
# default: forward_as_body
forwards=forward_as_body

A config/aerc/binds.conf => config/aerc/binds.conf +99 -0
@@ 0,0 1,99 @@
# Binds are of the form <key sequence> = <command to run>
# To use '=' in a key sequence, substitute it with "Eq": "<Ctrl+Eq>"
# If you wish to bind #, you can wrap the key sequence in quotes: "#" = quit
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>
<C-t> = :term<Enter>

[messages]
q = :quit<Enter>

j = :next<Enter>
<Down> = :next<Enter>
<C-d> = :next 50%<Enter>
<C-f> = :next 100%<Enter>
<PgDn> = :next -s 100%<Enter>

k = :prev<Enter>
<Up> = :prev<Enter>
<C-u> = :prev 50%<Enter>
<C-b> = :prev 100%<Enter>
<PgUp> = :prev -s 100%<Enter>
g = :select 0<Enter>
G = :select -1<Enter>

J = :next-folder<Enter>
K = :prev-folder<Enter>

<Enter> = :view<Enter>
d = :confirm 'Really delete this message?' ':delete-message<Enter>'<Enter>
D = :delete<Enter>
A = :archive flat<Enter>

C = :compose<Enter>

rr = :reply -a<Enter>
rq = :reply -aq<Enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>

c = :cf<space>
$ = :term<space>
! = :term<space>
| = :pipe<space>

/ = :search<space>
\ = :filter<space>
n = :next-result<Enter>
N = :prev-result<Enter>

[view]
q = :close<Enter>
| = :pipe<space>
D = :delete<Enter>
S = :save<space>
A = :archive flat<Enter>

f = :forward<Enter>
rr = :reply -a<Enter>
rq = :reply -aq<Enter>
Rr = :reply<Enter>
Rq = :reply -q<Enter>

H = :toggle-headers<Enter>
<C-k> = :prev-part<Enter>
<C-j> = :next-part<Enter>
J = :next<Enter>
K = :prev<Enter>

[compose]
# Keybindings used when the embedded terminal is not selected in the compose
# view
$ex = <C-x>
<C-k> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<tab> = :next-field<Enter>

[compose::editor]
# Keybindings used when the embedded terminal is selected in the compose view
$noinherit = true
$ex = <C-x>
<C-k> = :prev-field<Enter>
<C-j> = :next-field<Enter>
<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>

[compose::review]
# Keybindings used when reviewing a message to be sent
y = :send<Enter>
n = :abort<Enter>
q = :abort<Enter>
e = :edit<Enter>
a = :attach<space>

[terminal]
$noinherit = true
$ex = <C-x>

<C-p> = :prev-tab<Enter>
<C-n> = :next-tab<Enter>

A config/aerc/templates/recaptime.dev-onboarding => config/aerc/templates/recaptime.dev-onboarding +1 -0
@@ 0,0 1,1 @@
Hi {{new-crew-member-username}} and welcome to Recap Time Squad!
\ No newline at end of file

A config/aerc/templates/thanks => config/aerc/templates/thanks +5 -0
@@ 0,0 1,5 @@
X-Sourcehut-Patchset-Update: APPLIED

Thanks!

{{exec "{ git remote get-url --push origin; git reflog -2 origin/main --pretty=format:%h | xargs printf '%s\n' | tac; } | xargs printf 'To %s\n   %s..%s  main -> main'" ""}}
\ No newline at end of file

M config/bashrc/aliases => config/bashrc/aliases +12 -6
@@ 1,5 1,7 @@
#!/bin/bash

# SPDX-License-Identifier: MPL-2.0
#
##################################################
#                                                #
#     AN NOTE ON ADDING ALIASES INTO HERE:       #


@@ 37,7 39,8 @@ alias tag-checkpoint="git tag --gpg-sign"
alias tag-checkpoint-nogpg="git tag --no-gpg-sign"
alias new-tag="tag-checkpoint"
alias new-tag-nogpg="tag-checkpoint-nogpg"
## shortcuts to managing yiff stash
## shortcuts to managing yiff stash, might be converted into an full-blown
## function/shell script later
alias stash="git stash push --keep-index"
alias pop-stash="git stash pop"
alias apply-stash="git stash apply"


@@ 46,6 49,7 @@ alias yeet-stash="git stash drop"
alias stage="git add"
alias unstage="git restore --staged"
alias nuke-from-index="git rm"
alias nuke-cached="git rm --cached"

# branch management
alias rename-branch="git branch -m"


@@ 63,7 67,7 @@ alias remove-remote="nuke-remote"
alias push="git push"
## add main:master since Git assumes local branch to
## remote branch when running this alias
alias deploy-divio="git push divio"
alias deploy-divio="git push divio" # might use divio again after getting an CC in the future

# fetch / pull
alias fetch="git fetch --all"


@@ 73,11 77,12 @@ alias pull-upstream="fetch && git pull upstream"
alias pull-origin="fetch && git pull origin"

# history-cleanup like scripts
alias clean-shellhis="history -c && clear"
#alias clean-shellhis="history -c && clear"

# test SSH connections
alias test-gh-ssh="ssh -p 22 git@github.com"
alias test-gl-ssh="ssh -p 22 git@gitlab.com"
alias test-gh-ssh="ssh -T -p 22 git@github.com"
alias test-gl-ssh="ssh -T -p 22 git@gitlab.com"
alias test-git-hut-ssh="ssh -T -p 22 git@git.sr.ht"

# ssh-agent stuff
## quock shortcut into add-ssh-keys stuff


@@ 85,9 90,10 @@ alias add-ssh-key="$HOME/.dotfiles/bin/add-ssh-keys"

# shortcuts to some functions
alias edit-script="edit-script-file"
alias edit-functions="edit-funcs-bashrc"

# add a bit of test here
alias guild-test="echo successfully imported owo"

# shortcuts for rdp stuff
alias bshq-cursed='rdesktop --user cursed-remote-user -r audio:local -x lan -r clipboard:PRIMARYCLIPBOARD -n guildedguy bullshit.hq'
#alias bshq-cursed='rdesktop --user cursed-remote-user -r audio:local -x lan -r clipboard:PRIMARYCLIPBOARD -n guildedguy bullshit.hq'

M config/bashrc/chain-source => config/bashrc/chain-source +4 -1
@@ 3,4 3,7 @@
# these commands should be triggered on shell startup
source "$DOTFILES_HOME/config/bashrc/aliases"
source "$DOTFILES_HOME/config/bashrc/functions"
#guild-test

if ! command -v keychain >> /dev/null; then
  keychain ~/.ssh/personal ~/.ssh/ajhalili2006.recaptime.dev
fi

M config/bashrc/functions => config/bashrc/functions +24 -23
@@ 1,10 1,8 @@
#!/bin/bash
# shellcheck disable=SC2199,SC2068,SC1091,SC2086,SC2145

# custom function management here
# changes to the worthwhile-functions filepath requires
# an update o the filepath via 'edit-script reload-funcs-bashrc
# and also any reference here
# SPDX-License-Identifier: MPL-2.0


DOTFILES_HOME=${DOTFILES_HOME:-"$HOME/.dotfiles"}
source "$DOTFILES_HOME/tools/bootstrap-utils/00-script-library.sh"


@@ 14,7 12,7 @@ disable-funcs () {
}

edit-funcs-bashrc() {
   $(command -v nano>>/dev/null && echo nano || echo vi) ~/.dotfiles/bashrc/worthwhile-functions
   $(command -v nano>>/dev/null && echo nano || echo vi) ~/.dotfiles/bashrc/functions
}

list-debs-size() {


@@ 23,10 21,10 @@ list-debs-size() {

edit-script-file() {
    # if you use other editor, please set $EDITOR.
    $EDITOR "$(command -v $1)"
    ${EDITOR:-"nano"} "$(command -v $1)"
}

# reloading stuff
# Refreshing shell with latest updates
refresh-funcs() {
  showStage "reloading current session with fresh functions"
  source "$DOTFILES_HOME/config/bashrc/functions"


@@ 54,33 52,36 @@ list-nodejs-scripts() {
  [[ -f "package.json" ]] && jq .scripts < package.json || echo "No package.json found in current directory."
}

# TODO: Support code-server from Coder and Gitpod's OpenVSCode Server.
# TODO: Might also add support for Theia IDE too soon.
code() {
  # quick trick in case only code-insiders is installed and not code
  if ! command -v code >> /dev/null; then
  if [[ $(type -p code) == "" ]]; then
    if command -v code-insiders >>/dev/null; then
      warn "code-stable is not installed, but code-insiders is found in PATH, setting USE_CODE_INSIDERS"
      warn "for this run"
      warn "code is not installed, but code-insiders is found in PATH, setting USE_CODE_INSIDERS"
      warn "for this run behind the scenes for you"
      USE_CODE_INSIDERS=true
    fi
  fi

  if [[ -f "/snap/bin/code" && "$USE_CODE_INSIDERS" == "" ]]; then
    echo "info: execing /snap/bin/code with params: $*"
    exec /snap/bin/code "$@"
    /snap/bin/code "$@"
  elif [[ -f "/snap/bin/code-insiders" ]]; then
    echo "info: execing /snap/bin/code-insiders with params: $*"
    exec /snap/bin/code-insiders "$*"
    /snap/bin/code-insiders "$*"
  fi

  if [[ "$(command -v code)" != "" && "$USE_CODE_INSIDERS" == "" ]]; then
    info "execing $(command -v code) with params: $*"
    exec "$(command -v code)" "$*"
  elif [[ $(command -v code-insiders) != "" ]]; then
    info "execing $(command -v code-insiders) with params: $*"
    exec "$(command -v code-insiders)" "$*"
  if [[ "$(type -p code)" != "" && "$USE_CODE_INSIDERS" == "" ]]; then
    info "execing $(type -p code) with params: $*"
    "$(type -p code)" "$*"
  elif [[ $(type -p code-insiders) != "" ]]; then
    info "execing $(type -p code-insiders) with params: $*"
    "$(command -v code-insiders)" "$*"
  else
    echo "Either VS Code Stable or Insiders aren't installed on your system. Please visit"
    echo "https://go.rtapp.tk/get-code to install VS Code. If you're using VS Code server,"
    echo ""
    return 1
  fi

  echo "Either VS Code Stable or Insiders aren't installed on your system. Please visit"
  echo "https://go.rtapp.tk/get-code to install the code editor."
  return 1
}
\ No newline at end of file
}

M config/bashrc/ubuntu.bashrc => config/bashrc/ubuntu.bashrc +6 -3
@@ 167,19 167,22 @@ else
fi

# As long as possible, attempt to setup our GnuPG agent when we're on an SSH session.
KEYCHAIN_FLAGS_NOGUI="--nogui --noinherit"
#KEYCHAIN_FLAGS=""
if [[ -n "$SSH_CLIENT" ]] || [[ -n "$SSH_TTY" ]]; then
	eval $(keychain --agents gpg,ssh --eval --nogui --noinherit) || true
	eval $(keychain --agents gpg,ssh --eval $KEYCHAIN_FLAGS_NOGUI) || true
	export GPG_TTY=$(tty)
else
	# We'll do some checks here btw, Currently I use GNOME and Xfce4 as my desktop environments
	case $(ps -o comm= -p $PPID) in
        	# Sometimes, $SSH_CLIENT and/or $SSH_TTY doesn't exists so we'll pull what ps says
		sshd | */sshd) eval $(keychain --agents gpg,ssh --eval --nogui --noinherit) || true;;
		sshd | */sshd) eval $(keychain --agents gpg,ssh --eval $KEYCHAIN_FLAGS_NOGUI) || true;;
		xfce*) eval $(keychain --agents gpg,ssh --eval) || true;;
		gnome*) eval $(keychain --agents gpg,ssh --eval) || true;;
                
		# Don't forget VS Code and code-server!
		code) eval $(keychain --agents gpg,ssh --eval) || true;;
		*) eval $(keychain --agents gpg,ssh --eval --nogui --noinherit) || true;;
		*) eval $(keychain --agents gpg,ssh --eval $KEYCHAIN_FLAGS_NOGUI) || true;;
	esac
fi


A config/konsole/bookmarks.xml => config/konsole/bookmarks.xml +12 -0
@@ 0,0 1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xbel>
<xbel xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info" dbusName="konsole" xmlns:kdepriv="http://www.kde.org/kdepriv" xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks">
 <bookmark href="file:///home/ajhalili2006/.gnupg">
  <title></title>
  <info>
   <metadata owner="http://freedesktop.org">
    <bookmark:icon name=""/>
   </metadata>
  </info>
 </bookmark>
</xbel>

A config/konsole/bookmarks.xml.tbcache => config/konsole/bookmarks.xml.tbcache +0 -0
A config/konsole/konsolestaterc => config/konsole/konsolestaterc +2 -0
@@ 0,0 1,2 @@
[General]
CommandBarLastUsedActions=

A config/konsole/~ajhalili2006 - bash.profile => config/konsole/~ajhalili2006 - bash.profile +21 -0
@@ 0,0 1,21 @@
[Appearance]
ColorScheme=Breeze
Font=CaskaydiaCove Nerd Font Mono,12,-1,5,50,0,0,0,0,0
TabColor=0,255,0

[General]
Command=/usr/bin/env bash
Environment=TERM=xterm-256color,COLORTERM=truecolor,KONSOLE=1,TMUX=
Name=~ajhalili2006 - bash
Parent=FALLBACK/
SemanticUpDown=false

[Interaction Options]
CtrlRequiredForDrag=false

[Scrolling]
HistoryMode=2

[Terminal Features]
BlinkingCursorEnabled=true
UrlHintsModifiers=67108864

M config/ssh-client/linux => config/ssh-client/linux +15 -14
@@ 24,7 24,6 @@ Host github.com
Host gitlab.alpinelinux.org
    User git
    IdentityFile ~/.ssh/launchpad

# Launchpad.net SSH keys for mirroring some repos manually,
# partularly the gitlab.com:termux-package-android5x/src.git repo
# among any sort of shits and giggles.


@@ 34,6 33,9 @@ Host git.launchpad.net
Host bazar.launchpad.net
    IdentityFile ~/.ssh/launchpad
    User ajhalili2006
Host git.sr.ht
   IdentityFile ~/.ssh/personal
   User git

# LXC containers, please append as possible
Host ghost-localhost


@@ 82,9 84,9 @@ Host wsl.stellapent.local
   Hostname stellapent.local
   Port 2222
# SourceForge
Host sourceforge
Host shell.sourceforge.net
   User ajhalili2006
   Hostname shell.sourceforge.net
   #Hostname shell.sourceforge.net
   IdentityFile ~/.ssh/launchpad

# hax.co.id


@@ 94,14 96,13 @@ Host sourceforge
#   User ajhalili2006
#   Port 4830
#   IdentityFile ~/.ssh/launchpad

Host sandbox.ajhalili2006.dev
   Hostname 148.251.50.26
   Port 12411
   User ajhalili2006
   IdentityFile ~/.ssh/launchpad
Host mau-dev-mirrors-haxserver.runners.recaptime.dev
   Hostname todo.recaptime.app
   User ajhalili2006
   Port 6666
   IdentityFile ~/.ssh/ajhalili2006.recaptime.dev
#Host sandbox.ajhalili2006.dev
#   Hostname 148.251.50.26
#   Port 12411
#   User ajhalili2006
#   IdentityFile ~/.ssh/launchpad
#Host mau-dev-mirrors-haxserver.runners.recaptime.dev
#   Hostname todo.recaptime.app
#   User ajhalili2006
#   Port 6666
#   IdentityFile ~/.ssh/ajhalili2006.recaptime.dev

M docs/onboarding.md => docs/onboarding.md +1 -1
@@ 91,7 91,7 @@ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1; sudo sysctl -w net.ipv6.conf.de
## Post System Preparation/Wramup

* Run the bootstrap script as noted in the README. **Remember that Tailscale setup is still manual due to presence of ACL policies in `recaptime.org.github` tailnet.**
* After bootstrapping, run the `tailscale-provisioner` script, which requires Python instealled. It'll prompt you for an Tailscale authtoken and select tags. You don't need to do this on Termux, assuming the Android app is installed. If already configured, you may need to add `--force` flag on it.
* After bootstrapping, run the `tailscale-provisioner` script, which requires Deno instealled. It'll prompt you for an Tailscale authtoken and select tags. You don't need to do this on Termux, assuming the Android app is installed. If already configured, you may need to add `--force` flag on it.
* Manually import GPG keys with `gpg --decrypt "$DOTFILES_HOME/secrets/pgp/personal.key.asc" | gpg --import`.

## Optionals

A docs/os-installation/alpinelinux.md => docs/os-installation/alpinelinux.md +5 -0
@@ 0,0 1,5 @@
# Setting up Alpine Linux

> Wiki version: https://ajhalili2006.miraheze.org/wiki/Onboarding_new_device/Computers/Linux/Alpine

TBD