Compare commits

...

2 commits

Author SHA1 Message Date
b12f ee324d57af
modules/terminal-life: use theme variables for fzf 2024-09-06 17:39:10 +02:00
b12f f015e9c6fa
pkgs/record-screen: hide wf-recorder 2024-09-06 17:38:43 +02:00
3 changed files with 18 additions and 39 deletions

View file

@ -1,4 +1,4 @@
{ args@{
lib, lib,
config, config,
pkgs, pkgs,
@ -77,44 +77,23 @@ in {
settings = import ./starship.toml.nix flake.self.theme.withHashtag; settings = import ./starship.toml.nix flake.self.theme.withHashtag;
}; };
programs.bash = import ./bash { programs.bash = import ./bash args;
inherit config;
inherit pkgs;
inherit lib;
};
programs.fzf = import ./fzf { programs.fzf = import ./fzf args;
inherit config;
inherit pkgs;
};
programs.neovim = import ./nvim {
inherit config;
inherit pkgs;
inherit lib;
};
programs.neovim = import ./nvim args;
# Ensure nvim backup directory gets created # Ensure nvim backup directory gets created
# Workaround for E510: Can't make backup file (add ! to override) # Workaround for E510: Can't make backup file (add ! to override)
xdg.dataFile."nvim/backup/.keep".text = ""; xdg.dataFile."nvim/backup/.keep".text = "";
xdg.dataFile."nvim/json-schemas/.keep".text = ""; xdg.dataFile."nvim/json-schemas/.keep".text = "";
xdg.dataFile."nvim/templates/.keep".text = ""; xdg.dataFile."nvim/templates/.keep".text = "";
programs.git = import ./git {}; programs.git = import ./git args;
xdg.configFile."git/config".text = import ./.config/git/config.nix { xdg.configFile."git/config".text = import ./.config/git/config.nix args;
inherit config; xdg.configFile."git/gitmessage".text = import ./.config/git/gitmessage.nix args;
inherit pkgs; xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix args;
};
xdg.configFile."git/gitmessage".text = import ./.config/git/gitmessage.nix {
inherit config;
inherit pkgs;
};
xdg.configFile."git/global_gitignore".text = import ./.config/git/global_gitignore.nix {
inherit config;
inherit pkgs;
};
programs.direnv = import ./direnv {}; programs.direnv = import ./direnv args;
}; };
}; };
} }

View file

@ -1,15 +1,17 @@
{ {
config, config,
pkgs, pkgs,
flake,
... ...
}: { }: {
enable = true; enable = true;
defaultCommand = "fd --hidden --type f --exclude .git"; defaultCommand = "fd --hidden --type f --exclude .git";
defaultOptions = [ defaultOptions = with flake.self.theme.withHashtag; [
"--color=bg+:#2d2a2e,bg:#1a181a,spinner:#ef9062,hl:#7accd7" "--color=bg+:${base01},bg:${base00},spinner:${base0C},hl:${base0D}"
"--color=fg:#d3d1d4,header:#7accd7,info:#e5c463,pointer:#ef9062" "--color=fg:${base04},header:${base0D},info:${base0A},pointer:${base0C}"
"--color=marker:#ef9062,fg+:#303030,prompt:#e5c463,hl+:#7accd7" "--color=marker:${base0C},fg+:${base02},prompt:${base0A},hl+:${base0D}"
]; ];
# Use ble.sh for completions, see # Use ble.sh for completions, see
# modules/terminal-life/bash/default.nix -> bleopt complete_menu_style=desc # modules/terminal-life/bash/default.nix -> bleopt complete_menu_style=desc
# and https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A77-Completion # and https://github.com/akinomyoga/ble.sh/wiki/Manual-%C2%A77-Completion

View file

@ -2,10 +2,10 @@ self:
with self; '' with self; ''
set -e set -e
RECORDER_PID=$(${procps}/bin/ps aux | ${gnugrep}/bin/grep "\--class screen-recorder" | ${gnugrep}/bin/grep -v grep | ${gawk}/bin/awk '{print $2}') RECORDER_PID=$(${procps}/bin/ps aux | ${gnugrep}/bin/grep "wf-recorder" | ${gnugrep}/bin/grep -v grep | ${gawk}/bin/awk '{print $2}')
NUM_PID=$(echo -n $RECORDER_PID | ${coreutils}/bin/wc -w) NUM_PID=$(echo -n $RECORDER_PID | ${coreutils}/bin/wc -w)
if (( NUM_PID > 0 )); then if (( NUM_PID > 0 )); then
FILE_LOCATION=$(${procps}/bin/ps aux | ${gnugrep}/bin/grep "\--class screen-recorder" | ${gnugrep}/bin/grep -v grep | ${gawk}/bin/awk '{print $NF}') FILE_LOCATION=$(${procps}/bin/ps aux | ${gnugrep}/bin/grep "wf-recorder" | ${gnugrep}/bin/grep -v grep | ${gawk}/bin/awk '{print $NF}')
kill $RECORDER_PID kill $RECORDER_PID
${libnotify}/bin/notify-send "Recorded to $FILE_LOCATION" ${libnotify}/bin/notify-send "Recorded to $FILE_LOCATION"
exit 0 exit 0
@ -21,8 +21,6 @@ with self; ''
RESOLUTION="$(echo $GEOMETRY | ${gawk}/bin/awk '{print $2}')" RESOLUTION="$(echo $GEOMETRY | ${gawk}/bin/awk '{print $2}')"
FILE_LOCATION="$HOME/Videos/Screenrecordings/$(${coreutils}/bin/date +%Y%m%d_%Hh%Mm%Ss)_$RESOLUTION.mp4" FILE_LOCATION="$HOME/Videos/Screenrecordings/$(${coreutils}/bin/date +%Y%m%d_%Hh%Mm%Ss)_$RESOLUTION.mp4"
echo "Recording $GEOMETRY into $FILE_LOCATION" echo "Recording $GEOMETRY into $FILE_LOCATION"
${alacritty}/bin/alacritty \ ${wf-recorder}/bin/wf-recorder -g "$GEOMETRY" -f "$FILE_LOCATION"
--class screen-recorder \
-e ${wf-recorder}/bin/wf-recorder -g "$GEOMETRY" -f "$FILE_LOCATION"
${libnotify}/bin/notify-send "Recording to $FILE_LOCATION" ${libnotify}/bin/notify-send "Recording to $FILE_LOCATION"
'' ''