From e0bb101455f64daf46ff90dc724410a556d586bb Mon Sep 17 00:00:00 2001 From: Thomas Dehaeze Date: Sun, 29 Dec 2019 15:11:49 +0100 Subject: [PATCH] Change i3exit script to be compatible with bspwm. Add camelcamelcamel binding to qutebrowser --- dotfiles/applications.org | 64 +++++++++++++++++++-------------------- dotfiles/binaries.org | 12 +++----- dotfiles/qutebrowser.org | 6 +++- dotfiles/scripts.org | 10 +++--- 4 files changed, 47 insertions(+), 45 deletions(-) diff --git a/dotfiles/applications.org b/dotfiles/applications.org index 4830c87..5e323be 100644 --- a/dotfiles/applications.org +++ b/dotfiles/applications.org @@ -1,10 +1,10 @@ #+TITLE:Desktop file for the applications * Neomutt - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/neomutt.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/neomutt.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] Name=Neomutt @@ -18,10 +18,10 @@ #+end_src * Zathura - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/zathura.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/zathura.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] Version=1.0 @@ -36,10 +36,10 @@ #+end_src * Weechat - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/weechat.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/weechat.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] Encoding=UTF-8 @@ -56,10 +56,10 @@ #+end_src * Matlab - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/matlab.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/matlab.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] Version=1.0 @@ -75,10 +75,10 @@ #+end_src * Neovim - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/nvim.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/nvim.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] Name=Neovim @@ -95,10 +95,10 @@ #+end_src * TODO Transmission - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/transmission.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/transmission.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] @@ -107,10 +107,10 @@ Exec=/usr/bin/env transadd %U #+end_src * Images - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/img.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/img.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] Type=Application @@ -119,10 +119,10 @@ #+end_src * TODO RSS - :PROPERTIES: - :header-args: :tangle ~/.local/share/applications/rss.desktop - :header-args+: :comments both :mkdirp yes - :END: +:PROPERTIES: +:header-args: :tangle ~/.local/share/applications/rss.desktop +:header-args+: :comments both :mkdirp yes +:END: #+begin_src conf [Desktop Entry] Type=Application diff --git a/dotfiles/binaries.org b/dotfiles/binaries.org index 608eb72..4907d89 100644 --- a/dotfiles/binaries.org +++ b/dotfiles/binaries.org @@ -464,29 +464,27 @@ mode=bookmarks main #+begin_src bash # with openrc use loginctl - [[ $(cat /proc/1/comm) == "systemd" ]] && logind=systemctl || logind=loginctl - case "$1" in lock) ~/scripts/lockscreen.sh ;; logout) - i3-msg exit + loginctl terminate-session `loginctl session-status | head -n 1 | awk '{print $1}'` ;; switch_user) dm-tool switch-to-greeter ;; suspend) - $logind suspend && ~/scripts/lockscreen.sh + systemctl suspend && ~/scripts/lockscreen.sh ;; hibernate) - $logind hibernate && ~/scripts/lockscreen.sh + systemctl hibernate && ~/scripts/lockscreen.sh ;; reboot) - $logind reboot + systemctl reboot ;; shutdown) - $logind poweroff + systemctl poweroff ;; ,*) echo "== ! i3exit: missing or invalid argument ! ==" diff --git a/dotfiles/qutebrowser.org b/dotfiles/qutebrowser.org index d0f23da..67e9813 100644 --- a/dotfiles/qutebrowser.org +++ b/dotfiles/qutebrowser.org @@ -937,11 +937,15 @@ c.url.start_pages = ['https://start.duckduckgo.com'] #+end_src *** Annotate with Hypothesis - #+begin_src conf config.bind(',a', "jseval javascript:(function(){window.hypothesisConfig=function(){return{showHighlights:true,appType:'bookmarklet'};};var d=document,s=d.createElement('script');s.setAttribute('src','https://hypothes.is/embed.js');d.body.appendChild(s)})();") #+end_src +*** See price in CamelCamelCamel +#+begin_src conf + config.bind(',P', ":open -t https://fr.camelcamelcamel.com/search?sq={url}") +#+end_src + * Userscripts ** Cast Youtube to Chromecast :PROPERTIES: diff --git a/dotfiles/scripts.org b/dotfiles/scripts.org index 1ece64e..c915f89 100644 --- a/dotfiles/scripts.org +++ b/dotfiles/scripts.org @@ -1,11 +1,11 @@ #+TITLE: Scripts * Wallpapers - :PROPERTIES: - :header-args: :tangle ~/scripts/wallpapers.sh - :header-args+: :comments both :mkdirp yes - :header-args+: :shebang "#!/usr/bin/env bash" - :END: +:PROPERTIES: +:header-args: :tangle ~/scripts/wallpapers.sh +:header-args+: :comments both :mkdirp yes +:header-args+: :shebang "#!/usr/bin/env bash" +:END: #+begin_src bash while true; do nitrogen --set-zoom-fill --random ".wallpapers"