forked from Shinonome/dots-hyprland
add cloudflare warp icon
This commit is contained in:
@@ -121,14 +121,17 @@ export const ModuleCloudflareWarp = async (props = {}) => {
|
||||
enabled: false,
|
||||
},
|
||||
className: 'txt-small sidebar-iconbutton',
|
||||
tooltipText: 'WARP',
|
||||
tooltipText: 'Cloudflare WARP',
|
||||
onClicked: (self) => {
|
||||
self.attribute.enabled = !self.attribute.enabled;
|
||||
self.toggleClassName('sidebar-button-active', self.attribute.enabled);
|
||||
if (self.attribute.enabled) Utils.execAsync('warp-cli connect').catch(print)
|
||||
else Utils.execAsync('warp-cli disconnect').catch(print);
|
||||
},
|
||||
child: MaterialIcon('dns', 'norm'),
|
||||
child: Widget.Icon({
|
||||
icon: 'cloudflare-dns-symbolic',
|
||||
className: 'txt-norm',
|
||||
}),
|
||||
setup: (self) => {
|
||||
setupCursorHover(self);
|
||||
self.attribute.enabled = !exec(`bash -c 'warp-cli status | grep Disconnected'`);
|
||||
|
||||
@@ -85,7 +85,7 @@ const timeRow = Box({
|
||||
|
||||
const togglesBox = Widget.Box({
|
||||
hpack: 'center',
|
||||
className: 'sidebar-togglesbox spacing-h-10',
|
||||
className: 'sidebar-togglesbox spacing-h-5',
|
||||
children: [
|
||||
ToggleIconWifi(),
|
||||
ToggleIconBluetooth(),
|
||||
|
||||
Reference in New Issue
Block a user