Fix NerdFont icon alignments. (#143)
* WIP * Fix nerdfont icon alignments * Ship needed fonts * Remove italicised fonts * Update readme and separate OSD settings into their own category. * Dashboard styling updates --------- Co-authored-by: matavach <erik@matijevich.org>
This commit is contained in:
@@ -3,6 +3,9 @@ A panel built for Hyprland with [Aylur's Gtk Shell](https://github.com/Aylur/ags
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Installation
|
||||||
|
The [HyprPanel Wiki](https://hyprpanel.com/getting_started/installation.html) contains in depth instructions for installing the panel and all of its dependencies. The instructions below are general instructions for installing the panel.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
Bun
|
Bun
|
||||||
|
|
||||||
|
|||||||
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Bold.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Bold.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-ExtraBold.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-ExtraBold.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-ExtraLight.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-ExtraLight.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Light.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Light.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Medium.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Medium.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Regular.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Regular.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-SemiBold.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-SemiBold.ttf
Normal file
Binary file not shown.
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Thin.ttf
Normal file
BIN
assets/fonts/JetBrainsMonoNerdFontPropo-Thin.ttf
Normal file
Binary file not shown.
@@ -33,7 +33,7 @@ try {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (v.ags[1] < v.expect[1] || v.ags[2] < v.expect[2]) {
|
if (v.ags[1] < v.expect[1] || v.ags[2] < v.expect[2]) {
|
||||||
print(`my config needs at least v${v.expect.join(".")}, yours is v${v.ags.join(".")}`)
|
print(`HyprPanel needs atleast v${v.expect.join(".")} of AGS, yours is v${v.ags.join(".")}`)
|
||||||
App.quit()
|
App.quit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
28
install_fonts.sh
Executable file
28
install_fonts.sh
Executable file
@@ -0,0 +1,28 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
SOURCE_DIR="./assets/fonts"
|
||||||
|
DEST_DIR="$HOME/.local/share/fonts"
|
||||||
|
DEST_PATH="$DEST_DIR/NFP"
|
||||||
|
|
||||||
|
if [ ! -d "$SOURCE_DIR" ]; then
|
||||||
|
echo "Source directory '$SOURCE_DIR' does not exist."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$DEST_PATH" ]; then
|
||||||
|
echo "Destination directory '$DEST_PATH' does not exist. Creating it..."
|
||||||
|
mkdir -p "$DEST_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$(ls -A "$SOURCE_DIR")" ]; then
|
||||||
|
echo "Source directory '$SOURCE_DIR' is empty. No files to copy."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Copying fonts from '$SOURCE_DIR' to '$DEST_PATH'..."
|
||||||
|
cp -r "$SOURCE_DIR"/* "$DEST_PATH"
|
||||||
|
|
||||||
|
echo "Updating font cache..."
|
||||||
|
fc-cache -fv
|
||||||
|
|
||||||
|
echo "Fonts installed successfully."
|
||||||
@@ -6,7 +6,7 @@ import { openMenu } from "../utils.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-button-icon bluetooth",
|
class_name: "bar-button-icon bluetooth txt-icon bar",
|
||||||
});
|
});
|
||||||
|
|
||||||
const btText = Widget.Label({
|
const btText = Widget.Label({
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const Media = () => {
|
|||||||
child: Widget.Box({
|
child: Widget.Box({
|
||||||
children: [
|
children: [
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
class_name: "bar-button-icon media",
|
class_name: "bar-button-icon media txt-icon bar",
|
||||||
label: songIcon.bind("value").as(v => v || ""),
|
label: songIcon.bind("value").as(v => v || ""),
|
||||||
}),
|
}),
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ const Menu = () => {
|
|||||||
return {
|
return {
|
||||||
component: Widget.Box({
|
component: Widget.Box({
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "bar-menu_label",
|
class_name: "bar-menu_label txt-icon bar",
|
||||||
label: options.bar.launcher.icon.bind("value"),
|
label: options.bar.launcher.icon.bind("value"),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export const Notifications = () => {
|
|||||||
(notif, dnd, showTotal) => {
|
(notif, dnd, showTotal) => {
|
||||||
const notifIcon = Widget.Label({
|
const notifIcon = Widget.Label({
|
||||||
hpack: "center",
|
hpack: "center",
|
||||||
class_name: "bar-button-icon notifications",
|
class_name: "bar-button-icon notifications txt-icon bar",
|
||||||
label: dnd ? "" : notif.length > 0 ? "" : "",
|
label: dnd ? "" : notif.length > 0 ? "" : "",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ const audio = await Service.import("audio");
|
|||||||
import { openMenu } from "../utils.js";
|
import { openMenu } from "../utils.js";
|
||||||
import options from "options";
|
import options from "options";
|
||||||
|
|
||||||
import { globalMousePos } from "globals.js";
|
|
||||||
|
|
||||||
const Volume = () => {
|
const Volume = () => {
|
||||||
const icons = {
|
const icons = {
|
||||||
101: "",
|
101: "",
|
||||||
@@ -30,7 +28,7 @@ const Volume = () => {
|
|||||||
const volIcn = Widget.Label({
|
const volIcn = Widget.Label({
|
||||||
vpack: "center",
|
vpack: "center",
|
||||||
label: getIcon(),
|
label: getIcon(),
|
||||||
class_name: "bar-button-icon volume",
|
class_name: "bar-button-icon volume txt-icon bar",
|
||||||
});
|
});
|
||||||
|
|
||||||
const volPct = Widget.Label({
|
const volPct = Widget.Label({
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const ClientTitle = () => {
|
|||||||
component: Widget.Box({
|
component: Widget.Box({
|
||||||
children: [
|
children: [
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
class_name: "bar-button-icon windowtitle",
|
class_name: "bar-button-icon windowtitle txt-icon bar",
|
||||||
label: hyprland.active.bind("client").as((v) => filterTitle(v).icon),
|
label: hyprland.active.bind("client").as((v) => filterTitle(v).icon),
|
||||||
}),
|
}),
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ const Workspaces = (monitor = -1, ws = 8) => {
|
|||||||
],
|
],
|
||||||
(show_icons, show_numbered, numbered_active_indicator) => {
|
(show_icons, show_numbered, numbered_active_indicator) => {
|
||||||
if (show_icons) {
|
if (show_icons) {
|
||||||
return `workspace-icon`;
|
return `workspace-icon txt-icon bar`;
|
||||||
}
|
}
|
||||||
if (show_numbered) {
|
if (show_numbered) {
|
||||||
const numActiveInd = hyprland.active.workspace.id === i
|
const numActiveInd = hyprland.active.workspace.id === i
|
||||||
|
|||||||
@@ -37,8 +37,8 @@ const renderInputDevices = (inputDevices: Stream[]) => {
|
|||||||
.bind("description")
|
.bind("description")
|
||||||
.as((v) =>
|
.as((v) =>
|
||||||
device.description === v
|
device.description === v
|
||||||
? "menu-button-icon active input"
|
? "menu-button-icon active input txt-icon"
|
||||||
: "menu-button-icon input",
|
: "menu-button-icon input txt-icon",
|
||||||
),
|
),
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ const renderPlaybacks = (playbackDevices: Stream[]) => {
|
|||||||
.bind("description")
|
.bind("description")
|
||||||
.as((v) =>
|
.as((v) =>
|
||||||
device.description === v
|
device.description === v
|
||||||
? "menu-button-icon active playback"
|
? "menu-button-icon active playback txt-icon"
|
||||||
: "menu-button-icon playback",
|
: "menu-button-icon playback txt-icon",
|
||||||
),
|
),
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const connectedControls = (dev: BluetoothDevice, connectedDevices: BluetoothDevi
|
|||||||
class_name: "menu-icon-button unpair bluetooth",
|
class_name: "menu-icon-button unpair bluetooth",
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
tooltip_text: dev.paired ? "Unpair" : "Pair",
|
tooltip_text: dev.paired ? "Unpair" : "Pair",
|
||||||
class_name: "menu-icon-button-label unpair bluetooth",
|
class_name: "menu-icon-button-label unpair bluetooth txt-icon",
|
||||||
label: dev.paired ? "" : "",
|
label: dev.paired ? "" : "",
|
||||||
}),
|
}),
|
||||||
on_primary_click: () =>
|
on_primary_click: () =>
|
||||||
@@ -32,7 +32,7 @@ const connectedControls = (dev: BluetoothDevice, connectedDevices: BluetoothDevi
|
|||||||
class_name: "menu-icon-button disconnect bluetooth",
|
class_name: "menu-icon-button disconnect bluetooth",
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
tooltip_text: dev.connected ? "Disconnect" : "Connect",
|
tooltip_text: dev.connected ? "Disconnect" : "Connect",
|
||||||
class_name: "menu-icon-button-label disconnect bluetooth",
|
class_name: "menu-icon-button-label disconnect bluetooth txt-icon",
|
||||||
label: dev.connected ? "" : "",
|
label: dev.connected ? "" : "",
|
||||||
}),
|
}),
|
||||||
on_primary_click: () => dev.setConnection(!dev.connected),
|
on_primary_click: () => dev.setConnection(!dev.connected),
|
||||||
@@ -41,7 +41,7 @@ const connectedControls = (dev: BluetoothDevice, connectedDevices: BluetoothDevi
|
|||||||
class_name: "menu-icon-button untrust bluetooth",
|
class_name: "menu-icon-button untrust bluetooth",
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
tooltip_text: dev.trusted ? "Untrust" : "Trust",
|
tooltip_text: dev.trusted ? "Untrust" : "Trust",
|
||||||
class_name: "menu-icon-button-label untrust bluetooth",
|
class_name: "menu-icon-button-label untrust bluetooth txt-icon",
|
||||||
label: dev.trusted ? "" : "",
|
label: dev.trusted ? "" : "",
|
||||||
}),
|
}),
|
||||||
on_primary_click: () =>
|
on_primary_click: () =>
|
||||||
@@ -60,7 +60,7 @@ const connectedControls = (dev: BluetoothDevice, connectedDevices: BluetoothDevi
|
|||||||
class_name: "menu-icon-button delete bluetooth",
|
class_name: "menu-icon-button delete bluetooth",
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
tooltip_text: "Forget",
|
tooltip_text: "Forget",
|
||||||
class_name: "menu-icon-button-label delete bluetooth",
|
class_name: "menu-icon-button-label delete bluetooth txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
on_primary_click: () => {
|
on_primary_click: () => {
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ const devices = (bluetooth: Bluetooth, self: Box<any, any>) => {
|
|||||||
children: [
|
children: [
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
vpack: "start",
|
vpack: "start",
|
||||||
class_name: `menu-button-icon bluetooth ${conDevNames.includes(device.address) ? "active" : ""}`,
|
class_name: `menu-button-icon bluetooth ${conDevNames.includes(device.address) ? "active" : ""} txt-icon`,
|
||||||
label: getBluetoothIcon(`${device["icon-name"]}-symbolic`),
|
label: getBluetoothIcon(`${device["icon-name"]}-symbolic`),
|
||||||
}),
|
}),
|
||||||
Widget.Box({
|
Widget.Box({
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ export const TodayStats = (theWeather: Variable<Weather>) => {
|
|||||||
class_name: "weather wind",
|
class_name: "weather wind",
|
||||||
children: [
|
children: [
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
class_name: "weather wind icon",
|
class_name: "weather wind icon txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
@@ -37,7 +37,7 @@ export const TodayStats = (theWeather: Variable<Weather>) => {
|
|||||||
class_name: "weather precip",
|
class_name: "weather precip",
|
||||||
children: [
|
children: [
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
class_name: "weather precip icon",
|
class_name: "weather precip icon txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export const TodayTemperature = (theWeather: Variable<Weather>) => {
|
|||||||
.bind("value")
|
.bind("value")
|
||||||
.as(
|
.as(
|
||||||
(v) =>
|
(v) =>
|
||||||
`calendar-menu-weather today temp label icon ${getIcon(Math.ceil(v.current.temp_f)).color}`,
|
`calendar-menu-weather today temp label icon txt-icon ${getIcon(Math.ceil(v.current.temp_f)).color}`,
|
||||||
),
|
),
|
||||||
label: theWeather
|
label: theWeather
|
||||||
.bind("value")
|
.bind("value")
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ const Controls = () => {
|
|||||||
},
|
},
|
||||||
on_primary_click: () => network.toggleWifi(),
|
on_primary_click: () => network.toggleWifi(),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
self.hook(network, () => {
|
self.hook(network, () => {
|
||||||
return (self.label = network.wifi.enabled ? "" : "");
|
return (self.label = network.wifi.enabled ? "" : "");
|
||||||
@@ -37,6 +38,7 @@ const Controls = () => {
|
|||||||
),
|
),
|
||||||
on_primary_click: () => bluetooth.toggle(),
|
on_primary_click: () => bluetooth.toggle(),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
label: bluetooth.bind("enabled").as((btOn) => (btOn ? "" : "")),
|
label: bluetooth.bind("enabled").as((btOn) => (btOn ? "" : "")),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -50,6 +52,7 @@ const Controls = () => {
|
|||||||
),
|
),
|
||||||
on_primary_click: () => (notifications.dnd = !notifications.dnd),
|
on_primary_click: () => (notifications.dnd = !notifications.dnd),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
label: notifications.bind("dnd").as((dnd) => (dnd ? "" : "")),
|
label: notifications.bind("dnd").as((dnd) => (dnd ? "" : "")),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -64,6 +67,7 @@ const Controls = () => {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
self.hook(audio, () => {
|
self.hook(audio, () => {
|
||||||
return (self.label = audio.speaker.is_muted ? "" : "");
|
return (self.label = audio.speaker.is_muted ? "" : "");
|
||||||
@@ -82,6 +86,7 @@ const Controls = () => {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
setup: (self) => {
|
setup: (self) => {
|
||||||
self.hook(audio, () => {
|
self.hook(audio, () => {
|
||||||
return (self.label = audio.microphone.is_muted ? "" : "");
|
return (self.label = audio.microphone.is_muted ? "" : "");
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ const Shortcuts = () => {
|
|||||||
.bind("value")
|
.bind("value")
|
||||||
.as((cmd) => () => handleClick(cmd)),
|
.as((cmd) => () => handleClick(cmd)),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: left.shortcut1.icon.bind("value"),
|
label: left.shortcut1.icon.bind("value"),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -99,7 +99,7 @@ const Shortcuts = () => {
|
|||||||
.bind("value")
|
.bind("value")
|
||||||
.as((cmd) => () => handleClick(cmd)),
|
.as((cmd) => () => handleClick(cmd)),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: left.shortcut2.icon.bind("value"),
|
label: left.shortcut2.icon.bind("value"),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -117,7 +117,7 @@ const Shortcuts = () => {
|
|||||||
.as((cmd) => () => handleClick(cmd)),
|
.as((cmd) => () => handleClick(cmd)),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
hpack: "center",
|
hpack: "center",
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: left.shortcut3.icon.bind("value"),
|
label: left.shortcut3.icon.bind("value"),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -128,7 +128,7 @@ const Shortcuts = () => {
|
|||||||
.bind("value")
|
.bind("value")
|
||||||
.as((cmd) => () => handleClick(cmd)),
|
.as((cmd) => () => handleClick(cmd)),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: left.shortcut4.icon.bind("value"),
|
label: left.shortcut4.icon.bind("value"),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -152,7 +152,7 @@ const Shortcuts = () => {
|
|||||||
.bind("value")
|
.bind("value")
|
||||||
.as((cmd) => () => handleClick(cmd)),
|
.as((cmd) => () => handleClick(cmd)),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: right.shortcut1.icon.bind("value"),
|
label: right.shortcut1.icon.bind("value"),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -164,7 +164,7 @@ const Shortcuts = () => {
|
|||||||
App.toggleWindow("settings-dialog");
|
App.toggleWindow("settings-dialog");
|
||||||
},
|
},
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -181,7 +181,7 @@ const Shortcuts = () => {
|
|||||||
.bind("value")
|
.bind("value")
|
||||||
.as((cmd) => () => handleClick(cmd)),
|
.as((cmd) => () => handleClick(cmd)),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: right.shortcut3.icon.bind("value"),
|
label: right.shortcut3.icon.bind("value"),
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
@@ -206,7 +206,7 @@ const Shortcuts = () => {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "button-label",
|
class_name: "button-label txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -128,7 +128,10 @@ const Stats = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
|
})
|
||||||
}),
|
}),
|
||||||
Widget.Button({
|
Widget.Button({
|
||||||
on_primary_click: terminal.bind("value").as(term => {
|
on_primary_click: terminal.bind("value").as(term => {
|
||||||
@@ -227,7 +230,10 @@ const Stats = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
|
})
|
||||||
}),
|
}),
|
||||||
Widget.Button({
|
Widget.Button({
|
||||||
on_primary_click: terminal.bind("value").as(term => {
|
on_primary_click: terminal.bind("value").as(term => {
|
||||||
@@ -273,7 +279,10 @@ const Stats = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
|
})
|
||||||
}),
|
}),
|
||||||
Widget.Button({
|
Widget.Button({
|
||||||
on_primary_click: terminal.bind("value").as(term => {
|
on_primary_click: terminal.bind("value").as(term => {
|
||||||
@@ -318,7 +327,10 @@ const Stats = () => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
|
})
|
||||||
}),
|
}),
|
||||||
Widget.Button({
|
Widget.Button({
|
||||||
on_primary_click: terminal.bind("value").as(term => {
|
on_primary_click: terminal.bind("value").as(term => {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ const renderWAPs = (self: any, network: Network, staging: Variable<AccessPoint>,
|
|||||||
children: [
|
children: [
|
||||||
Widget.Label({
|
Widget.Label({
|
||||||
vpack: "start",
|
vpack: "start",
|
||||||
class_name: `network-icon wifi ${ap.ssid === network.wifi.ssid ? "active" : ""}`,
|
class_name: `network-icon wifi ${ap.ssid === network.wifi.ssid ? "active" : ""} txt-icon`,
|
||||||
label: getWifiIcon(`${ap["iconName"]}`),
|
label: getWifiIcon(`${ap["iconName"]}`),
|
||||||
}),
|
}),
|
||||||
Widget.Box({
|
Widget.Box({
|
||||||
@@ -202,6 +202,7 @@ const renderWAPs = (self: any, network: Network, staging: Variable<AccessPoint>,
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon delete-network",
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ const Controls = (notifs) => {
|
|||||||
children: [
|
children: [
|
||||||
Widget.Switch({
|
Widget.Switch({
|
||||||
class_name: "menu-switch notifications",
|
class_name: "menu-switch notifications",
|
||||||
|
vpack: "center",
|
||||||
active: notifs.bind("dnd").as((dnd: boolean) => !dnd),
|
active: notifs.bind("dnd").as((dnd: boolean) => !dnd),
|
||||||
on_activate: ({ active }) => {
|
on_activate: ({ active }) => {
|
||||||
notifs.dnd = !active;
|
notifs.dnd = !active;
|
||||||
@@ -41,7 +42,7 @@ const Controls = (notifs) => {
|
|||||||
tooltip_text: "Clear Notifications",
|
tooltip_text: "Clear Notifications",
|
||||||
on_primary_click: () => notifs.clear(),
|
on_primary_click: () => notifs.clear(),
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "clear-notifications-label",
|
class_name: "clear-notifications-label txt-icon",
|
||||||
label: "",
|
label: "",
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export const CloseButton = (notif: Notification, notifs: Notifications) => {
|
|||||||
notifs.CloseNotification(notif.id);
|
notifs.CloseNotification(notif.id);
|
||||||
},
|
},
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon notif-close",
|
||||||
label: "",
|
label: "",
|
||||||
hpack: "center",
|
hpack: "center",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ export const CloseButton = (notif: Notification, notifs: Notifications) => {
|
|||||||
notifs.CloseNotification(notif.id);
|
notifs.CloseNotification(notif.id);
|
||||||
},
|
},
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
|
class_name: "txt-icon notif-close",
|
||||||
label: "",
|
label: "",
|
||||||
hpack: "center",
|
hpack: "center",
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export const OSDIcon = (ort: OSDOrientation) => {
|
|||||||
class_name: "osd-icon-container",
|
class_name: "osd-icon-container",
|
||||||
hexpand: true,
|
hexpand: true,
|
||||||
child: Widget.Label({
|
child: Widget.Label({
|
||||||
class_name: "osd-icon",
|
class_name: "osd-icon txt-icon",
|
||||||
hexpand: true,
|
hexpand: true,
|
||||||
vexpand: true,
|
vexpand: true,
|
||||||
hpack: "center",
|
hpack: "center",
|
||||||
|
|||||||
@@ -11,6 +11,9 @@
|
|||||||
@import "style/common/floating-widget.scss";
|
@import "style/common/floating-widget.scss";
|
||||||
@import "style/common/widget-button.scss";
|
@import "style/common/widget-button.scss";
|
||||||
|
|
||||||
|
//general styles
|
||||||
|
@import "style/common/general";
|
||||||
|
|
||||||
//modules - bar
|
//modules - bar
|
||||||
@import "style/bar/menu";
|
@import "style/bar/menu";
|
||||||
@import "style/bar/audio";
|
@import "style/bar/audio";
|
||||||
@@ -46,6 +49,3 @@
|
|||||||
|
|
||||||
//settings dialog
|
//settings dialog
|
||||||
@import "style/settings/dialog";
|
@import "style/settings/dialog";
|
||||||
|
|
||||||
//general styles
|
|
||||||
@import "style/common/general";
|
|
||||||
|
|||||||
@@ -1,5 +1,27 @@
|
|||||||
@import '../colors.scss';
|
@import '../colors.scss';
|
||||||
|
|
||||||
|
.txt-icon {
|
||||||
|
font-family: "JetBrainsMono Nerd Font Propo", monospace;
|
||||||
|
font-size: 1.5em;
|
||||||
|
|
||||||
|
&.bluetooth {
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.playback {
|
||||||
|
font-size: 1.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.input {
|
||||||
|
font-size: 1.3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.bar.txt-icon {
|
||||||
|
font-family: "JetBrainsMono Nerd Font Propo", monospace;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
window.popup {
|
window.popup {
|
||||||
opacity: $bar-menus-opacity/100;
|
opacity: $bar-menus-opacity/100;
|
||||||
|
|
||||||
|
|||||||
@@ -166,3 +166,13 @@
|
|||||||
.hourly-weather-temp {
|
.hourly-weather-temp {
|
||||||
color: if($bar-menus-monochrome, $bar-menus-label, $bar-menus-menu-clock-weather-hourly-temperature);
|
color: if($bar-menus-monochrome, $bar-menus-label, $bar-menus-menu-clock-weather-hourly-temperature);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.weather.precip.icon {
|
||||||
|
min-width: 1em;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.weather.wind.icon {
|
||||||
|
min-width: 1em;
|
||||||
|
font-size: 1em;
|
||||||
|
}
|
||||||
|
|||||||
@@ -127,10 +127,6 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
|
||||||
font-size: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.record.active {
|
&.record.active {
|
||||||
background: if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-shortcuts-recording);
|
background: if($bar-menus-monochrome, $bar-menus-buttons-default, $bar-menus-menu-dashboard-shortcuts-recording);
|
||||||
|
|
||||||
@@ -156,6 +152,7 @@
|
|||||||
button {
|
button {
|
||||||
padding: 0em;
|
padding: 0em;
|
||||||
min-height: 3em;
|
min-height: 3em;
|
||||||
|
min-width: 3.8em;
|
||||||
|
|
||||||
label {
|
label {
|
||||||
color: if($bar-menus-monochrome, $bar-menus-buttons-text, $bar-menus-menu-dashboard-controls-wifi-text);
|
color: if($bar-menus-monochrome, $bar-menus-buttons-text, $bar-menus-menu-dashboard-controls-wifi-text);
|
||||||
@@ -287,8 +284,9 @@
|
|||||||
|
|
||||||
.stat {
|
.stat {
|
||||||
label {
|
label {
|
||||||
margin-right: 1em;
|
margin-right: 0.75em;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
min-width: 1.65em;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.cpu label {
|
&.cpu label {
|
||||||
|
|||||||
@@ -5,7 +5,25 @@ outputFile="snapshot_$(date +%Y-%m-%d_%H-%M-%S).png"
|
|||||||
outputPath="$outputDir/$outputFile"
|
outputPath="$outputDir/$outputFile"
|
||||||
mkdir -p "$outputDir"
|
mkdir -p "$outputDir"
|
||||||
|
|
||||||
if grimblast copysave area "$outputPath"; then
|
mode=$1
|
||||||
|
|
||||||
|
case "$mode" in
|
||||||
|
active)
|
||||||
|
command="grimblast copysave active $outputPath"
|
||||||
|
;;
|
||||||
|
output)
|
||||||
|
command="grimblast copysave output $outputPath"
|
||||||
|
;;
|
||||||
|
area)
|
||||||
|
command="grimblast copysave area $outputPath"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {active|output|area}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
if eval "$command"; then
|
||||||
recentFile=$(ls -t "$outputDir"/snapshot_*.png | head -n 1)
|
recentFile=$(ls -t "$outputDir"/snapshot_*.png | head -n 1)
|
||||||
notify-send "Grimblast" "Your snapshot has been saved." \
|
notify-send "Grimblast" "Your snapshot has been saved." \
|
||||||
-i video-x-generic \
|
-i video-x-generic \
|
||||||
|
|||||||
@@ -23,15 +23,6 @@ export const BarGeneral = () => {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
Option({ opt: options.terminal, title: 'Terminal', subtitle: "Tools such as 'btop' will open in this terminal", type: 'string' }),
|
Option({ opt: options.terminal, title: 'Terminal', subtitle: "Tools such as 'btop' will open in this terminal", type: 'string' }),
|
||||||
|
|
||||||
Header('On Screen Display'),
|
|
||||||
Option({ opt: options.theme.osd.enable, title: 'Enabled', type: 'boolean' }),
|
|
||||||
Option({ opt: options.theme.osd.orientation, title: 'Orientation', type: 'enum', enums: ["horizontal", "vertical"] }),
|
|
||||||
Option({ opt: options.theme.osd.location, title: 'Position', subtitle: 'Position of the OSD on the screen', type: 'enum', enums: ["top left", "top", "top right", "right", "bottom right", "bottom", "bottom left", "left"] }),
|
|
||||||
Option({ opt: options.theme.osd.monitor, title: 'Monitor', subtitle: 'The ID of the monitor on which to display the OSD', type: 'number' }),
|
|
||||||
Option({ opt: options.theme.osd.active_monitor, title: 'Follow Cursor', subtitle: 'The OSD will follow the monitor of your cursor', type: 'boolean' }),
|
|
||||||
Option({ opt: options.theme.osd.radius, title: 'Radius', subtitle: 'Radius of the on-screen-display that indicates volume/brightness change', type: 'string' }),
|
|
||||||
Option({ opt: options.theme.osd.margins, title: 'Margins', subtitle: 'Margins in the following format: top right bottom left', type: 'string' }),
|
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,14 +3,16 @@ import { BarSettings } from "./bar/index";
|
|||||||
import { ClockMenuSettings } from "./menus/clock";
|
import { ClockMenuSettings } from "./menus/clock";
|
||||||
import { DashboardMenuSettings } from "./menus/dashboard";
|
import { DashboardMenuSettings } from "./menus/dashboard";
|
||||||
import { NotificationSettings } from "./notifications/index";
|
import { NotificationSettings } from "./notifications/index";
|
||||||
|
import { OSDSettings } from "./osd/index";
|
||||||
|
|
||||||
type Page = "General" | "Bar" | "Clock Menu" | "Dashboard Menu" | "Notifications";
|
type Page = "General" | "Bar" | "Clock Menu" | "Dashboard Menu" | "Notifications" | "OSD";
|
||||||
const CurrentPage = Variable<Page>("General");
|
const CurrentPage = Variable<Page>("General");
|
||||||
|
|
||||||
const pagerMap: Page[] = [
|
const pagerMap: Page[] = [
|
||||||
"General",
|
"General",
|
||||||
"Bar",
|
"Bar",
|
||||||
"Notifications",
|
"Notifications",
|
||||||
|
"OSD",
|
||||||
"Clock Menu",
|
"Clock Menu",
|
||||||
"Dashboard Menu",
|
"Dashboard Menu",
|
||||||
]
|
]
|
||||||
@@ -40,6 +42,7 @@ export const SettingsMenu = () => {
|
|||||||
"General": BarGeneral(),
|
"General": BarGeneral(),
|
||||||
"Bar": BarSettings(),
|
"Bar": BarSettings(),
|
||||||
"Notifications": NotificationSettings(),
|
"Notifications": NotificationSettings(),
|
||||||
|
"OSD": OSDSettings(),
|
||||||
"Clock Menu": ClockMenuSettings(),
|
"Clock Menu": ClockMenuSettings(),
|
||||||
"Dashboard Menu": DashboardMenuSettings(),
|
"Dashboard Menu": DashboardMenuSettings(),
|
||||||
},
|
},
|
||||||
|
|||||||
21
widget/settings/pages/config/osd/index.ts
Normal file
21
widget/settings/pages/config/osd/index.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
import { Option } from "widget/settings/shared/Option";
|
||||||
|
import { Header } from "widget/settings/shared/Header";
|
||||||
|
|
||||||
|
import options from "options";
|
||||||
|
|
||||||
|
export const OSDSettings = () => {
|
||||||
|
return Widget.Box({
|
||||||
|
class_name: "bar-theme-page paged-container",
|
||||||
|
vertical: true,
|
||||||
|
children: [
|
||||||
|
Header('On Screen Display'),
|
||||||
|
Option({ opt: options.theme.osd.enable, title: 'Enabled', type: 'boolean' }),
|
||||||
|
Option({ opt: options.theme.osd.orientation, title: 'Orientation', type: 'enum', enums: ["horizontal", "vertical"] }),
|
||||||
|
Option({ opt: options.theme.osd.location, title: 'Position', subtitle: 'Position of the OSD on the screen', type: 'enum', enums: ["top left", "top", "top right", "right", "bottom right", "bottom", "bottom left", "left"] }),
|
||||||
|
Option({ opt: options.theme.osd.monitor, title: 'Monitor', subtitle: 'The ID of the monitor on which to display the OSD', type: 'number' }),
|
||||||
|
Option({ opt: options.theme.osd.active_monitor, title: 'Follow Cursor', subtitle: 'The OSD will follow the monitor of your cursor', type: 'boolean' }),
|
||||||
|
Option({ opt: options.theme.osd.radius, title: 'Radius', subtitle: 'Radius of the on-screen-display that indicates volume/brightness change', type: 'string' }),
|
||||||
|
Option({ opt: options.theme.osd.margins, title: 'Margins', subtitle: 'Margins in the following format: top right bottom left', type: 'string' }),
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user