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/msmtp/config
misc/spotifyd.conf
misc/wakatime.cfg

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

@ -1,4 +1,5 @@
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
checkupdates+aur
checkupdates-aur
cndrvcups-lt
cordless-bin
direnv
downgrade
@ -33,49 +32,13 @@ mutt-wizard
ncpamixer
nerd-fonts-hack
notion-app
notion-enhancer
numix-icon-theme-git
nvm
pam-gnupg
perl-checkupdates-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-tui
spotifyd-full-git
sselp
sublime-text-3
surf
tela-icon-theme
terminal_dimensions-git
termpdf-git
ttf-material-design-icons
ttf-symbola
typora
vtop
vue-cli
wallabag-client
wd719x-firmware
whatsapp-nativefier-dark
xbanish-timeout-git
xchat-se
xkb-switch
xkblayout-state-git
xmenu
yaft
ytfzf-git
zoom
ytfzf

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

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


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

@ -1,4 +1,4 @@
#!/bin/bash
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]
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/keyboard ~/.keyboard
ln -s ~/.dotfiles/misc/mimeapps.list ~/.config/mimeapps.list
ln -s ~/.dotfiles/misc/wakatime.cfg ~/.wakatime.cfg
mkdir -p ~/.config/spotifyd
ln -s ~/.dotfiles/misc/spotifyd.conf ~/.config/spotifyd/spotifyd.conf
ln -s ~/.dotfiles/fonts ~/.fonts
@ -173,10 +174,11 @@ meson ..
ninja
sudo ninja install
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
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
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

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
dwmblocks
mconnect
dunst"
dunst
clipmenud"
# Open menu
selection=$(printf '%s' "$items" | $DMENU)
@ -32,7 +33,11 @@ case $selection in
;;
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)
kill -9 $(pidof dunst)


+ 7
- 3
scripts/layoutmenu.sh View File

@ -1,7 +1,11 @@
#!/bin/sh
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

+ 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
}
start_dnd() {
xset s off
xset s off -dpms
echo "off" > ~/.cache/screensaver
notify-send "Screensaver off";
}
end_dnd() {
xset s on
xset s off +dpms
echo "on" > ~/.cache/screensaver
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 -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
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) ;;
3) notify-send " Weather module" "\- Left click for full 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 int showsystray = 1; /* 0 means no systray */
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 autostartsh[] = "autostart.sh";
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_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_on[] = {"/home/yigit/.scripts/screensaver_toggle", "-e",NULL};
@ -65,6 +67,7 @@ static Key keys[] = {
{ MODKEY, XK_j, focusstack, {.i = +1 } },
{ MODKEY, XK_i, spawn, {.v = screensaver_off} },
{ MODKEY|ShiftMask, XK_i, spawn, {.v = screensaver_on } },
{ MODKEY|ShiftMask, XK_o, spawn, {.v = screen_off } },
{ MODKEY, XK_n, spawn, {.v = notification_off} },
{ MODKEY|ShiftMask, XK_n, spawn, {.v = notification_on } },
{ MODKEY, XK_k, focusstack, {.i = -1 } },
@ -160,7 +163,7 @@ static Key keys[] = {
static Button buttons[] = {
/* click event mask button function argument */
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
{ ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} },
{ ClkClientWin, MODKEY, Button1, movemouse, {0} },
{ ClkClientWin, MODKEY, Button2, togglefloating, {0} },
{ ClkClientWin, MODKEY, Button3, resizemouse, {0} },
@ -170,7 +173,5 @@ static Button buttons[] = {
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
{ ClkStatusText, 0, Button1, sigdwmblocks, {.i = 1 } },
{ 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 &
rm -f ~/.surf/tabbed-surf.xid
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
feh --bg-fill /home/yigit/.dotfiles/backgrounds/wallpaper.jpg
~/.scripts/daily-update
xrdb ~/.Xresources &
~/.scripts/mailsync &
if [ "$NEXTCLOUD" = true ] ; then
nextcloud --background &
fi
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
if [ "$ACTIVITYWATCHER" = true ] ; then
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 load-module module-x11-bell sample=x11-bell display=$DISPLAY
xset b 100
xset dpms 600 600 600
dunst &


BIN
zsh/secret.secret View File


Loading…
Cancel
Save