options for nix shell

This commit is contained in:
Leonardo Eugênio 2022-08-18 13:58:35 -03:00
parent f1a94ce2c6
commit 270deeab42
3 changed files with 37 additions and 24 deletions

View file

@ -168,6 +168,11 @@ function fish_prompt
_fish_prompt_accent "$hostname"
end
if test -n "$IN_NIX_SHELL"
_fish_prompt_normal " with "
_fish_prompt_accent "nix"
end
fish_git_prompt
# Line break

View file

@ -59,6 +59,7 @@ in {
wpass
screenshotsh
_gpg-unlock
xdg-utils
# media
yt-dlp
ffmpeg
@ -67,6 +68,8 @@ in {
mpc-cli
helvum
gimp
kdenlive
blender
libreoffice
# pulse_sink
#games
@ -95,7 +98,7 @@ in {
cargo-edit
cargo-feature
cargo-watch
rust-analyzer
pkgs.unstable.rust-analyzer
gcc
nixfmt
];
@ -108,6 +111,7 @@ in {
'';
shellAbbrs = {
v = "kak";
ns = "nix develop --command $SHELL";
# system
sv = "sudo systemct";
suv = "sudo systemct --user";

View file

@ -32,7 +32,29 @@ let
'';
in {
config = {
wayland.windowManager.sway = {
wayland.windowManager.sway = let
mod = "Mod4";
menu = "rofi -show drun";
terminal = "alacritty";
# Utility funcion
# Input: [{v1=1;} {v2=2;}]
# Output: {v1=1;v2=2;}
mergeAttrsSet = lib.foldAttrs (n: _: n) { };
forEachMerge = list: func: mergeAttrsSet (lib.forEach list func);
# same as imap0 but reversed inputs
iforEach0 = (list: func: lib.imap0 func list);
# Usefull for translating an imperative foreach into declarative attrset creation
# iforEach0mergeAttrsSet ["val1" "val2"] (i: v: {
# ${i} = v;
# })
# Ouput: {val1 = 1; val2 = 2;}
iforEach0mergeAttrsSet = list: func:
mergeAttrsSet (iforEach0 list func);
in {
enable = true;
config = {
bars = [ ];
@ -124,34 +146,15 @@ in {
"q" = "";
"s" = "exec ${pulse_sink}/bin/pulse_sink";
};
passthrough = {
"${mod}+escape" = "mode default;exec notify-send 'Passthrough off'";
};
};
floating = {
modifier = "Mod4";
criteria = [ { class = "file_picker"; } { app_id = "file_picker"; } ];
};
keybindings = let
mod = "Mod4";
menu = "rofi -show drun";
terminal = "alacritty";
# Utility funcion
# Input: [{v1=1;} {v2=2;}]
# Output: {v1=1;v2=2;}
mergeAttrsSet = lib.foldAttrs (n: _: n) { };
forEachMerge = list: func: mergeAttrsSet (lib.forEach list func);
# same as imap0 but reversed inputs
iforEach0 = (list: func: lib.imap0 func list);
# Usefull for translating an imperative foreach into declarative attrset creation
# iforEach0mergeAttrsSet ["val1" "val2"] (i: v: {
# ${i} = v;
# })
# Ouput: {val1 = 1; val2 = 2;}
iforEach0mergeAttrsSet = list: func:
mergeAttrsSet (iforEach0 list func);
# mod+1 to swich to workspace 1
# mod+shift+1 to move to workspace 1
workspace_binds = let
@ -276,6 +279,7 @@ in {
"${mod}+Ctrl+Return" = "exec thunar";
"${mod}+x" = "kill";
"${mod}+m" = "mode audio";
"${mod}+escape" = "mode passthrough;exec notify-send 'Passthrough on'";
"${mod}+f" = "fullscreen toggle";
"${mod}+Shift+space" = "floating toggle";
"${mod}+space" = "focus mode_toggle";