make scripts posix sh
This commit is contained in:
parent
6f0c0047d0
commit
5c82197471
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
# g# e f# b | b f# g# e | g# f# e b
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
# usermod -aG input $USER
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
beep \
|
||||
-f 1198.64491 -l 200 \
|
||||
|
||||
@ -5,7 +5,7 @@ bssid="$(bluetoothctl devices | rofi -dmenu -p "Devices: " -l 20 | cut -d' ' -f2
|
||||
exit_counter=0
|
||||
until bluetoothctl connect "$bssid"
|
||||
do
|
||||
((exit_counter+=1))
|
||||
exit_counter=$((exit_counter+1))
|
||||
|
||||
if [ "$exit_counter" -gt 3 ]; then
|
||||
break
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
gen_workspaces()
|
||||
{
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
# The idea is to define "holder" modules in i3status config and then replace them
|
||||
|
||||
@ -12,15 +12,14 @@
|
||||
[ -x "/usr/bin/jq" ] || exec i3status
|
||||
|
||||
update_holder() {
|
||||
local instance="$1"
|
||||
local replacement="$2"
|
||||
instance="$1"
|
||||
replacement="$2"
|
||||
echo "$3" | jq --argjson arg_j "$replacement" "(.[] | (select(.instance==\"$instance\"))) |= \$arg_j"
|
||||
}
|
||||
|
||||
get_device_battery_status() {
|
||||
for uuid in $(timeout 1 bluetoothctl devices | cut -f2 -d' ' 2>/dev/null)
|
||||
do
|
||||
local device_info
|
||||
device_info="$(timeout 1 bluetoothctl info "$uuid")"
|
||||
|
||||
if echo "$device_info" | grep -q 'Connected: yes\|Battery Percentage'; then
|
||||
@ -31,7 +30,7 @@ get_device_battery_status() {
|
||||
}
|
||||
|
||||
update_json_with_text() {
|
||||
local json="{ \"full_text\": \"$1\", \"color\": \"#FFFFFF\"}"
|
||||
json="{ \"full_text\": \"$1\", \"color\": \"#FFFFFF\"}"
|
||||
update_holder "holder__headphones" "$json" "$2"
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/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}')"
|
||||
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"
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
eval "$(echo "i3-msg exit
|
||||
|
||||
@ -63,4 +63,3 @@ case "$1" in
|
||||
*) shift; cmd_help "$@" ;;
|
||||
esac
|
||||
exit 0
|
||||
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
choosed_screen_layout="$(slm ls | rofi -dmenu -m -1 -i -p "Select screen layout")"
|
||||
slm load "$choosed_screen_layout"
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
readonly tmux_list_sessions_script="$HOME/.local/bin/tmux_list_sessions.sh"
|
||||
readonly tmux_list_sessions_script="${HOME}/.local/bin/tmux_list_sessions.sh"
|
||||
|
||||
export FZF_DEFAULT_OPTS="\
|
||||
${FZF_DEFAULT_OPTS}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
readonly tmux_list_sessions_script="$HOME/.local/bin/tmux_list_sessions.sh"
|
||||
readonly tmux_list_sessions_script="${HOME}/.local/bin/tmux_list_sessions.sh"
|
||||
|
||||
export FZF_DEFAULT_OPTS="\
|
||||
${FZF_DEFAULT_OPTS}
|
||||
|
||||
@ -1,15 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
declare current_session
|
||||
current_session="$(tmux display-message -p '#S')"
|
||||
readonly current_session
|
||||
|
||||
declare last_session
|
||||
last_session="$(tmux display-message -p '#{client_last_session}')"
|
||||
readonly last_session
|
||||
|
||||
declare sessions
|
||||
sessions="$(tmux list-session -F '#S#{?session_attached, (attached) , }')"
|
||||
sessions="$(echo "${sessions}" | sed "s/^${current_session} /${current_session} (current) /")"
|
||||
sessions="$(echo "${sessions}" | sed "s/^${last_session} /${last_session} (last) /")"
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
export FZF_DEFAULT_OPTS="\
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
set -eo pipefail
|
||||
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: ")"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user