summaryrefslogtreecommitdiff
path: root/home/xyz/.config/fcitx5
diff options
context:
space:
mode:
Diffstat (limited to 'home/xyz/.config/fcitx5')
0 files changed, 0 insertions, 0 deletions
ref='#n88'>88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214
#!/bin/bash

# $- meaning see https://stackoverflow.com/questions/42757236/what-does-mean-in-bash
# If not running interactively, don't do anything
#[[ $- != *i* ]] && return
# https://github.com/westscz/.dotfiles/blob/master/system/bashrc
case $- in
	*i*) ;;
	*) return;;
esac

. /usr/share/fzf/completion.bash
. /usr/share/fzf/key-bindings.bash
. /usr/share/bash-complete-alias/complete_alias

# default PS1
#PS1='[\u@\h \W]\$ '

# deprecated
# 0: not bold, 91: bright red
# \e[m act like \e[0m, means reset so commands after it will not be colored 
# https://en.wikipedia.org/wiki/ANSI_escape_code#3-bit_and_4-bit
# need \[ and \] around color codes so bash ignore color codes when calculating line wraps?
# https://www.cyberciti.biz/faq/bash-shell-change-the-color-of-my-shell-prompt-under-linux-or-unix/#:~:text=you%20also%20need%20to%20put%20%5C%5B%20and%20%5C%5D%20around%20any%20color%20codes%20so%20that%20bash%20does%20not%20take%20them%20into%20account%20when%20calculating%20line%20wraps.
#PS1='\[\e[0;91m\][\u@\h \W]\$ \[\e[0m\]'
# \033 can be used for dash printf, but \e can't? not sure why
#PS1='\[\033[0;91m\][\u@\h \W]\$ \[\033[0m\]'

# tput is better for different terminals? 
# but also need \[ and \] around color code for PS1! but seems no need for printf in script? why?
# setaf and sgr0 see `man terminfo`, also it seems can have 256 different colors
PS1="\[$(tput setaf 1)\][\u@\h \W]\$ \[$(tput sgr0)\]"

# https://github.com/LukeSmithxyz/voidrice/blob/master/.config/shell/aliasrc
for cmd in hardcode-fixer ventoy units_cur fbgrab powertop nft rpi-imager fdisk dmesg; do
	alias $cmd="sudo $cmd"
done
for cmd in pacdiff visudo; do
	alias $cmd="sudo -E $cmd"
done