GithubHelp home page GithubHelp logo

Comments (8)

rktjmp avatar rktjmp commented on June 3, 2024

I'm not really set up for doing something like that.

Which parts of :LushRunTutorial did you find difficult?

from lush.nvim.

ashincoder avatar ashincoder commented on June 3, 2024

Do you have dmenu. I can send you a dmenu script to record. I don't need you to show how to create the colors. Coudl you just help on how to setup it up

from lush.nvim.

ashincoder avatar ashincoder commented on June 3, 2024

I'm not really set up for doing something like that.

Which parts of :LushRunTutorial did you find difficult?

I can't really explain it. Sorry. I think it is overwhelming me.

from lush.nvim.

ashincoder avatar ashincoder commented on June 3, 2024

here is the dmenu script for recording

#!/bin/sh

# Usage:
# `$0`: Ask for recording type via dmenu
# `$0 screencast`: Record both audio and screen
# `$0 video`: Record only screen
# `$0 audio`: Record only audio
# `$0 kill`: Kill existing recording
#
# If there is already a running instance, user will be prompted to end it.

killrecording() {
	recpid="$(cat /tmp/recordingpid)"
	# kill with SIGTERM, allowing finishing touches.
	kill -15 "$recpid"
	rm -f /tmp/recordingpid
	pkill -RTMIN+9 "${STATUSBAR:-dwmblocks}"
	# even after SIGTERM, ffmpeg may still run, so SIGKILL it.
	sleep 3
	kill -9 "$recpid"
	exit
	}

screencast() { \
	ffmpeg -y \
	-f x11grab \
	-framerate 60 \
	-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
	-i "$DISPLAY" \
	-f pulse -i default \
	-r 30 \
 	-c:v h264 -crf 0 -preset ultrafast -c:a aac \
	"$HOME/screencast-$(date '+%y%m%d-%H%M-%S').mp4" &
	echo $! > /tmp/recordingpid
       	}

video() { ffmpeg \
	-f x11grab \
	-s "$(xdpyinfo | grep dimensions | awk '{print $2;}')" \
	-i "$DISPLAY" \
 	-c:v libx264 -qp 0 -r 30 \
	"$HOME/video-$(date '+%y%m%d-%H%M-%S').mkv" &
	echo $! > /tmp/recordingpid
	}

webcamhidef() { ffmpeg \
	-f v4l2 \
	-i /dev/video0 \
	-video_size 1920x1080 \
	"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
	echo $! > /tmp/recordingpid
	}

webcam() { ffmpeg \
	-f v4l2 \
	-i /dev/video0 \
	-video_size 640x480 \
	"$HOME/webcam-$(date '+%y%m%d-%H%M-%S').mkv" &
	echo $! > /tmp/recordingpid
	}


audio() { \
	ffmpeg \
	-f alsa -i default \
	-c:a flac \
	"$HOME/audio-$(date '+%y%m%d-%H%M-%S').flac" &
	echo $! > /tmp/recordingpid
	}

askrecording() { \
	choice=$(printf "screencast\\nvideo\\nvideo selected\\naudio\\nwebcam\\nwebcam (hi-def)" | dmenu -i -p "Select recording style:")
	case "$choice" in
		screencast) screencast;;
		audio) audio;;
		video) video;;
		*selected) videoselected;;
		webcam) webcam;;
		"webcam (hi-def)") webcamhidef;;
	esac
	}

asktoend() { \
	response=$(printf "No\\nYes" | dmenu -i -p "Recording still active. End recording?") &&
	[ "$response" = "Yes" ] &&  killrecording
	}

videoselected()
{
	slop -f "%x %y %w %h" > /tmp/slop
	read -r X Y W H < /tmp/slop
	rm /tmp/slop

	ffmpeg \
	-f x11grab \
	-framerate 60 \
	-video_size "$W"x"$H" \
	-i :0.0+"$X,$Y" \
	-c:v libx264 -qp 0 -r 30 \
	"$HOME/box-$(date '+%y%m%d-%H%M-%S').mkv" &
	echo $! > /tmp/recordingpid
}

case "$1" in
	screencast) screencast;;
	audio) audio;;
	video) video;;
	*selected) videoselected;;
	kill) killrecording;;
	*) ([ -f /tmp/recordingpid ] && asktoend && exit) || askrecording;;
esac

from lush.nvim.

ashincoder avatar ashincoder commented on June 3, 2024

The think I don't understand is how to start making a colorscheme.

from lush.nvim.

rktjmp avatar rktjmp commented on June 3, 2024

Did you run through https://github.com/rktjmp/lush.nvim#usage? Which part did you get stuck on?

from lush.nvim.

ashincoder avatar ashincoder commented on June 3, 2024

I did all that but I don't know hwo to set colorschemes or stuff

from lush.nvim.

rktjmp avatar rktjmp commented on June 3, 2024

Assuming you have your theme in ~/projects/my_theme, you should add that to your runtime somehow (i.e: use '~/projects/my_theme' for packer) then call colorscheme my_theme.

from lush.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.