summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/common.nix32
-rw-r--r--lib/linux.nix13
2 files changed, 35 insertions, 10 deletions
diff --git a/lib/common.nix b/lib/common.nix
index 0fa9302..bf9b3c6 100644
--- a/lib/common.nix
+++ b/lib/common.nix
@@ -77,6 +77,13 @@ in
enable = true;
enableBashIntegration = true;
defaultCommand = "rg --files";
+ changeDirWidgetCommand = "fd --type d"; # M-c
+ changeDirWidgetOptions = ["--preview 'tree -C {} | head -100'"];
+ fileWidgetCommand = "fd --type f";
+ fileWidgetOptions = ["--preview 'head -n100 {}'"];
+ historyWidgetOptions = ["--sort" "--exact"];
+ tmux.enableShellIntegration = true;
+ tmux.shellIntegrationOptions = [ "-p 70%" ];
};
git = {
@@ -121,7 +128,6 @@ in
date = "local";
};
};
-
};
tmux = {
@@ -211,6 +217,8 @@ in
direnv = {
enable = true;
+ enableBashIntegration = true;
+ nix-direnv.enable = true;
};
vim = {
@@ -232,6 +240,14 @@ in
extraConfig = builtins.readFile ./vimrc;
};
+ info.enable = true;
+ man.enable = true;
+
+ nix-index = {
+ enable = true;
+ enableBashIntegration = true;
+ };
+
bash = {
enable = true;
initExtra = ''
@@ -273,14 +289,12 @@ in
git rev-parse HEAD > /dev/null 2>&1
}
- fzf-down() {
- fzf --reverse --height 50% "$@" --border
- }
+ alias fzf-tmux='fzf-tmux -p "70%"'
_gf() {
is_in_git_repo || return
git -c color.status=always status --short |
- fzf-down -m --ansi --nth 2..,.. \
+ fzf-tmux -p "70%" -m --ansi --nth 2..,.. \
--preview '(git diff --color=always -- {-1} | sed 1,4d; cat {-1}) | head -500' |
cut -c4- | sed 's/.* -> //'
}
@@ -288,7 +302,7 @@ in
_gb() {
is_in_git_repo || return
git branch -a --color=always | grep -v '/HEAD\s' | sort |
- fzf-down --ansi --multi --tac --preview-window right:70% \
+ fzf-tmux --ansi --multi --tac --preview-window right:70% \
--preview 'git log --oneline --graph --date=short --color=always --pretty="format:%C(auto)%cd %h%d %s" $(sed s/^..// <<< {} | cut -d" " -f1) | head -'$LINES |
sed 's/^..//' | cut -d' ' -f1 |
sed 's#^remotes/##'
@@ -297,14 +311,14 @@ in
_gt() {
is_in_git_repo || return
git tag --sort -version:refname |
- fzf-down --multi --preview-window right:70% \
+ fzf-tmux --multi --preview-window right:70% \
--preview 'git show --color=always {} | head -'$LINES
}
_gh() {
is_in_git_repo || return
git log --date=short --format="%C(green)%C(bold)%cd %C(auto)%h%d %s (%an)" --graph --color=always |
- fzf-down --ansi --no-sort --reverse --multi --bind 'ctrl-s:toggle-sort' \
+ fzf-tmux --ansi --no-sort --reverse --multi --bind 'ctrl-s:toggle-sort' \
--header 'Press CTRL-S to toggle sort' \
--preview 'grep -o "[a-f0-9]\{7,\}" <<< {} | xargs git show --color=always | head -'$LINES |
grep -o "[a-f0-9]\{7,\}"
@@ -313,7 +327,7 @@ in
_gr() {
is_in_git_repo || return
git remote -v | awk '{print $1 "\t" $2}' | uniq |
- fzf-down --tac \
+ fzf-tmux --tac \
--preview 'git log --oneline --graph --date=short --pretty="format:%C(auto)%cd %h%d %s" {1} | head -200' |
cut -d$'\t' -f1
}
diff --git a/lib/linux.nix b/lib/linux.nix
index c234593..6154f00 100644
--- a/lib/linux.nix
+++ b/lib/linux.nix
@@ -239,7 +239,8 @@ in
full-at = 99;
};
"module/volume-bar" = {
- type = "internal/volume";
+ type = "internal/alsa";
+ master-soundcard = "hw:1";
bar-volume-font = 2;
bar-volume-width = 9;
format-volume = "<label-volume><bar-volume>";
@@ -427,6 +428,16 @@ in
rofi = {
enable = true;
+ pass.enable = true;
+ plugins = with pkgs; [
+ rofi-calc
+ rofi-emoji
+ rofi-file-browser
+ rofi-menugen
+ rofi-mpd
+ rofi-pass
+ rofi-systemd
+ ];
};
};