.bashrc 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  1. # /etc/skel/.bashrc
  2. #
  3. # This file is sourced by all *interactive* bash shells on startup,
  4. # including some apparently interactive shells such as scp and rcp
  5. # that can't tolerate any output. So make sure this doesn't display
  6. # anything or bad things will happen !
  7. # Test for an interactive shell. There is no need to set anything
  8. # past this point for scp and rcp, and it's important to refrain from
  9. # outputting anything in those cases.
  10. if [[ $- != *i* ]] ; then
  11. # Shell is non-interactive. Be done now!
  12. return
  13. fi
  14. # Putting my fun stuff here.
  15. #once upon a time, here follows a paste of flow's .bashrc, including the if interactive then fish bit
  16. # .bashrc
  17. #testpause20240207
  18. # set PATH so it includes ~/bin if exists
  19. #if [ -d "$HOME/bin" ] ; then
  20. # PATH="$HOME/bin:$PATH"
  21. #fi
  22. # if u dislike touchpad, enable this
  23. #synclient TouchpadOff=1
  24. #or if you want it on, see if this re-enables it:
  25. #synclient TouchpadOff=0
  26. #adding that to sorter. :)
  27. # reminder to self... i made those section headers using... ... idk, figlet? toilet? which font though?
  28. #
  29. # ... found out, via
  30. # for i in (ls /bedrock/strata/ceres/usr/share/figlet/) ; echo ; echo -n (ls -l /bedrock/strata/ceres/usr/share/figlet/$i) ; echo ; figlet -f $i mc ; end
  31. # it's :
  32. # smblock.
  33. # figlet -f smblock headername | xclip
  34. ########################
  35. ########################
  36. ####### mc stuff #######
  37. #
  38. #▛▚▀▖▞▀▖
  39. #▌▐ ▌▌ ▖
  40. #▘▝ ▘▝▀
  41. #
  42. #
  43. # * Messages for package app-misc/mc-4.8.30-r2:
  44. #
  45. # * To enable exiting to latest working directory,
  46. # * put this into your ~/.bashrc:
  47. # * . /usr/libexec/mc/mc.sh
  48. . /usr/libexec/mc/mc.sh
  49. ########################
  50. ########################
  51. ##################################################################################################
  52. ##################################################################################################
  53. ################# fish stuff #####################################################################
  54. # ▗▀▖▗ ▌
  55. # ▐ ▄ ▞▀▘▛▀▖
  56. # ▜▀ ▐ ▝▀▖▌ ▌
  57. # ▐ ▀▘▀▀ ▘ ▘
  58. #
  59. ############ nahhh, we dont want bash for interactive. :3
  60. # If not running interactively, don't do anything
  61. #[[ $- != *i* ]] && return
  62. # if interactive, launch fish
  63. [[ $- != *i* ]] && return || fish
  64. # or try other methods from https://www.cyberciti.biz/faq/linux-unix-bash-check-interactive-shell/
  65. ##################################################################################################
  66. ##################################################################################################
  67. ##################################################################################################
  68. ##################################################################################################
  69. ##################################################################################################
  70. ##################### blesh stuff ################################################################
  71. ### ▌ ▜ ▌
  72. ### ▛▀▖▐ ▞▀▖▞▀▘▛▀▖
  73. ### ▌ ▌▐ ▛▀ ▝▀▖▌ ▌ pssst. this makes bash nearly as nice as zsh or fish for completion
  74. ### ▀▀ ▘▝▀▘▀▀ ▘ ▘
  75. ### blesh / ble.sh
  76. ##################
  77. #(1/1) installing blesh-git [########################################################] 100%
  78. #==> To start using ble.sh, you can run "source /usr/share/blesh/ble.sh"
  79. #==> To load ble.sh by default in interactive sessions reliably,
  80. #==> Add this line at the top of your .bashrc:
  81. #[[ $- == *i* ]] && source /usr/share/blesh/ble.sh --noattach
  82. #==> Add this line at the bottom of your .bashrc:
  83. #[[ ${BLE_VERSION-} ]] && ble-attach
  84. #==> Documentation available at: https://github.com/akinomyoga/ble.sh/wiki
  85. #source /usr/share/blesh/ble.sh
  86. #### blesh:
  87. #source /bedrock/strata/artix/usr/share/blesh/ble.sh
  88. ##################################################################################################
  89. ##################################################################################################
  90. #####################################################################################################################
  91. #####################################################################################################################
  92. # prompt
  93. # ▐
  94. # ▛▀▖▙▀▖▞▀▖▛▚▀▖▛▀▖▜▀
  95. # ▙▄▘▌ ▌ ▌▌▐ ▌▙▄▘▐ ▖
  96. # ▌ ▘ ▝▀ ▘▝ ▘▌ ▀
  97. PS1="\[\033[0;32m\]\$(date +%Y%m%d)\[\033[31m\]\h \[\033[33m\]\$(brl which) \[\033[0m\]\[\033[36m\]\w \[\033[0m\]\$ "
  98. #####################################################################################################################
  99. #####################################################################################################################
  100. ####################
  101. ####################
  102. ####### PATH #######
  103. export PATH=$PATH:~/bin:~/.cabal/bin
  104. ####################
  105. ####################
  106. ####################
  107. ####################
  108. ####### MORE #######
  109. # ▗▐
  110. #▞▀▌▄▜▀
  111. #▚▄▌▐▐ ▖
  112. #▗▄▘▀▘▀
  113. GITTINGS="$HOME/gittings/"
  114. ####################
  115. ########################
  116. ########################
  117. ####### aliases ########
  118. # ▜ ▗
  119. # ▝▀▖▐ ▄ ▝▀▖▞▀▘
  120. # ▞▀▌▐ ▐ ▞▀▌▝▀▖
  121. # ▝▀▘ ▘▀▘▝▀▘▀▀
  122. alias ovh='ssh digit@ovhtoo'
  123. alias ovhprox='ssh -C2qTnN -D 8080 digit@ovhtoo -M -S /tmp/digit@ovhtoo:22'
  124. #####################
  125. ####### media #######
  126. #
  127. # ▌▗
  128. # ▛▚▀▖▞▀▖▞▀▌▄ ▝▀▖
  129. # ▌▐ ▌▛▀ ▌ ▌▐ ▞▀▌
  130. # ▘▝ ▘▝▀▘▝▀▘▀▘▝▀▘
  131. #
  132. # load radio stations aliases
  133. #. $GITTINGS/radiodigit/.radiorc
  134. #same pitch at speed
  135. alias mpv='mpv -af scaletempo'
  136. #just music
  137. alias mpvm='mpv --no-video $1'
  138. #juicy
  139. alias mplease='mpv --ytdl-format=160'
  140. #real juicy
  141. alias mpleep='mpv --ytdl-format=171'
  142. #freedom fave
  143. alias mp43='mpv --ytdl-format=43'
  144. #bandwidthsalv
  145. alias mp5='mpv --ytdl-format=5'
  146. #standard
  147. alias mp43='mpv --ytdl-format=18'
  148. #hq
  149. alias mp43='mpv --ytdl-format=22'
  150. #do you have a fascbook?
  151. fascbook(){ mp43 "https://www.youtube.com/watch?v=JotAOgXFxSs" ; facebook ; }
  152. #facebook(){ mp43 "https://www.youtube.com/watch?v=JotAOgXFxSs" ; fascbook ; }
  153. #formats list
  154. #140 m4a audio only DASH audio 131k , m4a_dash container, aac @128k (44100Hz), 52.45MiB
  155. #171 webm audio only DASH audio 149k , audio@128k (44100Hz), 45.90MiB
  156. #141 m4a audio only DASH audio 258k , m4a_dash container, aac @256k (44100Hz), 105.30MiB
  157. #160 mp4 254x144 DASH video 122k , 15fps, video only, 45.56MiB
  158. #242 webm 424x240 DASH video 217k , 1fps, video only, 78.30MiB
  159. #133 mp4 424x240 DASH video 256k , 25fps, video only, 100.82MiB
  160. #243 webm 636x360 DASH video 418k , 1fps, video only, 145.27MiB
  161. #134 mp4 636x360 DASH video 615k , 25fps, video only, 221.03MiB
  162. #244 webm 848x480 DASH video 844k , 1fps, video only, 290.09MiB
  163. #135 mp4 848x480 DASH video 1119k , 25fps, video only, 424.25MiB
  164. #247 webm 1270x720 DASH video 1429k , 1fps, video only, 500.26MiB
  165. #136 mp4 1270x720 DASH video 2245k , 25fps, video only, 806.59MiB
  166. #248 webm 1906x1080 DASH video 2849k , 1fps, video only, 1.01GiB
  167. #137 mp4 1906x1080 DASH video 4257k , 25fps, video only, 1.37GiB
  168. #17 3gp 176x144
  169. #36 3gp 320x240
  170. #5 flv 400x240
  171. #43 webm 640x360
  172. #18 mp4 640x360
  173. #22 mp4 1280x720 (best)
  174. #################################
  175. ### RADIO GA GA ### RADIO GOO GOO
  176. #hard house
  177. #alias radiohardhouse='mpv ~/c/radio/hhuk.ogg.m3u'
  178. #soundscape
  179. #alias radiodrone='mpv ~/c/radio/dronezone56.pls'
  180. #trance
  181. #alias radiotrance='mpv ~/c/radio/thetrip.pls'
  182. #elite
  183. #alias radioelite="mpv http://listen.radionomy.com/radio-sidewinder.m3u"
  184. #radioelite="mpv ~/c/radio/radio-sidewinder.m3u"
  185. ##############################################
  186. ####### nixos/ package manager aliases #######
  187. # ▗
  188. # ▛▀▖▄ ▚▗▘▞▀▖▞▀▘
  189. # ▌ ▌▐ ▗▚ ▌ ▌▝▀▖
  190. # ▘ ▘▀▘▘ ▘▝▀ ▀▀
  191. # install package
  192. alias nei='nix-env -i'
  193. # uninstall package
  194. alias nee='nix-env -e'
  195. # search
  196. alias neqag='nix-env -qa \* | grep'
  197. alias neaqg='nix-env -qa \* | grep'
  198. # list all available
  199. alias neqa='nix-env -qa \*'
  200. alias neaq='nix-env -qa \*'
  201. # list installed
  202. alias neq='nix-env -q \*'
  203. # search installed
  204. alias neq='nix-env -q \* | grep'
  205. # update available packages list ( i think )
  206. alias ncu='nix-channel --update'
  207. # upgrade --dry-run
  208. alias neup='nix-env -u --dry-run'
  209. alias neudr='nix-env -u --dry-run'
  210. # upgrade (wait! only run as root at / ... or some warning like that iirc)
  211. alias neu='nix-env -u'
  212. # undooooooo!
  213. alias nerb='nix-env --rollback'
  214. # roll back to $n
  215. alias nesg='nix-env --switch-generation '
  216. # list available rollbacks
  217. alias nelg='nix-env --list-generations'
  218. #another search
  219. neps(){ nix-env -qa \* -P | fgrep -i "$1"; }
  220. ##### digit's new alternate nixos package search model
  221. ### update package list
  222. alias dpu='nix-env -qa > ~/packages'
  223. ### list package
  224. #alias dpl='cat ~/packages'
  225. alias dpl='less ~/packages'
  226. ### search package
  227. dps(){ cat ~/packages | grep "$1"; }
  228. ### install package
  229. dpi(){ nix-env -i "$1"; }
  230. ############################
  231. ####### XBPS ALIASES #######
  232. ####### & FUNCTIONS. #######
  233. # ▌
  234. # ▚▗▘▛▀▖▛▀▖▞▀▘
  235. # ▗▚ ▌ ▌▙▄▘▝▀▖
  236. # ▘ ▘▀▀ ▌ ▀▀
  237. alias xbps-list='xbps-list-packages-ypnosestyle'
  238. xbps-flatlist(){
  239. xbps-list-packages-ypnosestyle > xqlotmp
  240. sed 's/$/ /g' xqlotmp | tr -d '\n' ; echo
  241. rm xqlotmp
  242. }
  243. xbps-list-packages-ypnosestyle(){
  244. xbps-query -m | while IFS=$'\n' read -r PKG; do echo "${PKG%-*}"; done
  245. }
  246. xbps-list-packages-domstyle(){
  247. xbps-query -m | rev | cut -d"-" -f2- | rev
  248. }
  249. #######################################################################
  250. #######################################################################
  251. # ▗ ▜
  252. # ▞▀▘▛▀▖▞▀▖▞▀▖▄ ▝▀▖▐
  253. # ▝▀▖▙▄▘▛▀ ▌ ▖▐ ▞▀▌▐
  254. # ▀▀ ▌ ▝▀▘▝▀ ▀▘▝▀▘ ▘s
  255. #
  256. #### special one!
  257. ### as seen on archwiki for skype.
  258. alias fyafox='xhost +local: && su fox -c firefox'
  259. #second version, after wheel trick
  260. alias ffox='xhost +local: && sudo -u fox /nix/store/w53y2zxglxpswfnl8y3y93jm11cr4jfx-firefox-35.0/bin/firefox'
  261. #easy clear
  262. alias l='clear'
  263. #shortcut
  264. LOADINGBAY='ovhtoo:/home/digit/stuff/ninudeskia/ryverdyak/loadingbay'
  265. ###
  266. ## funky functions
  267. #orbea's slackware package searchery
  268. slackpkgsearch(){
  269. ( cd /var/log/packages/ ; grep -x 'U.*M' * ) | awk -F: '{print $3 "\t" $1}' | sort -n
  270. }
  271. alias f='fish'
  272. alias ls='ls --color=auto'
  273. #PS1='[\u@\h \W]\$ '
  274. #carbs things
  275. #CPT_PATH=$HOME/repos/carbs/core
  276. #CPT_PATH=$CPT_PATH:$HOME/repos/carbs/extra
  277. #CPT_PATH=$CPT_PATH:$HOME/repos/carbs/xorg
  278. #CPT_PATH=$CPT_PATH:$HOME/repos/carbs/community
  279. #export CPT_PATH
  280. #load stuff from xsh
  281. #source ~/.xsh
  282. # Added by Radicle.
  283. export PATH="$PATH:/home/digit/.radicle/bin"
  284. ####################
  285. ####################
  286. ####### MORE #######
  287. # ▛▚▀▖▞▀▖▙▀▖▞▀▖
  288. # ▌▐ ▌▌ ▌▌ ▛▀
  289. # ▘▝ ▘▝▀ ▘ ▝▀▘...