Skip to content

Commit

Permalink
Use brightnessctl
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Jan 25, 2024
1 parent ee00a4b commit c0357d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
9 changes: 4 additions & 5 deletions home-modules/xmonad/xmonad.hs
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ myKeys conf@(XConfig {XMonad.modMask = modm}) =
(modm, xK_slash) ~> spawn "playerctl play-pause",
(modm, xK_comma) ~> spawn "playerctl previous",
(modm, xK_period) ~> spawn "playerctl next",
(0, xF86XK_AudioRaiseVolume) ~> spawn "audio-control up 5%",
(0, xF86XK_AudioLowerVolume) ~> spawn "audio-control down 5%",
(0, xF86XK_AudioRaiseVolume) ~> spawn "audio-control up 10%",
(0, xF86XK_AudioLowerVolume) ~> spawn "audio-control down 10%",
(0, xF86XK_AudioMute) ~> spawn "audio-control mute",
-- Brightness keys
(0, xF86XK_MonBrightnessUp) ~> spawn "sudo light -A 5",
(0, xF86XK_MonBrightnessDown) ~> spawn "sudo light -U 5",
(0, xF86XK_MonBrightnessUp) ~> spawn "brightnessctl s +10%",
(0, xF86XK_MonBrightnessDown) ~> spawn "brightnessctl s 10%-",
-- close focused window
(modm, xK_q) ~> kill,
-- GAPS!!!
Expand Down Expand Up @@ -203,7 +203,6 @@ myLayoutHook =
)
$ gaps [(L, outerGap), (R, outerGap), (U, outerGap), (D, outerGap)]
$ spacingRaw False (Border 10 10 10 10) True (Border 10 10 10 10) True
$ smartBorders
myLayout

toggleStrutsKey XConfig {XMonad.modMask = modm} = (modm, xK_b)
Expand Down
1 change: 1 addition & 0 deletions hosts/x1/home.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
gtk
xmonad
polybar
mpv
])
inputs.nixvim.homeManagerModules.nixvim
inputs.nix-index-database.hmModules.nix-index
Expand Down
7 changes: 5 additions & 2 deletions modules/laptop.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{pkgs, ...}: {

environment.systemPackages = with pkgs; [
brightnessctl
];

services.xserver = {
# caps lock is super
xkbOptions = "caps:super";
Expand All @@ -18,8 +23,6 @@
powerManagement.powertop.enable = true;
services.tlp.enable = true;

programs.light.enable = true;

# able to change backlight or turn off wifi without sudo
security.sudo = {
extraRules = [
Expand Down

0 comments on commit c0357d9

Please sign in to comment.