Update font and power icon.

This commit is contained in:
Jas Singh
2024-06-23 21:46:18 -07:00
parent 42b8948e48
commit f03443a252
12 changed files with 42 additions and 38 deletions

View File

@@ -3,12 +3,12 @@ import { closeAllMenus } from "../bar.js";
const Bluetooth = () => { const Bluetooth = () => {
const btIcon = Widget.Label({ const btIcon = Widget.Label({
label: bluetooth.bind("enabled").as((v) => v ? "󰂯 " : "󰂲 "), label: bluetooth.bind("enabled").as((v) => v ? "󰂯" : "󰂲"),
class_name: "bar-bt_icon", class_name: "bar-bt_icon",
}); });
const btText = Widget.Label({ 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", class_name: "bar-bt_label",
}); });

View File

@@ -1,5 +1,5 @@
const date = Variable("", { 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 = () => { const Clock = () => {

View File

@@ -31,14 +31,14 @@ const Media = () => {
const getIconForPlayer = (playerName) => { const getIconForPlayer = (playerName) => {
const windowTitleMap = [ const windowTitleMap = [
["Mozilla Firefox", "󰈹"], ["Mozilla Firefox", "󰈹 "],
["Microsoft Edge", "󰇩"], ["Microsoft Edge", "󰇩 "],
["(.*)Discord(.*)", ""], ["(.*)Discord(.*)", " "],
["Plex", "󰚺 Plex"], ["Plex", "󰚺 "],
["(.*) Spotify Free", "󰓇"], ["(.*) Spotify Free", "󰓇 "],
["(.*)Spotify Premium", "󰓇"], ["(.*)Spotify Premium", "󰓇 "],
["Spotify", "󰓇"], ["Spotify", "󰓇 "],
["(.*)", "󰝚"], ["(.*)", "󰝚 "],
]; ];
const foundMatch = windowTitleMap.find((wt) => const foundMatch = windowTitleMap.find((wt) =>

View File

@@ -23,6 +23,7 @@ const Network = () => {
return { return {
component: Widget.Box({ component: Widget.Box({
vpack: "center",
class_name: "bar-network", class_name: "bar-network",
children: network children: network
.bind("primary") .bind("primary")

View File

@@ -3,9 +3,9 @@ export const Power = () => {
component: Widget.Box({ component: Widget.Box({
child: Widget.Button({ child: Widget.Button({
class_name: "bar-powermenu", class_name: "bar-powermenu",
child: Widget.Label({ child: Widget.Icon({
class_name: "bar-power_label", class_name: "bar-power_label",
label: "", icon: "system-shutdown-symbolic",
}), }),
}), }),
}), }),

View File

@@ -26,17 +26,20 @@ const Volume = () => {
}; };
const volIcn = Widget.Label({ const volIcn = Widget.Label({
vpack: "center",
label: getIcon(), label: getIcon(),
class_name: "bar-volume_icon", class_name: "bar-volume_icon",
}); });
const volPct = Widget.Label({ const volPct = Widget.Label({
vpack: "center",
label: audio.speaker.bind("volume").as((v) => ` ${Math.floor(v * 100)}%`), label: audio.speaker.bind("volume").as((v) => ` ${Math.floor(v * 100)}%`),
class_name: "bar-volume_percentage", class_name: "bar-volume_percentage",
}); });
return { return {
component: Widget.Box({ component: Widget.Box({
vpack: "center",
class_name: "volume", class_name: "volume",
children: [volIcn, volPct], children: [volIcn, volPct],
}), }),

View File

@@ -1,7 +1,7 @@
@import '../colors'; @import '../colors';
.bar-bt_icon { .bar-bt_icon {
font-size: 1.2em; font-size: 1.15em;
color: $sky; color: $sky;
} }

View File

@@ -2,5 +2,5 @@
.bar-power_label { .bar-power_label {
color: $red; color: $red;
margin-right: 0.2rem; margin-top: 0.2rem;
} }

View File

@@ -1,8 +1,8 @@
* { * {
all: unset; all: unset;
font-family: "JetBrains Mono Nerd Font"; font-family: "Ubuntu";
font-size: 1.15rem; font-size: 1.2rem;
font-weight: bold; font-weight: 600;
} }
//general //general

View File

@@ -1,7 +1,7 @@
@import "../colors"; @import "../colors";
.media-indicator-container { .media-indicator-container {
min-width: 41rem; min-width: 40rem;
min-height: 10rem; min-height: 10rem;
background: $mantle; background: $mantle;
border: 0.25rem solid $surface0; border: 0.25rem solid $surface0;

View File

@@ -1,8 +1,8 @@
* { * {
all: unset; all: unset;
font-family: "JetBrains Mono Nerd Font"; font-family: "Ubuntu";
font-size: 1.15rem; font-size: 1.2rem;
font-weight: bold; font-weight: 600;
} }
menu { menu {
@@ -304,7 +304,7 @@ spinner:checked {
} }
.bar-bt_icon { .bar-bt_icon {
font-size: 1.2em; font-size: 1.15em;
color: #89dceb; color: #89dceb;
} }
@@ -387,7 +387,7 @@ spinner:checked {
.bar-power_label { .bar-power_label {
color: #f38ba8; color: #f38ba8;
margin-right: 0.2rem; margin-top: 0.2rem;
} }
.bar { .bar {
@@ -896,7 +896,7 @@ window#powermenu .powermenu.box {
} }
.media-indicator-container { .media-indicator-container {
min-width: 41rem; min-width: 40rem;
min-height: 10rem; min-height: 10rem;
background: #181825; background: #181825;
border: 0.25rem solid #313244; border: 0.25rem solid #313244;