@ -1,4 +1,5 @@ | |||||
zsh/secret:63d3fba77f570fbb9e9f999303a2828c4a2d88990836e80ea08a48c48619da22 | zsh/secret:63d3fba77f570fbb9e9f999303a2828c4a2d88990836e80ea08a48c48619da22 | ||||
mail/mbsyncrc:01f68fec13c3876b2bb7e43b8314e8caca761301acb0818cb25a43b14051061b | |||||
mail/msmtp/config:41dcd3d97414cdeb53c3a8acb7966f9c33ad6bc3c0a47d78f3c1484f910db618 | |||||
misc/spotifyd.conf: | |||||
mail/mbsyncrc:65eec91b162f829575c2cc4b2428faa90eb71f3f79ba779bcfe70712f161cabe | |||||
mail/msmtp/config:529c5ae169a81f528ece6356c2bfb23f20af93619386aa018f28fab9505271ec | |||||
misc/spotifyd.conf:dd73afe8809498ba3b00ba9aa99e78fb3606867dc4871231880d2ebfd55196a9 | |||||
misc/wakatime.cfg:e306146d45036c38f15aa9a817fc172bdca3c4c9d9ed3c4f6fe1d8d93d783d78 |
@ -1,4 +1,4 @@ | |||||
#!/bin/bash | #!/bin/bash | ||||
pacman -Qq | grep -v "$(pacman -Qqm)" | grep -v yay > ~/.dotfiles/arch-setup/nonAUR.txt | pacman -Qq | grep -v "$(pacman -Qqm)" | grep -v yay > ~/.dotfiles/arch-setup/nonAUR.txt | ||||
pacman -Qqm | grep -v canon | grep -v capt > ~/.dotfiles/arch-setup/AUR.txt | |||||
pacman -Qqm | grep -v canon | grep -v capt | grep -v cups> ~/.dotfiles/arch-setup/AUR.txt | |||||
@ -1 +0,0 @@ | |||||
/home/yigit/.dotfiles/fonts |
@ -1,7 +1,3 @@ | |||||
smb://yigitcolakoglu.com;yigitcolakoglu@home.yigitcolakoglu.com/dockerstorage/ dockerstorage on home.yigitcolakoglu.com | |||||
file:///home/yigit/Projects Projects | |||||
file:///home/yigit/Downloads Downloads | |||||
file:///home/yigit/Nextcloud Nextcloud | |||||
file:///home/yigit/Pictures Pictures | |||||
file:///home/yigit/Documents Documents | |||||
file:///home/yigit/Pictures Pictures | |||||
file:///home/yigit/Nextcloud | |||||
file:///home/yigit/Documents/ | |||||
file:///home/yigit/Pictures/ |
@ -1,2 +1,2 @@ | |||||
[Settings] | [Settings] | ||||
gtk-application-prefer-dark-theme=0 | |||||
gtk-application-prefer-dark-theme=1 |
@ -1,5 +1,5 @@ | |||||
#!/bin/bash | #!/bin/bash | ||||
setxkbmap us,tr -variant altgr-intl, -option caps:escape # Set keyboard layout. map CapsLock to Esc | setxkbmap us,tr -variant altgr-intl, -option caps:escape # Set keyboard layout. map CapsLock to Esc | ||||
xset r rate 120 40 | |||||
xset r rate 180 40 | |||||
xmodmap -e "clear control" -e "add control = Control_L" -e "clear mod3" -e "add mod3 = Control_R" # Map right Ctrl to Mod3Mask | xmodmap -e "clear control" -e "add control = Control_L" -e "clear mod3" -e "add mod3 = Control_R" # Map right Ctrl to Mod3Mask |
@ -1,89 +0,0 @@ | |||||
#!/usr/bin/env python3 | |||||
""" | |||||
A python script to get battery level from Bluetooth headsets | |||||
""" | |||||
# License: GPL-3.0 | |||||
# Author: @TheWeirdDev | |||||
# 29 Sept 2019 | |||||
import errno | |||||
import bluetooth | |||||
import sys | |||||
def send(sock, message): | |||||
sock.send(b"\r\n" + message + b"\r\n") | |||||
def getATCommand(sock, line, device): | |||||
blevel = -1 | |||||
if b"BRSF" in line: | |||||
send(sock, b"+BRSF: 1024") | |||||
send(sock, b"OK") | |||||
elif b"CIND=" in line: | |||||
send(sock, b"+CIND: (\"battchg\",(0-5))") | |||||
send(sock, b"OK") | |||||
elif b"CIND?" in line: | |||||
send(sock, b"+CIND: 5") | |||||
send(sock, b"OK") | |||||
elif b"BIND=?" in line: | |||||
# Announce that we support the battery level HF indicator | |||||
# https://www.bluetooth.com/specifications/assigned-numbers/hands-free-profile/ | |||||
send(sock, b"+BIND: (2)") | |||||
send(sock, b"OK") | |||||
elif b"BIND?" in line: | |||||
# Enable battery level HF indicator | |||||
send(sock, b"+BIND: 2,1") | |||||
send(sock, b"OK") | |||||
elif b"XAPL=" in line: | |||||
send(sock, b"+XAPL: iPhone,7") | |||||
send(sock, b"OK") | |||||
elif b"IPHONEACCEV" in line: | |||||
parts = line.strip().split(b',')[1:] | |||||
if len(parts) > 1 and (len(parts) % 2) == 0: | |||||
parts = iter(parts) | |||||
params = dict(zip(parts, parts)) | |||||
if b'1' in params: | |||||
blevel = (int(params[b'1']) + 1) * 10 | |||||
elif b"BIEV=" in line: | |||||
params = line.strip().split(b"=")[1].split(b",") | |||||
if params[0] == b"2": | |||||
blevel = int(params[1]) | |||||
else: | |||||
send(sock, b"OK") | |||||
if blevel != -1: | |||||
print(f"Battery level for {device} is {blevel}%") | |||||
return False | |||||
return True | |||||
def main(): | |||||
if (len(sys.argv) < 2): | |||||
print("Usage: bl_battery.py <BT_MAC_ADDRESS_1>[.PORT] ...") | |||||
print(" Port number is optional (default = 4)") | |||||
exit() | |||||
else: | |||||
for device in sys.argv[1:]: | |||||
i = device.find('.') | |||||
if i == -1: | |||||
port = 4 | |||||
else: | |||||
port = int(device[i+1:]) | |||||
device = device[:i] | |||||
try: | |||||
s = bluetooth.BluetoothSocket(bluetooth.RFCOMM) | |||||
s.connect((device, port)) | |||||
while getATCommand(s, s.recv(128), device): | |||||
pass | |||||
s.close() | |||||
except OSError as e: | |||||
print(f"{device} is offline", e) | |||||
if __name__ == "__main__": | |||||
main() |
@ -0,0 +1,24 @@ | |||||
#!/bin/bash | |||||
hour=$(date +"%H") | |||||
morning=11 | |||||
afternoon=19 | |||||
cached=$(cat /tmp/day_cache) | |||||
if [ $hour \< $morning ]; then | |||||
if [ ! "$cached" = "morning" ]; then | |||||
feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-cow.jpg | |||||
echo "morning" > /tmp/day_cache | |||||
fi | |||||
elif [ $hour \< $afternoon ]; then | |||||
if [ ! "$cached" = "afternoon" ]; then | |||||
feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-sea.jpg | |||||
echo "afternoon" > /tmp/day_cache | |||||
fi | |||||
else | |||||
if [ ! "$cached" = "night" ]; then | |||||
feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper-wheel.jpg | |||||
echo "night" > /tmp/day_cache | |||||
fi | |||||
fi |
@ -1,7 +1,11 @@ | |||||
#!/bin/sh | #!/bin/sh | ||||
cat <<EOF | xmenu | cat <<EOF | xmenu | ||||
[]= Tiled Layout 0 | |||||
><> Floating Layout 1 | |||||
[M] Monocle Layout 2 | |||||
0-Tiled Layout | |||||
1-Dwindle | |||||
2-Grid Layout | |||||
3-Centered Master | |||||
4-Centered Floating Master | |||||
5-Monocle Layout | |||||
6-Deck Layout | |||||
EOF | EOF |
@ -1,15 +0,0 @@ | |||||
notmuch tag +g_draft path:"Gmail/draft/**" | |||||
notmuch tag +g_sent path:"Gmail/sent/**" | |||||
notmuch tag +g_spam path:"Gmail/spam/**" | |||||
notmuch tag +g_archive path:"Gmail/archived/**" | |||||
notmuch tag +o_draft path:"Outlook/draft/**" | |||||
notmuch tag +o_sent path:"Outlook/sent/**" | |||||
notmuch tag +o_spam path:"Outlook/spam/**" | |||||
notmuch tag +o_archive path:"Outlook/archive/**" | |||||
notmuch tag +p_draft path:"Private/draft/**" | |||||
notmuch tag +p_sent path:"Private/sent/**" | |||||
notmuch tag +p_spam path:"Private/spam/**" | |||||
notmuch tag +p_archive path:"Private/archive/**" | |||||
@ -1,8 +0,0 @@ | |||||
new=$(notmuch search 'tag:inbox and tag:unread and NOT path:*/archive NOT tag:archive and NOT tag:spam and NOT tag:sent and NOT tag:draft' | wc -l) | |||||
if [[ $new != 0 ]] | |||||
then | |||||
dunstify --icon='/home/yigit/.icons/mail.png' -a 'New Email' "You have $new new mail." | |||||
fi | |||||
echo $new > /home/yigit/.config/mail_num |
@ -0,0 +1,66 @@ | |||||
#!/bin/bash | |||||
## zaread - a simple script created by paoloap. | |||||
# default variables | |||||
zadir="$HOME"'/.zaread/' | |||||
reader="zathura" | |||||
# if ~/.zaread doesn't exist, we create it. | |||||
if [[ ! -d "$zadir" ]]; then | |||||
mkdir "$zadir" | |||||
mkdir "$zadir"cksum | |||||
fi | |||||
# if no arguments exit. | |||||
if [[ -z $@ ]]; then exit 1; fi | |||||
# if zathura is not installed, we force the user to choose a pdf reader | |||||
# after three wrong commands, the script exits 1 | |||||
# if the user inserts a command that exists but is not a pdf reader then... then fuck him. | |||||
counter=0 | |||||
while [[ -z `command -v "$reader"` ]]; do | |||||
if [ $counter -gt 3 ]; then exit 1; fi | |||||
let counter+=1 | |||||
echo "Seems that you don't have zathura installed. Please choose an installed PDF reader:" | |||||
read reader | |||||
done | |||||
echo "We'll read PDF with $reader." | |||||
## create position and file variables ## | |||||
# complete file name (path excluded): | |||||
file=`echo "$@" | rev | cut -d'/' -f1 | rev` | |||||
# complete directory path: | |||||
# if it has been inserted absolute path ($@ starts with '/') | |||||
if [[ $@ =~ ^/ ]]; then | |||||
directory=`echo "$@" | rev | cut -d'/' -f2- | rev`"/" | |||||
# else (relative path inserted) | |||||
else | |||||
dir=`pwd`"/"`echo "$@" | sed 's|.[^/]*$||'`"/" | |||||
directory=`echo "$dir" | sed 's|//|/|'` | |||||
fi | |||||
echo "$directory""$file" | |||||
# if file type is pdf, then just read the file | |||||
if [[ `file "$directory""$file" | cut -d':' -f2 | cut -d' ' -f2` == "PDF" ]]; then | |||||
echo "The file is already in PDF format." | |||||
$reader "$directory""$file" | |||||
# else check if you already have its pdf version (if not, create it) | |||||
else | |||||
pdffile=`echo "$file" | rev | cut -d'.' -f2- | rev`".pdf" | |||||
check=`cksum "$directory""$file" | awk '{print $1}'` | |||||
# if pdf version hasn't ever been created, or it changed, then | |||||
# make conversion and store the checksum. | |||||
if [[ ( ! -f "$zadir$pdffile" ) || ( ! "$check" == `cat "$zadir"cksum/"$file".check` ) ]]; then | |||||
# if it's a mobi file, then convert it to epub (the command depends on calibre) | |||||
if [[ "$file" =~ ^.*\.mobi$ ]]; then | |||||
ebook-converter "$directory""$file" "$directory"`echo "$file" | sed 's/mobi$/epub/'` | |||||
else | |||||
libreoffice --convert-to pdf "$directory""$file" --headless --outdir "$zadir" | |||||
fi | |||||
echo "$check" > "$zadir"cksum/"$file".check | |||||
fi | |||||
$reader "$zadir$pdffile" | |||||
fi |