ffmpeg -thread_queue_size 512 -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 /home/username/screencasts/$(date +%Hh_%Mm_%Ss_%d_%B_%Y).mp4
bindsym --release Print exec --no-startup-id "maim -s -c 1,0,0,0.6 ~/Screenshots/$(date +%Hh_%Mm_%Ss_%d_%B_%Y).png"
bindsym --release $mod+Print exec --no-startup-id "maim -i $(xdotool getactivewindow) ~/Screenshots/$(date +%Hh_%Mm_%Ss_%d_%B_%Y).png"
const data = Array
.from(document.querySelectorAll('.input-container'))
.reduce((acc, el, i) => (
acc[`input${i + 1}`] = [
'parameter',
'result',
'select',
'range',
].map(name => el.querySelector(`[name="${name}"]`).value),
acc
), {});
let interval = null
class Slider {
constructor(elemID, onLoad) {
this.elem = document.querySelector(`#${elemID}`);
this.slidesMain = this.elem.querySelectorAll('.slide');
this.currentSlide = 0
this.onLoad = onLoad
this.changeSlideOnHover()
if (onLoad) {
this.changeSlideOnLoad()
}
}
nextSlide() {
this.slidesMain[this.currentSlide].classList.remove("showing");
this.currentSlide = (this.currentSlide + 1) % this.slidesMain.length;
this.slidesMain[this.currentSlide].classList.add("showing");
}
changeSlideOnHover() {
this.elem.addEventListener("mouseenter", () => {
clearTimeout(interval)
this.nextSlide()
interval = setInterval(() => {
this.nextSlide()
}, 6000);
});
this.elem.addEventListener("mouseleave", () => {
clearTimeout(interval)
});
}
changeSlideOnLoad() {
this.nextSlide()
interval = setInterval(() => {
this.nextSlide()
}, 6000);
}
}
const slider1 = new Slider('slidesLeft', true);
const slider2 = new Slider('slidesRight', false);
.presentation-title {
position: relative;
padding-bottom: 124px;
font-size: 75px;
color: #ffffff;
z-index: 2;
font-weight: 800;
pointer-events: none;
}
function tickRate(rate, tick=60000){
var time = 0;
var money = 0;
var xtick = rate / 60
var interval = setInterval(()=>console.log(`заработано: ${(money+=xtick).toFixed(2)} к ${(++time)} минуте`), tick)
}
tickRate(200)
//"заработано: 3.33 к 1 минуте"
//"заработано: 6.67 к 2 минуте"
//"заработано: 10.00 к 3 минуте"
//"заработано: 13.33 к 4 минуте"
//"заработано: 16.67 к 5 минуте"
//"заработано: 20.00 к 6 минуте"
//"заработано: 23.33 к 7 минуте"
//"заработано: 26.67 к 8 минуте"
<ul>
<li>Elem</li>
<li>Elem</li>
<li>Elem</li>
<li>Elem</li>
</ul>
var a = document.querySelector('ul > li:nth-child(3)'); // берем 3 элемент li в списке ul.
a.classList.add('active'); // добавляем класс active 3 элементу
ul > li:nth-child(3) {
color: red;
}