commit fb5ba17eae6d571ad438f09c787929c69dd158c5 Author: sup39 Date: Tue Dec 19 18:30:24 2023 +0900 init diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d17c3bf --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2023 sup39 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..d231ed6 --- /dev/null +++ b/README.md @@ -0,0 +1,4 @@ +# bashrc for sup39 + +## References +- [Firefish サーバーの立て方メモ](https://blog.naskya.net/post/6kic0tebueju/#firefish-%e3%82%92%e8%b5%b7%e5%8b%95) by naskya (2023) diff --git a/bashrc b/bashrc new file mode 100644 index 0000000..a9ccf07 --- /dev/null +++ b/bashrc @@ -0,0 +1,24 @@ +# bashrc for sup39 (https://forgejo.sup39.dev/sup39/bashrc) + +## editor +export EDITOR=nvim +alias vi=nvim + +## color +alias ls='ls --color=auto' +alias grep='grep --color=auto' + +## https://blog.naskya.net/post/6kic0tebueju/#firefish-%e3%82%92%e8%b5%b7%e5%8b%95 +alias sudo='sudo ' +alias start="bash -c 'systemctl start \$0; journalctl --catalog --pager-end --follow --unit=\$0'" + +## PS1 +EPS0='\e]0;\u@\h: \w\a' +EPS1='\u@\h' +EPS2=':\w\$' +sup39_update_PS1 () { + bind "set vi-ins-mode-string \"\1${EPS0@P}\e[38;5;49m\2${EPS1@P}\1\e[39m\2${EPS2@P}\"" + bind "set vi-cmd-mode-string \"\1${EPS0@P}\e[38;5;200m\2${EPS1@P}\1\e[39m\2${EPS2@P}\"" +} +PROMPT_COMMAND=sup39_update_PS1 +PS1=' ' diff --git a/inputrc b/inputrc new file mode 100644 index 0000000..3a067bd --- /dev/null +++ b/inputrc @@ -0,0 +1,5 @@ +# bashrc for sup39 (https://forgejo.sup39.dev/sup39/bashrc) + +set editing-mode vi +set show-mode-in-prompt on +"jk": vi-movement-mode