swtch to zsh
This commit is contained in:
parent
c81070da92
commit
e2359005d5
6 changed files with 108 additions and 20 deletions
22
common.nix
22
common.nix
|
@ -2,8 +2,8 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./vim
|
./vim
|
||||||
./fish.nix
|
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
|
./zsh.nix
|
||||||
(import ./termite.nix {
|
(import ./termite.nix {
|
||||||
config = config;
|
config = config;
|
||||||
pkgs = pkgs;
|
pkgs = pkgs;
|
||||||
|
@ -14,6 +14,24 @@
|
||||||
./git.nix
|
./git.nix
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
./xdg.nix
|
./xdg.nix
|
||||||
./sway
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
systemd.user.services = {
|
||||||
|
auto-source-volume = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Revert setting volume of microphone";
|
||||||
|
Documentation = [ "man(1)pacmd" ];
|
||||||
|
BindsTo = "pulseaudio.service";
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
ExecStart = "/bin/sh %h/bin/auto-source-volume.sh";
|
||||||
|
Type = "simple";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
3
fish.nix
3
fish.nix
|
@ -28,7 +28,8 @@
|
||||||
set fish_prompt_pwd_dir_length 0
|
set fish_prompt_pwd_dir_length 0
|
||||||
|
|
||||||
set -U FZF_LEGACY_KEYBINDINGS 0
|
set -U FZF_LEGACY_KEYBINDINGS 0
|
||||||
#set -x TERM xterm-256color
|
set -x TERM xterm-256color
|
||||||
|
set -U fish_user_paths ~/bin $fish_user_paths
|
||||||
|
|
||||||
#if status is-interactive
|
#if status is-interactive
|
||||||
#and not status is-login
|
#and not status is-login
|
||||||
|
|
30
metis.nix
30
metis.nix
|
@ -1,6 +1,7 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
userEnv = {
|
userEnv = {
|
||||||
|
TERMINAL="xterm-256color";
|
||||||
EDITOR = "vim";
|
EDITOR = "vim";
|
||||||
PAGER = "less";
|
PAGER = "less";
|
||||||
MAILDIR = "\$HOME/.var/mail";
|
MAILDIR = "\$HOME/.var/mail";
|
||||||
|
@ -25,6 +26,14 @@ in
|
||||||
systemd.user.sessionVariables = userEnv;
|
systemd.user.sessionVariables = userEnv;
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
aspellDicts.en
|
||||||
|
aspellDicts.de
|
||||||
|
aspellDicts.en-science
|
||||||
|
aspellDicts.en-computers
|
||||||
|
aspell
|
||||||
|
xorg.xev
|
||||||
|
gnumake
|
||||||
|
graphviz
|
||||||
xwayland
|
xwayland
|
||||||
slurp
|
slurp
|
||||||
grim
|
grim
|
||||||
|
@ -55,7 +64,6 @@ in
|
||||||
mblaze
|
mblaze
|
||||||
mpv
|
mpv
|
||||||
nmap
|
nmap
|
||||||
pandoc
|
|
||||||
pass
|
pass
|
||||||
pavucontrol
|
pavucontrol
|
||||||
pinentry
|
pinentry
|
||||||
|
@ -81,12 +89,22 @@ in
|
||||||
audio-recorder
|
audio-recorder
|
||||||
qt5.qttools
|
qt5.qttools
|
||||||
emacs
|
emacs
|
||||||
|
qt5.qtwayland
|
||||||
|
swayidle
|
||||||
|
mako
|
||||||
|
swaylock
|
||||||
|
kanshi
|
||||||
|
termite
|
||||||
|
bemenu
|
||||||
|
xss-lock
|
||||||
|
htop
|
||||||
] ++ (with unstable; [
|
] ++ (with unstable; [
|
||||||
python38Packages.managesieve
|
python38Packages.managesieve
|
||||||
android-studio
|
android-studio
|
||||||
cachix
|
cachix
|
||||||
keepassxc
|
keepassxc
|
||||||
signal-desktop
|
signal-desktop
|
||||||
|
libguestfs
|
||||||
]);
|
]);
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
|
@ -94,11 +112,11 @@ in
|
||||||
tray = false;
|
tray = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
#services.screen-locker = {
|
services.screen-locker = {
|
||||||
# enable = true;
|
enable = false;
|
||||||
# inactiveInterval = 5;
|
inactiveInterval = 5;
|
||||||
# lockCmd = "\${pkgs.swaylock}/bin/swaylock";
|
lockCmd = "~/bin/lock-session";
|
||||||
#};
|
};
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
15
sway/config
15
sway/config
|
@ -197,13 +197,13 @@ mode "$mode_move" {
|
||||||
}
|
}
|
||||||
|
|
||||||
# lock the screen
|
# lock the screen
|
||||||
bindsym $mod+equal exec loginctl lock-session
|
bindsym $mod+equal exec ~/bin/lock-session
|
||||||
|
|
||||||
# control volume
|
# control volume
|
||||||
bindsym --locked XF86AudioRaiseVolume exec amixer set 'Master' 5%+ && pkill -RTMIN+10 i3blocks
|
bindsym --locked XF86AudioRaiseVolume exec amixer set 'Master' 5%+ && pkill -RTMIN+10 i3blocks
|
||||||
bindsym --locked XF86AudioLowerVolume exec amixer set 'Master' 5%- && pkill -RTMIN+10 i3blocks
|
bindsym --locked XF86AudioLowerVolume exec amixer set 'Master' 5%- && pkill -RTMIN+10 i3blocks
|
||||||
bindsym --locked XF86AudioMute exec amixer set Master toggle && pkill -RTMIN+10 i3blocks
|
bindsym --locked XF86AudioMute exec amixer set Master toggle && pkill -RTMIN+10 i3blocks
|
||||||
bindsym --locked XF86AudioMicMute exec amixer set 'Capture' toggle && pkill -RTMIN+10 i3blocks
|
bindsym --locked --to-code XF86AudioMicMute exec --no-startup-id pactl set-source-mute 1 toggle
|
||||||
|
|
||||||
# control media player
|
# control media player
|
||||||
bindsym --locked XF86AudioPlay exec playerctl play-pause && pkill -RTMIN+11 i3blocks
|
bindsym --locked XF86AudioPlay exec playerctl play-pause && pkill -RTMIN+11 i3blocks
|
||||||
|
@ -297,10 +297,9 @@ assign [app_id="jetbrains-studio"] workspace 3
|
||||||
assign [app_id="org.keepassxc.KeePassXC"] workspace 10
|
assign [app_id="org.keepassxc.KeePassXC"] workspace 10
|
||||||
|
|
||||||
exec xset s off
|
exec xset s off
|
||||||
#exec xss-lock -- lock-session
|
#exec swayidle -w timeout 300 '$HOME/bin/lock-session' timeout 240 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep '$HOME/bin/lock-session' lock '$HOME/bin/lock-session'
|
||||||
exec swayidle -w timeout 300 '$HOME/bin/lock-session' timeout 240 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep '$HOME/bin/lock-session' lock '$HOME/bin/lock-session'
|
|
||||||
#exec redshift
|
#exec redshift
|
||||||
exec keepassxc
|
#exec keepassxc
|
||||||
exec firefox
|
#exec firefox
|
||||||
exec thunderbird
|
#exec thunderbird
|
||||||
exec telegram
|
#exec riot-desktop
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{ config, pkgs, lib, ...}:
|
{ config, pkgs, lib, ...}:
|
||||||
{
|
let
|
||||||
|
unstable = import <nixpkgs-unstable> {};
|
||||||
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
qt5.qtwayland
|
qt5.qtwayland
|
||||||
swaylock
|
|
||||||
swayidle
|
swayidle
|
||||||
xwayland
|
xwayland
|
||||||
mako
|
mako
|
||||||
|
@ -11,7 +12,9 @@
|
||||||
termite
|
termite
|
||||||
bemenu
|
bemenu
|
||||||
xss-lock
|
xss-lock
|
||||||
];
|
] ++ (with unstable; [
|
||||||
|
swaylock
|
||||||
|
]);
|
||||||
|
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
49
zsh.nix
Normal file
49
zsh.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
programs.fzf.enableZshIntegration = true;
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableAutosuggestions = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autocd = true;
|
||||||
|
sessionVariables = {
|
||||||
|
TERM = "xterm-256color";
|
||||||
|
EDITOR = "vim";
|
||||||
|
};
|
||||||
|
history = {
|
||||||
|
extended = true;
|
||||||
|
ignoreDups = true;
|
||||||
|
ignoreSpace = true;
|
||||||
|
save = 100000;
|
||||||
|
share = true;
|
||||||
|
};
|
||||||
|
plugins = [
|
||||||
|
];
|
||||||
|
initExtra = ''
|
||||||
|
source ~/.nix-profile/share/zsh-git-prompt/zshrc.sh
|
||||||
|
source ~/.nix-profile/share/fzf/key-bindings.zsh
|
||||||
|
source ~/.nix-profile/share/fzf/completion.zsh
|
||||||
|
PROMPT='%F{red}%?%f %F{green}%m%f:%F{blue}%~%f '
|
||||||
|
RPROMPT='$(git_super_status)'
|
||||||
|
'';
|
||||||
|
profileExtra = ''
|
||||||
|
'';
|
||||||
|
shellAliases = {
|
||||||
|
gst = "git status";
|
||||||
|
gco = "git commit";
|
||||||
|
glo = "git log";
|
||||||
|
gad = "git add";
|
||||||
|
ls = "exa";
|
||||||
|
ll = "exa -l";
|
||||||
|
la = "exa -la";
|
||||||
|
mv = "mv -i";
|
||||||
|
cp = "cp -i";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = [
|
||||||
|
pkgs.exa
|
||||||
|
pkgs.zsh-git-prompt
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue