Browse Source

Help me I cant stop

main
Yigit Colakoglu 4 years ago
parent
commit
111b5f1b15
30 changed files with 149 additions and 299 deletions
  1. +1
    -0
      .gitignore
  2. +4
    -3
      .gitsecret/paths/mapping.cfg
  3. +1
    -38
      arch-setup/AUR.txt
  4. +13
    -116
      arch-setup/nonAUR.txt
  5. +1
    -1
      arch-setup/plist.sh
  6. +0
    -0
      backgrounds/wallpaper-old.jpg
  7. +2
    -2
      firefox/vimium.json
  8. +0
    -1
      fonts/fonts
  9. +3
    -7
      gtk/gtk-3.0/bookmarks
  10. +1
    -1
      gtk/gtk-4.0/settings.ini
  11. +5
    -3
      install.sh
  12. BIN
      mail/mbsyncrc.secret
  13. BIN
      mail/msmtp/config.secret
  14. +1
    -1
      misc/keyboard
  15. BIN
      misc/spotifyd.conf.secret
  16. BIN
      misc/wakatime.cfg.secret
  17. +0
    -89
      scripts/bluetooth_battery.py
  18. +24
    -0
      scripts/daily-update
  19. +7
    -2
      scripts/dmenu-refresh
  20. +7
    -3
      scripts/layoutmenu.sh
  21. +0
    -15
      scripts/mail_tag.sh
  22. +0
    -8
      scripts/mails.sh
  23. +2
    -2
      scripts/screensaver_toggle
  24. +2
    -0
      scripts/status-bar/time
  25. +1
    -1
      scripts/status-bar/weather
  26. +66
    -0
      scripts/zaread
  27. +1
    -1
      suckless/dwm/config.h
  28. +4
    -3
      suckless/dwm/keybind.h
  29. +3
    -2
      xorg/xinitrc
  30. BIN
      zsh/secret.secret

+ 1
- 0
.gitignore View File

@ -4,3 +4,4 @@ zsh/secret
mail/mbsyncrc mail/mbsyncrc
mail/msmtp/config mail/msmtp/config
misc/spotifyd.conf misc/spotifyd.conf
misc/wakatime.cfg

+ 4
- 3
.gitsecret/paths/mapping.cfg View File

@ -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
- 38
arch-setup/AUR.txt View File

@ -10,7 +10,6 @@ brave-bin
canto-next-git canto-next-git
checkupdates+aur checkupdates+aur
checkupdates-aur checkupdates-aur
cndrvcups-lt
cordless-bin cordless-bin
direnv direnv
downgrade downgrade
@ -33,49 +32,13 @@ mutt-wizard
ncpamixer ncpamixer
nerd-fonts-hack nerd-fonts-hack
notion-app notion-app
notion-enhancer
numix-icon-theme-git
nvm nvm
pam-gnupg
perl-checkupdates-aur perl-checkupdates-aur
perl-www-aur perl-www-aur
pipes.sh
plymouth-git
plymouth-theme-cubes-git
plymouth-theme-darth-vader-git
postman-bin
python-click-spinner
python-delorean
qt5-styleplugins
ranger-git
readability-cli
renpy-sdk
rofi-bluetooth-git
ruby-erubis
ruby-xdg
spicetify-cli
spotify spotify
spotify-tui spotify-tui
spotifyd-full-git spotifyd-full-git
sselp
sublime-text-3
surf
tela-icon-theme
terminal_dimensions-git
termpdf-git
ttf-material-design-icons
ttf-symbola ttf-symbola
typora
vtop
vue-cli
wallabag-client
wd719x-firmware
whatsapp-nativefier-dark
xbanish-timeout-git
xchat-se
xkb-switch xkb-switch
xkblayout-state-git
xmenu xmenu
yaft
ytfzf-git
zoom
ytfzf

+ 13
- 116
arch-setup/nonAUR.txt View File

@ -1,6 +1,5 @@
a52dec a52dec
aalib aalib
abook
accountsservice accountsservice
ack ack
acl acl
@ -25,11 +24,10 @@ at-spi2-atk
at-spi2-core at-spi2-core
atk atk
atkmm atkmm
atool
attr attr
audit audit
autoconf autoconf
autoconf-archive
autoconf2.13
automake automake
avahi avahi
baobab baobab
@ -66,28 +64,19 @@ cantarell-fonts
canto-curses canto-curses
capnproto capnproto
capstone capstone
cbindgen
cblas cblas
cdparanoia cdparanoia
cheese
chmlib chmlib
chromaprint chromaprint
chrony chrony
cinnamon-desktop cinnamon-desktop
clang
clipnotify clipnotify
clucene clucene
clutter
clutter-gst
clutter-gtk
cmake cmake
code code
cogl
colord colord
compiler-rt
conky conky
coreutils coreutils
cpupower
cracklib cracklib
cronie cronie
cryptsetup cryptsetup
@ -103,7 +92,6 @@ dbus
dbus-glib dbus-glib
dbus-python dbus-python
dconf dconf
dejagnu
desktop-file-utils desktop-file-utils
device-mapper device-mapper
diffutils diffutils
@ -116,28 +104,26 @@ docbook-xml
docbook-xsl docbook-xsl
dosfstools dosfstools
double-conversion double-conversion
doxygen
dunst dunst
e2fsprogs e2fsprogs
efibootmgr efibootmgr
efitools efitools
efivar efivar
electron electron
electron6
elfutils elfutils
elinks
enchant enchant
engrampa
exempi exempi
exfat-utils exfat-utils
exiv2 exiv2
exo exo
expat expat
expect
faac faac
faad2 faad2
fakeroot fakeroot
feh feh
ffmpeg ffmpeg
ffmpegthumbnailer
fftw fftw
figlet figlet
file file
@ -145,19 +131,17 @@ filesystem
findutils findutils
firefox-developer-edition firefox-developer-edition
flac flac
fltk
flex
fluidsynth fluidsynth
fontconfig fontconfig
fontforge fontforge
foremost foremost
freetype2 freetype2
frei0r-plugins
fribidi fribidi
fuse-common fuse-common
fuse2 fuse2
fuse3 fuse3
fzf fzf
gavl
gawk gawk
gc gc
gcc gcc
@ -165,8 +149,6 @@ gcc-libs
gconf gconf
gcr gcr
gd gd
gdb
gdb-common
gdbm gdbm
gdk-pixbuf-xlib gdk-pixbuf-xlib
gdk-pixbuf2 gdk-pixbuf2
@ -193,10 +175,8 @@ glslang
glu glu
gmime3 gmime3
gmp gmp
gn-m85
gnome-autoar gnome-autoar
gnome-bluetooth gnome-bluetooth
gnome-common
gnome-desktop gnome-desktop
gnome-disk-utility gnome-disk-utility
gnome-keyring gnome-keyring
@ -205,8 +185,6 @@ gnome-session
gnome-settings-daemon gnome-settings-daemon
gnome-shell gnome-shell
gnome-themes-extra gnome-themes-extra
gnome-video-effects
gnu-free-fonts
gnupg gnupg
gnuplot gnuplot
gnutls gnutls
@ -214,7 +192,6 @@ go
gobject-introspection gobject-introspection
gobject-introspection-runtime gobject-introspection-runtime
gparted gparted
gperf
gpgme gpgme
gpm gpm
gptfdisk gptfdisk
@ -307,6 +284,7 @@ haskell-errors
haskell-file-embed haskell-file-embed
haskell-glob haskell-glob
haskell-haddock-library haskell-haddock-library
haskell-haddock-library1.9
haskell-hashable haskell-hashable
haskell-hourglass haskell-hourglass
haskell-hslua haskell-hslua
@ -380,10 +358,10 @@ haskell-xml-conduit
haskell-xml-types haskell-xml-types
haskell-zip-archive haskell-zip-archive
haskell-zlib haskell-zlib
hdf5
hexchat hexchat
hicolor-icon-theme hicolor-icon-theme
hidapi hidapi
highlight
hspell hspell
htop htop
http-parser http-parser
@ -391,17 +369,14 @@ hunspell
hwids hwids
hwloc hwloc
hyphen hyphen
i7z
iana-etc iana-etc
icu icu
ijs ijs
imagemagick imagemagick
imake
imlib2 imlib2
inetutils inetutils
inkscape inkscape
intel-ucode intel-ucode
intltool
iproute2 iproute2
iptables iptables
iputils iputils
@ -409,7 +384,6 @@ ipython
irssi irssi
iso-codes iso-codes
isync isync
itstool
jack jack
jansson jansson
jasper jasper
@ -452,19 +426,7 @@ less
lhasa lhasa
lib32-gcc-libs lib32-gcc-libs
lib32-glibc lib32-glibc
lib32-icu
lib32-libjpeg-turbo
lib32-libpng12
lib32-libtiff
lib32-libxml2
lib32-ncurses
lib32-popt
lib32-readline
lib32-xz
lib32-zlib
lib32-zstd
libabw libabw
libaec
libaio libaio
libarchive libarchive
libass libass
@ -571,7 +533,7 @@ liblrdf
libluv libluv
libmad libmad
libmatroska libmatroska
libmaxminddb
libmediainfo
libmfx libmfx
libmicrodns libmicrodns
libmicrohttpd libmicrohttpd
@ -618,7 +580,6 @@ libpipeline
libplacebo libplacebo
libplist libplist
libpng libpng
libpng12
libproxy libproxy
libpsl libpsl
libpulse libpulse
@ -665,7 +626,6 @@ libunrar
libunwind libunwind
libupnp libupnp
libusb libusb
libusb-compat
libusbmuxd libusbmuxd
libutempter libutempter
libuv libuv
@ -722,6 +682,7 @@ libxvmc
libxxf86vm libxxf86vm
libyaml libyaml
libyuv libyuv
libzen
libzip libzip
libzmf libzmf
licenses licenses
@ -733,17 +694,15 @@ linux
linux-api-headers linux-api-headers
linux-firmware linux-firmware
linux-headers linux-headers
lld
llvm
llvm-libs llvm-libs
lm_sensors lm_sensors
lmdb lmdb
lpsolve lpsolve
lua lua
lua51
lua52 lua52
lua53 lua53
luajit luajit
luit
lvm2 lvm2
lxappearance lxappearance
lz4 lz4
@ -751,7 +710,6 @@ lzo
m4 m4
mailcap mailcap
make make
mallard-ducktype
man-db man-db
mariadb mariadb
mariadb-clients mariadb-clients
@ -760,6 +718,7 @@ mathjax
mathjax2 mathjax2
md4c md4c
mdadm mdadm
mediainfo
mesa mesa
meson meson
minizip minizip
@ -769,7 +728,6 @@ mkinitcpio-busybox
mlocate mlocate
mobile-broadband-provider-info mobile-broadband-provider-info
mono mono
mozilla-common
mpfr mpfr
mpg123 mpg123
mpv mpv
@ -779,9 +737,7 @@ mtdev
mujs mujs
mutter mutter
mysql-workbench mysql-workbench
nasm
ncurses ncurses
ncurses5-compat-libs
ndctl ndctl
nemo nemo
neofetch neofetch
@ -792,14 +748,12 @@ net-tools
netpbm netpbm
nettle nettle
networkmanager networkmanager
newsboat
nextcloud-client nextcloud-client
ngrok ngrok
ninja ninja
nm-connection-editor nm-connection-editor
node-gyp node-gyp
nodejs nodejs
notmuch
notmuch-runtime notmuch-runtime
noto-fonts noto-fonts
noto-fonts-emoji noto-fonts-emoji
@ -809,6 +763,7 @@ nspr
nss nss
ntfs-3g ntfs-3g
nuspell nuspell
odt2txt
oniguruma oniguruma
openal openal
opencore-amr opencore-amr
@ -876,7 +831,6 @@ perl-timedate
perl-try-tiny perl-try-tiny
perl-uri perl-uri
perl-www-robotrules perl-www-robotrules
perl-xml-parser
perl-yaml-tiny perl-yaml-tiny
php php
picom picom
@ -910,7 +864,6 @@ python-appdirs
python-apsw python-apsw
python-argh python-argh
python-argon2_cffi python-argon2_cffi
python-asn1crypto
python-astroid python-astroid
python-async_generator python-async_generator
python-attrs python-attrs
@ -1077,47 +1030,9 @@ python-yaml
python-zeroconf python-zeroconf
python-zipp python-zipp
python2 python2
python2-appdirs
python2-asn1crypto
python2-backports
python2-cachecontrol
python2-cffi
python2-chardet
python2-colorama
python2-configparser
python2-contextlib2
python2-cryptography
python2-distlib
python2-distro
python2-docutils python2-docutils
python2-enum34
python2-future python2-future
python2-html5lib
python2-idna
python2-importlib-metadata
python2-ipaddress
python2-msgpack
python2-ordered-set
python2-packaging
python2-pathlib2
python2-pep517
python2-pip
python2-progress
python2-psutil
python2-pycparser
python2-pygame-sdl2 python2-pygame-sdl2
python2-pyopenssl
python2-pyparsing
python2-requests
python2-resolvelib
python2-retrying
python2-scandir
python2-setuptools
python2-six
python2-toml
python2-urllib3
python2-webencodings
python2-zipp
qpdf qpdf
qt5-base qt5-base
qt5-declarative qt5-declarative
@ -1126,7 +1041,6 @@ qt5-imageformats
qt5-location qt5-location
qt5-quickcontrols2 qt5-quickcontrols2
qt5-svg qt5-svg
qt5-tools
qt5-wayland qt5-wayland
qt5-webchannel qt5-webchannel
qt5-webengine qt5-webengine
@ -1135,6 +1049,7 @@ qt5-x11extras
qt5ct qt5ct
qtkeychain-qt5 qtkeychain-qt5
radare2 radare2
ranger
rapidjson rapidjson
raptor raptor
rasqal rasqal
@ -1155,16 +1070,13 @@ rtkit
rtmpdump rtmpdump
rubberband rubberband
ruby ruby
ruby-bundler
ruby-hpricot ruby-hpricot
ruby-irb ruby-irb
ruby-mustache ruby-mustache
ruby-rainbow
ruby-rdiscount ruby-rdiscount
ruby-rdoc ruby-rdoc
ruby-reline ruby-reline
ruby-ronn ruby-ronn
ruby-thor
rubygems rubygems
run-parts run-parts
rust rust
@ -1191,7 +1103,6 @@ sonic-visualiser
sord sord
sound-theme-freedesktop sound-theme-freedesktop
soundtouch soundtouch
source-highlight
spandsp spandsp
speex speex
speexdsp speexdsp
@ -1202,7 +1113,6 @@ srt
sshfs sshfs
startup-notification startup-notification
stegoveritas stegoveritas
stfl
sudo sudo
svt-av1 svt-av1
svt-hevc svt-hevc
@ -1218,11 +1128,9 @@ taglib
talloc talloc
tar tar
tbb tbb
tcl
tcsh tcsh
tdb tdb
telegram-desktop telegram-desktop
termite-terminfo
texinfo texinfo
texlive-bibtexextra texlive-bibtexextra
texlive-bin texlive-bin
@ -1237,7 +1145,6 @@ texlive-pictures
texlive-pstricks texlive-pstricks
texlive-publishers texlive-publishers
texlive-science texlive-science
thermald
thin-provisioning-tools thin-provisioning-tools
thunar thunar
thunderbird thunderbird
@ -1248,6 +1155,7 @@ tmux
tor tor
torbrowser-launcher torbrowser-launcher
tracker3 tracker3
tre
tree tree
tree-sitter tree-sitter
tslib tslib
@ -1257,26 +1165,22 @@ ttf-joypixels
ttf-liberation ttf-liberation
ttf-linux-libertine ttf-linux-libertine
ttf-opensans ttf-opensans
turbostat
twine twine
twolame twolame
tzdata tzdata
uchardet uchardet
udisks2 udisks2
ueberzug ueberzug
unclutter
unibilium unibilium
unixodbc unixodbc
unrar unrar
unzip unzip
upower upower
urlview
usbmuxd usbmuxd
util-linux util-linux
util-linux-libs util-linux-libs
v4l-utils v4l-utils
vala vala
vamp-plugin-sdk
vi vi
vid.stab vid.stab
vim-runtime vim-runtime
@ -1286,7 +1190,6 @@ vlc
vmaf vmaf
volume_key volume_key
vsqlite++ vsqlite++
vte-common
vulkan-icd-loader vulkan-icd-loader
w3m w3m
wavpack wavpack
@ -1309,7 +1212,6 @@ x265
xapian-core xapian-core
xapp xapp
xautolock xautolock
xbitmaps
xcb-proto xcb-proto
xcb-util xcb-util
xcb-util-image xcb-util-image
@ -1321,7 +1223,6 @@ xclip
xdg-dbus-proxy xdg-dbus-proxy
xdg-utils xdg-utils
xf86-input-libinput xf86-input-libinput
xf86-video-amdgpu
xf86-video-intel xf86-video-intel
xf86-video-vesa xf86-video-vesa
xfconf xfconf
@ -1389,9 +1290,6 @@ xxhash
xz xz
yajl yajl
yarn yarn
yasm
yelp-tools
yelp-xsl
youtube-dl youtube-dl
zathura zathura
zathura-pdf-mupdf zathura-pdf-mupdf
@ -1399,7 +1297,6 @@ zbar
zenity zenity
zeromq zeromq
zimg zimg
zip
zita-alsa-pcmi zita-alsa-pcmi
zita-resampler zita-resampler
zlib zlib


+ 1
- 1
arch-setup/plist.sh View File

@ -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

backgrounds/wallpaper.jpg → backgrounds/wallpaper-old.jpg View File


+ 2
- 2
firefox/vimium.json
File diff suppressed because it is too large
View File


+ 0
- 1
fonts/fonts View File

@ -1 +0,0 @@
/home/yigit/.dotfiles/fonts

+ 3
- 7
gtk/gtk-3.0/bookmarks View File

@ -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
- 1
gtk/gtk-4.0/settings.ini View File

@ -1,2 +1,2 @@
[Settings] [Settings]
gtk-application-prefer-dark-theme=0
gtk-application-prefer-dark-theme=1

+ 5
- 3
install.sh View File

@ -97,6 +97,7 @@ ln -s ~/.dotfiles/misc/htop ~/.config/htop
ln -s ~/.dotfiles/misc/.fzf.zsh ~/.fzf.zsh ln -s ~/.dotfiles/misc/.fzf.zsh ~/.fzf.zsh
ln -s ~/.dotfiles/misc/keyboard ~/.keyboard ln -s ~/.dotfiles/misc/keyboard ~/.keyboard
ln -s ~/.dotfiles/misc/mimeapps.list ~/.config/mimeapps.list ln -s ~/.dotfiles/misc/mimeapps.list ~/.config/mimeapps.list
ln -s ~/.dotfiles/misc/wakatime.cfg ~/.wakatime.cfg
mkdir -p ~/.config/spotifyd mkdir -p ~/.config/spotifyd
ln -s ~/.dotfiles/misc/spotifyd.conf ~/.config/spotifyd/spotifyd.conf ln -s ~/.dotfiles/misc/spotifyd.conf ~/.config/spotifyd/spotifyd.conf
ln -s ~/.dotfiles/fonts ~/.fonts ln -s ~/.dotfiles/fonts ~/.fonts
@ -173,10 +174,11 @@ meson ..
ninja ninja
sudo ninja install sudo ninja install
cd $prev cd $prev
mkdir -p ~/Downloads/mconnect
git clone https://github.com/theFr1nge/bitwarden-dmenu.git /tmp/bwdmenu
cd /tmp/bwdmenu
npm install
sudo git clone https://github.com/theFr1nge/bitwarden-dmenu.git /usr/share/bwdmenu
cd /usr/share/bwdmenu
sudo npm install
sudo npm i -g sudo npm i -g
cd $prev cd $prev


BIN
mail/mbsyncrc.secret View File


BIN
mail/msmtp/config.secret View File


+ 1
- 1
misc/keyboard View File

@ -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

BIN
misc/spotifyd.conf.secret View File


BIN
misc/wakatime.cfg.secret View File


+ 0
- 89
scripts/bluetooth_battery.py View File

@ -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()

+ 24
- 0
scripts/daily-update View File

@ -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

+ 7
- 2
scripts/dmenu-refresh View File

@ -16,7 +16,8 @@ DMENU='dmenu -z 1900 -x 10 -y 10 -i'
items="dwm items="dwm
dwmblocks dwmblocks
mconnect mconnect
dunst"
dunst
clipmenud"
# Open menu # Open menu
selection=$(printf '%s' "$items" | $DMENU) selection=$(printf '%s' "$items" | $DMENU)
@ -32,7 +33,11 @@ case $selection in
;; ;;
mconnect) mconnect)
kill -9 $(pidof mconnect) kill -9 $(pidof mconnect)
mconnect -d &
(cd ~/Downloads/mconnect; mconnect -d > /tmp/mconnect 2> /tmp/mconnect.err &)
;;
clipmenud)
pkill -f clipmenud
clipmenud > /tmp/clipmenud.out 2> /tmp/clipmenud.err &
;; ;;
dunst) dunst)
kill -9 $(pidof dunst) kill -9 $(pidof dunst)


+ 7
- 3
scripts/layoutmenu.sh View File

@ -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

+ 0
- 15
scripts/mail_tag.sh View File

@ -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/**"

+ 0
- 8
scripts/mails.sh View File

@ -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

+ 2
- 2
scripts/screensaver_toggle View File

@ -9,12 +9,12 @@ getargs() {
done done
} }
start_dnd() { start_dnd() {
xset s off
xset s off -dpms
echo "off" > ~/.cache/screensaver echo "off" > ~/.cache/screensaver
notify-send "Screensaver off"; notify-send "Screensaver off";
} }
end_dnd() { end_dnd() {
xset s on
xset s off +dpms
echo "on" > ~/.cache/screensaver echo "on" > ~/.cache/screensaver
notify-send "Screensaver on."; notify-send "Screensaver on.";
} }


+ 2
- 0
scripts/status-bar/time View File

@ -7,3 +7,5 @@ cmd=$(date +"%R")
#echo "$ifg $icon $tfg$cmd" #echo "$ifg $icon $tfg$cmd"
echo -n "^c#0f111a^^b#bf616a^ $icon $cmd ^d^" echo -n "^c#0f111a^^b#bf616a^ $icon $cmd ^d^"
~/.scripts/daily-update & # update wallpaper as well

+ 1
- 1
scripts/status-bar/weather View File

@ -23,7 +23,7 @@ showweather() {
} }
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1) setsid -f "$TERMINAL" -c weather -n weather -e less -Srf "$weatherreport" ;;
1) setsid -f st -c weather -n weather -e less -Srf "$weatherreport" ;;
2) getforecast && showweather && kill -50 $(pidof dwmblocks) ;; 2) getforecast && showweather && kill -50 $(pidof dwmblocks) ;;
3) notify-send " Weather module" "\- Left click for full forecast. 3) notify-send " Weather module" "\- Left click for full forecast.
- Middle click to update forecast. - Middle click to update forecast.


+ 66
- 0
scripts/zaread View File

@ -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

+ 1
- 1
suckless/dwm/config.h View File

@ -8,7 +8,7 @@ static const unsigned int systrayspacing = 2; /* systray spacing */
static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/ static const int systraypinningfailfirst = 1; /* 1: if pinning fails, display systray on the first monitor, False: display systray on the last monitor*/
static int showsystray = 1; /* 0 means no systray */ static int showsystray = 1; /* 0 means no systray */
static const int tag_padding = 0; static const int tag_padding = 0;
static const char *layoutmenu_cmd = "~/.scripts/layoutmenu.sh";
static const char *layoutmenu_cmd = "/home/yigit/.scripts/layoutmenu.sh";
static const char autostartblocksh[] = "autostart_blocking.sh"; static const char autostartblocksh[] = "autostart_blocking.sh";
static const char autostartsh[] = "autostart.sh"; static const char autostartsh[] = "autostart.sh";
static const char dwmdir[] = "dwm"; static const char dwmdir[] = "dwm";


+ 4
- 3
suckless/dwm/keybind.h View File

@ -37,6 +37,8 @@ static const char *simcrop[] = {"simcrop","-fc","-sc", "-g", "900x500",NULL};
static const char *notification_off[] = {"/home/yigit/.scripts/dunst_toggle.sh","-s",NULL}; static const char *notification_off[] = {"/home/yigit/.scripts/dunst_toggle.sh","-s",NULL};
static const char *notification_on[] = {"/home/yigit/.scripts/dunst_toggle.sh", "-e",NULL}; static const char *notification_on[] = {"/home/yigit/.scripts/dunst_toggle.sh", "-e",NULL};
static const char *screen_off[] = {"xset", "dpms", "force", "off", NULL};
static const char *screensaver_off[] = {"/home/yigit/.scripts/screensaver_toggle","-s",NULL}; static const char *screensaver_off[] = {"/home/yigit/.scripts/screensaver_toggle","-s",NULL};
static const char *screensaver_on[] = {"/home/yigit/.scripts/screensaver_toggle", "-e",NULL}; static const char *screensaver_on[] = {"/home/yigit/.scripts/screensaver_toggle", "-e",NULL};
@ -65,6 +67,7 @@ static Key keys[] = {
{ MODKEY, XK_j, focusstack, {.i = +1 } }, { MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_i, spawn, {.v = screensaver_off} }, { MODKEY, XK_i, spawn, {.v = screensaver_off} },
{ MODKEY|ShiftMask, XK_i, spawn, {.v = screensaver_on } }, { MODKEY|ShiftMask, XK_i, spawn, {.v = screensaver_on } },
{ MODKEY|ShiftMask, XK_o, spawn, {.v = screen_off } },
{ MODKEY, XK_n, spawn, {.v = notification_off} }, { MODKEY, XK_n, spawn, {.v = notification_off} },
{ MODKEY|ShiftMask, XK_n, spawn, {.v = notification_on } }, { MODKEY|ShiftMask, XK_n, spawn, {.v = notification_on } },
{ MODKEY, XK_k, focusstack, {.i = -1 } }, { MODKEY, XK_k, focusstack, {.i = -1 } },
@ -160,7 +163,7 @@ static Key keys[] = {
static Button buttons[] = { static Button buttons[] = {
/* click event mask button function argument */ /* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} }, { ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} }, { ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} }, { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} }, { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
@ -170,7 +173,5 @@ static Button buttons[] = {
{ ClkTagBar, MODKEY, Button3, toggletag, {0} }, { ClkTagBar, MODKEY, Button3, toggletag, {0} },
{ ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1 } }, { ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1 } },
{ ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2 } }, { ClkStatusText, 0, Button2, sigdwmblocks, {.i = 2 } },
{ ClkStatusText, 0, Button3, sigdwmblocks, {.i = 3 } },
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} },
}; };

+ 3
- 2
xorg/xinitrc View File

@ -12,14 +12,14 @@ export SSH_AUTH_SOCK
clipmenud > /tmp/clipmenud.out 2> /tmp/clipmenud.err & clipmenud > /tmp/clipmenud.out 2> /tmp/clipmenud.err &
rm -f ~/.surf/tabbed-surf.xid rm -f ~/.surf/tabbed-surf.xid
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 & /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper.jpg
~/.scripts/daily-update
xrdb ~/.Xresources & xrdb ~/.Xresources &
~/.scripts/mailsync & ~/.scripts/mailsync &
if [ "$NEXTCLOUD" = true ] ; then if [ "$NEXTCLOUD" = true ] ; then
nextcloud --background & nextcloud --background &
fi fi
if [ "$MCONNECT" = true ] ; then if [ "$MCONNECT" = true ] ; then
/usr/local/bin/mconnect -d > /tmp/mconnect 2> /tmp/mconnect.err &
(cd ~/Downloads/mconnect; mconnect -d > /tmp/mconnect 2> /tmp/mconnect.err &)
fi fi
if [ "$ACTIVITYWATCHER" = true ] ; then if [ "$ACTIVITYWATCHER" = true ] ; then
pkill -f aw-watcher-window pkill -f aw-watcher-window
@ -43,6 +43,7 @@ xbanish -t 2000 -s &
pactl upload-sample /usr/share/sounds/freedesktop/stereo/bell.oga x11-bell pactl upload-sample /usr/share/sounds/freedesktop/stereo/bell.oga x11-bell
pactl load-module module-x11-bell sample=x11-bell display=$DISPLAY pactl load-module module-x11-bell sample=x11-bell display=$DISPLAY
xset b 100 xset b 100
xset dpms 600 600 600
dunst & dunst &


BIN
zsh/secret.secret View File


Loading…
Cancel
Save