mirror of
https://github.com/sahinakkaya/dotfiles.git
synced 2025-07-16 07:39:40 +03:00
Move old config to old-dots branch
This commit is contained in:
33
GitRepositories/patches/polybar-wireguard/wireguard.patch
Normal file
33
GitRepositories/patches/polybar-wireguard/wireguard.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff --git a/polybar-wireguard b/rofi-wireguard
|
||||
similarity index 88%
|
||||
rename from polybar-wireguard
|
||||
rename to rofi-wireguard
|
||||
index 6712185..03e7dcb 100755
|
||||
--- a/polybar-wireguard
|
||||
+++ b/rofi-wireguard
|
||||
@@ -6,11 +6,11 @@
|
||||
# https://github.com/polybar/polybar/wiki/Formatting#format-tags-inside-polybar-config
|
||||
green=#55aa55
|
||||
|
||||
-configs_path="/PATH/TO/CONF/FILES"
|
||||
+configs_path="$HOME/.config/wireguard"
|
||||
connected_interface=$(sudo wg | grep interface | cut -d " " -f2)
|
||||
|
||||
connect() {
|
||||
- selected_config=$(ls $configs_path/*.conf | xargs basename -a -s .conf | dmenu)
|
||||
+ selected_config=$(ls $configs_path/*.conf | xargs basename -a -s .conf | rofi -i -dmenu -p "Select a VPN server to connect: ")
|
||||
[[ $selected_config ]] && sudo wg-quick up "$configs_path"/"$selected_config".conf
|
||||
}
|
||||
|
||||
@@ -36,9 +36,9 @@ toggle() {
|
||||
print() {
|
||||
if [[ $connected_interface ]]
|
||||
then
|
||||
- echo %{u"$green"}%{+u}%{T4}%{F"$green"}%{T-}%{F-} "$connected_interface"
|
||||
+ echo $connected_interface
|
||||
else
|
||||
- echo %{T4}%{T-}
|
||||
+ echo
|
||||
fi
|
||||
}
|
||||
|
71
GitRepositories/patches/rofi-bluetooth/dontshowmenu.patch
Normal file
71
GitRepositories/patches/rofi-bluetooth/dontshowmenu.patch
Normal file
@ -0,0 +1,71 @@
|
||||
diff --git a/rofi-bluetooth b/rofi-bluetooth
|
||||
index 5c52fd8..012e612 100755
|
||||
--- a/rofi-bluetooth
|
||||
+++ b/rofi-bluetooth
|
||||
@@ -33,7 +33,6 @@ power_on() {
|
||||
toggle_power() {
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
- show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
@@ -59,7 +58,6 @@ toggle_scan() {
|
||||
if scan_on; then
|
||||
kill $(pgrep -f "bluetoothctl scan on")
|
||||
bluetoothctl scan off
|
||||
- show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
@@ -83,10 +81,8 @@ pairable_on() {
|
||||
toggle_pairable() {
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
- show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
- show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -105,10 +101,8 @@ discoverable_on() {
|
||||
toggle_discoverable() {
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
- show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
- show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -126,10 +120,8 @@ device_connected() {
|
||||
toggle_connection() {
|
||||
if device_connected $1; then
|
||||
bluetoothctl disconnect $1
|
||||
- device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect $1
|
||||
- device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -183,8 +175,6 @@ toggle_trust() {
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
- printf ''
|
||||
-
|
||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
@@ -202,8 +192,6 @@ print_status() {
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
- else
|
||||
- echo ""
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user