diff --git a/.config/awesome/autohidewibox.conf b/.config/awesome/autohidewibox.conf deleted file mode 100644 index ce7d83b..0000000 --- a/.config/awesome/autohidewibox.conf +++ /dev/null @@ -1,39 +0,0 @@ -[autohidewibox] - - # Select your awesome version - # Possible values: 3, 4 - awesomeVersion=4 - - # A comma-separated list of keys. - # Some suggestions: - # 133 - Meta-L - # 134 - Meta-R - # 37 - Ctrl-L - # 105 - Ctrl-R - # 66 - CapsLock - superKeys=133,134 - - # The show/hide behavior. Possible values: - # 'transient': The wibox is only shown while a super key is pressed. - # 'toggle': Pressing and releasing a super key (press and release) toggles - # the wibox visibility. - # Default = transient. - mode=transient - - # The name of one or more (comma separated) - # wiboxes which to autohide. - wiboxname=mywibox - - # Delay execution in ms - delayShow=600 - delayHide=0 - - # Custom commands to send to awesome - # Use this to call custom-defined event functions in your awesome config - # (Note: You can leave 'wiboxname' above empty, or remove it completely) - customhide=stopgaps() - customshow=startgaps() - - # Used for debug/development purposes. Prints extra bits information. - # Possible values: 0, 1 - debug=0 diff --git a/.config/awesome/autohidewibox.py b/.config/awesome/autohidewibox.py deleted file mode 100755 index 5652a32..0000000 --- a/.config/awesome/autohidewibox.py +++ /dev/null @@ -1,171 +0,0 @@ -#!/usr/bin/python3 - -import subprocess -import re -import configparser -import os.path as path -import sys -import threading - -MODE_TRANSIENT = "transient" -MODE_TOGGLE = "toggle" - -config = configparser.ConfigParser() -try: - userconf = path.join(path.expanduser("~"), ".config/autohidewibox.conf") - if len(sys.argv)>1 and path.isfile(sys.argv[1]): - config.read(sys.argv[1]) - elif path.isfile(userconf): - config.read(userconf) - else: - config.read("/etc/autohidewibox.conf") -except configparser.MissingSectionHeaderError: - pass - - -awesomeVersion = config.get( "autohidewibox", "awesomeVersion", fallback=4) -superKeys = config.get( "autohidewibox", "superKeys", fallback="133,134").split(",") -wiboxes = config.get( "autohidewibox", "wiboxname", fallback="mywibox").split(",") -customhide = config.get( "autohidewibox", "customhide", fallback=None) -customshow = config.get( "autohidewibox", "customshow", fallback=None) -delayShow = config.getfloat( "autohidewibox", "delayShow", fallback=0) -delayHide = config.getfloat( "autohidewibox", "delayHide", fallback=0) -mode = config.get( "autohidewibox", "mode", fallback=MODE_TRANSIENT) -debug = config.getboolean("autohidewibox", "debug", fallback=False) - -# (remove the following line if your wibox variables have strange characters) -wiboxes = [ w for w in wiboxes if re.match("^[a-zA-Z_][a-zA-Z0-9_]*$", w) ] -#python>=3.4: wiboxes = [ w for w in wiboxes if re.fullmatch("[a-zA-Z_][a-zA-Z0-9_]*", w) ] - -delay = {True: delayShow, False: delayHide} -delayThread = None -wiboxIsCurrentlyVisible = False -waitingFor = False -nonSuperKeyWasPressed = False -cancel = threading.Event() - -shPath = "" -shPotentialPaths = ["/usr/bin/sh", "/bin/sh"] -for p in shPotentialPaths: - if path.exists(p): - shPath = p - break -if shPath == "": - print("Can't find sh in any of: " + ",".join(shPotentialPaths), file=sys.stderr) - sys.exit(1) - -hideCommand3 = "for k,v in pairs({wibox}) do v.visible = {state} end" -hideCommand4 = "for s in screen do s.{wibox}.visible = {state} end" -try: - hideCommand = hideCommand4 if int(awesomeVersion) >= 4 else hideCommand3 -except ValueError: - hideCommand = hideCommand4 - - -def _debug(*args): - if debug: - print(*args) - - -def setWiboxState(state=True, immediate=False): - global delayThread, waitingFor, cancel, wiboxIsCurrentlyShown - wiboxIsCurrentlyShown = state - dbgPstate = "show" if state else "hide" - if delay[not state] > 0: - _debug(dbgPstate, "delay other") - if type(delayThread) == threading.Thread and delayThread.is_alive(): - # two consecutive opposing events cancel out. second event should not be called - _debug(dbgPstate, "delay other, thread alive -> cancel") - cancel.set() - return - if delay[state] > 0 and not immediate: - _debug(dbgPstate + " delay same") - if not (type(delayThread) == threading.Thread and delayThread.is_alive()): - _debug(dbgPstate, "delay same, thread dead -> start wait") - waitingFor = state - cancel.clear() - delayThread = threading.Thread(group=None, target=waitDelay, kwargs={"state": state}) - delayThread.daemon = True - delayThread.start() - # a second event setting the same state is silently discarded - return - _debug("state:", dbgPstate) - customcmd = customshow if state else customhide - if customcmd: - subprocess.call( - shPath + " " + - "-c \"echo '" + - customcmd + - "' | awesome-client\"", - shell=True) - for wibox in wiboxes: - subprocess.call( - shPath + " " + - "-c \"echo '" + - hideCommand.format(wibox=wibox, state="true" if state else "false") + - "' | awesome-client\"", - shell=True) - - - -def waitDelay(state=True): - if not cancel.wait(delay[state]/1000): - setWiboxState(state=state, immediate=True) - - -try: - setWiboxState(False) - - proc = subprocess.Popen(['xinput', '--test-xi2', '--root', '3'], stdout=subprocess.PIPE) - - field = None - keystate = None - - for line in proc.stdout: - l = line.decode("utf-8").strip() - eventmatch = re.match("EVENT type (\\d+) \\(.+\\)", l) - detailmatch = re.match("detail: (\\d+)", l) - - if eventmatch: - _debug(eventmatch) - try: - field = "event" - keystate = eventmatch.group(1) - _debug("found event, waiting for detail...") - except IndexError: - field = None - keystate = None - - if (field is "event") and detailmatch: - _debug(detailmatch) - try: - if detailmatch.group(1) in superKeys: - _debug("is a super key") - if keystate == "13": # press - nonSuperKeyWasPressed = False - if mode == MODE_TRANSIENT: - _debug("showing wibox") - setWiboxState(True) - if keystate == "14": # release - if mode == MODE_TRANSIENT: - _debug("hiding wibox") - setWiboxState(False) - # Avoid toggling the wibox when a super key is used in conjunction - # with another key. - elif mode == MODE_TOGGLE and not nonSuperKeyWasPressed: - _debug("toggling wibox") - setWiboxState(not wiboxIsCurrentlyShown) - nonSuperKeyWasPressed = False - else: - nonSuperKeyWasPressed = True - except IndexError: - _debug("Couldn't parse keystate number.") - pass - finally: - field = None - keystate = None -except KeyboardInterrupt: - pass -finally: - setWiboxState(True, True) - # print("Shutting down") diff --git a/.config/awesome/autorun.sh b/.config/awesome/autorun.sh index 83ce036..1d03b74 100755 --- a/.config/awesome/autorun.sh +++ b/.config/awesome/autorun.sh @@ -9,11 +9,13 @@ function run { run ~/.config/picom/launch.sh #run ~/.config/awesome/autohidewibox.py ~/.config/awesome/autohidewibox.conf -run ~/setbg.sh +run ~/Scripts/setbg.sh run dunst run pulseeffects --gapplication-service xsetwacom set "Wacom HID 50DB Finger touch" Gesture off run touchegg run nm-applet +run /usr/lib/kdeconnectd run kdeconnect-indicator +run snixembed #run music_wake.sh diff --git a/.config/awesome/config_desktop.lua b/.config/awesome/config_desktop.lua index 444f484..9b8a2f5 100644 --- a/.config/awesome/config_desktop.lua +++ b/.config/awesome/config_desktop.lua @@ -1,4 +1,5 @@ return { + table.unpack(require("config_common")), widgets = { top = { left = { diff --git a/.config/awesome/config_laptop.lua b/.config/awesome/config_laptop.lua index f8de283..86a608b 100644 --- a/.config/awesome/config_laptop.lua +++ b/.config/awesome/config_laptop.lua @@ -1,4 +1,5 @@ return { + table.unpack(require("config_common")), widgets = { top = { left = { @@ -30,7 +31,7 @@ return { } }, battery = "BAT1", - net_interface = "wlan0", + net_interface = "wlp3s0", volume = { options = {"Master", "-D", "pulse"}, sink = "@DEFAULT_SINK@" diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 261fc22..29fc3e2 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -354,8 +354,8 @@ vicious.cache(vicious.widgets.bat) vicious.register(batwidget, vicious.widgets.bat, format_battery, 20, config.battery) wifiwidget = wibox.widget.textbox() -vicious.cache(vicious.widgets.wifi) -vicious.register(wifiwidget, vicious.widgets.wifi, format_wifi, 3, config.net_interface) +vicious.cache(vicious.widgets.wifiiw) +vicious.register(wifiwidget, vicious.widgets.wifiiw, format_wifi, 3, config.net_interface) cpuwidget = wibox.widget.textbox() vicious.cache(vicious.widgets.cpu) @@ -762,10 +762,10 @@ globalkeys = gears.table.join( awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end, {description = "decrease the number of columns", group = "layout"}), awful.key({ modkey, }, "space", function () - start_switcher(); + --start_switcher(); awful.layout.inc( 1); - layout_table[awful.screen.focused().selected_tag] = awful.screen.focused().selected_tag.layout - switcher_timer:again() + --layout_table[awful.screen.focused().selected_tag] = awful.screen.focused().selected_tag.layout + --switcher_timer:again() end, {description = "select next", group = "layout"}), awful.key({ modkey, "Shift" }, "space", function () start_switcher(); @@ -809,19 +809,6 @@ globalkeys = gears.table.join( {description = "show the menubar", group = "launcher"}), awful.key({ modkey }, "d", function() rofi_spawn("rofi -show drun -me-select-entry '' -me-accept-entry 'MousePrimary'") end, {description = "launch rofi", group = "launcher"}), - - --[[ - awful.key({ modkey, "Shift" }, "m", - function (c) - rofi_spawn("dmenu_script minecraft.sh") - end , - {description = "Play Minecraft"}), - awful.key({ modkey, "Shift" }, "f", - function (c) - rofi_spawn("dmenu_script factorio.sh") - end , - {description = "Play Factorio"}), - --]] awful.key({ modkey, "Shift" }, "g", function (c) rofi_spawn("dmenu_script lutris.sh") diff --git a/.config/awesome/vicious b/.config/awesome/vicious index 7694963..3bd7b59 160000 --- a/.config/awesome/vicious +++ b/.config/awesome/vicious @@ -1 +1 @@ -Subproject commit 76949631dcf79c3f5efdd1d47dd850390123f42a +Subproject commit 3bd7b59b2c8f999f39600ab640856342f6436d7c diff --git a/.config/mpd/database b/.config/mpd/database index d95bb95..6441ab8 100644 Binary files a/.config/mpd/database and b/.config/mpd/database differ diff --git a/.config/mpd/mpd.conf b/.config/mpd/mpd.conf index 6db8432..ff0f01c 100644 --- a/.config/mpd/mpd.conf +++ b/.config/mpd/mpd.conf @@ -10,14 +10,14 @@ # be disabled and audio files will only be accepted over ipc socket (using # file:// protocol) or streaming files over an accepted protocol. # -music_directory "~/mpd-links" +music_directory "/home/daan/mpd-links" # # This setting sets the MPD internal playlist directory. The purpose of this # directory is storage for playlists created by MPD. The server will use # playlist files not created by the server but only if they are in the MPD # format. This setting defaults to playlist saving being disabled. # -playlist_directory "~/.config/mpd/playlists" +playlist_directory "/home/daan/.config/mpd/playlists" # # This setting sets the location of the MPD database. This file is used to # load the database at server start up and store the database while the @@ -25,7 +25,7 @@ playlist_directory "~/.config/mpd/playlists" # MPD to accept files over ipc socket (using file:// protocol) or streaming # files over an accepted protocol. # -db_file "~/.config/mpd/database" +db_file "/home/daan/.config/mpd/database" # # These settings are the locations for the daemon log files for the daemon. # These logs are great for troubleshooting, depending on your log_level @@ -34,25 +34,25 @@ db_file "~/.config/mpd/database" # The special value "syslog" makes MPD use the local syslog daemon. This # setting defaults to logging to syslog. # -#log_file "~/.mpd/log" +#log_file "/home/daan/.mpd/log" # # This setting sets the location of the file which stores the process ID # for use of mpd --kill and some init scripts. This setting is disabled by # default and the pid file will not be stored. # -#pid_file "~/.mpd/pid" +#pid_file "/home/daan/.mpd/pid" # # This setting sets the location of the file which contains information about # most variables to get MPD back into the same general shape it was in before # it was brought down. This setting is disabled by default and the server # state will be reset on server start up. # -state_file "~/.config/mpd/state" +state_file "/home/daan/.config/mpd/state" # # The location of the sticker database. This is a database which # manages dynamic information attached to songs. # -sticker_file "~/.config/mpd/sticker.sql" +sticker_file "/home/daan/.config/mpd/sticker.sql" # ############################################################################### @@ -84,7 +84,7 @@ connection_timeout "5" #bind_to_address "any" # # And for Unix Socket -#bind_to_address "~/.mpd/socket" +#bind_to_address "/home/daan/.mpd/socket" # # This setting is the TCP port that is desired for the daemon to get assigned # to. diff --git a/.config/mpd/playlists/This Will Destroy You.m3u b/.config/mpd/playlists/This Will Destroy You.m3u index fc6b5f5..591bba5 100644 --- a/.config/mpd/playlists/This Will Destroy You.m3u +++ b/.config/mpd/playlists/This Will Destroy You.m3u @@ -1,7 +1,15 @@ -This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 01 A Three-Legged Workhorse.flac -This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 02 Villa del Refugio.flac -This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 03 Threads.flac -This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 04 Leather Wings.flac -This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 05 The Mighty Rio Grande.flac -This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 06 They Move on Tracks of Never-Ending Light.flac -This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 07 Burial on the Presidio Banks.flac +Music/This Will Destroy You/Young Mountain/01 Quiet.flac +Music/This Will Destroy You/Young Mountain/02 The World is Our ___.flac +Music/This Will Destroy You/Young Mountain/03 I Believe in Your Victory.flac +Music/This Will Destroy You/Young Mountain/04 Grandfather Clock.flac +Music/This Will Destroy You/Young Mountain/05 Happiness_ We’re All in it Together.flac +Music/This Will Destroy You/Young Mountain/06 There are Some Remedies Worse Than the Disease.flac +Music/This Will Destroy You/Young Mountain/07 Sleep.flac +Music/This Will Destroy You/This Will Destroy You/01 A Three-Legged Workhorse.flac +Music/This Will Destroy You/This Will Destroy You/02 Villa Del Refugio.flac +Music/This Will Destroy You/This Will Destroy You/03 Threads.flac +Music/This Will Destroy You/This Will Destroy You/04 Leather Wings.flac +Music/This Will Destroy You/This Will Destroy You/05 The Mighty Rio Grande.flac +Music/This Will Destroy You/This Will Destroy You/06 They Move on Tracks of Never-Ending Light.flac +Music/This Will Destroy You/This Will Destroy You/07 Burial on the Presidio Banks.flac +Music/Various Artists/08 Language of Memory.flac diff --git a/.config/mpd/state b/.config/mpd/state deleted file mode 100644 index dc77a1a..0000000 --- a/.config/mpd/state +++ /dev/null @@ -1,20 +0,0 @@ -sw_volume: 39 -audio_device_state:1:pulse audio -state: play -current: 2 -time: 119.956000 -random: 0 -repeat: 0 -single: 0 -consume: 0 -crossfade: 0 -mixrampdb: 0.000000 -mixrampdelay: -1.000000 -playlist_begin -0:Music/Alcest/Écailles de lune/01 Écailles de lune, Part 1.flac -1:Music/Alcest/Écailles de lune/02 Écailles de lune, Part 2.flac -2:Music/Alcest/Écailles de lune/03 Percées de lumière.flac -3:Music/Alcest/Écailles de lune/04 Abysses.flac -4:Music/Alcest/Écailles de lune/05 Solar Song.flac -5:Music/Alcest/Écailles de lune/06 Sur l'océan couleur de fer.flac -playlist_end diff --git a/.config/mpd/sticker.sql b/.config/mpd/sticker.sql index 8202b58..64fde03 100644 Binary files a/.config/mpd/sticker.sql and b/.config/mpd/sticker.sql differ diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index af034e7..01c59d2 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -50,6 +50,15 @@ call plug#end() " required filetype plugin indent on " required +autocmd FileType matlab setlocal keywordprg=info\ octave\ --vi-keys\ --index-search + +augroup filetypedetect + " Mail + autocmd BufRead,BufNewFile *mutt-* setfiletype mail +augroup END + +let g:languagetool_jar = "/home/daan/.local/share/languagetool/languagetool-commandline.jar" + let g:jsx_ext_required = 0 let g:neosnippet#enable_completed_snippet = 1 @@ -215,7 +224,19 @@ set expandtab let g:C_Mapfeader = ',' nnoremap :noh: -inoremap pumvisible() ? "\" : "\u\" +imap (neosnippet_expand_or_jump) +smap (neosnippet_expand_or_jump) +xmap (neosnippet_expand_target) + +imap neosnippet#expandable_or_jumpable() ? +\ "\(neosnippet_expand_or_jump)" +\: pumvisible() ? "\" : "\" +smap neosnippet#expandable_or_jumpable() ? +\ "\(neosnippet_expand_or_jump)" +\: "\" + +let g:deoplete#enable_smart_case = 1 +imap pumvisible() ? deoplete#close_popup() : "\" :tnoremap inoremap diff --git a/.zshrc b/.zshrc index 359fc8b..9aa8288 100644 --- a/.zshrc +++ b/.zshrc @@ -1,9 +1,11 @@ # If you come from bash you might have to change your $PATH. export PATH=$HOME/bin:/usr/local/bin:$PATH -export PATH="$PATH:$HOME/go/bin:$HOME/.cargo/bin:$HOME/.ghcup/bin" +export PATH="$PATH:$HOME/go/bin:$HOME/.cargo/bin:$HOME/.gem/ruby/2.7.0/bin:$HOME/.ghcup/bin" export ZSH=/usr/share/oh-my-zsh +[[ -r "/usr/share/z/z.sh" ]] && source /usr/share/z/z.sh + # Path to your oh-my-zsh installation. #POWERLEVEL9K_MODE='nerdfont-complete' @@ -68,7 +70,7 @@ alias nodeindex="node lib/index.js" plugins=( git archlinux - tig gitfast colorize command-not-found cp dirhistory sudo + tig gitfast colorize command-not-found cp dirhistory sudo zsh-syntax-highlighting ) ZSH_COMPDUMP=/tmp/zcompdump-$USER @@ -165,7 +167,7 @@ export WORKON_HOME=~/Documents/Development/Python/virtualenvs py() { PY_PREV_DIR=$PWD - source "$1/bin/activate" +# source "$1/bin/activate" # commented out by conda initialize } depy() { @@ -216,6 +218,9 @@ alias vim="nvim" alias vi="vim" alias v="vi" +alias sys="systemctl" +alias sysu="systemctl --user" + # Scripts alias rotate="~/.config/i3/rotate.sh" @@ -236,6 +241,13 @@ twitch() { mpv "https://twitch.tv/$1" } +zoommode() { + echo "Loading v4l2loopback module..." + sudo modprobe v4l2loopback + echo "Loading PulseAudio null-source..." + pactl load-module module-null-source source_name=null +} + copy() { echo "${PWD}/${1}" | xclip -i } @@ -255,7 +267,6 @@ wakezolder() { wol -p 8009 -i 192.168.1.200 d4:3d:7e:fc:0e:32 } - # /!\ do not use with zsh-autosuggestions # /!\ zsh-syntax-highlighting and then zsh-autosuggestions must be at the end @@ -274,3 +285,19 @@ eval $(thefuck --alias) alias config='/usr/bin/git --git-dir=/home/daan/.cfg/ --work-tree=/home/daan' alias config='/usr/bin/git --git-dir=/home/daan/.cfg/ --work-tree=/home/daan' #source /home/daan/.local/bin/tp + +# >>> conda initialize >>> +# !! Contents within this block are managed by 'conda init' !! +#__conda_setup="$('/usr/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)" +#if [ $? -eq 0 ]; then + #eval "$__conda_setup" +#else + #if [ -f "/usr/etc/profile.d/conda.sh" ]; then + #. "/usr/etc/profile.d/conda.sh" + #else + #export PATH="/usr/bin:$PATH" + #fi +#fi +#unset __conda_setup +# <<< conda initialize <<< + diff --git a/setbg.sh b/setbg.sh deleted file mode 100755 index eb9734d..0000000 --- a/setbg.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -DIR="/home/daan/Pictures/wallpapers/" -FILE=$(ls $DIR | shuf -n 1) -feh --bg-fill "$DIR/$FILE" -#wal -i "$DIR/$FILE"