This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !bin/bash | |
file=$(ls -Art ~/Pictures/| grep Screenshot\ from\ | tail -n 1) | |
kdeconnect-handler ~/Pictures/"$file" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Called by sxiv(1) whenever an image gets loaded, | |
# with the name of the image file as its first argument. | |
# The output is displayed in sxiv's status bar. | |
# Arguments: | |
# $1: path to image file | |
# $2: image width | |
# $3: image height |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Zathura configuration file | |
# See man `man zathurarc' | |
# Open document in fit-width mode by default | |
set adjust-open "best-fit" | |
# One page per row by default | |
set pages-per-row 1 | |
#stop at page boundries |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
output=$(bluetoothctl show | sed -n -e 's/^.*Powered: //p') | |
if [[ $output = no ]]; then | |
bluetoothctl power on | |
notify-send -h int:transient:1 "Bluetooth" "On" | |
else | |
bluetoothctl power off | |
notify-send -h int:transient:1 "Bluetooth" "Off" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mixer.Info[] aInfos = AudioSystem.getMixerInfo(); | |
for (int i = 0; i < aInfos.length; i++) { | |
Mixer mixer = AudioSystem.getMixer(aInfos[i]); | |
// mixer.open(); | |
Line.Info[] lines = mixer.getTargetLineInfo(); | |
System.out.println((aInfos[i].getName())); | |
for (int j = 0; j < lines.length; j++) { | |
System.out.println((" " + lines[j].toString())); | |
if (lines[j] instanceof DataLine.Info) { | |
AudioFormat[] formats = ((DataLine.Info) lines[j]).getFormats(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<properties> | |
<java.version>1.8</java.version> | |
<maven.compiler.source>${java.version}</maven.compiler.source> | |
<maven.compiler.target>${java.version}</maven.compiler.target> | |
</properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AudioFormat format = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, | |
44100, | |
16, | |
2, | |
4, | |
44100, | |
false); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.sound.sampled.*; | |
import java.io.*; | |
import java.util.Scanner; | |
public class MicStuff { | |
public static void main(String[] args) throws LineUnavailableException, IOException, UnsupportedAudioFileException { | |
AudioFormat format = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, | |
44100, | |
16, | |
2, |
NewerOlder