From 7be365e39f9d21da11003a10c861685e51917319 Mon Sep 17 00:00:00 2001 From: Yigit Colakoglu Date: Fri, 3 Sep 2021 19:37:21 +0200 Subject: [PATCH] More and more changes --- .../plugins/ZeresPluginLibrary.config.json | 2 +- .config/calcurse/conf | 10 +-- .config/doom/config.el | 9 ++- .config/doom/org-conf.el | 24 ------ .config/doom/packages.el | 1 - .config/imapfilter/config.lua | 14 ---- .config/isync/mbsyncrc | 25 +++++++ .config/mimeapps.list | 2 + .../1-yigitcolakoglu@hotmail.com.muttrc | 2 +- .../accounts/1-yigitcolakoglu@hotmail.com.sig | 4 - .../2-yigit@yigitcolakoglu.com.muttrc | 2 +- .../accounts/2-yigit@yigitcolakoglu.com.sig | 4 - .../mutt/accounts/3-yigit@fr1nge.xyz.muttrc | 46 ------------ .config/mutt/accounts/3-yigit@fr1nge.xyz.sig | 4 - .config/mutt/muttrc | 3 +- .config/nvim/plugin/plugins.vim | 5 ++ .config/qt5ct/qt5ct.conf | 6 +- .config/vim/vimrc | 16 ++-- .config/zsh/.zshrc | 2 +- .config/zsh/aliases | 2 +- .config/zsh/cmds | 24 ++++++ .local/bin/calconsync | 2 +- .local/bin/compiler | 1 + .local/bin/daily-update | 7 +- .local/bin/dmenu-mconnect | 2 - .local/bin/dmenu-web | 2 +- .local/bin/dmenu-xrandr | 69 ++++++++++-------- .local/bin/exfirefoxtabs.py | 67 ++++++++++++++--- .local/bin/nextcloud-sync | 1 + .local/bin/password_manager | 2 +- .local/share/bookmarks | 2 + .local/src/dwm/keybinds.h | 8 +- .local/src/dwm/rules.h | 4 +- .local/src/st/config.h | 2 +- .local/src/st/st | Bin 111928 -> 111928 bytes .local/src/st/x.o | Bin 82072 -> 82072 bytes 36 files changed, 201 insertions(+), 175 deletions(-) delete mode 100644 .config/mutt/accounts/1-yigitcolakoglu@hotmail.com.sig delete mode 100644 .config/mutt/accounts/2-yigit@yigitcolakoglu.com.sig delete mode 100644 .config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc delete mode 100644 .config/mutt/accounts/3-yigit@fr1nge.xyz.sig diff --git a/.config/BetterDiscord/plugins/ZeresPluginLibrary.config.json b/.config/BetterDiscord/plugins/ZeresPluginLibrary.config.json index 4b708adc..77223a42 100644 --- a/.config/BetterDiscord/plugins/ZeresPluginLibrary.config.json +++ b/.config/BetterDiscord/plugins/ZeresPluginLibrary.config.json @@ -1,6 +1,6 @@ { "currentVersionInfo": { - "version": "1.2.29", + "version": "1.2.30", "hasShownChangelog": true } } \ No newline at end of file diff --git a/.config/calcurse/conf b/.config/calcurse/conf index 1ce2ab07..f705d873 100644 --- a/.config/calcurse/conf +++ b/.config/calcurse/conf @@ -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 diff --git a/.config/doom/config.el b/.config/doom/config.el index ec16c503..d307425b 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -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) diff --git a/.config/doom/org-conf.el b/.config/doom/org-conf.el index c1930b13..73d6e371 100644 --- a/.config/doom/org-conf.el +++ b/.config/doom/org-conf.el @@ -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" diff --git a/.config/doom/packages.el b/.config/doom/packages.el index db4b7083..7146a039 100644 --- a/.config/doom/packages.el +++ b/.config/doom/packages.el @@ -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) diff --git a/.config/imapfilter/config.lua b/.config/imapfilter/config.lua index bf114f62..7bfa5669 100644 --- a/.config/imapfilter/config.lua +++ b/.config/imapfilter/config.lua @@ -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"} diff --git a/.config/isync/mbsyncrc b/.config/isync/mbsyncrc index 75c4dc11..816b4bcc 100644 --- a/.config/isync/mbsyncrc +++ b/.config/isync/mbsyncrc @@ -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 diff --git a/.config/mimeapps.list b/.config/mimeapps.list index 5b96948f..543f5d7b 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -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; diff --git a/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc b/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc index dd853f7e..c6c8f76f 100644 --- a/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc +++ b/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc @@ -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 diff --git a/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.sig b/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.sig deleted file mode 100644 index 6ffcdf79..00000000 --- a/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.sig +++ /dev/null @@ -1,4 +0,0 @@ -Yiğit Çolakoğlu -=================== -Senior Student at Ted Ankara College Foundation High School - diff --git a/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc b/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc index b42b5f0a..010a43ab 100644 --- a/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc +++ b/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc @@ -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 diff --git a/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.sig b/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.sig deleted file mode 100644 index 6ffcdf79..00000000 --- a/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.sig +++ /dev/null @@ -1,4 +0,0 @@ -Yiğit Çolakoğlu -=================== -Senior Student at Ted Ankara College Foundation High School - diff --git a/.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc b/.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc deleted file mode 100644 index 3769ad5b..00000000 --- a/.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc +++ /dev/null @@ -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 -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 "mw -y yigit@fr1nge.xyz" "run mbsync to sync yigit@fr1nge.xyz" - -mailboxes "=Drafts" "=INBOX" "=Junk" "=Sent" "=Archive" "=Deleted Items" -macro index,pager ga "=Archive" "go to archive" -macro index,pager Ma ";=Archive" "move mail to archive" -macro index,pager Ca ";=Archive" "copy mail to archive" -macro index,pager gj "=Junk" "go to spam" -macro index,pager Mj ";=Junk" "move mail to spam" -macro index,pager Cj ";=Junk" "copy mail to spam" -set record = "+Sent" -macro index,pager gs "=Sent" "go to sent" -macro index,pager Ms ";=Sent" "move mail to sent" -macro index,pager Cs ";=Sent" "copy mail to sent" -macro index,pager gt "=Deleted Items" "go to trash" -macro index,pager Mt ";=Deleted Items" "move mail to trash" -macro index,pager Ct ";=Deleted Items" "copy mail to trash" -set trash = "+Trash" -set postponed = "+Drafts" -macro index,pager gd "=Drafts" "go to drafts" -macro index,pager Md ";=Drafts" "move mail to drafts" -macro index,pager Cd ";=Drafts" "copy mail to drafts" -macro index,pager gi "=INBOX" "go to inbox" -macro index,pager Mi ";=INBOX" "move mail to inbox" -macro index,pager Ci ";=INBOX" "copy mail to inbox" -set spoolfile = "+INBOX" diff --git a/.config/mutt/accounts/3-yigit@fr1nge.xyz.sig b/.config/mutt/accounts/3-yigit@fr1nge.xyz.sig deleted file mode 100644 index 6ffcdf79..00000000 --- a/.config/mutt/accounts/3-yigit@fr1nge.xyz.sig +++ /dev/null @@ -1,4 +0,0 @@ -Yiğit Çolakoğlu -=================== -Senior Student at Ted Ankara College Foundation High School - diff --git a/.config/mutt/muttrc b/.config/mutt/muttrc index 158ee3ed..78301829 100644 --- a/.config/mutt/muttrc +++ b/.config/mutt/muttrc @@ -32,4 +32,5 @@ set crypt_use_gpgme set pgp_default_key = "yigitcolakoglu@hotmail.com" macro index,pager i1 'source /home/yigit/.config/mutt/accounts/1-yigitcolakoglu@hotmail.com.muttrc!;' "switch to yigitcolakoglu@hotmail.com" macro index,pager i2 'source /home/yigit/.config/mutt/accounts/2-yigit@yigitcolakoglu.com.muttrc!;' "switch to yigit@yigitcolakoglu.com" -macro index,pager i3 'source /home/yigit/.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc!;' "switch to yigit@fr1nge.xyz" +macro index,pager i3 'source /home/yigit/.config/mutt/accounts/3-Y.Colakoglu@student.tudelft.nl.muttrc!;' "switch to Y.Colakoglu@student.tudelft.nl" +macro index,pager i4 'source /home/yigit/.config/mutt/accounts/3-yigit@fr1nge.xyz.muttrc!;' "switch to yigit@fr1nge.xyz" diff --git a/.config/nvim/plugin/plugins.vim b/.config/nvim/plugin/plugins.vim index 3855fe7f..a34e0f81 100644 --- a/.config/nvim/plugin/plugins.vim +++ b/.config/nvim/plugin/plugins.vim @@ -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() diff --git a/.config/qt5ct/qt5ct.conf b/.config/qt5ct/qt5ct.conf index f943e719..d301f8df 100644 --- a/.config/qt5ct/qt5ct.conf +++ b/.config/qt5ct/qt5ct.conf @@ -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,)" diff --git a/.config/vim/vimrc b/.config/vim/vimrc index e8494e59..1482b10f 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -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 c :w! \| !compiler "%" " Set leader let mapleader = "," " Leader Mappings +nnoremap c :w! \| !compiler "%" map w :update map q :qall map gs :Gstatus @@ -47,8 +43,8 @@ map h :History " CtrlP use FZF (faster!) nnoremap :Files -nnoremap b :Buffers -noremap u :wsilent !urlview +nnoremap b :Buffers +noremap u :wsilent !urlview " System clipboard copy nnoremap y "+y @@ -60,6 +56,12 @@ nnoremap P "+P vnoremap d "+d nnoremap D "+D + +if has('nvim') + source ~/.config/nvim/plugin/plugins.vim +endif + + syntax on filetype plugin on diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index 12d2c425..695d3f66 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -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 diff --git a/.config/zsh/aliases b/.config/zsh/aliases index 2a0fa09a..84acd3cd 100755 --- a/.config/zsh/aliases +++ b/.config/zsh/aliases @@ -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'" diff --git a/.config/zsh/cmds b/.config/zsh/cmds index 4fe0c546..2cb907dd 100644 --- a/.config/zsh/cmds +++ b/.config/zsh/cmds @@ -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/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="" diff --git a/.local/bin/dmenu-web b/.local/bin/dmenu-web index ba961bac..95cc9e3e 100755 --- a/.local/bin/dmenu-web +++ b/.local/bin/dmenu-web @@ -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() { diff --git a/.local/bin/dmenu-xrandr b/.local/bin/dmenu-xrandr index b666c8b6..30e66d50 100755 --- a/.local/bin/dmenu-xrandr +++ b/.local/bin/dmenu-xrandr @@ -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 -# + diff --git a/.local/bin/exfirefoxtabs.py b/.local/bin/exfirefoxtabs.py index 5a0648e4..bc0ddcb9 100755 --- a/.local/bin/exfirefoxtabs.py +++ b/.local/bin/exfirefoxtabs.py @@ -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() + + diff --git a/.local/bin/nextcloud-sync b/.local/bin/nextcloud-sync index f0cbe23f..4a52a185 100755 --- a/.local/bin/nextcloud-sync +++ b/.local/bin/nextcloud-sync @@ -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 diff --git a/.local/bin/password_manager b/.local/bin/password_manager index 1c3e2a32..d8f45ae2 100755 --- a/.local/bin/password_manager +++ b/.local/bin/password_manager @@ -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 "$@") diff --git a/.local/share/bookmarks b/.local/share/bookmarks index ebaae8c6..f3c5f03a 100644 --- a/.local/share/bookmarks +++ b/.local/share/bookmarks @@ -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 diff --git a/.local/src/dwm/keybinds.h b/.local/src/dwm/keybinds.h index c49ee2f7..c1f4cd8d 100644 --- a/.local/src/dwm/keybinds.h +++ b/.local/src/dwm/keybinds.h @@ -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} }, diff --git a/.local/src/dwm/rules.h b/.local/src/dwm/rules.h index a2f04d59..cf77d57e 100644 --- a/.local/src/dwm/rules.h +++ b/.local/src/dwm/rules.h @@ -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 }, diff --git a/.local/src/st/config.h b/.local/src/st/config.h index c656da3b..3ec849cb 100644 --- a/.local/src/st/config.h +++ b/.local/src/st/config.h @@ -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"; diff --git a/.local/src/st/st b/.local/src/st/st index 79e43e7129ef6b804a71076718c79a5d34b21b1d..39e75087c78f09adb7b9aaeea6ed7b56e0ecee14 100755 GIT binary patch delta 58 zcmV-A0LA~f>ISC#?&6!NmtaYONehib|-jVom-ygC`xw}YGmx10k3u&kpj82wUoY$#PXGV_ delta 58 zcmV-A0LA~f>ISC#?&6fomR*A+w-5KS~tb&ZW=%#!Rg$%C8&x10k3u&kpj82wU(Jse>Hq)$ diff --git a/.local/src/st/x.o b/.local/src/st/x.o index 1ecca9c19a73f7f3b5955e63cd90e3c0649fc472..1f8752e753caebebfc9da8e9d1eff50a32faedc9 100644 GIT binary patch delta 28 kcmbQy$U38ub%TRD$E=x=_6!US_L~!f3>Y_8cqse;0FiGBC;$Ke delta 28 jcmbQy$U38ub%TRDhp}<7Jp)67{pQ3V1IEo29tuAIg$oIF