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

View file

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

View file

@ -2,10 +2,10 @@ self:
with self; ''
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)
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
${libnotify}/bin/notify-send "Recorded to $FILE_LOCATION"
exit 0
@ -21,8 +21,6 @@ with self; ''
RESOLUTION="$(echo $GEOMETRY | ${gawk}/bin/awk '{print $2}')"
FILE_LOCATION="$HOME/Videos/Screenrecordings/$(${coreutils}/bin/date +%Y%m%d_%Hh%Mm%Ss)_$RESOLUTION.mp4"
echo "Recording $GEOMETRY into $FILE_LOCATION"
${alacritty}/bin/alacritty \
--class screen-recorder \
-e ${wf-recorder}/bin/wf-recorder -g "$GEOMETRY" -f "$FILE_LOCATION"
${wf-recorder}/bin/wf-recorder -g "$GEOMETRY" -f "$FILE_LOCATION"
${libnotify}/bin/notify-send "Recording to $FILE_LOCATION"
''