home: pager: use upstream module
Only for the configuration, not `LESS`, as settings it through the configuration file does not result in the behaviour I want in Git (and probably other programs).
This commit is contained in:
parent
c3603a6191
commit
7a7da21a27
1 changed files with 10 additions and 6 deletions
|
|
@ -9,6 +9,16 @@ in
|
||||||
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.less = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
config = ''
|
||||||
|
#command
|
||||||
|
# Quit without clearing the screen on `Q`
|
||||||
|
Q toggle-option -!^Predraw-on-quit\nq
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
# My default pager
|
# My default pager
|
||||||
PAGER = "less";
|
PAGER = "less";
|
||||||
|
|
@ -17,11 +27,5 @@ in
|
||||||
# Better XDG compliance
|
# Better XDG compliance
|
||||||
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
|
LESSHISTFILE = "${config.xdg.stateHome}/less/history";
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg.configFile."lesskey".text = ''
|
|
||||||
#command
|
|
||||||
# Quit without clearing the screen on `Q`
|
|
||||||
Q toggle-option -!^Predraw-on-quit\nq
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue