Merge branch 'master' into master
This commit is contained in:
@@ -81,7 +81,7 @@
|
||||
if [ "$#" -eq 0 ]; then
|
||||
exec ${self.packages.${final.stdenv.system}.default}/bin/hyprpanel
|
||||
else
|
||||
exec ${ags.packages.${final.stdenv.system}.io}/bin/astal -i hyprpanel "$@"
|
||||
exec ${ags.packages.${final.stdenv.system}.io}/bin/astal -i hyprpanel "$*"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
@@ -25,6 +25,8 @@ let
|
||||
mkStrOption = default: mkOption { type = types.str; default = default; };
|
||||
mkIntOption = default: mkOption { type = types.int; default = default; };
|
||||
mkBoolOption = default: mkOption { type = types.bool; default = default; };
|
||||
mkStrListOption = default: mkOption { type = types.listOf types.str; default = default; };
|
||||
mkFloatOption = default: mkOption { type = types.float; default = default; };
|
||||
|
||||
# TODO: Please merge https://github.com/Jas-SinghFSU/HyprPanel/pull/497
|
||||
# Do not ask what these do...
|
||||
@@ -151,6 +153,25 @@ in
|
||||
bar.clock.scrollUp = mkStrOption "";
|
||||
bar.clock.showIcon = mkBoolOption true;
|
||||
bar.clock.showTime = mkBoolOption true;
|
||||
bar.customModules.cava.showIcon = mkBoolOption true;
|
||||
bar.customModules.cava.icon = mkStrOption "";
|
||||
bar.customModules.cava.spaceCharacter = mkStrOption " ";
|
||||
bar.customModules.cava.barCharacters = mkStrListOption [ "▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ];
|
||||
bar.customModules.cava.showActiveOnly = mkBoolOption false;
|
||||
bar.customModules.cava.bars = mkIntOption 10;
|
||||
bar.customModules.cava.channels = mkIntOption 2;
|
||||
bar.customModules.cava.framerate = mkIntOption 60;
|
||||
bar.customModules.cava.samplerate = mkIntOption 44100;
|
||||
bar.customModules.cava.autoSensitivity = mkBoolOption true;
|
||||
bar.customModules.cava.lowCutoff = mkIntOption 50;
|
||||
bar.customModules.cava.highCutoff = mkIntOption 10000;
|
||||
bar.customModules.cava.noiseReduction = mkFloatOption 0.77;
|
||||
bar.customModules.cava.stereo = mkBoolOption false;
|
||||
bar.customModules.cava.leftClick = mkStrOption "";
|
||||
bar.customModules.cava.rightClick = mkStrOption "";
|
||||
bar.customModules.cava.middleClick = mkStrOption "";
|
||||
bar.customModules.cava.scrollUp = mkStrOption "";
|
||||
bar.customModules.cava.scrollDown = mkStrOption "";
|
||||
bar.customModules.cpu.icon = mkStrOption "";
|
||||
bar.customModules.cpu.label = mkBoolOption true;
|
||||
bar.customModules.cpu.leftClick = mkStrOption "";
|
||||
|
||||
@@ -38,7 +38,13 @@ const Bluetooth = (): BarBoxChild => {
|
||||
);
|
||||
|
||||
const componentBinding = Variable.derive(
|
||||
[bind(options.bar.bluetooth.label), bind(bluetoothService, 'isPowered'), bind(bluetoothService, 'devices')],
|
||||
[
|
||||
bind(options.bar.bluetooth.label),
|
||||
bind(bluetoothService, 'isPowered'),
|
||||
bind(bluetoothService, 'devices'),
|
||||
|
||||
bind(bluetoothService, 'isConnected'),
|
||||
],
|
||||
(showLabel: boolean, isPowered: boolean, devices: AstalBluetooth.Device[]): JSX.Element => {
|
||||
if (showLabel) {
|
||||
return (
|
||||
|
||||
@@ -7,12 +7,11 @@ import { BarBoxChild } from 'src/lib/types/bar.js';
|
||||
import { runAsyncCommand, throttledScrollHandler } from 'src/components/bar/utils/helpers.js';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { onMiddleClick, onPrimaryClick, onScroll, onSecondaryClick } from 'src/lib/shared/eventHandlers';
|
||||
import { notifdService } from 'src/lib/constants/services';
|
||||
|
||||
const { show_total, rightClick, middleClick, scrollUp, scrollDown, hideCountWhenZero } = options.bar.notifications;
|
||||
const { ignore } = options.notifications;
|
||||
|
||||
const notifs = AstalNotifd.get_default();
|
||||
|
||||
export const Notifications = (): BarBoxChild => {
|
||||
const componentClassName = Variable.derive(
|
||||
[bind(options.theme.bar.buttons.style), bind(show_total)],
|
||||
@@ -29,8 +28,8 @@ export const Notifications = (): BarBoxChild => {
|
||||
|
||||
const boxChildren = Variable.derive(
|
||||
[
|
||||
bind(notifs, 'notifications'),
|
||||
bind(notifs, 'dontDisturb'),
|
||||
bind(notifdService, 'notifications'),
|
||||
bind(notifdService, 'dontDisturb'),
|
||||
bind(show_total),
|
||||
bind(ignore),
|
||||
bind(hideCountWhenZero),
|
||||
|
||||
@@ -2,7 +2,7 @@ import options from 'src/options';
|
||||
import { Module } from '../../shared/Module';
|
||||
import { inputHandler } from 'src/components/bar/utils/helpers';
|
||||
import { BarBoxChild } from 'src/lib/types/bar';
|
||||
import { bind } from 'astal';
|
||||
import { bind, Variable } from 'astal';
|
||||
import { Astal } from 'astal/gtk3';
|
||||
|
||||
const { icon, leftClick, rightClick, middleClick, scrollUp, scrollDown } = options.bar.customModules.power;
|
||||
@@ -11,6 +11,7 @@ export const Power = (): BarBoxChild => {
|
||||
const powerModule = Module({
|
||||
tooltipText: 'Power Menu',
|
||||
textIcon: bind(icon),
|
||||
showLabelBinding: Variable(false),
|
||||
boxClass: 'powermodule',
|
||||
props: {
|
||||
setup: (self: Astal.Button) => {
|
||||
|
||||
@@ -99,7 +99,7 @@ export function icon(name: string | null, fallback = icons.missing): string {
|
||||
|
||||
if (lookUpIcon(icon)) return icon;
|
||||
|
||||
print(`no icon substitute "${icon}" for "${name}", fallback: "${fallback}"`);
|
||||
console.log(`no icon substitute "${icon}" for "${name}", fallback: "${fallback}"`);
|
||||
return fallback;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user