Update font and power icon.
This commit is contained in:
@@ -3,12 +3,12 @@ import { closeAllMenus } from "../bar.js";
|
||||
|
||||
const Bluetooth = () => {
|
||||
const btIcon = Widget.Label({
|
||||
label: bluetooth.bind("enabled").as((v) => v ? " " : " "),
|
||||
label: bluetooth.bind("enabled").as((v) => v ? "" : ""),
|
||||
class_name: "bar-bt_icon",
|
||||
});
|
||||
|
||||
const btText = Widget.Label({
|
||||
label: bluetooth.bind("enabled").as((v) => v ? "On" : "Off"),
|
||||
label: bluetooth.bind("enabled").as((v) => v ? " On" : " Off"),
|
||||
class_name: "bar-bt_label",
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const date = Variable("", {
|
||||
poll: [1000, 'date "+ %a %b %d %I:%M:%S %p"'],
|
||||
poll: [1000, 'date "+ %a %b %d %I:%M:%S %p"'],
|
||||
});
|
||||
|
||||
const Clock = () => {
|
||||
|
||||
@@ -31,14 +31,14 @@ const Media = () => {
|
||||
|
||||
const getIconForPlayer = (playerName) => {
|
||||
const windowTitleMap = [
|
||||
["Mozilla Firefox", ""],
|
||||
["Microsoft Edge", ""],
|
||||
["(.*)Discord(.*)", ""],
|
||||
["Plex", " Plex"],
|
||||
["(.*) Spotify Free", ""],
|
||||
["(.*)Spotify Premium", ""],
|
||||
["Spotify", ""],
|
||||
["(.*)", ""],
|
||||
["Mozilla Firefox", " "],
|
||||
["Microsoft Edge", " "],
|
||||
["(.*)Discord(.*)", " "],
|
||||
["Plex", " "],
|
||||
["(.*) Spotify Free", " "],
|
||||
["(.*)Spotify Premium", " "],
|
||||
["Spotify", " "],
|
||||
["(.*)", " "],
|
||||
];
|
||||
|
||||
const foundMatch = windowTitleMap.find((wt) =>
|
||||
|
||||
@@ -17,12 +17,13 @@ const Network = () => {
|
||||
|
||||
const wiredIndicator = [
|
||||
Widget.Label({
|
||||
label: network.bind("wired").as(() => " Wired"),
|
||||
label: network.bind("wired").as(() => " Wired"),
|
||||
}),
|
||||
];
|
||||
|
||||
return {
|
||||
component: Widget.Box({
|
||||
vpack: "center",
|
||||
class_name: "bar-network",
|
||||
children: network
|
||||
.bind("primary")
|
||||
|
||||
@@ -3,9 +3,9 @@ export const Power = () => {
|
||||
component: Widget.Box({
|
||||
child: Widget.Button({
|
||||
class_name: "bar-powermenu",
|
||||
child: Widget.Label({
|
||||
child: Widget.Icon({
|
||||
class_name: "bar-power_label",
|
||||
label: "⏻",
|
||||
icon: "system-shutdown-symbolic",
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
|
||||
@@ -26,17 +26,20 @@ const Volume = () => {
|
||||
};
|
||||
|
||||
const volIcn = Widget.Label({
|
||||
vpack: "center",
|
||||
label: getIcon(),
|
||||
class_name: "bar-volume_icon",
|
||||
});
|
||||
|
||||
const volPct = Widget.Label({
|
||||
label: audio.speaker.bind("volume").as((v) => ` ${Math.floor(v * 100)}%`),
|
||||
vpack: "center",
|
||||
label: audio.speaker.bind("volume").as((v) => ` ${Math.floor(v * 100)}%`),
|
||||
class_name: "bar-volume_percentage",
|
||||
});
|
||||
|
||||
return {
|
||||
component: Widget.Box({
|
||||
vpack: "center",
|
||||
class_name: "volume",
|
||||
children: [volIcn, volPct],
|
||||
}),
|
||||
|
||||
@@ -2,17 +2,17 @@ const hyprland = await Service.import("hyprland");
|
||||
|
||||
const filterTitle = (windowtitle) => {
|
||||
const windowTitleMap = [
|
||||
["kitty", " Kitty Terminal"],
|
||||
["firefox", " Firefox"],
|
||||
["microsoft-edge", " Edge"],
|
||||
["discord", " Discord"],
|
||||
["org.kde.dolphin", " Dolphin"],
|
||||
["plex", " Plex"],
|
||||
["steam", " Steam"],
|
||||
["", " Desktop"],
|
||||
["spotify", " Spotify"],
|
||||
["obsidian", " Obsidian"],
|
||||
["(.+)", ` ${windowtitle.class.charAt(0).toUpperCase() + windowtitle.class.slice(1)}`],
|
||||
["kitty", " Kitty Terminal"],
|
||||
["firefox", " Firefox"],
|
||||
["microsoft-edge", " Edge"],
|
||||
["discord", " Discord"],
|
||||
["org.kde.dolphin", " Dolphin"],
|
||||
["plex", " Plex"],
|
||||
["steam", " Steam"],
|
||||
["", " Desktop"],
|
||||
["spotify", " Spotify"],
|
||||
["obsidian", " Obsidian"],
|
||||
["(.+)", ` ${windowtitle.class.charAt(0).toUpperCase() + windowtitle.class.slice(1)}`],
|
||||
];
|
||||
|
||||
const foundMatch = windowTitleMap.find((wt) =>
|
||||
|
||||
Reference in New Issue
Block a user