Miscellaneous config changes
- Updated flake inputs - Fixed alacritty config - Added sway exit keybind - Added brightness control - Created second wob bar for brightness - Added networkmanager to laptop
This commit is contained in:
parent
06546c28ac
commit
2f610c6fc2
|
@ -14,6 +14,7 @@ in {
|
||||||
tldr
|
tldr
|
||||||
pandoc
|
pandoc
|
||||||
pamixer
|
pamixer
|
||||||
|
brightnessctl
|
||||||
playerctl
|
playerctl
|
||||||
screenfetch
|
screenfetch
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
background_opacity = 0.9;
|
window.opacity = 0.9;
|
||||||
|
|
||||||
# Based on the GNOME Dark theme
|
# Based on the GNOME Dark theme
|
||||||
colors.primary = {
|
colors.primary = {
|
||||||
|
|
|
@ -60,8 +60,10 @@ in {
|
||||||
|
|
||||||
startup = map (x: { command = x; }) [
|
startup = map (x: { command = x; }) [
|
||||||
''~/.azotebg''
|
''~/.azotebg''
|
||||||
# Make wob channel
|
# Make wob channels
|
||||||
''mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob''
|
''mkfifo $SWAYSOCK.volume.wob && tail -f $SWAYSOCK.volume.wob | wob''
|
||||||
|
''mkfifo $SWAYSOCK.brightness.wob && tail -f $SWAYSOCK.brightness.wob | wob \
|
||||||
|
--border-color "#FFFF00FF" --bar-color "#FFFF00FF"''
|
||||||
''swayidle timeout 120 'swaylock -f --grace=180' \
|
''swayidle timeout 120 'swaylock -f --grace=180' \
|
||||||
timeout 600 'systemctl suspend' \
|
timeout 600 'systemctl suspend' \
|
||||||
before-sleep 'swaylock -f' ''
|
before-sleep 'swaylock -f' ''
|
||||||
|
@ -70,10 +72,13 @@ in {
|
||||||
];
|
];
|
||||||
|
|
||||||
keybindings = let
|
keybindings = let
|
||||||
# Display volume using wob
|
# Volume using pamixer and wob
|
||||||
audio-disp = ''pamixer --get-volume > $SWAYSOCK.wob'';
|
audio-disp = ''pamixer --get-volume > $SWAYSOCK.volume.wob'';
|
||||||
audio = cmd: "exec pamixer ${cmd} && ${audio-disp}";
|
audio = cmd: "exec pamixer ${cmd} && ${audio-disp}";
|
||||||
brightness-set = x: "exec brightnessctl set ${x}";
|
# Brightness using brightnessctl and wob
|
||||||
|
brightness-disp = ''brightnessctl get > $SWAYSOCK.brightness.wob'';
|
||||||
|
brightness = x: "exec brightnessctl set ${x} && ${brightness-disp}";
|
||||||
|
# Play controls using playerctl
|
||||||
playerctl = cmd: "exec playerctl ${cmd}";
|
playerctl = cmd: "exec playerctl ${cmd}";
|
||||||
in pkgs.lib.mkOptionDefault {
|
in pkgs.lib.mkOptionDefault {
|
||||||
"${modifier}+Shift+d" = ''exec wofi --show run'';
|
"${modifier}+Shift+d" = ''exec wofi --show run'';
|
||||||
|
@ -87,13 +92,18 @@ in {
|
||||||
# Special XF86 key bindings
|
# Special XF86 key bindings
|
||||||
"XF86AudioRaiseVolume" = audio "-ui 2";
|
"XF86AudioRaiseVolume" = audio "-ui 2";
|
||||||
"XF86AudioLowerVolume" = audio "-ud 2";
|
"XF86AudioLowerVolume" = audio "-ud 2";
|
||||||
|
"Shift+XF86AudioRaiseVolume" = audio "-ui 2 --allow-boost";
|
||||||
|
"Shift+XF86AudioLowerVolume" = audio "-ud 2 --allow-boost";
|
||||||
"XF86AudioMute" = ''exec pamixer --toggle-mute'';
|
"XF86AudioMute" = ''exec pamixer --toggle-mute'';
|
||||||
"XF86AudioMicMute" = ''exec pactl set-source-mute @DEFAULT_SOURCE@ toggle'';
|
"XF86AudioMicMute" = ''exec pactl set-source-mute @DEFAULT_SOURCE@ toggle'';
|
||||||
"XF86MonBrightnessDown" = brightness-set "5%-";
|
"XF86MonBrightnessDown" = brightness "5-";
|
||||||
"XF86MonBrightnessUp" = brightness-set "+5%";
|
"XF86MonBrightnessUp" = brightness "+5";
|
||||||
"XF86AudioPlay" = playerctl "play-pause";
|
"XF86AudioPlay" = playerctl "play-pause";
|
||||||
"XF86AudioNext" = playerctl "next";
|
"XF86AudioNext" = playerctl "next";
|
||||||
"XF86AudioPrev" = playerctl "previous";
|
"XF86AudioPrev" = playerctl "previous";
|
||||||
|
|
||||||
|
# Exit
|
||||||
|
"${modifier}+Shift+e" = ''exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' '';
|
||||||
};
|
};
|
||||||
|
|
||||||
output."*" = {
|
output."*" = {
|
||||||
|
@ -102,4 +112,3 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
# bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
|
||||||
|
|
12
flake.lock
12
flake.lock
|
@ -23,11 +23,11 @@
|
||||||
},
|
},
|
||||||
"nixos-hardware": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1645748302,
|
"lastModified": 1646173104,
|
||||||
"narHash": "sha256-uUzNyT0XSkwh4Vsrn4M/+i3j89y4FFxEiLww+qXxeJU=",
|
"narHash": "sha256-ajtk7Buvg2v3QRBMQ+cYLia67QFax0XI0ZItTl8eHPw=",
|
||||||
"owner": "kiana-S",
|
"owner": "kiana-S",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "75df50946ad6bc126e2773ed6aae323ebb0e3078",
|
"rev": "8530cfe9a9d41323fb760977538011e930c0343d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -53,11 +53,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1646092373,
|
"lastModified": 1646158169,
|
||||||
"narHash": "sha256-sKyF5z6FPC3G12AvSz/xoV0z48J1N1m82GriyQiPcQA=",
|
"narHash": "sha256-MCZe/mDI9CWbLwS/CwK33Gr1m/5JTI3Qo182Y70ZBUc=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "15e0e6b4cf7e33f44da1ae2f55bb2f2a9205cc0c",
|
"rev": "a987395f66b630dff8cc616818dacfff6dc2dfb1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -14,4 +14,9 @@ in {
|
||||||
# Passwords
|
# Passwords
|
||||||
users.users.kiana = { inherit hashedPassword; };
|
users.users.kiana = { inherit hashedPassword; };
|
||||||
users.users.root = { inherit hashedPassword; };
|
users.users.root = { inherit hashedPassword; };
|
||||||
|
|
||||||
|
# Networking
|
||||||
|
networking.wireless.enable = false;
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
users.users.kiana.extraGroups = [ "networkmanager" ];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue