mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 15:11:34 +01:00
Remove special widget control for qtile
This commit is contained in:
parent
4b650721b0
commit
cbebff390c
3 changed files with 8 additions and 47 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{
|
||||
imports = [
|
||||
./qtile.nix
|
||||
./hyprland
|
||||
|
|
@ -9,16 +9,4 @@
|
|||
./waybar.nix
|
||||
./hypridlelock.nix
|
||||
];
|
||||
|
||||
options.myConfig.de = {
|
||||
widget = {
|
||||
backlight = {
|
||||
enable = lib.mkEnableOption "";
|
||||
device = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
};
|
||||
battery.enable = lib.mkEnableOption "";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,29 +36,7 @@ in {
|
|||
|
||||
services.dunst.enable = true;
|
||||
|
||||
xdg.configFile."qtile/config.py".text = let
|
||||
backlightKeys =
|
||||
if cfg.widget.backlight.enable
|
||||
then ''
|
||||
Key([], "XF86MonBrightnessUp", lazy.spawn("brillo -q -s ${cfg.widget.backlight.device} -u 50000 -A 4"), desc="Raise brightness"),
|
||||
Key([], "XF86MonBrightnessDown", lazy.spawn("brillo -q -s ${cfg.widget.backlight.device} -u 50000 -U 4"), desc="Lower brightness"),
|
||||
''
|
||||
else "";
|
||||
backlightWidget =
|
||||
if cfg.widget.backlight.enable
|
||||
then ''
|
||||
widget.Sep(),
|
||||
widget.Backlight(fmt=" {}", backlight_name='${cfg.widget.backlight.device}'),
|
||||
''
|
||||
else "";
|
||||
batteryWidget =
|
||||
if cfg.widget.battery.enable
|
||||
then ''
|
||||
widget.Sep(),
|
||||
widget.Battery(format=" {percent:2.0%}"),
|
||||
''
|
||||
else "";
|
||||
in ''
|
||||
xdg.configFile."qtile/config.py".text = ''
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
|
|
@ -107,7 +85,8 @@ in {
|
|||
Key([], "XF86AudioRaiseVolume", lazy.spawn("wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"), desc="Raise volume"),
|
||||
|
||||
# Brightness controls
|
||||
${backlightKeys}
|
||||
Key([], "XF86MonBrightnessUp", lazy.spawn("brillo -q -u 50000 -A 4"), desc="Raise brightness"),
|
||||
Key([], "XF86MonBrightnessDown", lazy.spawn("brillo -q -u 50000 -U 4"), desc="Lower brightness"),
|
||||
|
||||
# Move window focus
|
||||
Key([mod], left, lazy.layout.left(), desc="Move focus to left"),
|
||||
|
|
@ -183,8 +162,10 @@ in {
|
|||
]),
|
||||
widget.Sep(),
|
||||
widget.PulseVolume(fmt=" {}"),
|
||||
${backlightWidget}
|
||||
${batteryWidget}
|
||||
widget.Sep(),
|
||||
widget.Backlight(fmt=" {}", backlight_name='amdgpu_bl1'),
|
||||
widget.Sep(),
|
||||
widget.Battery(format=" {percent:2.0%}"),
|
||||
],
|
||||
26,
|
||||
),
|
||||
|
|
|
|||
|
|
@ -2,14 +2,6 @@
|
|||
imports = [./default.nix];
|
||||
|
||||
home-manager.users.seb = {
|
||||
myConfig.de.widget = {
|
||||
backlight = {
|
||||
enable = true;
|
||||
device = "amdgpu_bl1";
|
||||
};
|
||||
battery.enable = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.monitor = "eDP-1,1920x1080@60,0x0,1";
|
||||
|
||||
services.hypridle = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue