From 73dd975c7e483eabe14bc1388885ef2e04a6c15d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 16 Jul 2024 10:14:47 -0500 Subject: [PATCH] adding empv script to add mpv from firefox to empv in emacs --- .config/tridactyl/tridactylrc | 2 +- home/home.nix | 3 ++- pkgs/desktop-packages.nix | 4 ++-- scripts/empv | 8 ++++++-- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.config/tridactyl/tridactylrc b/.config/tridactyl/tridactylrc index a369b34..8b476c5 100644 --- a/.config/tridactyl/tridactylrc +++ b/.config/tridactyl/tridactylrc @@ -74,7 +74,7 @@ command aud js -p tri.excmds.shellescape(JS_ARG).then(url => tri.excmds.exclaim_ unbind t "" Adding my own bindings -bind v composite hint -pipe a href | js -p tri.excmds.shellescape(JS_ARG) | exclaim_quiet mpl +bind v composite hint -pipe a href | js -p tri.excmds.shellescape(JS_ARG) | exclaim_quiet empv bind gt hint -W torrent bind gv current_url mpv bind ga hint -W aud diff --git a/home/home.nix b/home/home.nix index 59e0542..3f55d50 100644 --- a/home/home.nix +++ b/home/home.nix @@ -1068,7 +1068,7 @@ end padding.y = 10; dynamic_padding = true; }; - shell.program = "nu"; + shell.program = "fish"; font = { normal = { family = "VictorMono Nerd Font"; @@ -1124,6 +1124,7 @@ end enable = true; enableNushellIntegration = true; enableBashIntegration = true; + enableFishIntegration = true; settings = { format = '' [\[](fg:#78787e) $username$hostname$directory[\]](fg:#78787e) [$cmd_duration$time$status](italic fg:#78787e) diff --git a/pkgs/desktop-packages.nix b/pkgs/desktop-packages.nix index cb413d0..a8134ef 100644 --- a/pkgs/desktop-packages.nix +++ b/pkgs/desktop-packages.nix @@ -135,8 +135,8 @@ with lib; # }; # }) kdenlive - olive-editor - davinci-resolve + # olive-editor + # davinci-resolve natron glaxnimate mediainfo diff --git a/scripts/empv b/scripts/empv index ec8acb4..ff91dbe 100755 --- a/scripts/empv +++ b/scripts/empv @@ -1,3 +1,7 @@ -#!/bin/sh +#!/usr/bin/env fish -emacsclient -e "(message (car server-eval-args-left))" $1 +set arg "(empv-enqueue-last \""$argv[1]"\")" +echo $arg +set title (yt-dlp --get-title $argv[1]) +echo $title added +emacsclient -e $arg && notify-send $title" has been added to the queue"