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