Compare commits

...

2 commits

Author SHA1 Message Date
1cad82456e
common link to entry point
All checks were successful
/ job (push) Successful in 4m0s
2025-06-28 03:01:52 +02:00
9e785b7ce1
gnome/proxy/socks 2025-06-25 22:14:46 +02:00
4 changed files with 24 additions and 7 deletions

View file

@ -1,3 +1,7 @@
# ╭────╮
# │ fs │
# ╰────╯
rwx_fs_make_btrfs() { rwx_fs_make_btrfs() {
local device="${1}" local device="${1}"
local label="${2}" local label="${2}"

View file

@ -23,12 +23,18 @@ rwx_gnome_background_win3() {
# ╰───────┴───────╯ # ╰───────┴───────╯
rwx_gnome_proxy() { rwx_gnome_proxy() {
local value local port="${1}"
case "${1}" in local prefix="org.gnome.system.proxy"
"on") value="manual" ;; case "${port}" in
*) value="none" ;; "")
gsettings set "${prefix}" "mode" "none"
;;
*)
gsettings set "${prefix}" "mode" "manual"
gsettings set "${prefix}.socks" "host" "localhost"
gsettings set "${prefix}.socks" "port" "${port}"
;;
esac esac
gsettings set "org.gnome.system.proxy" "mode" "${value}"
} }
# ╭───────┬─────╮ # ╭───────┬─────╮

View file

@ -84,12 +84,14 @@ rwx_find_shell() {
# │ main │ ifs │ # │ main │ ifs │
# ╰──────┴─────╯ # ╰──────┴─────╯
# set internal field separator to line feed
rwx_ifs_set() { rwx_ifs_set() {
_RWX_IFS="${IFS}" _RWX_IFS="${IFS}"
IFS=" IFS="
" "
} }
# unset internal field separator
rwx_ifs_unset() { rwx_ifs_unset() {
IFS="${_RWX_IFS}" IFS="${_RWX_IFS}"
unset RWX_IFS unset RWX_IFS
@ -99,6 +101,7 @@ rwx_ifs_unset() {
# │ main │ source │ # │ main │ source │
# ╰──────┴────────╯ # ╰──────┴────────╯
# source code from file path
rwx_source() { rwx_source() {
local path="${1}" local path="${1}"
[ -d "${path}" ] || [ -d "${path}" ] ||

View file

@ -92,7 +92,7 @@ rwx_self_init() {
_rwx_cmd_rwx_install() { rwx_self_install "${@}"; } _rwx_cmd_rwx_install() { rwx_self_install "${@}"; }
rwx_self_install() { rwx_self_install() {
local target="${1}" local target="${1}"
local command file root local command file name root
# code # code
if [ -n "${target}" ]; then if [ -n "${target}" ]; then
root="${target}${RWX_ROOT_SYSTEM}" root="${target}${RWX_ROOT_SYSTEM}"
@ -101,10 +101,14 @@ rwx_self_install() {
fi fi
# commands # commands
root="${target}/usr/local/bin" root="${target}/usr/local/bin"
name="${RWX_SELF_NAME}.sh"
file="${root}/${name}"
rwx_remove "${file}"
rwx_link "${file}" "${RWX_MAIN_PATH}"
for command in $(rwx_self_commands); do for command in $(rwx_self_commands); do
file="${root}/${command}" file="${root}/${command}"
rwx_remove "${file}" rwx_remove "${file}"
rwx_link "${file}" "${RWX_MAIN_PATH}" rwx_link "${file}" "${name}"
done done
# sh # sh
file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh" file="${target}/etc/profile.d/${RWX_SELF_NAME}.sh"