<commit_before>#!/bin/bash
echo "------------------------"
echo "Created By: <NAME>"
echo "https://obakfahad.com"
echo "Github Repository: https://github.com/obakfahad/giffider"
echo "------------------------"
me=$(whoami)
loc=/home/$me/Pictures/
cd $loc
echo "1. Giffider in Full Screen?"
echo "2. Giffider in specific Windows?"
read fw
if [ $fw = "1" ]
then	

	hor=$(xdpyinfo | awk -F'[ x]+' '/dimensions:/{print $3}')
	ver=$(xdpyinfo | awk -F'[ x]+' '/dimensions:/{print $4}')
	echo "Dual monitor ? Type 'y' if Yes and 'n' for no."
	read ifdual
	if [ $ifdual = "y" ]
		then
			echo "Horizontal = "$hor	
			echo "Vertical="$ver
			echo "Your gif Duration ?"
			read duration
			echo "Your gif's name ?"
			read giffidername
			byzanz-record --duration=$duration --width=$hor --height=$ver giffider-$giffidername.gif
		else
			echo "Horizontal = "$[hor/2]
			horizontal=$[hor/2]
			echo "Vertical="$ver
			echo "Your gif Duration ?"
			read duration
			echo "Your gif's name ?"
			read giffidername
			byzanz-record --duration=$duration --width=$horizontal --height=$ver giffider-$giffidername.gif
	fi

fi




if [ $fw = "2" ]
then
	
	rm file.txt
	rm 1.txt
	xwininfo >> file.txt
	sed -n '8,13p' file.txt | awk 'NF{print $NF}' >> 1.txt
	X=$(sed -n '1p' 1.txt)
	Y=$(sed -n '2p' 1.txt)
	width=$(sed -n '5p' 1.txt)
	height=$(sed -n '6p' 1.txt)
	echo "Your gif Duration ?"
	read duration
	echo "Your gif's name ?"
	read giffidername
	byzanz-record --duration=$duration --x=$X --y=$Y --width=$width --height=$height giffider-$giffidername.gif<commit_msg>Corrected some lines but found an error with dualmonitor. Will update it soon.<commit_after>#!/bin/bash
echo "------------------------"
echo "Created By: <NAME>"
echo "https://obakfahad.com"
echo "Github Repository: https://github.com/obakfahad/giffider"
echo "------------------------"
me=$(whoami)
loc=/home/$me/Pictures/
cd $loc
echo "1. Giffider in Full Screen?"
echo "2. Giffider in specific Window?"
read fw
if [ $fw = "1" ]
then	

	hor=$(xdpyinfo | awk -F'[ x]+' '/dimensions:/{print $3}')
	ver=$(xdpyinfo | awk -F'[ x]+' '/dimensions:/{print $4}')
	echo "1. Dual monitor ?"
	echo "2. Single Monitor ?"
	read ifdual
	if [ $ifdual = "1" ]
		then
			echo "1. Dual Monitor."
			echo "Horizontal = "$hor	
			echo "Vertical="$ver
			echo "Your gif Duration ?"
			read duration
			echo "Your gif's name ?"
			read giffidername
			byzanz-record --duration=$duration --width=$hor --height=$ver giffider-$giffidername.gif
			
			
			
			
	if [ $ifdual = "2" ]
			echo "2. Single Monitor"
			echo "Horizontal = "$[hor/2]
			horizontal=$[hor/2]
			echo "Vertical="$ver
			echo "Your gif Duration ?"
			read duration
			echo "Your gif's name ?"
			read giffidername
			byzanz-record --duration=$duration --width=$horizontal --height=$ver giffider-$giffidername.gif
	fi

fi




if [ $fw = "2" ]
then
	
	rm .file.txt
	rm .1.txt
	xwininfo >> .file.txt
	sed -n '8,13p' .file.txt | awk 'NF{print $NF}' >> .1.txt
	X=$(sed -n '1p' .1.txt)
	Y=$(sed -n '2p' .1.txt)
	width=$(sed -n '5p' .1.txt)
	height=$(sed -n '6p' .1.txt)
	echo "Your gif Duration ?"
	read duration
	echo "Your gif's name ?"
	read giffidername
	byzanz-record --duration=$duration --x=$X --y=$Y --width=$width --height=$height giffider-$giffidername.gif
{'fraction_non_alphanumeric': 0.20024570024570024, 'fraction_numerical': 0.014742014742014743, 'mean_word_length': 2.9193742478941034, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6287843', 'n_tokens_mistral': 1354, 'n_tokens_neox': 1212, 'n_words': 348}