bashrc.d updates
This commit is contained in:
parent
0873f0b347
commit
ae4f820c67
3 changed files with 21 additions and 0 deletions
|
|
@ -29,6 +29,7 @@ depends = ["default"]
|
||||||
"graphical/flatpak" = "~/.var/app"
|
"graphical/flatpak" = "~/.var/app"
|
||||||
"graphical/share" = "~/.local/share"
|
"graphical/share" = "~/.local/share"
|
||||||
"graphical/fonts" = "~/.fonts"
|
"graphical/fonts" = "~/.fonts"
|
||||||
|
"graphical/bashrc.d" = "~/.bashrc.d"
|
||||||
|
|
||||||
[graphical.variables]
|
[graphical.variables]
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,11 @@ devpod-arm() {
|
||||||
# }
|
# }
|
||||||
# distrobox enter --additional-flags "--env DB_PATH=${PWD}" ${1}
|
# distrobox enter --additional-flags "--env DB_PATH=${PWD}" ${1}
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
show_colour() {
|
||||||
|
perl -e 'foreach $a(@ARGV){print "\e[48:2::".join(":",unpack("C*",pack("H*",$a)))."m \e[49m "};print "\n"' "$@"
|
||||||
|
}
|
||||||
|
|
||||||
simplewebserver() {
|
simplewebserver() {
|
||||||
if [ "${1}" = "-n" ]; then
|
if [ "${1}" = "-n" ]; then
|
||||||
screen bash -c "printf 'running [ /usr/bin/python3 -m http.server ] in screen...\nTo run with server-side includes, remove -n\n';/usr/bin/python3 -m http.server"
|
screen bash -c "printf 'running [ /usr/bin/python3 -m http.server ] in screen...\nTo run with server-side includes, remove -n\n';/usr/bin/python3 -m http.server"
|
||||||
|
|
|
||||||
15
graphical/bashrc.d/graphical
Executable file
15
graphical/bashrc.d/graphical
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
dol() {
|
||||||
|
if [[ -z ${1} ]];then
|
||||||
|
DOLPHIN_OPEN_DIR="$(pwd)"
|
||||||
|
else
|
||||||
|
if [[ ${1:0:1} == "~" ]];then
|
||||||
|
DOLPHIN_OPEN_DIR="$(realpath """${1/\~/${HOME}}""")"
|
||||||
|
else
|
||||||
|
DOLPHIN_OPEN_DIR="$(realpath """${1}""")"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
printf '[-] opening [%s] in dolphin...\n' "${DOLPHIN_OPEN_DIR}"
|
||||||
|
swaymsg exec "dolphin --new-window """${DOLPHIN_OPEN_DIR}""""
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue