Compare commits

..
42 Commits
Author SHA1 Message Date
bryanpedini fdb5d070e4 moved from static list of file to include to for cycle 2023-12-12 15:47:25 +01:00
bryanpedini ab8821aa4c fixed typo, updated variable fancyfy 2023-12-12 14:50:24 +01:00
bryanpedini 4833a0a72e added dockerpull alias 2023-12-12 14:47:22 +01:00
bryanpedini 761f7cf482 updated docker logs aliases 2023-12-12 14:46:33 +01:00
bryanpedini fd349baa99 variabilized terminal fancifying (client/server) 2023-12-12 14:45:02 +01:00
bryanpedini 3c4e7d7858 added nocomments alias
removes comments from file and prints the rest
2023-10-02 14:38:23 +02:00
bryanpedini 756bfbc542 added convenience alias 'sshfingerprint' 2023-03-31 20:25:47 +02:00
bryanpedini d235ac670d removed leading underscore in public key name echo 2022-09-12 16:35:29 +02:00
bryanpedini 3a1f00ae34 neated the output of "pubkey" alias 2022-09-03 19:22:12 +02:00
bryanpedini 8a87db917d added sshagent alias 2022-08-21 16:33:25 +02:00
bryanpedini dc2300b9cb added docker aliases 2022-08-21 16:22:16 +02:00
bryanpedini 464b77caa4 moved to variabilized home in acme.sh alias 2022-08-21 16:19:30 +02:00
bryanpedini 74d4d88ac6 added bashrc refresh alias 2022-08-03 08:24:25 +02:00
bryanpedini 42c11470b9 moved to *any* type public key
preparing for ED25519 key
2022-08-03 08:23:08 +02:00
bryanpedini ae3732ebbb added acme.sh alias 2022-08-03 08:22:13 +02:00
bryanpedini 1c41cd039d fixed dnsversion alias 2022-04-02 16:03:11 +02:00
bryanpedini 799af1f6a1 added dnsversion alias
to check remote servers
2022-04-02 16:01:21 +02:00
bryanpedini c51a067dda removed blinking of cursor 2022-04-02 16:00:37 +02:00
bryanpedini 8a8f304c1c fix sourcing paths, use relatives 2022-02-10 18:12:27 +01:00
bryanpedini ead9cb0d71 added new ansible workspace alias 2022-02-10 17:41:29 +01:00
bryanpedini 6dd1d386d1 fixed sed path in server customization 2022-02-10 16:33:07 +01:00
bryanpedini 9c4db7fef6 added revert server to client bash customization 2022-02-10 16:22:29 +01:00
bryanpedini fe4a896ada removed force option, not needed anymore 2022-02-10 16:19:35 +01:00
bryanpedini c33ae90b33 fixed reference in ~/.bashrc 2022-02-10 16:08:13 +01:00
bryanpedini 09cf9b8bbe added delete and move functions 2022-02-10 16:05:04 +01:00
bryanpedini 2913920987 removed copying functions, no need anymore 2022-02-10 15:58:07 +01:00
bryanpedini ee267c0c50 moved from copying the settings to using them in place 2022-02-10 15:58:07 +01:00
bryanpedini 6179e8d809 removed cleanup function 2022-02-10 15:58:07 +01:00
bryanpedini e8f69fbbad added sshconfig alias 2022-01-03 10:13:49 +01:00
bryanpedini 53752a866e added termbin alias 2021-08-18 11:42:16 +02:00
bryanpedini a4885fa060 added forced update method, do not use now (UNTESTED) 2021-08-15 14:44:02 +02:00
bryanpedini 627282b2cc added newlines for better formatting, may the Force of better explanation be with you 2021-08-15 14:37:41 +02:00
bryanpedini a8eaab7e81 added sambashare convenience alias, updated README.md with usage documentation section 2021-07-18 18:41:56 +02:00
bryanpedini 6b2dded19a updated README.md
not actually KDE-related, just Linux in general
2021-07-17 16:09:01 +02:00
bryanpedini c8758fe259 neatly formatted for loop for better human reading
not that you would ever need to go into that manually anyway, but still...
2021-07-17 15:57:52 +02:00
bryanpedini 597354356b for some reason sometimes I do not have home bin folder added automatically
no problem, fixed
2021-07-17 15:57:27 +02:00
bryanpedini f5fb8e5dc3 newrepo convenience alias added 2021-07-09 18:39:31 +02:00
bryanpedini 82f2d7a989 today I'm stupid, what can you do about it? 2021-06-03 17:47:29 +02:00
bryanpedini 7d8f7312f1 oopsie.. 2021-06-03 17:45:49 +02:00
bryanpedini 9851de3007 may the Force be with you 2021-06-03 17:44:18 +02:00
bryanpedini 8866dc5bec quality of life, terminal server version
- cleanup is now opt-in instead of opt-out
- added server parameter to deploy with a different terminal scheme
2021-06-03 17:39:45 +02:00
bryanpedini eed4d5b142 little bugfix 2021-04-23 23:39:19 +02:00
8 changed files with 92 additions and 29 deletions

No files matched your search

+9 -3
View File
@@ -1,4 +1,10 @@
# personal-kde-config # Personal Linux config
Personal KDE and other Linux-related configs to help me succeed in life (or at least simplify it). Personal Linux-related configs to help me succeed in life (or at least simplify it).
Feel free to try this out, or even add "cool stuff" to help each other out! Feel free to try or poke around in the source (it's all human-readable bash), or heck even add "cool stuff" to help each other out!
## Usage
Explaining section for not-so-intuitive configurations
- alias `sambaserver`: please `cd` into the directoy is needed to be shared and execute `sambaserver` followed by `"shareuser;<SUBSTITUTE-YOUR-PASSWORD-HERE>"`, then just login with username `shareuser` and the provided password with the host computer as URL/IP, autodiscovery of both the host and the share was tested working on Windows and a Samsung Tablet.
- alias `termbin`: use when piping a cat/echo/file/etc to upload to termbin.com (¡requires Netcat!)
+2 -4
View File
@@ -1,5 +1,3 @@
for source in colored_commands convenience_aliases git_functions histcontrol ls_aliases safety_aliases terminal_colors terminal_fancyfying; do for source in $(find "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)" -type f | grep -v "_all"); do
if [ -f ~/.bashrc_overrides/$source ]; then . "${source}"
. ~/.bashrc_overrides/$source
fi
done done
+13 -1
View File
@@ -1,3 +1,15 @@
alias pubkey='cat ~/.ssh/id_rsa.pub' alias pubkey='for PUBKEY_FILE in $(ls ~/.ssh/id_*.pub); do echo "${PUBKEY_FILE} :" | sed -e "s/.*id_//;s/\.pub//"; cat "${PUBKEY_FILE}"; echo; done'
alias hosts='sudo nano /etc/hosts' alias hosts='sudo nano /etc/hosts'
alias historygrep='history | grep' alias historygrep='history | grep'
alias sshconfig='nano ~/.ssh/config'
alias bashrc='. ~/.bashrc'
alias sshagent='eval `ssh-agent` && ssh-add ~/.ssh/id_!(*.pub)'
alias sshfingerprint='ssh-keygen -lf'
alias nocomments='grep -vE "^$|^#|^;"'
alias newrepo='bash <(curl -s https://get.bjphoster.com/new-git-repo.sh)'
alias newansibleworkspace='bash <(curl -s https://get.bjphoster.com/new-ansible-workspace.sh)'
alias sambaserver='docker run -it --rm --network host -p 137:137 -p 138:138 -p 139:139 -p 445:445 -v `pwd`:/share dperson/samba -n -p -s "sambashare;/share;yes;no;no;shareuser" -w "WORKGROUP"'
alias acme.sh='docker run -it --rm -v ~/acme.sh:/acme.sh neilpang/acme.sh'
alias termbin='nc termbin.com 9999'
alias dnsversion='dig txt chaos version.bind'
+9
View File
@@ -0,0 +1,9 @@
alias dockerpull='docker compose pull'
alias dockerup='docker compose up'
alias dockerupd='docker compose up -d'
alias dockerdown='docker compose down'
alias dockerdownv='docker compose down --volumes'
alias dockerlogs='docker compose logs'
alias dockerlogsf='docker compose logs --follow'
alias dockerlogst='docker compose logs --tail=10'
alias dockerlogstf='docker compose logs --tail=10 --follow'
+4
View File
@@ -0,0 +1,4 @@
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
@@ -13,4 +13,4 @@ if [ $GIT_FUNCTIONS ]; then
fi fi
#PS1="$PS1${RED}#${FORMAT_RESET}" #PS1="$PS1${RED}#${FORMAT_RESET}"
PS1="$PS1${RED}${FORMAT_BLINK}\$${FORMAT_RESET}" PS1="$PS1${RED}\$${FORMAT_RESET}"
@@ -0,0 +1,13 @@
GIT_FUNCTIONS=true
# Spaced
#PS1="${LIGHTBLUE}[ ${LIGHTRED}\u ${LIGHTBLUE}@ ${LIGHTBROWN}$(hostname --fqdn) ${LIGHTBLUE}] ${LIGHTPURPLE}( ${GREEN}\w ${LIGHTPURPLE}) "
# Not spaced
PS1="${LIGHTBLUE}[${LIGHTRED}\u${LIGHTBLUE}@${LIGHTBROWN}$(hostname --fqdn)${LIGHTBLUE}]${LIGHTPURPLE}(${GREEN}\w${LIGHTPURPLE})"
if [ $GIT_FUNCTIONS ]; then
#PS1="$PS1${LIGHTPURPLE}[${LIGHTCYAN}$(__git_prompt)${LIGHTPURPLE}]"
PS1="$PS1${LIGHTBROWN}(${LIGHTCYAN}\$(__git_prompt)${LIGHTBROWN}) "
fi
PS1="$PS1${RED}#${FORMAT_RESET}"
+41 -20
View File
@@ -1,12 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
THIS="$(dirname "$(readlink -fm "$0")")" THIS="$(dirname "$(readlink -fm "$0")")"
CLEANUP=true SERVER=false
DELETE=false
MOVE=false
_arguments() { _arguments() {
for PARM in "$@"; do for PARM in "$@"; do
if [ "${PARM}" = "--no-cleanup" ]; then if [ "${PARM}" = "--server" ]; then
CLEANUP=false SERVER=true
elif [ "${PARM}" = "--delete" ]; then
DELETE=true
elif [ "${PARM}" = "--move" ]; then
MOVE=true
elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then elif [ "${PARM}" = "-h" ] || [ "${PARM}" = "--help" ]; then
_help _help
exit 0 exit 0
@@ -15,43 +21,58 @@ _arguments() {
} }
_help() { _help() {
echo "Usage: $(readlink -fm "$0") [-h | --help] [--no-cleanup]" echo "Usage: $(readlink -fm "$0") [-h | --help] [--cleanup]"
echo echo
echo "Options:" echo "Options:"
echo " -h | --help : Prints this help message and quits" echo " -h | --help"
echo " --no-cleanup: Does not clean the source folder after adding the bash overrides" echo " Prints this help message and quits"
echo " --force"
echo " Force the reinstallation of the files"
echo " --delete"
echo " Delete the reference in ~/.bashrc"
echo " --move"
echo " Create a new reference if the location of this folder has been changed"
echo " --server"
echo " Customizes the terminal feel for a server installation"
echo echo
} }
_bash_overrides() { _delete() {
cp -r bashrc_overrides ~/.bashrc_overrides sed -i '/REF:bashrc_overrides:REF/{N;d}' ~/.bashrc
echo "#REF:bashrc_overrides:REF" >> ~/.bashrc
echo "if [ -f ~/.bashrc_overrides/_all ]; then" >> ~/.bashrc
echo " . ~/.bashrc_overrides/_all" >> ~/.bashrc
echo "fi" >> ~/.bashrc
} }
_cleanup() { _bashrc_ref() {
rm -rf ${THIS} echo "#REF:bashrc_overrides:REF" >> ~/.bashrc
>>>>>>> master echo "export TERMINAL_FANCYFY=client" >> ~/.bashrc
echo ". ${THIS}/bashrc_overrides/_all" >> ~/.bashrc
}
_move() {
_delete
_bashrc_ref
} }
_main() { _main() {
_arguments "$@" _arguments "$@"
if [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ]; then if [ "${DELETE}" = true ]; then
_delete
elif [ "${MOVE}" = true ]; then
_move
elif [ ! -z "$(grep "#REF:bashrc_overrides:REF" ~/.bashrc)" ]; then
echo "bash overrides already in place" echo "bash overrides already in place"
echo "skipping..." echo "skipping..."
echo echo
else else
_bash_overrides _bashrc_ref
echo "bash overrides added" echo "bash overrides added"
echo echo
fi fi
if [ "${CLEANUP}" = true ]; then if [ "${SERVER}" = true ]; then
echo "cleaning up..." sed -i 's/terminal_fancyfying/terminal_fancyfying_server/' ${THIS}/bashrc_overrides/_all
_cleanup else
sed -i 's/terminal_fancyfying_server/terminal_fancyfying/' ${THIS}/bashrc_overrides/_all
fi fi
} }