chore
This commit is contained in:
parent
0ae714129f
commit
318436053a
@ -10,7 +10,7 @@ ssh:
|
|||||||
git:.config/git
|
git:.config/git
|
||||||
ranger:.config/ranger
|
ranger:.config/ranger
|
||||||
gpg:
|
gpg:
|
||||||
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3status .local/bin/i3status_wrapper .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/wifi .local/bin/bluetooth .local/bin/i3_switch_workspace.sh
|
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3status .local/bin/i3status_wrapper .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh
|
||||||
bat:.config/bat
|
bat:.config/bat
|
||||||
font:
|
font:
|
||||||
termux:.termux
|
termux:.termux
|
||||||
|
|||||||
@ -1,16 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
bssid="$(bluetoothctl devices | rofi -dmenu -p "Devices: " -l 20 | cut -d' ' -f2)"
|
|
||||||
|
|
||||||
exit_counter=0
|
|
||||||
until bluetoothctl connect "$bssid"
|
|
||||||
do
|
|
||||||
exit_counter=$((exit_counter+1))
|
|
||||||
|
|
||||||
if [ "$exit_counter" -gt 3 ]; then
|
|
||||||
break
|
|
||||||
else
|
|
||||||
echo ...
|
|
||||||
sleep 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
@ -12,39 +12,39 @@
|
|||||||
[ -x "/usr/bin/jq" ] || exec i3status
|
[ -x "/usr/bin/jq" ] || exec i3status
|
||||||
|
|
||||||
update_holder() {
|
update_holder() {
|
||||||
instance="$1"
|
instance="${1}"
|
||||||
replacement="$2"
|
replacement="${2}"
|
||||||
echo "$3" | jq --argjson arg_j "$replacement" "(.[] | (select(.instance==\"$instance\"))) |= \$arg_j"
|
echo "${3}" | jq --argjson arg_j "${replacement}" "(.[] | (select(.instance==\"${instance}\"))) |= \$arg_j"
|
||||||
}
|
}
|
||||||
|
|
||||||
get_device_battery_status() {
|
get_device_battery_status() {
|
||||||
for uuid in $(timeout 1 bluetoothctl devices | cut -f2 -d' ' 2>/dev/null)
|
for uuid in $(timeout 1 bluetoothctl devices | cut -f2 -d' ' 2>/dev/null)
|
||||||
do
|
do
|
||||||
device_info="$(timeout 1 bluetoothctl info "$uuid")"
|
device_info="$(timeout 1 bluetoothctl info "${uuid}")"
|
||||||
|
|
||||||
if echo "$device_info" | grep -q 'Connected: yes\|Battery Percentage'; then
|
if echo "${device_info}" | grep -q 'Connected: yes\|Battery Percentage'; then
|
||||||
echo "$device_info" | grep 'Battery Percentage' | awk -F '[()]' '{ print "🎧🔋"$2"%" }'
|
echo "${device_info}" | grep 'Battery Percentage' | awk -F '[()]' '{ print "🎧🔋"$2"%" }'
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
update_json_with_text() {
|
update_json_with_text() {
|
||||||
json="{ \"full_text\": \"$1\", \"color\": \"#FFFFFF\"}"
|
json="{ \"full_text\": \"${1}\", \"color\": \"#FFFFFF\"}"
|
||||||
update_holder "holder__headphones" "$json" "$2"
|
update_holder "holder__headphones" "${json}" "${2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
i3status | (
|
i3status | (
|
||||||
# read first 2 lines without formatting
|
# read first 2 lines without formatting
|
||||||
read -r line
|
read -r line
|
||||||
echo "$line"
|
echo "${line}"
|
||||||
read -r line
|
read -r line
|
||||||
echo "$line"
|
echo "${line}"
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
read -r line
|
read -r line
|
||||||
json_array="$(echo "$line" | sed -e 's/^,//')"
|
json_array="$(echo "${line}" | sed -e 's/^,//')"
|
||||||
echo "$(update_json_with_text "$(get_device_battery_status)" "$json_array"),"
|
echo "$(update_json_with_text "$(get_device_battery_status)" "${json_array}"),"
|
||||||
done
|
done
|
||||||
)
|
)
|
||||||
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
pidd="$(ps -u "${USER}" -o pid,%mem,%cpu,comm | sort -b -k2 -r | sed -n '1!p' | rofi -dmenu -i -l 15 | awk '{print $1}')"
|
|
||||||
kill -15 "$pidd"
|
|
||||||
@ -33,7 +33,7 @@ cmd_help () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
case "$1" in
|
case "${1}" in
|
||||||
ls) shift; cmd_list "$@" ;;
|
ls) shift; cmd_list "$@" ;;
|
||||||
load) shift; cmd_load "$@" ;;
|
load) shift; cmd_load "$@" ;;
|
||||||
wallpaper) shift; cmd_wallpaper "$@" ;;
|
wallpaper) shift; cmd_wallpaper "$@" ;;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
choosed_screen_layout="$(slm ls | rofi -dmenu -m -1 -i -p "Select screen layout")"
|
choosed_screen_layout="$(slm ls | rofi -dmenu -m -1 -i -p "Select screen layout")"
|
||||||
slm load "$choosed_screen_layout"
|
slm load "${choosed_screen_layout}"
|
||||||
@ -1,7 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -ue
|
|
||||||
|
|
||||||
bssid="$(nmcli -f BSSID,SSID,SIGNAL,RATE,BARS,SECURITY dev wifi list | sed -n '1!p' | rofi -dmenu -p "WiFi: " -l 20 | cut -d' ' -f1)"
|
|
||||||
pass="$(echo "" | rofi -dmenu -p "Password: ")"
|
|
||||||
nmcli device wifi connect "$bssid" "password" "$pass"
|
|
||||||
4
install
4
install
@ -59,8 +59,8 @@ _link_files_in_sandbox() (
|
|||||||
files="$(map_get_value "${TARGETS}" "$(string_exclude_first_char "${targetfile}")")"
|
files="$(map_get_value "${TARGETS}" "$(string_exclude_first_char "${targetfile}")")"
|
||||||
_link_files_in_sandbox ${files}
|
_link_files_in_sandbox ${files}
|
||||||
else
|
else
|
||||||
if [ ! "$(dirname "$targetfile")" = "." ]; then
|
if [ ! "$(dirname "${targetfile}")" = "." ]; then
|
||||||
mkdir -p "${SANDBOX_PATH}/$(dirname "$targetfile")"
|
mkdir -p "${SANDBOX_PATH}/$(dirname "${targetfile}")"
|
||||||
fi
|
fi
|
||||||
ln -sT "${SUB}/${targetfile}" "${SANDBOX_PATH}/${targetfile}"
|
ln -sT "${SUB}/${targetfile}" "${SANDBOX_PATH}/${targetfile}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user