enable swayidle
This commit is contained in:
parent
282d2e878e
commit
52278df318
126
user/home.nix
126
user/home.nix
|
@ -81,7 +81,7 @@ let
|
||||||
# bmenu * - use as dmenu, -p for custom prompt (man bemenu)
|
# bmenu * - use as dmenu, -p for custom prompt (man bemenu)
|
||||||
# bmenu run - select from .desktop files and run it
|
# bmenu run - select from .desktop files and run it
|
||||||
# bmenu start - internal option
|
# bmenu start - internal option
|
||||||
|
|
||||||
set swaymsg ${pkgs.sway}/bin/swaymsg
|
set swaymsg ${pkgs.sway}/bin/swaymsg
|
||||||
set swaymsg ${pkgs.sway}/bin/swaymsg
|
set swaymsg ${pkgs.sway}/bin/swaymsg
|
||||||
|
|
||||||
|
@ -128,16 +128,16 @@ let
|
||||||
|
|
||||||
set fn "${font.mono} ${font.size.small}"
|
set fn "${font.mono} ${font.size.small}"
|
||||||
|
|
||||||
set tb "${ color.bg }${theme.opacityHex}"
|
set tb "${color.bg}${theme.opacityHex}"
|
||||||
set tf "${ accent.color }"
|
set tf "${accent.color}"
|
||||||
|
|
||||||
set fb "${ color.bg }${theme.opacityHex}"
|
set fb "${color.bg}${theme.opacityHex}"
|
||||||
set ff "${ color.txt }"
|
set ff "${color.txt}"
|
||||||
|
|
||||||
set nb "${ color.bg }${theme.opacityHex}"
|
set nb "${color.bg}${theme.opacityHex}"
|
||||||
set nf "${ color.txt }"
|
set nf "${color.txt}"
|
||||||
set hb "${ accent.color }"
|
set hb "${accent.color}"
|
||||||
set hf "${ accent.fg }"
|
set hf "${accent.fg}"
|
||||||
|
|
||||||
${pkgs.dhist}/bin/dhist wrap -- ${pkgs.bemenu}/bin/bemenu \
|
${pkgs.dhist}/bin/dhist wrap -- ${pkgs.bemenu}/bin/bemenu \
|
||||||
$focused_output\
|
$focused_output\
|
||||||
|
@ -216,32 +216,30 @@ in {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
set -g __accent_color "${accent.color}"
|
set -g __accent_color "${accent.color}"
|
||||||
alias _fish_prompt_accent "_fish_prompt_color '$__accent_color'"
|
alias _fish_prompt_accent "_fish_prompt_color '$__accent_color'"
|
||||||
'';
|
'';
|
||||||
shellAbbrs = {
|
shellAbbrs = {
|
||||||
sv = "sudo systemct";
|
sv = "sudo systemct";
|
||||||
suv = "sudo systemct --user";
|
suv = "sudo systemct --user";
|
||||||
# git abbrs
|
# git abbrs
|
||||||
g = "git";
|
g = "git";
|
||||||
ga = "git add";
|
ga = "git add";
|
||||||
gs = "git status";
|
gs = "git status";
|
||||||
gsh = "git show";
|
gsh = "git show";
|
||||||
gl = "git log";
|
gl = "git log";
|
||||||
gg = "git graph";
|
gg = "git graph";
|
||||||
gd = "git diff";
|
gd = "git diff";
|
||||||
gds = "git diff --staged";
|
gds = "git diff --staged";
|
||||||
gc = "git commit";
|
gc = "git commit";
|
||||||
gca = "git commit --all";
|
gca = "git commit --all";
|
||||||
gcf = "git commit --fixup";
|
gcf = "git commit --fixup";
|
||||||
gp = "git push -u origin (git branch --show-current)";
|
gp = "git push -u origin (git branch --show-current)";
|
||||||
gw = "git switch";
|
gw = "git switch";
|
||||||
gr = "cd (git root)";
|
gr = "cd (git root)";
|
||||||
gri = "git rebase --interactive FETCH_HEAD";
|
gri = "git rebase --interactive FETCH_HEAD";
|
||||||
};
|
|
||||||
functions = {
|
|
||||||
fish_greeting = "";
|
|
||||||
};
|
};
|
||||||
|
functions = { fish_greeting = ""; };
|
||||||
};
|
};
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -255,30 +253,30 @@ in {
|
||||||
programs.alacritty = {
|
programs.alacritty = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
colors= {
|
colors = {
|
||||||
primary= {
|
primary = {
|
||||||
background= "${ color.bg }";
|
background = "${color.bg}";
|
||||||
foreground= "${ color.txt }";
|
foreground = "${color.txt}";
|
||||||
};
|
};
|
||||||
cursor= {
|
cursor = {
|
||||||
text= "#000000";
|
text = "#000000";
|
||||||
cursor= "${ accent.color }";
|
cursor = "${accent.color}";
|
||||||
};
|
};
|
||||||
normal= {
|
normal = {
|
||||||
black= "${ color.normal.black }";
|
black = "${color.normal.black}";
|
||||||
red= "${ color.normal.red }";
|
red = "${color.normal.red}";
|
||||||
green= "${ color.normal.green }";
|
green = "${color.normal.green}";
|
||||||
yellow= "${ color.normal.yellow }";
|
yellow = "${color.normal.yellow}";
|
||||||
blue= "${ color.normal.blue }";
|
blue = "${color.normal.blue}";
|
||||||
magenta= "${ color.normal.magenta }";
|
magenta = "${color.normal.magenta}";
|
||||||
cyan= "${ color.normal.cyan }";
|
cyan = "${color.normal.cyan}";
|
||||||
white= "${ color.normal.white }";
|
white = "${color.normal.white}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
draw_bold_text_with_bright_colors= false;
|
draw_bold_text_with_bright_colors = false;
|
||||||
window= {
|
window = {
|
||||||
opacity= theme.opacity / 100.0;
|
opacity = theme.opacity / 100.0;
|
||||||
dynamic_padding= true;
|
dynamic_padding = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -575,11 +573,7 @@ in {
|
||||||
unfocused = client bg_color bg_color fg_color bg_color bg_color;
|
unfocused = client bg_color bg_color fg_color bg_color bg_color;
|
||||||
urgent = client alert alert fg_color alert alert;
|
urgent = client alert alert fg_color alert alert;
|
||||||
};
|
};
|
||||||
output = {
|
output = { "*" = { bg = "${theme.background} fill"; }; };
|
||||||
"*" = {
|
|
||||||
bg = "${theme.background} fill";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
input."type:touchpad" = {
|
input."type:touchpad" = {
|
||||||
# Disable While Typing
|
# Disable While Typing
|
||||||
dwt = "disabled";
|
dwt = "disabled";
|
||||||
|
@ -736,6 +730,24 @@ in {
|
||||||
terminal = pkgs.alacritty.executable;
|
terminal = pkgs.alacritty.executable;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 360;
|
||||||
|
command = "swaylock -f";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1800;
|
||||||
|
command = "mpc status | grep \"^\[playing\]\" > /dev/null || swaymsg \"output * dpms off\"";
|
||||||
|
resumeCommand = "swaymsg \"output * dpms on\"";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
events = [{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "swaylock -f";
|
||||||
|
}];
|
||||||
|
};
|
||||||
services.gammastep = {
|
services.gammastep = {
|
||||||
enable = true;
|
enable = true;
|
||||||
provider = "geoclue2";
|
provider = "geoclue2";
|
||||||
|
|
Loading…
Reference in a new issue