Browse Source

More and more changes

main
Yigit Colakoglu 3 years ago
parent
commit
7be365e39f
36 changed files with 201 additions and 175 deletions
  1. +1
    -1
      .config/BetterDiscord/plugins/ZeresPluginLibrary.config.json
  2. +5
    -5
      .config/calcurse/conf
  3. +5
    -4
      .config/doom/config.el
  4. +0
    -24
      .config/doom/org-conf.el
  5. +0
    -1
      .config/doom/packages.el
  6. +0
    -14
      .config/imapfilter/config.lua
  7. +25
    -0
      .config/isync/mbsyncrc
  8. +2
    -0
      .config/mimeapps.list
  9. +1
    -1
      .config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc
  10. +0
    -4
      .config/mutt/accounts/1-yigitcolakoglu@hotmail.com.sig
  11. +1
    -1
      .config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc
  12. +0
    -4
      .config/mutt/accounts/2-yigit@yigitcolakoglu.com.sig
  13. +0
    -46
      .config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc
  14. +0
    -4
      .config/mutt/accounts/3-yigit@fr1nge.xyz.sig
  15. +2
    -1
      .config/mutt/muttrc
  16. +5
    -0
      .config/nvim/plugin/plugins.vim
  17. +3
    -3
      .config/qt5ct/qt5ct.conf
  18. +9
    -7
      .config/vim/vimrc
  19. +1
    -1
      .config/zsh/.zshrc
  20. +1
    -1
      .config/zsh/aliases
  21. +24
    -0
      .config/zsh/cmds
  22. +1
    -1
      .local/bin/calconsync
  23. +1
    -0
      .local/bin/compiler
  24. +6
    -1
      .local/bin/daily-update
  25. +0
    -2
      .local/bin/dmenu-mconnect
  26. +1
    -1
      .local/bin/dmenu-web
  27. +39
    -30
      .local/bin/dmenu-xrandr
  28. +55
    -12
      .local/bin/exfirefoxtabs.py
  29. +1
    -0
      .local/bin/nextcloud-sync
  30. +1
    -1
      .local/bin/password_manager
  31. +2
    -0
      .local/share/bookmarks
  32. +5
    -3
      .local/src/dwm/keybinds.h
  33. +3
    -1
      .local/src/dwm/rules.h
  34. +1
    -1
      .local/src/st/config.h
  35. BIN
      .local/src/st/st
  36. BIN
      .local/src/st/x.o

+ 1
- 1
.config/BetterDiscord/plugins/ZeresPluginLibrary.config.json View File

@ -1,6 +1,6 @@
{
"currentVersionInfo": {
"version": "1.2.29",
"version": "1.2.30",
"hasShownChangelog": true
}
}

+ 5
- 5
.config/calcurse/conf View File

@ -1,6 +1,6 @@
appearance.calendarview=monthly
appearance.compactpanels=no
appearance.defaultpanel=calendar
appearance.defaultpanel=appointments
appearance.layout=1
appearance.headerline=yes
appearance.eventseparator=yes
@ -8,12 +8,12 @@ appearance.dayseparator=yes
appearance.emptyline=yes
appearance.emptyday=--
appearance.notifybar=yes
appearance.sidebarwidth=0
appearance.sidebarwidth=17
appearance.theme=red on default
appearance.todoview=hide-completed
appearance.todoview=show-completed
appearance.headingpos=right-justified
daemon.enable=no
daemon.log=no
daemon.enable=yes
daemon.log=yes
format.inputdate=1
format.notifydate=%a %F
format.notifytime=%T


+ 5
- 4
.config/doom/config.el View File

@ -16,6 +16,8 @@ user-mail-address "yigit@yigitcolakoglu.com")
(setq org-journal-dir "~/Documents/org/journal/")
(setq display-line-numbers-type 'relative)
(setq twittering-allow-insecure-server-cert t)
(setq org-hugo-base-dir "~/Projects/fr1nge.xyz")
(setq org-hugo-default-section-directory "~/Projects/fr1nge.xyz")
(setq +ivy-buffer-preview t)
(global-auto-revert-mode t)
@ -64,10 +66,7 @@ user-mail-address "yigit@yigitcolakoglu.com")
)
(use-package! deft
:hook deft-mode-hook
:init
(setq deft-directory org-directory)
(setq deft-recursive t)
:hook deft-mode-hook :init (setq deft-directory org-directory) (setq deft-recursive t)
)
(use-package! hl-todo
@ -475,3 +474,5 @@ t)))
(setq +doom-dashboard-banner-file (expand-file-name "logo.png" doom-private-dir))
;; Use xclip globally
(xclip-mode)

+ 0
- 24
.config/doom/org-conf.el View File

@ -36,8 +36,6 @@
(setq org-log-done 'time)
(setq org-tags-column -80)
(setq org-refile-targets (quote ((nil :maxlevel . 1))))
(setq org-hugo-base-dir "~/Projects/fr1nge.xyz")
(setq org-hugo-default-section-directory "~/Projects/fr1nge.xyz")
(setq org-todo-keywords '((sequence
"TODO"
@ -218,28 +216,6 @@
(switch-to-buffer "*Calculator*")
(select-window main-window))))
(require 'ox-publish)
(setq org-publish-project-alist
'(
("roam-notes"
:base-directory "~/Documents/org/roam"
:base-extension "org"
:publishing-directory "~/Projects/wiki"
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t
)
("roam-static"
:base-directory "~/Documents/org/roam/static"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory "~/Projects/wiki/static"
:recursive t
:publishing-function org-publish-attachment
)
("roam" :components ("roam-notes" "roam-static"))
))
;;; ol-man.el - Support for links to man pages in Org mode
;;; https://www.gnu.org/software/emacs/manual/html_node/org/Adding-Hyperlink-Types.html
(org-link-set-parameters "man"


+ 0
- 1
.config/doom/packages.el View File

@ -49,5 +49,4 @@
(package! counsel-org-clock)
(package! mathpix.el :recipe (:host github :repo "jethrokuan/mathpix.el"))
(package! python-django)
(package! org-super-links)
(package! xclip)

+ 0
- 14
.config/imapfilter/config.lua View File

@ -57,19 +57,5 @@ function blockUni(blacklist)
end
end
-- Block e-mails that I'm too lazy to opt out of or can't figure out how
function blockSubject(blacklist)
mailboxes, folders = domain:list_all("/")
for _, v in pairs(mailboxes) do
for _, u in pairs(blacklist) do
m1 = domain[v]:contain_from(u)
m2 = hotmail[v]:contain_from(u)
m1:delete_messages()
m2:delete_messages()
end
end
end
fuckAleksandr {}
blockUni {"Hult", "hult"}
blockSubject {"Coralogix", "Whereby", "Manuel Tarin", "Starbucks", "TIDAL", "Fahim from Educative", "Lancaster University Leipzig", "New York Institute of Technology"}

+ 25
- 0
.config/isync/mbsyncrc View File

@ -74,3 +74,28 @@ SyncState *
MaxMessages 0
ExpireUnread no
# End profile
IMAPStore Y.Colakoglu@student.tudelft.nl-remote
Host imap.tudelft.nl
Port 993
User ycolakoglu@tudelft.net
PassCmd "pass University/password.tudelft.nl/ycolakoglu"
AuthMechs LOGIN
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
MaildirStore Y.Colakoglu@student.tudelft.nl-local
Subfolders Verbatim
Path /home/yigit/.local/share/mail/Y.Colakoglu@student.tudelft.nl/
Inbox /home/yigit/.local/share/mail/Y.Colakoglu@student.tudelft.nl/INBOX
Channel Y.Colakoglu@student.tudelft.nl
Expunge Both
Master :Y.Colakoglu@student.tudelft.nl-remote:
Slave :Y.Colakoglu@student.tudelft.nl-local:
Patterns * !"[Gmail]/All Mail"
Create Both
SyncState *
MaxMessages 0
ExpireUnread no
# End profile

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

@ -25,6 +25,7 @@ x-scheme-handler/mailto=neomutt.desktop
message/rfc822=userapp-neomutt.desktop
application/x-directory=lf.desktop
x-scheme-handler/discord-474605546457137157=discord-474605546457137157.desktop
x-scheme-handler/msteams=teams.desktop
[Added Associations]
application/rtf=libreoffice-writer.desktop;nvim.desktop;
@ -33,3 +34,4 @@ x-scheme-handler/tg=userapp-Telegram Desktop-APVS20.desktop;
application/x-rdp=vim.desktop;
text/markdown=nvim.desktop;
application/pdf=zaread.desktop;
text/plain=nvim.desktop;

+ 1
- 1
.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc View File

@ -8,7 +8,7 @@ set folder = "/home/yigit/.local/share/mail/yigitcolakoglu@hotmail.com"
set header_cache = /home/yigit/.cache/mutt-wizard/yigitcolakoglu@hotmail.com/headers
set message_cachedir = /home/yigit/.cache/mutt-wizard/yigitcolakoglu@hotmail.com/bodies
set mbox_type = Maildir
set signature = "/home/yigit/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.sig"
set signature = "/home/yigit/.config/mutt/accounts/formal.sig"
bind index,pager gg noop


+ 0
- 4
.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.sig View File

@ -1,4 +0,0 @@
Yiğit Çolakoğlu
===================
Senior Student at Ted Ankara College Foundation High School

+ 1
- 1
.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc View File

@ -8,7 +8,7 @@ set folder = "/home/yigit/.local/share/mail/yigit@yigitcolakoglu.com"
set header_cache = /home/yigit/.cache/mutt-wizard/yigit@yigitcolakoglu.com/headers
set message_cachedir = /home/yigit/.cache/mutt-wizard/yigit@yigitcolakoglu.com/bodies
set mbox_type = Maildir
set signature = "/home/yigit/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.sig"
set signature = "/home/yigit/.config/mutt/accounts/formal.sig"
bind index,pager gg noop
bind index,pager g noop


+ 0
- 4
.config/mutt/accounts/2-yigit@yigitcolakoglu.com.sig View File

@ -1,4 +0,0 @@
Yiğit Çolakoğlu
===================
Senior Student at Ted Ankara College Foundation High School

+ 0
- 46
.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc View File

@ -1,46 +0,0 @@
# vim: filetype=neomuttrc
# muttrc file for account yigit@fr1nge.xyz
set realname = "Yigit Colakoglu"
set from = "yigit@fr1nge.xyz"
set sendmail = "msmtp -a yigit@fr1nge.xyz"
alias me yigit <yigit@fr1nge.xyz>
set folder = "/home/yigit/.local/share/mail/yigit@fr1nge.xyz"
set header_cache = /home/yigit/.cache/mutt-wizard/yigit@fr1nge.xyz/headers
set message_cachedir = /home/yigit/.cache/mutt-wizard/yigit@fr1nge.xyz/bodies
set mbox_type = Maildir
set signature = "/home/yigit/.config/mutt/accounts/3-yigit@fr1nge.xyz.sig"
bind index,pager gg noop
bind index,pager g noop
bind index,pager M noop
bind index,pager C noop
bind index gg first-entry
unmailboxes *
unalternates *
unset signature
unmacro index o
macro index o "<shell-escape>mw -y yigit@fr1nge.xyz<enter>" "run mbsync to sync yigit@fr1nge.xyz"
mailboxes "=Drafts" "=INBOX" "=Junk" "=Sent" "=Archive" "=Deleted Items"
macro index,pager ga "<change-folder>=Archive<enter>" "go to archive"
macro index,pager Ma ";<save-message>=Archive<enter>" "move mail to archive"
macro index,pager Ca ";<copy-message>=Archive<enter>" "copy mail to archive"
macro index,pager gj "<change-folder>=Junk<enter>" "go to spam"
macro index,pager Mj ";<save-message>=Junk<enter>" "move mail to spam"
macro index,pager Cj ";<copy-message>=Junk<enter>" "copy mail to spam"
set record = "+Sent"
macro index,pager gs "<change-folder>=Sent<enter>" "go to sent"
macro index,pager Ms ";<save-message>=Sent<enter>" "move mail to sent"
macro index,pager Cs ";<copy-message>=Sent<enter>" "copy mail to sent"
macro index,pager gt "<change-folder>=Deleted Items<enter>" "go to trash"
macro index,pager Mt ";<save-message>=Deleted Items<enter>" "move mail to trash"
macro index,pager Ct ";<copy-message>=Deleted Items<enter>" "copy mail to trash"
set trash = "+Trash"
set postponed = "+Drafts"
macro index,pager gd "<change-folder>=Drafts<enter>" "go to drafts"
macro index,pager Md ";<save-message>=Drafts<enter>" "move mail to drafts"
macro index,pager Cd ";<copy-message>=Drafts<enter>" "copy mail to drafts"
macro index,pager gi "<change-folder>=INBOX<enter>" "go to inbox"
macro index,pager Mi ";<save-message>=INBOX<enter>" "move mail to inbox"
macro index,pager Ci ";<copy-message>=INBOX<enter>" "copy mail to inbox"
set spoolfile = "+INBOX"

+ 0
- 4
.config/mutt/accounts/3-yigit@fr1nge.xyz.sig View File

@ -1,4 +0,0 @@
Yiğit Çolakoğlu
===================
Senior Student at Ted Ankara College Foundation High School

+ 2
- 1
.config/mutt/muttrc View File

@ -32,4 +32,5 @@ set crypt_use_gpgme
set pgp_default_key = "yigitcolakoglu@hotmail.com"
macro index,pager i1 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigitcolakoglu@hotmail.com"
macro index,pager i2 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@yigitcolakoglu.com"
macro index,pager i3 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@fr1nge.xyz"
macro index,pager i3 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/3-Y.Colakoglu@student.tudelft.nl.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to Y.Colakoglu@student.tudelft.nl"
macro index,pager i4 '<sync-mailbox><enter-command>source /home/yigit/.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc<enter><change-folder>!<enter>;<check-stats>' "switch to yigit@fr1nge.xyz"

+ 5
- 0
.config/nvim/plugin/plugins.vim View File

@ -29,6 +29,9 @@ Plug 'isene/hyperlist.vim'
Plug 'neomutt/neomutt.vim'
Plug 'VebbNix/lf-vim'
" Browser editor support
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
" Tmux integration
Plug 'benmills/vimux'
Plug 'christoomey/vim-tmux-navigator'
@ -37,6 +40,7 @@ Plug 'christoomey/vim-tmux-navigator'
Plug 'junegunn/fzf.vim'
" Syntax highlighting
Plug 'rhysd/vim-wasm'
Plug 'elzr/vim-json'
Plug 'tpope/vim-markdown'
Plug 'pangloss/vim-javascript'
@ -44,4 +48,5 @@ Plug 'leafgarland/typescript-vim'
Plug 'vim-scripts/cool.vim'
Plug 'justinmk/vim-syntax-extra'
Plug 'arrufat/vala.vim'
Plug 'Shirk/vim-gas'
call plug#end()

+ 3
- 3
.config/qt5ct/qt5ct.conf View File

@ -2,8 +2,8 @@
color_scheme_path=/home/yigit/.config/qt5ct/colors/Material Ocean.conf
custom_palette=true
icon_theme=Tela
standard_dialogs=default
style=Fusion
standard_dialogs=gtk3
style=Windows
[Fonts]
fixed=@Variant(\0\0\0@\0\0\0.\0\x43\0\x61\0s\0k\0\x61\0y\0\x64\0i\0\x61\0\x43\0o\0v\0\x65\0 \0N\0\x65\0r\0\x64\0 \0\x46\0o\0n\0t@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
@ -25,4 +25,4 @@ underline_shortcut=2
wheel_scroll_lines=3
[SettingsWindow]
geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\x1e\0\0\0/\0\0\aa\0\0\x4-\0\0\0\x1f\0\0\0\x30\0\0\a`\0\0\x4,\0\0\0\0\0\0\0\0\a\x80\0\0\0\x1f\0\0\0\x30\0\0\a`\0\0\x4,)"
geometry="@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\x4\"\0\0\0/\0\0\aa\0\0\x4-\0\0\x4#\0\0\0\x30\0\0\a`\0\0\x4,\0\0\0\0\0\0\0\0\a\x80\0\0\x4#\0\0\0\x30\0\0\a`\0\0\x4,)"

+ 9
- 7
.config/vim/vimrc View File

@ -25,16 +25,12 @@ let s:MRU_File = $XDG_CACHE_HOME."/vim/mru"
if !has('nvim') | set viminfofile=$XDG_CACHE_HOME/vim/viminfo | endif
if has('nvim')
source ~/.config/nvim/plugin/plugins.vim
endif
map <leader>c :w! \| !compiler "<c-r>%"<CR>
" Set leader
let mapleader = ","
" Leader Mappings
nnoremap <Leader>c :w! \| !compiler "<c-r>%"<CR>
map <Leader>w :update<CR>
map <Leader>q :qall<CR>
map <Leader>gs :Gstatus<CR>
@ -47,8 +43,8 @@ map <Leader>h :History<CR>
" CtrlP use FZF (faster!)
nnoremap <C-p> :Files<CR>
nnoremap <leader>b :Buffers<CR>
noremap <leader>u :w<Home>silent <End> !urlview<CR>
nnoremap <Leader>b :Buffers<CR>
noremap <Leader>u :w<Home>silent <End> !urlview<CR>
" System clipboard copy
nnoremap <Leader>y "+y
@ -60,6 +56,12 @@ nnoremap <Leader>P "+P
vnoremap <Leader>d "+d
nnoremap <Leader>D "+D
if has('nvim')
source ~/.config/nvim/plugin/plugins.vim
endif
syntax on
filetype plugin on


+ 1
- 1
.config/zsh/.zshrc View File

@ -9,7 +9,7 @@
#zmodload zsh/zprof
eval "$(direnv hook zsh)" >> $XDG_RUNTIME_DIR/direnv
#welcome.sh
fortune | cowsay | lolcat
fortune -a | cowsay | lolcat
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi


+ 1
- 1
.config/zsh/aliases View File

@ -52,7 +52,7 @@ alias dpall="dots remote | xargs -I R git --git-dir=$HOME/.dotfiles.git/ --work-
alias dignore="dots update-index --assume-unchanged {pkg.list,install.sh,README.md}"
alias da="dots add -u"
alias dcm="dots commit"
alias pwndbg="gdb -nh -x \"$XDG_CONFIG_HOME\"/gdb/init"
alias pwndbg="gdb -nh -x \"$XDG_CONFIG_HOME\"/gdb/pwninit"
alias bon="sudo bash -c 'rc-service bluetooth start && rfkill unblock bluetooth'"


+ 24
- 0
.config/zsh/cmds View File

@ -144,3 +144,27 @@ tmate-unpair() {
echo "Session already killed"
fi
}
rawurlencode() {
local string="${1}:$(cat -)"
local strlen=${#string}
local encoded=""
local pos c o
for (( pos=0 ; pos<strlen ; pos++ )); do
c=${string:$pos:1}
case "$c" in
[-_.~a-zA-Z0-9] ) o="${c}" ;;
* ) printf -v o '%%%02x' "'$c"
esac
encoded+="${o}"
done
echo "${encoded}" # You can either set a return variable (FASTER)
REPLY="${encoded}" #+or echo the result (EASIER)... or both... :p
}
rawurldecode() {
printf -v REPLY '%b' "${1//%/\\x}" # You can either set a return variable (FASTER)
echo "${REPLY}" #+or echo the result (EASIER)... or both... :p
}

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

@ -1,6 +1,6 @@
#!/bin/bash
pidof emacs && emacsclient -e '(org-caldav-sync)' # Sync emacs-caldav as well
#pidof emacs && emacsclient -e '(org-caldav-sync)' # Sync emacs-caldav as well
eval "$(grep -h -- \
"^\s*\(export \)\?\(MBSYNCRC\|PASSWORD_STORE_DIR\|NOTMUCH_CONFIG\|GNUPGHOME\|XDG_DATA_HOME\|XDG_CONFIG_HOME\)=" \
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.zprofile" "$HOME/.config/zsh/.zprofile" "$HOME/.zshenv" \


+ 1
- 0
.local/bin/compiler View File

@ -48,6 +48,7 @@ case "$ext" in
org) emacs "$file" --batch -u "$USER" -f org-latex-export-to-pdf ;;
py) python "$file" ;;
[rR]md) Rscript -e "rmarkdown::render('$file', quiet=TRUE)" ;;
s) gcc -no-pie -g -o "$base" "$file" && $base ;;
rs) cargo build ;;
sass) sassc -a "$file" "$base.css" ;;
scad) openscad -o "$base".stl "$file" ;;


+ 6
- 1
.local/bin/daily-update View File

@ -1,11 +1,16 @@
#!/bin/sh
if [ "$1" = "-f" ]; then
cached=""
else
cached=$(cat "$XDG_RUNTIME_DIR"/day_cache)
fi
hour=$(date +"%-H")
morning=6
afternoon=12
night=19
cached=$(cat "$XDG_RUNTIME_DIR"/day_cache)
if [ "$hour" -le "$morning" ]; then
if [ ! "$cached" = "night" ]; then


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

@ -44,8 +44,6 @@ SEPERATOR='|'
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
ping -q -c 1 1.1.1.1 > /dev/null || "$(notify-send "check internet connection" && exit)"
show_devices (){
IFS=$','
devices=""


+ 1
- 1
.local/bin/dmenu-web View File

@ -9,7 +9,7 @@
# A browser-independent address bar with bookmark support. When the
# cursor is on a web browser it acts as the address bar of that browser.
engine='https://anon.sx/search?q=%s'
engine='https://searx.fmac.xyz/search?q=%s'
bookmarks="$HOME/.local/share/bookmarks"
gotourl() {


+ 39
- 30
.local/bin/dmenu-xrandr View File

@ -90,7 +90,44 @@ function main() {
# set primary output
prompt='Select primary output:'
output="$(menu_select "${prompt}" ${(k)=OUTPUT_CONFIGURED})" || bail $?
output="$(menu_select "${prompt}" ${(k)=OUTPUT_CONFIGURED})"
if [ "$(pidof x11vnc)" ]; then
killvnc="$(printf "no\nyes" | dmenu -p "Would you like to kill existing vnc display?")"
if [ "$killvnc" = "yes" ]; then
xrandr --output HDMI2 --off
killall -9 x11vnc
vnc="$(printf "no\nyes" | dmenu -p "Would you like to connect a remote display?")"
fi
else
vnc="$(printf "no\nyes" | dmenu -p "Would you like to connect a remote display?")"
fi
if [ "$vnc" = "yes" ]; then
echo "1920x1080" | dmenu -p "Please enter resolution:" | read resolution
[ "$resolution" ] || exit 1
printf "normal\nleft" | dmenu -p "Please enter rotation:" | read rotation
[ "$rotation" ] || exit 1
xrandr --output HDMI2 --off
h=$(echo "$resolution" | cut -d'x' -f1)
w=$(echo "$resolution" | cut -d'x' -f2)
modeline="$(gtf $h $w 60 | tail -n 2 | xargs | sed 's/Modeline [^ ]*//g'| xargs)"
name="${h}x${w}_$$.00"
wlan="$(ip -o -4 addr list wlan0 | awk '{print $4}' | cut -d/ -f1)"
eth="$(ip -o -4 addr list eth0 | awk '{print $4}' | cut -d/ -f1)"
bash -c "xrandr --newmode \"$name\" $modeline"
if [ "$rotation" = "normal" ]; then
clip="${h}x${w}+0+0"
else
clip="${w}x${h}+0+0"
fi
xrandr --addmode HDMI2 "$name"
xrandr --output HDMI2 --rotation $rotation --mode $name --left-of $output && { x11vnc \
-repeat -clip $clip & } || notify-send -a "Display Manager" "An issue occured"
pidof x11vnc && notify-send -t 60000 -a " Network info" "$(echo -e "wlan0: $wlan\neth0: $eth\nRunning on port 5900")"
daily-update -f
fi
[ "$output" = "eDP1" ] && bail 1
position='--primary'
mode="$(select_mode ${output})" || bail $?
@ -210,17 +247,6 @@ function select_mode() {
fi
}
################################################################################
# Uses dmenu to select the rotation of a given output. Prints the selection in
# xrandr option format (eg '--rotate inverted') to stdout
# Global variables:
# OPT_ROTATION
# ERR_BAD_ARGS
# Arguments:
# $1 - name of which output we are working with
# Returns:
# ERR_BAD_ARGS
################################################################################
function select_rotation() {
[[ -z $1 ]] && return "${ERR_BAD_ARGS}"
@ -239,20 +265,6 @@ function select_rotation() {
fi
}
################################################################################
# Uses dmenu to select an option. Undisplayed 'exit' option or pressing 'ESC'
# will return code ${EXIT_CLEAN} to trigger an abort to the script. Validates to
# make sure the selection is an option. If there is only 1 option, it will
# automatically choose it. Prints selection to stdout
# Global variables:
# none
# Arguments:
# $1=prompt
# $2+=menu items
# Returns:
# ERR_BAD_ARGS=bad arguments
# EXIT_CLEAN=user requested exit
################################################################################
function menu_select() {
[[ -z "$2" ]] && return ${ERR_BAD_ARGS}
@ -312,7 +324,4 @@ function bail() {
main
################################################################################
# vim filetype=zsh autoindent expandtab shiftwidth=2 tabstop=2
# End
#

+ 55
- 12
.local/bin/exfirefoxtabs.py View File

@ -14,15 +14,58 @@ import pathlib
import lz4.block
import json
path = pathlib.Path.home().joinpath('.mozilla/firefox')
files = path.glob(os.environ['FIREFOX_PROFILE'] + '/sessionstore-backups/recovery.js*')
for f in files:
b = f.read_bytes()
if b[:8] == b'mozLz40\0':
b = lz4.block.decompress(b[8:])
j = json.loads(b)
for w in j['windows']:
for t in w['tabs']:
i = t['index'] - 1
print(t['entries'][i]['url'])
class Node:
def __init__(self, url, lastAccessed):
self.url = url
self.lastAccessed = lastAccessed
self.left = None
self.right = None
self.parent = None
def insert(self, node):
if node.lastAccessed > self.lastAccessed:
if self.right:
self.right.insert(node)
else:
self.right = node
node.parent = self
else:
if self.left:
self.left.insert(node)
else:
self.left = node
node.parent = self
def print(self):
if self.right: # Print from high to low
self.right.print()
print(self.url)
if self.left:
self.left.print()
def main():
path = pathlib.Path('/dev/shm/firefox-' + os.environ['FIREFOX_PROFILE'] + "-" + os.environ['USER'] + '/sessionstore-backups')
files = path.glob('recovery.js*')
tree = None
for f in files:
b = f.read_bytes()
if b[:8] == b'mozLz40\0':
b = lz4.block.decompress(b[8:])
j = json.loads(b)
for w in j['windows']:
for t in w['tabs']:
i = t['index'] - 1
node = Node(t['entries'][i]['url'], t['lastAccessed'])
if tree:
tree.insert(node)
else:
tree = node
if tree:
tree.print()
if __name__ == "__main__":
main()

+ 1
- 0
.local/bin/nextcloud-sync View File

@ -2,6 +2,7 @@
source $HOME/.config/nextcloud/nextcloud
export XDG_RUNTIME_DIR=/tmp
rm -rf $XDG_RUNTIME_DIR/nextcloud.out
rm -rf $XDG_RUNTIME_DIR/nextcloud.err


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

@ -14,7 +14,7 @@ password_files=( "${password_files[@]#"$prefix"/}" )
password_files=( "${password_files[@]%.gpg}" )
# Show urls open in firefox on top
open_urls="$($HOME/.local/bin/exfirefoxtabs.py | awk -F/ '{print $3}' | sort | uniq | sed 's/$/\//g' | sed ':a;N;$!ba;s/\n/|\//g')"
open_urls="$($HOME/.local/bin/exfirefoxtabs.py | awk -F/ '{print $3}' | sort | uniq | sed 's/$//g' | sed ':a;N;$!ba;s/\n/|/g')"
pfiles="$(printf "%s\n" ${password_files[@]})"
list="$(echo "$pfiles" | grep -E "$open_urls")\n$(echo "$pfiles" | grep -Ev "$open_urls")"
entry=$(echo -e "$list" | dmenu -l 7 -p "Pass" -i "$@")


+ 2
- 0
.local/share/bookmarks View File

@ -1,4 +1,6 @@
https://brightspace.tudelft.nl
https://mytimetable.tudelft.nl
https://my.tudelft.nl
https://queue.tudelft.nl
https://weblab.tudelft.nl
https://stackoverflow.com/c/tud-cs/questions

+ 5
- 3
.local/src/dwm/keybinds.h View File

@ -55,7 +55,9 @@ static const char *wallabag[] = {"/home/yigit/.local/bin/dmenu-wallabag", "-s",
static const char *wiki[] = {"/home/yigit/.local/bin/dmenu-arch", NULL};
static const char *grabcolor[] = {"/home/yigit/.local/bin/grabcolor", NULL};
static const char *wc[] = {"/home/yigit/.local/bin/dmenu-wc", NULL};
static const char *network_manager[] = {"/home/yigit/.local/bin/connman_dmenu", NULL};
static const char *ambient_sound[] = {"/home/yigit/.local/bin/dmenu-ambient", NULL};
static const char *killall[] = {"/home/yigit/.local/bin/dmenu-killall", NULL};
static const char *mconnect[] = {"/home/yigit/.local/bin/dmenu-mconnect"};
static const char *udevil[] = {"/home/yigit/.local/bin/dmenu-udevil"};
@ -104,14 +106,12 @@ static Key keys[] = {
{ MODKEY|Mod1Mask, XK_comma, cyclelayout, {.i = -1 } }, /*Ciclar layouts*/
{ MODKEY|Mod1Mask, XK_period, cyclelayout, {.i = +1 } }, /*Ciclar layouts*/
{ MODKEY, XK_a, view, {.ui = ~0 } },
{ MODKEY|ShiftMask, XK_a, tag, {.ui = ~0 } },
{ MODKEY|Mod1Mask, XK_a, tag, {.ui = ~0 } },
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|Mod1Mask, XK_g, togglegaps, {0} },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)
@ -129,6 +129,7 @@ static Key keys[] = {
{ MODKEY|ShiftMask, XK_p, spawn, {.v = genpwd} },
{ MODKEY|ShiftMask, XK_b, spawn, {.v = bluetooth } },
{ MODKEY|Mod1Mask, XK_n, spawn, {.v = network_manager} }, /*Spiral*/
{ MODKEY|ShiftMask, XK_a, spawn, {.v = ambient_sound } },
{ MODKEY|Mod1Mask, XK_k, spawn, {.v = keyboard} }, /*tiled*/
{ MODKEY|ShiftMask, XK_r, spawn, {.v = refresh} }, /*tiled*/
{ 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } },
@ -153,6 +154,7 @@ static Key keys[] = {
{ MODKEY, XK_w, spawn, {.v = wiki} },
{ MODKEY, XK_t, spawn, {.v = online_class} },
{ MODKEY|ShiftMask, XK_m, spawn, {.v = mconnect} },
{ MODKEY|ShiftMask, XK_l, spawn, {.v = wc } },
{ MODKEY|ShiftMask, XK_d, spawn, {.v = udevil} },
{ MODKEY|ShiftMask, XK_u, spawn, {.v = udevil_umount} },
{ MODKEY, XK_y, spawn, {.v = youtube} },


+ 3
- 1
.local/src/dwm/rules.h View File

@ -20,7 +20,7 @@ static const Rule rules[] = {
/* class instance title tags mask isfloating floatpos isterminal noswallow monitor */
{ "discord" , NULL , NULL , 1 << 8 , NULL , NULL , 0 , 0 , -1 },
{ "Signal" , NULL , NULL , 1 << 8 , NULL , NULL , 0 , 0 , -1 },
{ "Signal" , NULL , NULL , 1 << 8 , NULL , NULL , 0 , 0 , -1 },
{ "Brave-browser" , NULL , NULL , 1 << 1 , NULL , NULL , 0 , 0 , -1 },
{ "Firefox" , NULL , NULL , 1 << 1 , NULL , NULL , 0 , 0 , -1 },
{ "firefox" , NULL , NULL , 1 << 1 , NULL , NULL , 0 , 0 , -1 },
@ -30,6 +30,8 @@ static const Rule rules[] = {
{ "st-256color" , NULL , NULL , 1 << 0 , NULL , NULL , 1 , 0 , -1 },
{ "Tor Browser" , NULL , NULL , 1 << 1 , NULL , NULL , 0 , 0 , -1 },
{ "TelegramDesktop" , NULL , NULL , 1 << 8 , NULL , NULL , 0 , 0 , -1 },
{ "zoom" , NULL , NULL , 1 << 5 , NULL , NULL , 0 , 0 , -1 },
{ "Microsoft Teams - Preview" , NULL , NULL , 1 << 5 , NULL , NULL , 0 , 0 , -1 },
{ "Nemo" , NULL , NULL , 0 , 1 , "50% 50% 1200W 800H" , 0 , 0 , -1 },
{ "ranger" , NULL , NULL , 0 , 1 , "50% 50% 800W 560H" , 0 , 0 , -1 },
{ "lf" , NULL , NULL , 0 , 1 , "50% 50% 800W 560H" , 0 , 0 , -1 },


+ 1
- 1
.local/src/st/config.h View File

@ -22,7 +22,7 @@ char *utmp = NULL;
char *scroll = "scroll";
char *stty_args = "stty raw pass8 nl -echo -iexten -cstopb 38400";
float alpha = 1, alphaUnfocused = 0.95;
float alpha = 1, alphaUnfocused = 0.85;
/* identification sequence returned in DA and DECID */
char *vtiden = "\033[?6c";


BIN
.local/src/st/st View File


BIN
.local/src/st/x.o View File


Loading…
Cancel
Save