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 = [
|
||||
./vim
|
||||
./fish.nix
|
||||
./tmux.nix
|
||||
./zsh.nix
|
||||
(import ./termite.nix {
|
||||
config = config;
|
||||
pkgs = pkgs;
|
||||
|
@ -14,6 +14,24 @@
|
|||
./git.nix
|
||||
./gtk.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 -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
|
||||
#and not status is-login
|
||||
|
|
30
metis.nix
30
metis.nix
|
@ -1,6 +1,7 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
userEnv = {
|
||||
TERMINAL="xterm-256color";
|
||||
EDITOR = "vim";
|
||||
PAGER = "less";
|
||||
MAILDIR = "\$HOME/.var/mail";
|
||||
|
@ -25,6 +26,14 @@ in
|
|||
systemd.user.sessionVariables = userEnv;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
aspellDicts.en
|
||||
aspellDicts.de
|
||||
aspellDicts.en-science
|
||||
aspellDicts.en-computers
|
||||
aspell
|
||||
xorg.xev
|
||||
gnumake
|
||||
graphviz
|
||||
xwayland
|
||||
slurp
|
||||
grim
|
||||
|
@ -55,7 +64,6 @@ in
|
|||
mblaze
|
||||
mpv
|
||||
nmap
|
||||
pandoc
|
||||
pass
|
||||
pavucontrol
|
||||
pinentry
|
||||
|
@ -81,12 +89,22 @@ in
|
|||
audio-recorder
|
||||
qt5.qttools
|
||||
emacs
|
||||
qt5.qtwayland
|
||||
swayidle
|
||||
mako
|
||||
swaylock
|
||||
kanshi
|
||||
termite
|
||||
bemenu
|
||||
xss-lock
|
||||
htop
|
||||
] ++ (with unstable; [
|
||||
python38Packages.managesieve
|
||||
android-studio
|
||||
cachix
|
||||
keepassxc
|
||||
signal-desktop
|
||||
libguestfs
|
||||
]);
|
||||
|
||||
services.syncthing = {
|
||||
|
@ -94,11 +112,11 @@ in
|
|||
tray = false;
|
||||
};
|
||||
|
||||
#services.screen-locker = {
|
||||
# enable = true;
|
||||
# inactiveInterval = 5;
|
||||
# lockCmd = "\${pkgs.swaylock}/bin/swaylock";
|
||||
#};
|
||||
services.screen-locker = {
|
||||
enable = false;
|
||||
inactiveInterval = 5;
|
||||
lockCmd = "~/bin/lock-session";
|
||||
};
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
|
|
15
sway/config
15
sway/config
|
@ -197,13 +197,13 @@ mode "$mode_move" {
|
|||
}
|
||||
|
||||
# lock the screen
|
||||
bindsym $mod+equal exec loginctl lock-session
|
||||
bindsym $mod+equal exec ~/bin/lock-session
|
||||
|
||||
# control volume
|
||||
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 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
|
||||
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
|
||||
|
||||
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 keepassxc
|
||||
exec firefox
|
||||
exec thunderbird
|
||||
exec telegram
|
||||
#exec keepassxc
|
||||
#exec firefox
|
||||
#exec thunderbird
|
||||
#exec riot-desktop
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
{ config, pkgs, lib, ...}:
|
||||
{
|
||||
let
|
||||
unstable = import <nixpkgs-unstable> {};
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
qt5.qtwayland
|
||||
swaylock
|
||||
swayidle
|
||||
xwayland
|
||||
mako
|
||||
|
@ -11,7 +12,9 @@
|
|||
termite
|
||||
bemenu
|
||||
xss-lock
|
||||
];
|
||||
] ++ (with unstable; [
|
||||
swaylock
|
||||
]);
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
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