Basic libinput gestures + structured shell aliases

This commit is contained in:
Filippo Berto 2021-07-15 09:04:04 +02:00
parent 2d6084b28a
commit 1f49192ab3
6 changed files with 68 additions and 19 deletions

View file

@ -0,0 +1,26 @@
{ pkgs, config, ... }:
let
libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures";
xdotool = "${pkgs.xdotool}/bin/xdotool";
in
{
systemd.user.services."libinput-gestures" = {
Unit = {
Description = "Touchpad gestures";
After = [ "graphical-session-pre.target" ];
PartOf = [ "graphical-session.target" ];
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = libinputGesturesCmd;
};
};
xdg.configFile."libinput-gestures.conf".text = ''
gesture swipe left ${xdotool} key alt+Right
gesture swipe right ${xdotool} key alt+Left
'';
}

11
modules/shell_aliases.nix Normal file
View file

@ -0,0 +1,11 @@
{ pkgs, ... }:
let
shellAliases = {
"sc" = "systemctl";
"scu" = "systemctl --user";
};
in
{
programs.bash = { inherit shellAliases; };
programs.zsh = { inherit shellAliases; };
}

19
modules/starship.nix Normal file
View file

@ -0,0 +1,19 @@
{
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
settings = {
directory.truncation_symbol = "/";
hostname.format = "[$hostname]($style) ";
line_break.disabled = true;
nix_shell.symbol = " ";
python.python_binary = "python3";
status = {
disabled = false;
format = "[$symbol $status]($style) ";
};
username.format = "[$user]($style)@";
};
};
}

View file

@ -45,22 +45,4 @@
};
};
programs.starship = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
settings = {
directory.truncation_symbol = "/";
hostname.format = "[$hostname]($style) ";
line_break.disabled = true;
nix_shell.symbol = " ";
python.python_binary = "python3";
status = {
disabled = false;
format = "[$symbol $status]($style) ";
};
username.format = "[$user]($style)@";
};
};
}