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
|
||||
pandoc
|
||||
pamixer
|
||||
brightnessctl
|
||||
playerctl
|
||||
screenfetch
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background_opacity = 0.9;
|
||||
window.opacity = 0.9;
|
||||
|
||||
# Based on the GNOME Dark theme
|
||||
colors.primary = {
|
||||
|
|
|
@ -60,8 +60,10 @@ in {
|
|||
|
||||
startup = map (x: { command = x; }) [
|
||||
''~/.azotebg''
|
||||
# Make wob channel
|
||||
''mkfifo $SWAYSOCK.wob && tail -f $SWAYSOCK.wob | wob''
|
||||
# Make wob channels
|
||||
''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' \
|
||||
timeout 600 'systemctl suspend' \
|
||||
before-sleep 'swaylock -f' ''
|
||||
|
@ -70,10 +72,13 @@ in {
|
|||
];
|
||||
|
||||
keybindings = let
|
||||
# Display volume using wob
|
||||
audio-disp = ''pamixer --get-volume > $SWAYSOCK.wob'';
|
||||
# Volume using pamixer and wob
|
||||
audio-disp = ''pamixer --get-volume > $SWAYSOCK.volume.wob'';
|
||||
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}";
|
||||
in pkgs.lib.mkOptionDefault {
|
||||
"${modifier}+Shift+d" = ''exec wofi --show run'';
|
||||
|
@ -85,15 +90,20 @@ in {
|
|||
"${modifier}+Print" = ''grim -g "$(swaymsg -t get_tree | jq -j '.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"')" -o $(date +%Y-%m-%d_%H-%m-%s)'';
|
||||
|
||||
# Special XF86 key bindings
|
||||
"XF86AudioRaiseVolume" = audio "-ui 2";
|
||||
"XF86AudioLowerVolume" = audio "-ud 2";
|
||||
"XF86AudioMute" = ''exec pamixer --toggle-mute'';
|
||||
"XF86AudioMicMute" = ''exec pactl set-source-mute @DEFAULT_SOURCE@ toggle'';
|
||||
"XF86MonBrightnessDown" = brightness-set "5%-";
|
||||
"XF86MonBrightnessUp" = brightness-set "+5%";
|
||||
"XF86AudioPlay" = playerctl "play-pause";
|
||||
"XF86AudioNext" = playerctl "next";
|
||||
"XF86AudioPrev" = playerctl "previous";
|
||||
"XF86AudioRaiseVolume" = audio "-ui 2";
|
||||
"XF86AudioLowerVolume" = audio "-ud 2";
|
||||
"Shift+XF86AudioRaiseVolume" = audio "-ui 2 --allow-boost";
|
||||
"Shift+XF86AudioLowerVolume" = audio "-ud 2 --allow-boost";
|
||||
"XF86AudioMute" = ''exec pamixer --toggle-mute'';
|
||||
"XF86AudioMicMute" = ''exec pactl set-source-mute @DEFAULT_SOURCE@ toggle'';
|
||||
"XF86MonBrightnessDown" = brightness "5-";
|
||||
"XF86MonBrightnessUp" = brightness "+5";
|
||||
"XF86AudioPlay" = playerctl "play-pause";
|
||||
"XF86AudioNext" = playerctl "next";
|
||||
"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."*" = {
|
||||
|
@ -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": {
|
||||
"locked": {
|
||||
"lastModified": 1645748302,
|
||||
"narHash": "sha256-uUzNyT0XSkwh4Vsrn4M/+i3j89y4FFxEiLww+qXxeJU=",
|
||||
"lastModified": 1646173104,
|
||||
"narHash": "sha256-ajtk7Buvg2v3QRBMQ+cYLia67QFax0XI0ZItTl8eHPw=",
|
||||
"owner": "kiana-S",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "75df50946ad6bc126e2773ed6aae323ebb0e3078",
|
||||
"rev": "8530cfe9a9d41323fb760977538011e930c0343d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -53,11 +53,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1646092373,
|
||||
"narHash": "sha256-sKyF5z6FPC3G12AvSz/xoV0z48J1N1m82GriyQiPcQA=",
|
||||
"lastModified": 1646158169,
|
||||
"narHash": "sha256-MCZe/mDI9CWbLwS/CwK33Gr1m/5JTI3Qo182Y70ZBUc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "15e0e6b4cf7e33f44da1ae2f55bb2f2a9205cc0c",
|
||||
"rev": "a987395f66b630dff8cc616818dacfff6dc2dfb1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -14,4 +14,9 @@ in {
|
|||
# Passwords
|
||||
users.users.kiana = { 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