Sat 6 Jul 13:21:49 CEST 2024
This commit is contained in:
parent
e65bb2e5af
commit
d966639a71
|
@ -23,13 +23,4 @@
|
|||
];
|
||||
input.kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
|
||||
};
|
||||
home.file."${config.xdg.configHome}/ags/settings.json".text = builtins.toJSON {
|
||||
temperature-cmd = "bash -c 'sensors | grep Tctl | cut -c16-22'";
|
||||
enable-battery = false;
|
||||
};
|
||||
home.file."${config.xdg.configHome}/ags/style.css".text = pkgs.lib.mkAfter ''
|
||||
window.bar {
|
||||
font-size: 1.2em;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ inputs, pkgs, config, ... }:
|
||||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
home.packages = [
|
||||
|
@ -7,149 +7,11 @@
|
|||
];
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
configDir = ./files;
|
||||
extraPackages = with pkgs; [
|
||||
gtksourceview
|
||||
webkitgtk
|
||||
accountsservice
|
||||
];
|
||||
};
|
||||
home.file."${config.xdg.configHome}/ags" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
home.file."${config.xdg.configHome}/ags/settings.json".text = pkgs.lib.mkDefault (builtins.toJSON {
|
||||
temperature-cmd = "bash -c 'sensors | grep Package | cut -c17-23'";
|
||||
enable-battery = true;
|
||||
});
|
||||
home.file."${config.xdg.configHome}/ags/style.css".text = ''
|
||||
window.bar {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
font-size: 1em;
|
||||
font-family: "Noto Sans", "FontAwesome";
|
||||
}
|
||||
|
||||
.systray-item {
|
||||
margin-left: 0.4em;
|
||||
margin-right: 0.4em;
|
||||
}
|
||||
|
||||
.systray {
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
|
||||
.window-box {
|
||||
margin-bottom: 0.3em;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
.clients box {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.battery-item {
|
||||
padding-left: 0.6em;
|
||||
padding-right: 0.6em;
|
||||
border-radius: 0.3em;
|
||||
background: #1f2430;
|
||||
}
|
||||
|
||||
.item, .clients box {
|
||||
background: #1f2430;
|
||||
padding-left: 0.7em;
|
||||
padding-right: 0.7em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.app-icon {
|
||||
margin-right: 0.6em;
|
||||
}
|
||||
|
||||
button {
|
||||
background: #1f2430;
|
||||
border:none;
|
||||
padding: 0.2em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.focused, .clients box.focused {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
.workspaces button {
|
||||
padding-left: 0.4em;
|
||||
padding-right: 0.4em;
|
||||
margin-left: 0.2em;
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
|
||||
.notification {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
/* Notifications */
|
||||
window.notification-popups box.notifications {
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
.icon {
|
||||
min-width: 68px;
|
||||
min-height: 68px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.icon image {
|
||||
font-size: 58px;
|
||||
/* to center the icon */
|
||||
margin: 5px;
|
||||
color: @theme_fg_color;
|
||||
}
|
||||
|
||||
.icon box {
|
||||
min-width: 68px;
|
||||
min-height: 68px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.notification {
|
||||
min-width: 350px;
|
||||
border-radius: 11px;
|
||||
padding: 1em;
|
||||
margin: .5em;
|
||||
background-color: #1f2430;
|
||||
}
|
||||
|
||||
.notification.critical {
|
||||
border: 1px solid lightcoral;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: @theme_fg_color;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.body {
|
||||
color: @theme_unfocused_fg_color;
|
||||
}
|
||||
|
||||
.actions .action-button {
|
||||
margin: 0 .4em;
|
||||
margin-top: .8em;
|
||||
}
|
||||
|
||||
.actions .action-button:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.actions .action-button:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -7,10 +7,12 @@ import { NotificationPopups } from "./notificationPopups.js"
|
|||
const battery = await Service.import('battery')
|
||||
const powerProfiles = await Service.import('powerprofiles')
|
||||
|
||||
const settings = JSON.parse(Utils.readFile(App.configDir + '/settings.json'))
|
||||
// temperature-cmd = "bash -c 'sensors | grep Tctl | cut -c16-22'";
|
||||
// temperature-cmd = "bash -c 'sensors | grep Package | cut -c17-23'";
|
||||
|
||||
const batteryIndicator = Widget.Box({
|
||||
children: settings["enable-battery"]? [
|
||||
visible: battery.available,
|
||||
children: battery.available? [
|
||||
Widget.Icon().hook(battery, self => {
|
||||
const thresholds = [...Array(11).keys()].map( i => i * 10);
|
||||
const icon = thresholds.find(threshold => threshold >= battery.percent)
|
||||
|
@ -203,7 +205,11 @@ function Right() {
|
|||
}),
|
||||
Widget.Label({
|
||||
class_name: "item blue",
|
||||
label: Variable("", { poll: [5000, settings["temperature-cmd"] ] }).bind(),
|
||||
label: Variable("", {
|
||||
poll: [5000, 'sensors', out => out.split('\n')
|
||||
.find(line => line.includes('Tctl') || line.includes('Package'))
|
||||
.split(/\s+/)[1].replace("+", "")],
|
||||
}).bind(),
|
||||
}),
|
||||
Widget.Label({
|
||||
class_name: "item",
|
||||
|
@ -224,6 +230,7 @@ function Bar(monitor = 0) {
|
|||
monitor,
|
||||
anchor: ["top", "left", "right"],
|
||||
exclusivity: "exclusive",
|
||||
css: "font-size: " + hyprland.monitors[monitor]["width"] > 1920? "1.2em;": "1em",
|
||||
child: Widget.CenterBox({
|
||||
class_name: "window-box",
|
||||
start_widget: Left(),
|
||||
|
@ -237,9 +244,12 @@ App.config({
|
|||
style: "./style.css",
|
||||
iconTheme: "Papirus",
|
||||
windows: [
|
||||
Bar(0),
|
||||
Bar(),
|
||||
NotificationPopups(),
|
||||
],
|
||||
})
|
||||
// window.bar {
|
||||
// font-size: 1.2em;
|
||||
// }
|
||||
|
||||
export { }
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
window.bar {
|
||||
background-color: rgba(0, 0, 0, 0.2);
|
||||
font-family: "Noto Sans", "FontAwesome";
|
||||
}
|
||||
|
||||
.systray-item {
|
||||
margin-left: 0.4em;
|
||||
margin-right: 0.4em;
|
||||
}
|
||||
|
||||
.systray {
|
||||
margin-left: 0.6em;
|
||||
}
|
||||
|
||||
.window-box {
|
||||
margin-bottom: 0.3em;
|
||||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
.clients box {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
.battery-item {
|
||||
padding-left: 0.6em;
|
||||
padding-right: 0.6em;
|
||||
margin-right: 0.6em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.item, .clients box {
|
||||
background: #1f2430;
|
||||
padding-left: 0.7em;
|
||||
padding-right: 0.7em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.app-icon {
|
||||
margin-right: 0.6em;
|
||||
}
|
||||
|
||||
button {
|
||||
background: #1f2430;
|
||||
border:none;
|
||||
padding: 0.2em;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
.focused, .clients box.focused {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
.workspaces button {
|
||||
padding-left: 0.4em;
|
||||
padding-right: 0.4em;
|
||||
margin-left: 0.2em;
|
||||
margin-right: 0.2em;
|
||||
}
|
||||
|
||||
.notification {
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
/* Notifications */
|
||||
window.notification-popups box.notifications {
|
||||
padding: .5em;
|
||||
}
|
||||
|
||||
.icon {
|
||||
min-width: 68px;
|
||||
min-height: 68px;
|
||||
margin-right: 1em;
|
||||
}
|
||||
|
||||
.icon image {
|
||||
font-size: 58px;
|
||||
/* to center the icon */
|
||||
margin: 5px;
|
||||
color: @theme_fg_color;
|
||||
}
|
||||
|
||||
.icon box {
|
||||
min-width: 68px;
|
||||
min-height: 68px;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.notification {
|
||||
min-width: 350px;
|
||||
border-radius: 11px;
|
||||
padding: 1em;
|
||||
margin: .5em;
|
||||
background-color: #1f2430;
|
||||
}
|
||||
|
||||
.notification.critical {
|
||||
border: 1px solid lightcoral;
|
||||
}
|
||||
|
||||
.title {
|
||||
color: @theme_fg_color;
|
||||
font-size: 1.4em;
|
||||
}
|
||||
|
||||
.body {
|
||||
color: @theme_unfocused_fg_color;
|
||||
}
|
||||
|
||||
.actions .action-button {
|
||||
margin: 0 .4em;
|
||||
margin-top: .8em;
|
||||
}
|
||||
|
||||
.actions .action-button:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.actions .action-button:last-child {
|
||||
margin-right: 0;
|
||||
}
|
|
@ -10,6 +10,7 @@
|
|||
boot.blacklistedKernelModules = [ "k10temp" ];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
|
||||
boot.kernelModules = [ "zenpower amd_pstate=active" ];
|
||||
boot.kernelParams = ["amd_pstate=active"];
|
||||
|
||||
# AMD CPU & GPU
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
@ -39,4 +40,13 @@
|
|||
};
|
||||
};
|
||||
programs.gnupg.agent.enable = true;
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.wireless.iwd.settings = {
|
||||
IPv6 = {
|
||||
Enabled = true;
|
||||
};
|
||||
Settings = {
|
||||
AutoConnect = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue