[Shell] Adds aliases for inhibitting sleep and allowing it again using tmux
This commit is contained in:
@@ -64,70 +64,75 @@
|
|||||||
"http" = "echo 'Do you mean: xh'";
|
"http" = "echo 'Do you mean: xh'";
|
||||||
"du" = "echo 'Do you mean: dust or dua?'";
|
"du" = "echo 'Do you mean: dust or dua?'";
|
||||||
"ranger" = "echo 'Do you mean: yazi'";
|
"ranger" = "echo 'Do you mean: yazi'";
|
||||||
|
"stay-awake" = ''
|
||||||
|
tmux new-session -d -A -s keep-awake 'systemd-inhibit --who="DRew" --why="Manual keep awake" --what=sleep sleep infinity'
|
||||||
|
'';
|
||||||
|
"allow-sleep" = "tmux kill-session -t keep-awake";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.zsh = {
|
programs = {
|
||||||
enable = true;
|
zoxide = {
|
||||||
envExtra = ''
|
# TODO: Learn all the capabilities of zoxide and use them.
|
||||||
PATH=$PATH:$HOME/.local/bin
|
|
||||||
GITHUB_USERNAME=periodic
|
|
||||||
'';
|
|
||||||
initContent = ''
|
|
||||||
# Make ^U work like it does in Bash
|
|
||||||
bindkey "^U" backward-kill-line
|
|
||||||
|
|
||||||
# This doesn't seem to be in the homemanager options
|
|
||||||
# Makes shells incrementally append history so that new shells have the history of open shells
|
|
||||||
setopt inc_append_history
|
|
||||||
'';
|
|
||||||
|
|
||||||
history = {
|
|
||||||
# Do not share history between sessions.
|
|
||||||
share = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
oh-my-zsh = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
enableZshIntegration = true;
|
||||||
"git"
|
|
||||||
"git-prompt"
|
|
||||||
"direnv"
|
|
||||||
"sudo"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = [
|
starship = {
|
||||||
{
|
enable = true;
|
||||||
name = "zsh-autosuggestions";
|
settings = {
|
||||||
src = pkgs.fetchFromGitHub {
|
add_newline = true;
|
||||||
owner = "zsh-users";
|
};
|
||||||
repo = "zsh-autosuggestions";
|
};
|
||||||
rev = "0e810e5afa27acbd074398eefbe28d13005dbc15";
|
zsh = {
|
||||||
hash = "sha256-85aw9OM2pQPsWklXjuNOzp9El1MsNb+cIiZQVHUzBnk=";
|
enable = true;
|
||||||
};
|
envExtra = ''
|
||||||
}
|
PATH=$PATH:$HOME/.local/bin
|
||||||
{
|
GITHUB_USERNAME=periodic
|
||||||
name = "zsh-syntax-highlighting";
|
'';
|
||||||
src = pkgs.fetchFromGitHub {
|
initContent = ''
|
||||||
owner = "zsh-users";
|
# Make ^U work like it does in Bash
|
||||||
repo = "zsh-syntax-highlighting";
|
bindkey "^U" backward-kill-line
|
||||||
rev = "5eb677bb0fa9a3e60f0eff031dc13926e093df92";
|
|
||||||
hash = "sha256-KRsQEDRsJdF7LGOMTZuqfbW6xdV5S38wlgdcCM98Y/Q=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.zoxide = {
|
# This doesn't seem to be in the homemanager options
|
||||||
# TODO: Learn all the capabilities of zoxide and use them.
|
# Makes shells incrementally append history so that new shells have the history of open shells
|
||||||
enable = true;
|
setopt inc_append_history
|
||||||
enableZshIntegration = true;
|
'';
|
||||||
};
|
|
||||||
|
|
||||||
programs.starship = {
|
history = {
|
||||||
enable = true;
|
# Do not share history between sessions.
|
||||||
settings = {
|
share = false;
|
||||||
add_newline = true;
|
};
|
||||||
|
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [
|
||||||
|
"git"
|
||||||
|
"git-prompt"
|
||||||
|
"direnv"
|
||||||
|
"sudo"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
plugins = [
|
||||||
|
{
|
||||||
|
name = "zsh-autosuggestions";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "zsh-users";
|
||||||
|
repo = "zsh-autosuggestions";
|
||||||
|
rev = "0e810e5afa27acbd074398eefbe28d13005dbc15";
|
||||||
|
hash = "sha256-85aw9OM2pQPsWklXjuNOzp9El1MsNb+cIiZQVHUzBnk=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "zsh-syntax-highlighting";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "zsh-users";
|
||||||
|
repo = "zsh-syntax-highlighting";
|
||||||
|
rev = "5eb677bb0fa9a3e60f0eff031dc13926e093df92";
|
||||||
|
hash = "sha256-KRsQEDRsJdF7LGOMTZuqfbW6xdV5S38wlgdcCM98Y/Q=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user