From d64d4a6a3924e144fe49b3d956320b37786a738a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20Gon=C3=A7alves?= Date: Fri, 14 Jan 2022 09:54:31 +0100 Subject: Fri Jan 14 09:54:31 AM CET 2022 --- .bin/ag-autorandr | 2 + .bin/create-local-backup | 24 ++++++++++ .bin/music | 4 +- .bin/nem | 8 ++++ .bin/sync-public-dotfiles | 53 ----------------------- .bin/synchronize-pub-dots | 53 +++++++++++++++++++++++ .bin/undock | 2 +- .config/newsboat/config | 2 + .config/nvim/colors/colorscheme.vim | 3 ++ .config/nvim/lua/settings.lua | 2 +- .config/qutebrowser/greasemonkey/glassdoor-css.js | 10 +++++ .config/tmux/tmux.conf | 2 +- 12 files changed, 107 insertions(+), 58 deletions(-) create mode 100755 .bin/create-local-backup create mode 100755 .bin/nem delete mode 100755 .bin/sync-public-dotfiles create mode 100755 .bin/synchronize-pub-dots diff --git a/.bin/ag-autorandr b/.bin/ag-autorandr index 1064e1c..1c4e325 100755 --- a/.bin/ag-autorandr +++ b/.bin/ag-autorandr @@ -13,3 +13,5 @@ for screen in ${screens}; do xrandr --output "${screen}" --auto --right-of "${screen_master}" screen_master="${screen}" done + +xrandr --output "${screen}" --primary diff --git a/.bin/create-local-backup b/.bin/create-local-backup new file mode 100755 index 0000000..4e4cb1b --- /dev/null +++ b/.bin/create-local-backup @@ -0,0 +1,24 @@ +#!/bin/sh + +set -xe + +source_directories="./git.rgoncalves.se/ + ./ + " + +out_dir=$(readlink -f "${1}") + +[ -d "${out_dir}" ] + +exit +rsync -hvrPt \ + --delete-after \ + --fuzzy \ + --prune-empty-dirs \ + --include "*.pdf" \ + --include "*.epub" \ + --include "*.png" \ + --include "*.jpg" \ + --include "*/" \ + --exclude "*" \ + "${src_dir}/" "${out_dir}/" diff --git a/.bin/music b/.bin/music index 5498dc0..6ef5ef8 100755 --- a/.bin/music +++ b/.bin/music @@ -46,8 +46,8 @@ main() { mkdir "${dir}" log "${dir} ${url}: download" - youtube-dl --rm-cache-dir >/dev/null - youtube-dl \ + yt-dlp --rm-cache-dir >/dev/null + yt-dlp \ --extract-audio \ --audio-format mp3 \ --prefer-ffmpeg \ diff --git a/.bin/nem b/.bin/nem new file mode 100755 index 0000000..efff120 --- /dev/null +++ b/.bin/nem @@ -0,0 +1,8 @@ +#!/bin/sh + +while true; do + date + sleep 1 +done & + +echo a diff --git a/.bin/sync-public-dotfiles b/.bin/sync-public-dotfiles deleted file mode 100755 index 5a6e795..0000000 --- a/.bin/sync-public-dotfiles +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -set -e - -command -v yadm git - -allowed_patterns="-e ^.bin - -e ^.config/alacritty/ - -e ^.config/calcurse/ - -e ^.config/cmus/classic.theme - -e ^.config/cmus/rc - -e ^.config/dot/term-color-* - -e ^.config/gopass/config.yml - -e ^.config/i3*/config - -e ^.config/tmux/ - -e ^.config/mimeapps.list - -e ^.config/neomutt/neomuttrc - -e ^.config/newsboat/config - -e ^.config/nvim/ - -e ^.config/qutebrowser/config.py - -e ^.config/qutebrowser/greasemonkey/ - -e ^.config/pipewire/ - -e ^.config/sway/config - -e ^.config/systemd/*.service - -e ^.config/user-dirs.dir - -e ^.config/user-dirs.locale - -e ^.gnupg/gpg-agent.conf - -e ^.public-keys/ - -e ^.kshrc - -e ^.weechat/buflist.conf - -e ^.weechat/fset.conf - -e ^.weechat/logger.conf - -e ^.weechat/weechat.conf - -e ^.xinitrc - -e ^.zshrc - " - -[ "$(yadm rev-parse --show-toplevel)" != "$(git rev-parse --show-toplevel)" ] - -# retrieve existing files -upstream_files=$(cd "${HOME}" && yadm ls-files) -local_files=$(find . -not -path "./.git*" -not -path ".") - -echo "${local_files}" | xargs rm -rf - -allowed_files=$(echo "${upstream_files}" | grep ${allowed_patterns}) -for allowed_file in ${allowed_files}; do - echo "${allowed_file}" - install -D "${HOME}/${allowed_file}" "${allowed_file}" -done - -git add . -git commit -m "$(date)" diff --git a/.bin/synchronize-pub-dots b/.bin/synchronize-pub-dots new file mode 100755 index 0000000..5a6e795 --- /dev/null +++ b/.bin/synchronize-pub-dots @@ -0,0 +1,53 @@ +#!/bin/sh + +set -e + +command -v yadm git + +allowed_patterns="-e ^.bin + -e ^.config/alacritty/ + -e ^.config/calcurse/ + -e ^.config/cmus/classic.theme + -e ^.config/cmus/rc + -e ^.config/dot/term-color-* + -e ^.config/gopass/config.yml + -e ^.config/i3*/config + -e ^.config/tmux/ + -e ^.config/mimeapps.list + -e ^.config/neomutt/neomuttrc + -e ^.config/newsboat/config + -e ^.config/nvim/ + -e ^.config/qutebrowser/config.py + -e ^.config/qutebrowser/greasemonkey/ + -e ^.config/pipewire/ + -e ^.config/sway/config + -e ^.config/systemd/*.service + -e ^.config/user-dirs.dir + -e ^.config/user-dirs.locale + -e ^.gnupg/gpg-agent.conf + -e ^.public-keys/ + -e ^.kshrc + -e ^.weechat/buflist.conf + -e ^.weechat/fset.conf + -e ^.weechat/logger.conf + -e ^.weechat/weechat.conf + -e ^.xinitrc + -e ^.zshrc + " + +[ "$(yadm rev-parse --show-toplevel)" != "$(git rev-parse --show-toplevel)" ] + +# retrieve existing files +upstream_files=$(cd "${HOME}" && yadm ls-files) +local_files=$(find . -not -path "./.git*" -not -path ".") + +echo "${local_files}" | xargs rm -rf + +allowed_files=$(echo "${upstream_files}" | grep ${allowed_patterns}) +for allowed_file in ${allowed_files}; do + echo "${allowed_file}" + install -D "${HOME}/${allowed_file}" "${allowed_file}" +done + +git add . +git commit -m "$(date)" diff --git a/.bin/undock b/.bin/undock index 2193610..c592fbf 100755 --- a/.bin/undock +++ b/.bin/undock @@ -2,5 +2,5 @@ set -xe -x11-config +dock xrandr -s 0 diff --git a/.config/newsboat/config b/.config/newsboat/config index 4095c45..c9d9fcd 100755 --- a/.config/newsboat/config +++ b/.config/newsboat/config @@ -13,6 +13,8 @@ unbind-key J unbind-key K bind-key j down bind-key k up +bind-key ^D pagedown +bind-key ^U pageup bind-key l open bind-key h quit diff --git a/.config/nvim/colors/colorscheme.vim b/.config/nvim/colors/colorscheme.vim index 9822ea4..48df51c 100755 --- a/.config/nvim/colors/colorscheme.vim +++ b/.config/nvim/colors/colorscheme.vim @@ -206,3 +206,6 @@ hi semshiSelected cterm=NONE ctermbg=161 ctermfg=231 hi semshiErrorSign cterm=NONE ctermbg=160 ctermfg=231 hi semshiErrorChar cterm=NONE ctermbg=160 ctermfg=231 sign define semshiError text=E> texthl=semshiErrorSign + +hi VirtColumn cterm=NONE ctermbg=0 ctermfg=2 +hi IndentBlankLineChar cterm=NONE ctermbg=0 ctermfg=15 diff --git a/.config/nvim/lua/settings.lua b/.config/nvim/lua/settings.lua index 2741c99..aa04dce 100755 --- a/.config/nvim/lua/settings.lua +++ b/.config/nvim/lua/settings.lua @@ -7,7 +7,7 @@ o.shell = '/bin/sh' o.encoding = 'utf-8' o.scrolloff = 3 o.lazyredraw = true -o.autochdir = true +o.autochdir = false o.smarttab = true o.number = true o.list = true diff --git a/.config/qutebrowser/greasemonkey/glassdoor-css.js b/.config/qutebrowser/greasemonkey/glassdoor-css.js index d0e0e49..ad82b26 100755 --- a/.config/qutebrowser/greasemonkey/glassdoor-css.js +++ b/.config/qutebrowser/greasemonkey/glassdoor-css.js @@ -7,3 +7,13 @@ window.addEventListener('load', function () { window.onscroll = null; }) + +window.addEventListener('load', function() { + let functions = [ + () => document.getElementById("ContentWallHardsell").remove(), + () => document.getElementsByTagName('body')[0].style.removeProperty("overflow"), + () => document.addEventListener("scroll", event => event.stopPropagation(), true), + () => document.addEventListener("mousemove", event => event.stopPropagation(), true), + ]; + functions.forEach(f => f()); +}); diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf index 81e5d4f..9e77b7c 100755 --- a/.config/tmux/tmux.conf +++ b/.config/tmux/tmux.conf @@ -3,7 +3,7 @@ set-option -g prefix ` set-option -g mouse off set-option -g mode-keys vi set-option -g escape-time 0 -# set-option -g default-terminal "screen-256color" +set-option -g default-terminal "screen-256color" set-option -g history-limit 5000 set -s escape-time 0 -- cgit v1.2.3