mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-12 23:42:56 +00:00
improve lockscreen and remove explicit packages
This commit is contained in:
parent
7603005864
commit
6c6d80a1d0
@ -2,7 +2,10 @@
|
||||
|
||||
let
|
||||
|
||||
lockCmd = ''i3lock --nofork --color "${config.gui.colorscheme.base00}"'';
|
||||
lockCmd =
|
||||
"${pkgs.betterlockscreen}/bin/betterlockscreen --lock --display 1 --blur 0.5 --span";
|
||||
lockUpdate =
|
||||
"${pkgs.betterlockscreen}/bin/betterlockscreen --update ${config.gui.wallpaper} --display 1 --span";
|
||||
|
||||
in {
|
||||
|
||||
@ -16,12 +19,12 @@ in {
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
dmenu # Launcher
|
||||
feh # Wallpaper
|
||||
playerctl # Media control
|
||||
];
|
||||
|
||||
home-manager.users.${config.user}.xsession.windowManager.i3 = {
|
||||
home-manager.users.${config.user} = {
|
||||
xsession.windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
config = let
|
||||
@ -108,10 +111,10 @@ in {
|
||||
"exec ddcutil --display 1 setvcp 10 - 30 && sleep 1; exec ddcutil --display 2 setvcp 10 - 30";
|
||||
|
||||
# Media player controls
|
||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||
"XF86AudioStop" = "exec playerctl stop";
|
||||
"XF86AudioNext" = "exec playerctl next";
|
||||
"XF86AudioPrev" = "exec playerctl previous";
|
||||
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl stop";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
|
||||
# Launchers
|
||||
"${modifier}+Return" =
|
||||
@ -197,8 +200,10 @@ in {
|
||||
|
||||
# Resizing
|
||||
"${modifier}+r" = ''mode "resize"'';
|
||||
"${modifier}+Control+Shift+h" = "resize shrink width 10 px or 10 ppt";
|
||||
"${modifier}+Control+Shift+j" = "resize grow height 10 px or 10 ppt";
|
||||
"${modifier}+Control+Shift+h" =
|
||||
"resize shrink width 10 px or 10 ppt";
|
||||
"${modifier}+Control+Shift+j" =
|
||||
"resize grow height 10 px or 10 ppt";
|
||||
"${modifier}+Control+Shift+k" =
|
||||
"resize shrink height 10 px or 10 ppt";
|
||||
"${modifier}+Control+Shift+l" = "resize grow width 10 px or 10 ppt";
|
||||
@ -238,6 +243,15 @@ in {
|
||||
extraConfig = "";
|
||||
};
|
||||
|
||||
programs.fish.functions = {
|
||||
update-lock-screen = {
|
||||
description = "Update lockscreen with wallpaper";
|
||||
body = lockUpdate;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
systemd.services.lock = {
|
||||
description = "Lock the screen on resume from suspend";
|
||||
before = [ "sleep.target" "suspend.target" ];
|
||||
@ -245,8 +259,7 @@ in {
|
||||
User = config.user;
|
||||
Type = "forking";
|
||||
Environment = "DISPLAY=:0";
|
||||
ExecStart = ''
|
||||
${pkgs.i3lock}/bin/i3lock --color "${config.gui.colorscheme.base00}"'';
|
||||
ExecStart = lockCmd;
|
||||
};
|
||||
wantedBy = [ "sleep.target" "suspend.target" ];
|
||||
};
|
||||
|
@ -11,8 +11,6 @@
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.packages = with pkgs; [ age ];
|
||||
|
||||
programs.himalaya = { enable = true; };
|
||||
programs.mbsync = { enable = true; };
|
||||
services.mbsync = {
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
home-manager.users.${config.user} = {
|
||||
|
||||
home.packages = with pkgs; [ exa fd bat ripgrep curl ];
|
||||
home.packages = with pkgs; [ curl ];
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
@ -38,7 +38,7 @@
|
||||
description = "Tidy up JSON using jq";
|
||||
body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS
|
||||
};
|
||||
ls = { body = "exa $argv"; };
|
||||
ls = { body = "${pkgs.exa}/bin/pkgs $argv"; };
|
||||
note = {
|
||||
description = "Edit or create a note";
|
||||
argumentNames = "filename";
|
||||
|
@ -27,12 +27,9 @@ in {
|
||||
tree # View directory hierarchy
|
||||
htop # Show system processes
|
||||
glow # Pretty markdown previews
|
||||
prettyping # ping
|
||||
qrencode # Generate qr codes
|
||||
vimv # Batch rename files
|
||||
dig # DNS lookup
|
||||
# gnupg
|
||||
# pass
|
||||
];
|
||||
|
||||
programs.zoxide.enable = true; # Shortcut jump command
|
||||
@ -51,11 +48,11 @@ in {
|
||||
ping = {
|
||||
description = "Improved ping";
|
||||
argumentNames = "target";
|
||||
body = "prettyping --nolegend $target";
|
||||
body = "${pkgs.prettyping}/bin/prettyping --nolegend $target";
|
||||
};
|
||||
qr = {
|
||||
body =
|
||||
"qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png"; # Fix for non-macOS
|
||||
"${pkgs.qrencode}/bin/qrencode $argv[1] -o /tmp/qr.png | open /tmp/qr.png"; # Fix for non-macOS
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user