Browse Source

Made too many changes to specify

main
Yigit Colakoglu 4 years ago
parent
commit
a27a93e377
21 changed files with 1246 additions and 47 deletions
  1. +1
    -1
      .config/antibody/zsh_plugins.txt
  2. +3
    -13
      .config/htop/htoprc
  3. +12
    -3
      .config/imapfilter/config.lua
  4. +5
    -0
      .config/mimeapps.list
  5. +8
    -0
      .config/mpDris2/mpDris2.conf
  6. +9
    -0
      .config/mutt/keys.muttrc
  7. +1
    -0
      .config/vim/plugin/plugins.vim
  8. +4
    -4
      .config/weechat/sec.conf
  9. +6
    -0
      .config/zsh/.zshrc
  10. +1
    -1
      .local/bin/backup
  11. +36
    -0
      .local/bin/dmenu-books
  12. +2
    -5
      .local/bin/dmenu-mconnect
  13. +1003
    -0
      .local/bin/nyan.sh
  14. +98
    -0
      .local/bin/roll.sh
  15. +10
    -10
      .local/bin/status-bar/battery
  16. +20
    -0
      .local/bin/synccontacts
  17. +15
    -0
      .local/share/applications/nvim.desktop
  18. +3
    -3
      .local/share/applications/vim.desktop
  19. +1
    -1
      .local/share/dwm/autostart.sh
  20. +6
    -6
      .local/share/startpage/src/raisin/raisin.pug
  21. +2
    -0
      .local/src/dwm/keybinds.h

+ 1
- 1
.config/antibody/zsh_plugins.txt View File

@ -7,6 +7,6 @@ zsh-users/zsh-history-substring-search
zsh-users/zsh-autosuggestions
le0me55i/zsh-extract
romkatv/powerlevel10k
# Aloxaf/fzf-tab
Aloxaf/fzf-tab
rupa/z

+ 3
- 13
.config/htop/htoprc View File

@ -1,10 +1,9 @@
# Beware! This file is rewritten by htop when settings are changed in the interface.
# The parser is also very primitive, and not human-friendly.
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_key=47
sort_direction=1
tree_sort_key=47
tree_sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=1
shadow_other_users=0
@ -13,20 +12,12 @@ show_program_path=1
highlight_base_name=1
highlight_megabytes=1
highlight_threads=1
highlight_changes=0
highlight_changes_delay_secs=5
find_comm_in_cmdline=1
strip_exe_from_cmdline=1
show_merged_command=0
tree_view=0
tree_view_always_by_pid=0
header_margin=1
detailed_cpu_time=0
cpu_count_from_one=1
cpu_count_from_zero=0
show_cpu_usage=1
show_cpu_frequency=0
show_cpu_temperature=0
degree_fahrenheit=0
update_process_names=0
account_guest_in_cpu_meter=0
color_scheme=0
@ -36,4 +27,3 @@ left_meters=LeftCPUs2 CPU Battery Blank Blank Blank Memory NetworkIO DiskIO
left_meter_modes=1 1 1 2 2 2 3 4 4
right_meters=RightCPUs2 Memory Swap Blank Blank Blank LoadAverage Uptime Tasks
right_meter_modes=1 1 1 2 2 2 3 4 4
hide_function_bar=0

+ 12
- 3
.config/imapfilter/config.lua View File

@ -38,7 +38,6 @@ hotmail = IMAP {
}
-- Block fucking Aleksandr. LEAVE ME ALONE DUDE
function fuckAleksandr()
mailboxes, folders = domain:list_all("/")
for _, v in pairs(mailboxes) do
@ -47,6 +46,16 @@ function fuckAleksandr()
end
end
print("Fuck Aleksandr")
-- Block annoying university advertisement e-mails
function blockUni(blacklist)
mailboxes, folders = domain:list_all("/")
for _, v in pairs(mailboxes) do
for _, u in pairs(blacklist) do
messages = domain[v]:contain_body(u)
messages:delete_messages()
end
end
end
fuckAleksandr {}
print("Done fucking Aleksandr")
blockUni {"Hult", "hult"}

+ 5
- 0
.config/mimeapps.list View File

@ -17,9 +17,14 @@ application/x-shellscript=vim.desktop
inode/directory=lf.desktop
application/x-gnome-saved-search=lf.desktop
application/pdf=zathura.desktop
application/epub=zathura.desktop
video/webm=mpv.desktop
application/zip=engrampa.desktop
x-scheme-handler/tg=userapp-Telegram Desktop-RUP9V0.desktop
x-scheme-handler/mailto=neomutt.desktop
message/rfc822=userapp-neomutt.desktop
application/x-directory=lf.desktop
x-scheme-handler/discord-474605546457137157=discord-474605546457137157.desktop
[Added Associations]
application/rtf=nvim.desktop;

+ 8
- 0
.config/mpDris2/mpDris2.conf View File

@ -0,0 +1,8 @@
[Connection]
host = 127.0.0.1
port = 6600
music_dir = /home/yigit/Music
[Bling]
notify = False
mmkeys = False

+ 9
- 0
.config/mutt/keys.muttrc View File

@ -66,3 +66,12 @@ bind index,pager \Co sidebar-open
bind index,pager \Cp sidebar-prev-new
bind index,pager \Cn sidebar-next-new
bind index,pager B sidebar-toggle-visible
# File attach
macro compose A \
"<shell-escape> lf-ueberzug -selection-path=/tmp/muttattach<enter>\
<enter-command>push W<enter>"
macro compose W \
"<attach-file>`cat /tmp/muttattach`<enter>"\

+ 1
- 0
.config/vim/plugin/plugins.vim View File

@ -5,6 +5,7 @@ Plug 'kaicataldo/material.vim'
Plug 'itchyny/lightline.vim'
Plug 'mengelbrecht/lightline-bufferline'
Plug 'lambdalisue/nerdfont.vim'
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
" Addons
Plug 'scrooloose/nerdtree'


+ 4
- 4
.config/weechat/sec.conf View File

@ -17,7 +17,7 @@ salt = on
[data]
__passphrase__ = on
oftc_password = "936C665BADDD99B55848AE19992B3873FBE68A074B1CE52CED6844A3CA3560376116A605980F02C7F9C8ED139044FBDA77090ED6953197"
sec.data.oftc_password = "E03D86B8F0B9601B5EC92FEA1A564671F3CFEBF7B63539878A6BC028FB906790199D450D342F019C493DB31BF6BC59C144270F1C7495FDB6739626B615404CF59FDD"
freenode = "06841832E731EB8D00293CCB6334BD328B117D661E99279ADE699F8331387315C713F852E3C65AB3AF6A3D6A401F05B456CE6032DBF30B8F244799"
rizon_password = "3F6AAECFAA67DBC3636B60B3E05695F354158BB329F90F51320808BF06A3088D6C727CCA642332A96E0DF79CA15176B07B89E38D31F553D72B6D1C1E117F7EBDDFEE"
oftc_password = "6FFD2A3519D4EF0A5D536F3EAD0717147EF2A93A31DC5844ABB53C21D5BFA4F4FDC4B28C6DA9AEA0B054170930E0772524C7624269E448"
sec.data.oftc_password = "110CA4CD81D793862408231A441E72221A58E37AD083F3B3904C36BD8381C9F34B8607CB5236FDF51C6788E452B6C5DDAED582FBFB96A68D025008E43C738613BCFC"
freenode = "F99A5C9A8F4B3503935C8D304FD6306D92ACCA9737BDAC958C28BB84824EAD608171F122641CC75774B99979A506979987AE5E26D4A769D3CFD13B"
rizon_password = "114694D58027869628E47C77A9C4FECBC13AD1A4AE558B161B8ADCF3E027270E4210B61D5D2009BDCB5A127275DFFC15BB4EFF422FF192415EC22D348FB484A455CE"

+ 6
- 0
.config/zsh/.zshrc View File

@ -129,6 +129,12 @@ key[Shift-Tab]="${terminfo[kcbt]}"
[[ -n "${key[PageDown]}" ]] && bindkey -- "${key[PageDown]}" end-of-buffer-or-history
[[ -n "${key[Shift-Tab]}" ]] && bindkey -- "${key[Shift-Tab]}" reverse-menu-complete
zstyle ':completion:*:git-checkout:*' sort false
zstyle ':completion:*:descriptions' format '[%d]'
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls -1 --color $realpath'
zstyle ':fzf-tab:*' switch-group ',' '.'
# Finally, make sure the terminal is in application mode, when zle is
# active. Only then are the values from $terminfo valid.
if (( ${+terminfo[smkx]} && ${+terminfo[rmkx]} )); then


+ 1
- 1
.local/bin/backup View File

@ -15,7 +15,7 @@ alias ssh_cmd="ssh -i \"$SSH_KEY\" $SSH_USER@$SSH_HOST"
DEVICE=tatooine
OPT="-aPh"
SNAP="$RSYNC_PROFILE/$DEVICE/"
date=$(date "+%I:%M-%d.%m.%Y")
date=$(date "+%d.%m.%Y_%I:%M")
# You should enter absolute paths
DIRS="/home/yigit
/etc


+ 36
- 0
.local/bin/dmenu-books View File

@ -0,0 +1,36 @@
#!/bin/sh
# This is a small script to open a book from your calibre library
# Using dmenu.
LIBRARY="$HOME/Library"
if [ "$(date -r "$XDG_CACHE_HOME/calibrelib" "+%d-%m-%Y")" = "$(date '+%d-%m-%Y')" ]; then
books_raw=$(cat "$XDG_CACHE_HOME/calibrelib")
else
books_raw=$(calibredb --with-library "$LIBRARY" list --for-machine --fields="title,authors,formats")
fi
id="$(echo "$books_raw" |\
jq -r '.[]|(.id | tostring) + " | " + .title + " | " + .authors' |\
dmenu -i -l 12 -p "Search Book: " |\
cut -d "|" -f 1)"
entry="$(echo "$books_raw" | jq -a ".[]|select(.id | contains($id))")"
formats="$(echo "$entry" | \
jq -r ".formats|.[]" |\
sed -r "s/.*\.([^\.]*)$/\1/g")"
if [ "$(echo "$formats" | wc -l)" -lt 2 ]; then
xdg-open "$(echo "$entry" | \
jq -r ".formats|.[0]")"
exit
fi
index=$(( $(echo "$formats" | grep -n -F $(echo "$formats" | \
dmenu -p "Select format:" ) | cut -d ":" -f 1) - 1))
xdg-open "$(echo "$entry" | \
jq -r ".formats|.[$line]")"

+ 2
- 5
.local/bin/dmenu-mconnect View File

@ -106,16 +106,13 @@ show_menu () {
recipient=$(echo '14039199518' | dmenu -i -p "Recipient's phone #")
mconnectctl send-sms "$2" "$message" "$recipient" ;;
*'Send URL' )
message=$(echo 'Clipboard' | dmenu -i -p "Enter Url:")
message=$(dmenu -i -p "Enter Url:" < /dev/null)
if [ "$message" = "Clipboard" ]; then
message=$(sselp)
fi
mconnectctl share-url "$2" "$message";;
*'Send Text' )
message=$(echo 'Clipboard' | dmenu -i -p "Enter Text:")
if [ "$message" = "Clipboard" ]; then
message=$(sselp)
fi
message=$(dmenu -i -p "Enter Text:" < /dev/null)
mconnectctl share-text "$2" "$message";;
*'Disconnect' )
mconnectctl disallow-device "$2"


+ 1003
- 0
.local/bin/nyan.sh
File diff suppressed because it is too large
View File


+ 98
- 0
.local/bin/roll.sh View File

@ -0,0 +1,98 @@
#!/bin/bash
# Rick Astley in your Terminal.
# By Serene Han and Justine Tunney <3
version='1.1'
rick='http://keroserene.net/lol'
video="$rick/astley80.full.bz2"
# TODO: I'll let someone with mac or windows machine send a pull request
# to get gsm going again :)
audio_gsm="$rick/roll.gsm"
audio_raw="$rick/roll.s16"
audpid=0
NEVER_GONNA='curl -s -L http://bit.ly/10hA8iC | bash'
MAKE_YOU_CRY="$HOME/.bashrc"
red='\x1b[38;5;9m'
yell='\x1b[38;5;216m'
green='\x1b[38;5;10m'
purp='\x1b[38;5;171m'
echo -en '\x1b[s' # Save cursor.
has?() { hash $1 2>/dev/null; }
cleanup() { (( audpid > 1 )) && kill $audpid 2>/dev/null; }
quit() { echo -e "\x1b[2J \x1b[0H ${purp}<3 \x1b[?25h \x1b[u \x1b[m"; }
usage () {
echo -en "${green}Rick Astley performs ♪ Never Gonna Give You Up ♪ on STDOUT."
echo -e " ${purp}[v$version]"
echo -e "${yell}Usage: ./astley.sh [OPTIONS...]"
echo -e "${purp}OPTIONS : ${yell}"
echo -e " help - Show this message."
echo -e " inject - Append to ${purp}${USER}${yell}'s bashrc. (Recommended :D)"
}
for arg in "$@"; do
if [[ "$arg" == "help"* || "$arg" == "-h"* || "$arg" == "--h"* ]]; then
usage && exit
elif [[ "$arg" == "inject" ]]; then
echo -en "${red}[Inject] "
echo $NEVER_GONNA >> $MAKE_YOU_CRY
echo -e "${green}Appended to $MAKE_YOU_CRY. <3"
echo -en "${yell}If you've astley overdosed, "
echo -e "delete the line ${purp}\"$NEVER_GONNA\"${yell}."
exit
else
echo -e "${red}Unrecognized option: \"$arg\""
usage && exit
fi
done
trap "cleanup" INT
trap "quit" EXIT
# Bean streamin' - agnostic to curl or wget availability.
obtainium() {
if has? curl; then curl -s $1
elif has? wget; then wget -q -O - $1
else echo "Cannot has internets. :(" && exit
fi
}
echo -en "\x1b[?25l \x1b[2J \x1b[H" # Hide cursor, clear screen.
#echo -e "${yell}Fetching audio..."
if has? afplay; then
# On Mac OS, if |afplay| available, pre-fetch compressed audio.
[ -f /tmp/roll.s16 ] || obtainium $audio_raw >/tmp/roll.s16
afplay /tmp/roll.s16 &
elif has? aplay; then
# On Linux, if |aplay| available, stream raw sound.
obtainium $audio_raw | aplay -Dplug:default -q -f S16_LE -r 8000 &
elif has? play; then
# On Cygwin, if |play| is available (via sox), pre-fetch compressed audio.
obtainium $audio_gsm >/tmp/roll.gsm.wav
play -q /tmp/roll.gsm.wav &
fi
audpid=$!
#echo -e "${yell}Fetching video..."
# Sync FPS to reality as best as possible. Mac's freebsd version of date cannot
# has nanoseconds so inject python. :/
python <(cat <<EOF
import sys
import time
fps = 25; time_per_frame = 1.0 / fps
buf = ''; frame = 0; next_frame = 0
begin = time.time()
try:
for i, line in enumerate(sys.stdin):
if i % 32 == 0:
frame += 1
sys.stdout.write(buf); buf = ''
elapsed = time.time() - begin
repose = (frame * time_per_frame) - elapsed
if repose > 0.0:
time.sleep(repose)
next_frame = elapsed / time_per_frame
if frame >= next_frame:
buf += line
except KeyboardInterrupt:
pass
EOF
) < <(obtainium $video | bunzip2 -q 2> /dev/null)

+ 10
- 10
.local/bin/status-bar/battery View File

@ -23,24 +23,24 @@ else
if [[ $plugged == "1" ]]; then
echo "^c#ebcb8b^$ac_bat^d^ $bat%"
elif [[ $bat -lt 10 ]]; then
echo "^c#ebcb8b^$ramp10^d^ $bat% "
echo "^c#ebcb8b^$ramp10^d^ $bat%"
elif [[ $bat -lt 20 ]]; then
echo "^c#ebcb8b^$ramp20^d^ $bat% "
echo "^c#ebcb8b^$ramp20^d^ $bat%"
elif [[ $bat -lt "30" ]]; then
echo "^c#ebcb8b^$ramp30^d^ $bat% "
echo "^c#ebcb8b^$ramp30^d^ $bat%"
elif [[ $bat -lt "40" ]]; then
echo "^c#ebcb8b^$ramp40^d^ $bat% "
echo "^c#ebcb8b^$ramp40^d^ $bat%"
elif [[ $bat -lt "50" ]]; then
echo "^c#ebcb8b^$ramp50^d^ $bat% "
echo "^c#ebcb8b^$ramp50^d^ $bat%"
elif [[ $bat -lt "60" ]]; then
echo "^c#ebcb8b^$ramp60^d^ $bat% "
echo "^c#ebcb8b^$ramp60^d^ $bat%"
elif [[ $bat -lt "70" ]]; then
echo "^c#ebcb8b^$ramp70^d^ $bat% "
echo "^c#ebcb8b^$ramp70^d^ $bat%"
elif [[ $bat -lt "80" ]]; then
echo "^c#ebcb8b^$ramp80^d^ $bat% "
echo "^c#ebcb8b^$ramp80^d^ $bat%"
elif [[ $bat -lt "90" ]]; then
echo "^c#ebcb8b^$ramp90^d^ $bat% "
echo "^c#ebcb8b^$ramp90^d^ $bat%"
elif [[ $bat -le "100" ]]; then
echo "^c#ebcb8b^$ramp100^d^ $bat% "
echo "^c#ebcb8b^$ramp100^d^ $bat%"
fi
fi

+ 20
- 0
.local/bin/synccontacts View File

@ -0,0 +1,20 @@
#!/bin/bash
tmpfile=$(mktemp)
destfile=$(mktemp)
wget -q 'https://drive.yigitcolakoglu.com/remote.php/dav/addressbooks/users/yigitcolakoglu/contacts/?export' \
--user yigitcolakoglu \
--password "$(pass show Server/drive.yigitcolakoglu.com/yigitcolakoglu)" \
-O $tmpfile
abook --convert \
--informat vcard \
--infile $tmpfile \
--outformat abook \
--outfile $destfile
rm $tmpfile
chmod 600 $destfile
sed 's/([0-9]) ([0-9])/\1\2/g' $destfile
mv $destfile "$XDG_DATA_HOME"/abook/addressbook

+ 15
- 0
.local/share/applications/nvim.desktop View File

@ -0,0 +1,15 @@
# The vim.desktop file is generated by src/po/Makefile, do NOT edit.
# Edit the src/po/vim.desktop.in file instead.
[Desktop Entry]
Name=NVim
GenericName=Text Editor
Comment=Edit text files
TryExec=nvim
Exec=st -c vim -e nvim %F
Terminal=false
Type=Application
Keywords=Text;editor;
Icon=nvim
Categories=Utility;TextEditor;
StartupNotify=false
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;

+ 3
- 3
.local/share/applications/vim.desktop View File

@ -4,12 +4,12 @@
Name=Vim
GenericName=Text Editor
Comment=Edit text files
TryExec=nvim
Exec=st -c vim -e nvim %F
TryExec=vim
Exec=st -c vim -e vim %F
Terminal=false
Type=Application
Keywords=Text;editor;
Icon=nvim
Icon=vim
Categories=Utility;TextEditor;
StartupNotify=false
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;

+ 1
- 1
.local/share/dwm/autostart.sh View File

@ -27,7 +27,7 @@ if [ "$ACTIVITYWATCHER" = true ] ; then
aw-watcher-afk &
fi
mpd
mpd-mpris &
mpDris2 &
touch ~/.cache/nextcloud-track
xss-lock -- slock &
picom --no-fading-openclose &


+ 6
- 6
.local/share/startpage/src/raisin/raisin.pug View File

@ -2,15 +2,15 @@
-
var dev = {
'regex101': 'regex101.com',
'codewars': 'codewars.com',
'regex101': 'regex101.com',
'codewars': 'codewars.com',
'dev.to': 'dev.to',
'css tricks': 'css-tricks.com'
'ycombinator': 'news.ycombinator.com'
}
var hack = {
'hackerone': 'hackerone.com',
'bugcrowd': 'bugcrowd.com',
'hackerone': 'hackerone.com',
'bugcrowd': 'bugcrowd.com',
'hackthebox': 'hackthebox.eu',
'intigriti': 'intigriti.com'
}
@ -39,7 +39,7 @@
mixin raisin(title, data)
raisin
raisin-header
raisin-header
p.raisin-title #{title}
raisin-links
each val, key in data


+ 2
- 0
.local/src/dwm/keybinds.h View File

@ -63,6 +63,7 @@ static const char *genpwd[] = {"/home/yigit/.local/bin/genpwd", NULL};
static const char *trackpad[] = {"/home/yigit/.local/bin/toggle_touchpad.sh"};
static const char *bluetooth[] = {"/home/yigit/.local/bin/dmenu-bluetooth", NULL};
static const char *url[] = {"/home/yigit/.local/bin/dmenu_surf", NULL};
static const char *readbook[] = {"/home/yigit/.local/bin/dmenu-books", NULL};
static const char *edit[] = {"/home/yigit/.local/bin/dmenu-edit", NULL};
static const char *surf[] = {"/home/yigit/.local/bin/tabbed_surf", NULL};
static const char *google[] = {"/home/yigit/.local/bin/menu-surfraw", "google", NULL};
@ -140,6 +141,7 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_e, spawn, {.v = simcrop } },
{ MODKEY, XK_e, spawn, {.v = edit} },
{ MODKEY, XK_u, spawn, {.v = url} },
{ MODKEY, XK_r, spawn, {.v = readbook} },
{ MODKEY|ShiftMask, XK_w, spawn, {.v = wallabag} },
{ MODKEY, XK_w, spawn, {.v = wiki} },
{ MODKEY, XK_g, spawn, {.v = google} },


Loading…
Cancel
Save