[AGS] Fix Bluetooth crashes
This commit is contained in:
		| @@ -114,15 +114,26 @@ const openBTPicker = () => { | ||||
| }; | ||||
|  | ||||
| const BluetoothPickerList = () => { | ||||
|     let btEnableState = readFile("./btconf") === "true" ? true : false; | ||||
|     let btEnableState = false; | ||||
|  | ||||
|     try { | ||||
|         btEnableState = readFile("./btconf") === "true" ? true : false; | ||||
|     } catch (_) { } | ||||
|  | ||||
|     if (bt.get_adapter()) { | ||||
|         print( 'Setting BT state to ' + btEnableState ); | ||||
|         print('Setting BT state to ' + btEnableState); | ||||
|         bt.adapter.set_powered(btEnableState); | ||||
|     } else { | ||||
|         timeout(5000, () => { | ||||
|             if (bt.get_adapter()) { | ||||
|                 print( 'Setting BT state to ' + btEnableState ); | ||||
|                 print('Setting BT state to ' + btEnableState); | ||||
|                 bt.adapter.set_powered(btEnableState); | ||||
|             } else { | ||||
|                 timeout(5000, () => { | ||||
|                     try { | ||||
|                         bt.adapter.set_powered(btEnableState); | ||||
|                     } catch (_) { } | ||||
|                 }) | ||||
|             } | ||||
|         }) | ||||
|     } | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| $fg-color: #E6E6E6; | ||||
| $bg-color: #141414; | ||||
| $accent-color: #B27BD1; | ||||
| $accent-color-2: #5F50A6; | ||||
| $accent-color: #040E1D; | ||||
| $accent-color-2: #0868BA; | ||||
|   | ||||
| @@ -4,10 +4,10 @@ | ||||
| #          ╰────────────────────────────────────────────────╯ | ||||
| # ──────────────────────────────────────────────────────────────────── | ||||
|  | ||||
| exec = swaybg -m fill -i /home/janis/NextCloud/Wallpapers/dark/colour-explosion.jpg | ||||
| exec = swaybg -m fill -i /home/janis/NextCloud/Wallpapers/hyprland/hyprland-pcs.png | ||||
|  | ||||
| general { | ||||
|     col.active_border = rgba(b27bd1cc) rgba(5f50a6cc) rgba(050406cc) 45deg | ||||
|     col.active_border = rgba(040e1dcc) rgba(0868bacc) rgba(0fb3d9cc) 45deg | ||||
|     col.inactive_border = rgb(000000) | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -13,8 +13,10 @@ exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 | ||||
| exec-once = hypridle | ||||
| exec-once = nm-applet | ||||
| exec-once = nextcloud --background | ||||
| exec-once = sleep 2 && bash -c "ags run -d ~/projects/active/dotfiles/config/astal/ --gtk4 >> ~/log 2>&1" | ||||
| exec-once = bash -c "ags run -d ~/projects/active/dotfiles/config/ags/notifications/ >> ~/logn 2>&1" | ||||
| # exec-once = sleep 2 && bash -c "ags run -d ~/projects/active/dotfiles/config/astal/ --gtk4 >> ~/log 2>&1" | ||||
| exec-once = sleep 2 && bash -c "ags run -d ~/projects/active/dotfiles/config/astal/ --gtk4" | ||||
| # exec-once = bash -c "ags run -d ~/projects/active/dotfiles/config/ags/notifications/ >> ~/logn 2>&1" | ||||
| exec-once = bash -c "ags run -d ~/projects/active/dotfiles/config/ags/notifications/" | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -18,7 +18,7 @@ general { | ||||
| # └                                                ┘ | ||||
| background { | ||||
|     monitor =  | ||||
|     path = /home/janis/NextCloud/Wallpapers/dark/mountains.jpg # Or screenshot | ||||
|     path = /home/janis/NextCloud/Wallpapers/dark/colour-splash.jpg # Or screenshot | ||||
|  | ||||
|     blur_passes = 1 | ||||
| } | ||||
| @@ -33,7 +33,7 @@ input-field { | ||||
|     dots_size = 0.33 # Scale of input-field height, 0.2 - 0.8 | ||||
|     dots_spacing = 0.15 # Scale of dots' absolute size, 0.0 - 1.0 | ||||
|     dots_center = false | ||||
|     outer_color = rgb(178, 123, 209) | ||||
|     outer_color = rgb(4, 14, 29) | ||||
|     inner_color = rgb(200, 200, 200) | ||||
|     font_color = rgb(10, 10, 10) | ||||
|     fade_on_empty = true | ||||
|   | ||||
| @@ -25,7 +25,7 @@ button:hover { | ||||
| } | ||||
|  | ||||
| button:focus { | ||||
|     background-color: rgb(178, 123, 209); | ||||
|     background-color: rgb(4, 14, 29); | ||||
|     color: rgb(230, 230, 230); | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user