From d1cc04a52c66ee197378d7354a1aba6281e8b32c Mon Sep 17 00:00:00 2001 From: Julian T Date: Thu, 14 Mar 2019 14:11:47 +0100 Subject: Youcompleteme and qutebrowser --- .gitignore | 1 + dwm/.xinitrc | 1 + dwm/lc | 65 +- emacs/.emacs | 17 + qutebrowser/.config/qutebrowser/config.py | 1824 ++++++++++++++++++++++++++++ qutebrowser/.config/qutebrowser/quickmarks | 9 + vim/.vimrc | 19 +- 7 files changed, 1889 insertions(+), 47 deletions(-) create mode 100644 .gitignore create mode 100644 qutebrowser/.config/qutebrowser/config.py create mode 100644 qutebrowser/.config/qutebrowser/quickmarks diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6e92f57 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +tags diff --git a/dwm/.xinitrc b/dwm/.xinitrc index d0232a3..ecf13e1 100644 --- a/dwm/.xinitrc +++ b/dwm/.xinitrc @@ -15,6 +15,7 @@ nm-applet & xscreensaver & xss-lock -- xscreensaver-command --lock & dunst & +xcompmgr & if ! pgrep -u "$USER" ssh-agent > /dev/null; then ssh-agent > ~/.ssh-agent-thing diff --git a/dwm/lc b/dwm/lc index a482d8e..9aef69c 100755 --- a/dwm/lc +++ b/dwm/lc @@ -1,50 +1,31 @@ #!/bin/bash -Menu="Program Info System File" -System="update poweroff syspend set-keyboard" -Info="battery" -Program="cups-website vim emacs htop scrot" -Commonfiles=".vimrc .zshrc" -All="$System $Info $Program" +Commands="update poweroff suspend set-keyboard caps-lock battery cups-website vim emacs htop scrot overleaf-render overleaf" handle_stuff() { - -# Dmemu listing - if [ "$1" = "--list" ]; then - printf "Program\nInfo\nSystem" - fi if [ "$1" = "--dmenu" ]; then - ./lc $(echo $Menu $All | tr " " "\n" | dmenu -i -p Launch) - fi - if [ "$1" = "System" ]; then - ./lc $(echo $System | tr " " "\n" | dmenu -i -p Launch) + ./lc $(echo $Commands | tr " " "\n" | dmenu -i -p ":") fi - if [ "$1" = "Info" ]; then - ./lc $(echo $Info | tr " " "\n" | dmenu -i -p Launch) - fi - if [ "$1" = "Program" ]; then - ./lc $(echo $Program | tr " " "\n" | dmenu -i -p Launch) - fi - if [ "$1" = "File" ]; then - st -e nvim $(echo $Commonfiles | tr " " "\n" | dmenu -i -p Launch) + + if [ "$1" = "edit" ] || [ "$1" = "e" ]; then + notify-send "$*" + st -e nvim $(echo $* | cut -d" " -f2-) fi # System info - if [ "$1" = "-b" ] || [ "$1" = "battery" ]; then + if [ "$1" = "b" ] || [ "$1" = "battery" ]; then notify-send "Battery information" "$(acpi | grep 1:)" fi # System maintenance - if [ "$1" = "-u" ] || [ "$1" = "update" ]; then - st -e sudo pacman -Syu - fi - if [ "$1" = "--xk" ] || [ "$1" = "set-keyboard" ]; then + if [ "$1" = "sk" ] || [ "$1" = "set-keyboard" ]; then setxkbmap -layout us -variant altgr-intl xmodmap .Xmodmap + xcape -e "Control_R=Escape" fi # POWER COMMANDS - if [ "$1" = "-s" ] || [ "$1" = "suspend" ]; then + if [ "$1" = "s" ] || [ "$1" = "suspend" ]; then systemctl suspend fi if [ "$1" = "poweroff" ]; then @@ -52,23 +33,34 @@ handle_stuff() { fi # Mics - if [ "$1" = "-p" ] || [ "$1" = "scrot" ]; then + if [ "$1" = "p" ] || [ "$1" = "scrot" ]; then scrot /tmp/%Y-%m-%d-%T-screenshot.png fi + if [ "$1" = "overleaf-render" ]; then + sh ~/Documents/overleafRenderer/compile.sh + fi + + if [ "$1" = "caps-lock" ] || [ "$1" = "cl" ]; then + xdotool key Caps_Lock + fi + # Launch - if [ "$1" = "-v" ] || [ "$1" = "vim" ]; then + if [ "$1" = "vi" ] || [ "$1" = "vim" ]; then st -e nvim fi - if [ "$1" = "--emacs" ] || [ "$1" = "emacs" ]; then + if [ "$1" = "emacs" ]; then st -e emacs fi - if [ "$1" = "--ht" ] || [ "$1" = "htop" ]; then + if [ "$1" = "ht" ] || [ "$1" = "htop" ]; then st -e htop fi - if [ "$1" = "--cups" ] || [ "$1" = "cups-website" ]; then + if [ "$1" = "cups" ] || [ "$1" = "cups-website" ]; then firefox "http://localhost:631/" fi + if [ "$1" = "overleaf" ]; then + firefox -p Sharelatex --no-remote + fi # Calc if [ "$(echo $1 | head -c 1)" = "=" ]; then @@ -78,7 +70,4 @@ handle_stuff() { } -for var in "$@" -do - handle_stuff "$var" & -done +handle_stuff $* & diff --git a/emacs/.emacs b/emacs/.emacs index 3c1ec30..3e61926 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -68,6 +68,23 @@ ;; ;; General config ;; +(use-package calfw + :ensure t) +(use-package calfw-ical + :ensure t) +(use-package calfw-org + :ensure t) + +(defun open-calendar () + (interactive) + (cfw:open-calendar-buffer :contents-sources + (list + (cfw:org-create-source "Green") + ) + ) + ) + +(setq backup-directory-alist `(("." . "~/.saves"))) (setq initial-buffer-choice nil) (setq org-support-shift-select t) diff --git a/qutebrowser/.config/qutebrowser/config.py b/qutebrowser/.config/qutebrowser/config.py new file mode 100644 index 0000000..261648b --- /dev/null +++ b/qutebrowser/.config/qutebrowser/config.py @@ -0,0 +1,1824 @@ +## Autogenerated config.py +## Documentation: +## qute://help/configuring.html +## qute://help/settings.html + +## This is here so configs done via the GUI are still loaded. +## Remove it to not load settings done via the GUI. +# config.load_autoconfig() + +## Aliases for commands. The keys of the given dictionary are the +## aliases, while the values are the commands they map to. +## Type: Dict +c.aliases = {'w': 'session-save', 'q': 'tab-close', 'qa': 'quit', 'wq': 'quit --save', 'wqa': 'quit --save', 'tabe' : 'open -t', 'nod' : 'download-clear'} + +## Time interval (in milliseconds) between auto-saves of +## config/cookies/etc. +## Type: Int +# c.auto_save.interval = 15000 + +## Always restore open sites when qutebrowser is reopened. +## Type: Bool +# c.auto_save.session = False + +## Backend to use to display websites. qutebrowser supports two different +## web rendering engines / backends, QtWebKit and QtWebEngine. QtWebKit +## was discontinued by the Qt project with Qt 5.6, but picked up as a +## well maintained fork: https://github.com/annulen/webkit/wiki - +## qutebrowser only supports the fork. QtWebEngine is Qt's official +## successor to QtWebKit. It's slightly more resource hungry than +## QtWebKit and has a couple of missing features in qutebrowser, but is +## generally the preferred choice. +## Type: String +## Valid values: +## - webengine: Use QtWebEngine (based on Chromium). +## - webkit: Use QtWebKit (based on WebKit, similar to Safari). +# c.backend = 'webengine' + +## This setting can be used to map keys to other keys. When the key used +## as dictionary-key is pressed, the binding for the key used as +## dictionary-value is invoked instead. This is useful for global +## remappings of keys, for example to map Ctrl-[ to Escape. Note that +## when a key is bound (via `bindings.default` or `bindings.commands`), +## the mapping is ignored. +## Type: Dict +# c.bindings.key_mappings = {'': '', '': '', '': '', '': '', '': '', '': '', '': '', '': ''} + +## Background color of the completion widget category headers. +## Type: QssColor +# c.colors.completion.category.bg = 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #888888, stop:1 #505050)' + +## Bottom border color of the completion widget category headers. +## Type: QssColor +# c.colors.completion.category.border.bottom = 'black' + +## Top border color of the completion widget category headers. +## Type: QssColor +# c.colors.completion.category.border.top = 'black' + +## Foreground color of completion widget category headers. +## Type: QtColor +# c.colors.completion.category.fg = 'white' + +## Background color of the completion widget for even rows. +## Type: QssColor +# c.colors.completion.even.bg = '#333333' + +## Text color of the completion widget. May be a single color to use for +## all columns or a list of three colors, one for each column. +## Type: List of QtColor, or QtColor +# c.colors.completion.fg = ['white', 'white', 'white'] + +## Background color of the selected completion item. +## Type: QssColor +# c.colors.completion.item.selected.bg = '#e8c000' + +## Bottom border color of the selected completion item. +## Type: QssColor +# c.colors.completion.item.selected.border.bottom = '#bbbb00' + +## Top border color of the completion widget category headers. +## Type: QssColor +# c.colors.completion.item.selected.border.top = '#bbbb00' + +## Foreground color of the selected completion item. +## Type: QtColor +# c.colors.completion.item.selected.fg = 'black' + +## Foreground color of the matched text in the completion. +## Type: QtColor +# c.colors.completion.match.fg = '#ff4444' + +## Background color of the completion widget for odd rows. +## Type: QssColor +# c.colors.completion.odd.bg = '#444444' + +## Color of the scrollbar in the completion view. +## Type: QssColor +# c.colors.completion.scrollbar.bg = '#333333' + +## Color of the scrollbar handle in the completion view. +## Type: QssColor +# c.colors.completion.scrollbar.fg = 'white' + +## Background color for the download bar. +## Type: QssColor +# c.colors.downloads.bar.bg = 'black' + +## Background color for downloads with errors. +## Type: QtColor +# c.colors.downloads.error.bg = 'red' + +## Foreground color for downloads with errors. +## Type: QtColor +# c.colors.downloads.error.fg = 'white' + +## Color gradient start for download backgrounds. +## Type: QtColor +# c.colors.downloads.start.bg = '#0000aa' + +## Color gradient start for download text. +## Type: QtColor +# c.colors.downloads.start.fg = 'white' + +## Color gradient stop for download backgrounds. +## Type: QtColor +# c.colors.downloads.stop.bg = '#00aa00' + +## Color gradient end for download text. +## Type: QtColor +# c.colors.downloads.stop.fg = 'white' + +## Color gradient interpolation system for download backgrounds. +## Type: ColorSystem +## Valid values: +## - rgb: Interpolate in the RGB color system. +## - hsv: Interpolate in the HSV color system. +## - hsl: Interpolate in the HSL color system. +## - none: Don't show a gradient. +# c.colors.downloads.system.bg = 'rgb' + +## Color gradient interpolation system for download text. +## Type: ColorSystem +## Valid values: +## - rgb: Interpolate in the RGB color system. +## - hsv: Interpolate in the HSV color system. +## - hsl: Interpolate in the HSL color system. +## - none: Don't show a gradient. +# c.colors.downloads.system.fg = 'rgb' + +## Background color for hints. Note that you can use a `rgba(...)` value +## for transparency. +## Type: QssColor +# c.colors.hints.bg = 'qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 rgba(255, 247, 133, 0.8), stop:1 rgba(255, 197, 66, 0.8))' + +## Font color for hints. +## Type: QssColor +# c.colors.hints.fg = 'black' + +## Font color for the matched part of hints. +## Type: QssColor +# c.colors.hints.match.fg = 'green' + +## Background color of the keyhint widget. +## Type: QssColor +# c.colors.keyhint.bg = 'rgba(0, 0, 0, 80%)' + +## Text color for the keyhint widget. +## Type: QssColor +# c.colors.keyhint.fg = '#FFFFFF' + +## Highlight color for keys to complete the current keychain. +## Type: QssColor +# c.colors.keyhint.suffix.fg = '#FFFF00' + +## Background color of an error message. +## Type: QssColor +# c.colors.messages.error.bg = 'red' + +## Border color of an error message. +## Type: QssColor +# c.colors.messages.error.border = '#bb0000' + +## Foreground color of an error message. +## Type: QssColor +# c.colors.messages.error.fg = 'white' + +## Background color of an info message. +## Type: QssColor +# c.colors.messages.info.bg = 'black' + +## Border color of an info message. +## Type: QssColor +# c.colors.messages.info.border = '#333333' + +## Foreground color of an info message. +## Type: QssColor +# c.colors.messages.info.fg = 'white' + +## Background color of a warning message. +## Type: QssColor +# c.colors.messages.warning.bg = 'darkorange' + +## Border color of a warning message. +## Type: QssColor +# c.colors.messages.warning.border = '#d47300' + +## Foreground color of a warning message. +## Type: QssColor +# c.colors.messages.warning.fg = 'white' + +## Background color for prompts. +## Type: QssColor +# c.colors.prompts.bg = '#444444' + +## Border used around UI elements in prompts. +## Type: String +# c.colors.prompts.border = '1px solid gray' + +## Foreground color for prompts. +## Type: QssColor +# c.colors.prompts.fg = 'white' + +## Background color for the selected item in filename prompts. +## Type: QssColor +# c.colors.prompts.selected.bg = 'grey' + +## Background color of the statusbar in caret mode. +## Type: QssColor +# c.colors.statusbar.caret.bg = 'purple' + +## Foreground color of the statusbar in caret mode. +## Type: QssColor +# c.colors.statusbar.caret.fg = 'white' + +## Background color of the statusbar in caret mode with a selection. +## Type: QssColor +# c.colors.statusbar.caret.selection.bg = '#a12dff' + +## Foreground color of the statusbar in caret mode with a selection. +## Type: QssColor +# c.colors.statusbar.caret.selection.fg = 'white' + +## Background color of the statusbar in command mode. +## Type: QssColor +# c.colors.statusbar.command.bg = 'black' + +## Foreground color of the statusbar in command mode. +## Type: QssColor +# c.colors.statusbar.command.fg = 'white' + +## Background color of the statusbar in private browsing + command mode. +## Type: QssColor +# c.colors.statusbar.command.private.bg = 'grey' + +## Foreground color of the statusbar in private browsing + command mode. +## Type: QssColor +# c.colors.statusbar.command.private.fg = 'white' + +## Background color of the statusbar in insert mode. +## Type: QssColor +# c.colors.statusbar.insert.bg = 'darkgreen' + +## Foreground color of the statusbar in insert mode. +## Type: QssColor +# c.colors.statusbar.insert.fg = 'white' + +## Background color of the statusbar. +## Type: QssColor +# c.colors.statusbar.normal.bg = 'black' + +## Foreground color of the statusbar. +## Type: QssColor +# c.colors.statusbar.normal.fg = 'white' + +## Background color of the statusbar in passthrough mode. +## Type: QssColor +# c.colors.statusbar.passthrough.bg = 'darkblue' + +## Foreground color of the statusbar in passthrough mode. +## Type: QssColor +# c.colors.statusbar.passthrough.fg = 'white' + +## Background color of the statusbar in private browsing mode. +## Type: QssColor +# c.colors.statusbar.private.bg = '#666666' + +## Foreground color of the statusbar in private browsing mode. +## Type: QssColor +# c.colors.statusbar.private.fg = 'white' + +## Background color of the progress bar. +## Type: QssColor +# c.colors.statusbar.progress.bg = 'white' + +## Foreground color of the URL in the statusbar on error. +## Type: QssColor +# c.colors.statusbar.url.error.fg = 'orange' + +## Default foreground color of the URL in the statusbar. +## Type: QssColor +# c.colors.statusbar.url.fg = 'white' + +## Foreground color of the URL in the statusbar for hovered links. +## Type: QssColor +# c.colors.statusbar.url.hover.fg = 'aqua' + +## Foreground color of the URL in the statusbar on successful load +## (http). +## Type: QssColor +# c.colors.statusbar.url.success.http.fg = 'white' + +## Foreground color of the URL in the statusbar on successful load +## (https). +## Type: QssColor +# c.colors.statusbar.url.success.https.fg = 'lime' + +## Foreground color of the URL in the statusbar when there's a warning. +## Type: QssColor +# c.colors.statusbar.url.warn.fg = 'yellow' + +## Background color of the tab bar. +## Type: QtColor +# c.colors.tabs.bar.bg = '#555555' + +## Background color of unselected even tabs. +## Type: QtColor +# c.colors.tabs.even.bg = 'darkgrey' + +## Foreground color of unselected even tabs. +## Type: QtColor +# c.colors.tabs.even.fg = 'white' + +## Color for the tab indicator on errors. +## Type: QtColor +# c.colors.tabs.indicator.error = '#ff0000' + +## Color gradient start for the tab indicator. +## Type: QtColor +# c.colors.tabs.indicator.start = '#0000aa' + +## Color gradient end for the tab indicator. +## Type: QtColor +# c.colors.tabs.indicator.stop = '#00aa00' + +## Color gradient interpolation system for the tab indicator. +## Type: ColorSystem +## Valid values: +## - rgb: Interpolate in the RGB color system. +## - hsv: Interpolate in the HSV color system. +## - hsl: Interpolate in the HSL color system. +## - none: Don't show a gradient. +# c.colors.tabs.indicator.system = 'rgb' + +## Background color of unselected odd tabs. +## Type: QtColor +# c.colors.tabs.odd.bg = 'grey' + +## Foreground color of unselected odd tabs. +## Type: QtColor +# c.colors.tabs.odd.fg = 'white' + +## Background color of selected even tabs. +## Type: QtColor +# c.colors.tabs.selected.even.bg = 'black' + +## Foreground color of selected even tabs. +## Type: QtColor +# c.colors.tabs.selected.even.fg = 'white' + +## Background color of selected odd tabs. +## Type: QtColor +# c.colors.tabs.selected.odd.bg = 'black' + +## Foreground color of selected odd tabs. +## Type: QtColor +# c.colors.tabs.selected.odd.fg = 'white' + +## Background color for webpages if unset (or empty to use the theme's +## color). +## Type: QtColor +# c.colors.webpage.bg = 'white' + +## Number of commands to save in the command history. 0: no history / -1: +## unlimited +## Type: Int +# c.completion.cmd_history_max_items = 100 + +## Delay (in milliseconds) before updating completions after typing a +## character. +## Type: Int +# c.completion.delay = 0 + +## Height (in pixels or as percentage of the window) of the completion. +## Type: PercOrInt +# c.completion.height = '50%' + +## Minimum amount of characters needed to update completions. +## Type: Int +# c.completion.min_chars = 1 + +## Which categories to show (in which order) in the :open completion. +## Type: FlagList +## Valid values: +## - searchengines +## - quickmarks +## - bookmarks +## - history +# c.completion.open_categories = ['searchengines', 'quickmarks', 'bookmarks', 'history'] + +## Move on to the next part when there's only one possible completion +## left. +## Type: Bool +# c.completion.quick = True + +## Padding (in pixels) of the scrollbar handle in the completion window. +## Type: Int +# c.completion.scrollbar.padding = 2 + +## Width (in pixels) of the scrollbar in the completion window. +## Type: Int +# c.completion.scrollbar.width = 12 + +## When to show the autocompletion window. +## Type: String +## Valid values: +## - always: Whenever a completion is available. +## - auto: Whenever a completion is requested. +## - never: Never. +# c.completion.show = 'always' + +## Shrink the completion to be smaller than the configured size if there +## are no scrollbars. +## Type: Bool +# c.completion.shrink = False + +## Format of timestamps (e.g. for the history completion). +## Type: TimestampTemplate +# c.completion.timestamp_format = '%Y-%m-%d' + +## Execute the best-matching command on a partial match. +## Type: Bool +# c.completion.use_best_match = False + +## A list of patterns which should not be shown in the history. This only +## affects the completion. Matching URLs are still saved in the history +## (and visible on the qute://history page), but hidden in the +## completion. Changing this setting will cause the completion history to +## be regenerated on the next start, which will take a short while. +## Type: List of UrlPattern +# c.completion.web_history.exclude = [] + +## Number of URLs to show in the web history. 0: no history / -1: +## unlimited +## Type: Int +# c.completion.web_history.max_items = -1 + +## Require a confirmation before quitting the application. +## Type: ConfirmQuit +## Valid values: +## - always: Always show a confirmation. +## - multiple-tabs: Show a confirmation if multiple tabs are opened. +## - downloads: Show a confirmation if downloads are running +## - never: Never show a confirmation. +c.confirm_quit = ['downloads'] + +## Automatically start playing `