This commit is contained in:
Daan Vanoverloop 2020-11-04 11:48:17 +01:00
commit 3b61e5ef42
15 changed files with 88 additions and 277 deletions

View File

@ -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

View File

@ -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")

View File

@ -9,11 +9,13 @@ function run {
run ~/.config/picom/launch.sh run ~/.config/picom/launch.sh
#run ~/.config/awesome/autohidewibox.py ~/.config/awesome/autohidewibox.conf #run ~/.config/awesome/autohidewibox.py ~/.config/awesome/autohidewibox.conf
run ~/setbg.sh run ~/Scripts/setbg.sh
run dunst run dunst
run pulseeffects --gapplication-service run pulseeffects --gapplication-service
xsetwacom set "Wacom HID 50DB Finger touch" Gesture off xsetwacom set "Wacom HID 50DB Finger touch" Gesture off
run touchegg run touchegg
run nm-applet run nm-applet
run /usr/lib/kdeconnectd
run kdeconnect-indicator run kdeconnect-indicator
run snixembed
#run music_wake.sh #run music_wake.sh

View File

@ -1,4 +1,5 @@
return { return {
table.unpack(require("config_common")),
widgets = { widgets = {
top = { top = {
left = { left = {

View File

@ -1,4 +1,5 @@
return { return {
table.unpack(require("config_common")),
widgets = { widgets = {
top = { top = {
left = { left = {
@ -30,7 +31,7 @@ return {
} }
}, },
battery = "BAT1", battery = "BAT1",
net_interface = "wlan0", net_interface = "wlp3s0",
volume = { volume = {
options = {"Master", "-D", "pulse"}, options = {"Master", "-D", "pulse"},
sink = "@DEFAULT_SINK@" sink = "@DEFAULT_SINK@"

View File

@ -354,8 +354,8 @@ vicious.cache(vicious.widgets.bat)
vicious.register(batwidget, vicious.widgets.bat, format_battery, 20, config.battery) vicious.register(batwidget, vicious.widgets.bat, format_battery, 20, config.battery)
wifiwidget = wibox.widget.textbox() wifiwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.wifi) vicious.cache(vicious.widgets.wifiiw)
vicious.register(wifiwidget, vicious.widgets.wifi, format_wifi, 3, config.net_interface) vicious.register(wifiwidget, vicious.widgets.wifiiw, format_wifi, 3, config.net_interface)
cpuwidget = wibox.widget.textbox() cpuwidget = wibox.widget.textbox()
vicious.cache(vicious.widgets.cpu) 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, awful.key({ modkey, "Control" }, "l", function () awful.tag.incncol(-1, nil, true) end,
{description = "decrease the number of columns", group = "layout"}), {description = "decrease the number of columns", group = "layout"}),
awful.key({ modkey, }, "space", function () awful.key({ modkey, }, "space", function ()
start_switcher(); --start_switcher();
awful.layout.inc( 1); awful.layout.inc( 1);
layout_table[awful.screen.focused().selected_tag] = awful.screen.focused().selected_tag.layout --layout_table[awful.screen.focused().selected_tag] = awful.screen.focused().selected_tag.layout
switcher_timer:again() --switcher_timer:again()
end, {description = "select next", group = "layout"}), end, {description = "select next", group = "layout"}),
awful.key({ modkey, "Shift" }, "space", function () awful.key({ modkey, "Shift" }, "space", function ()
start_switcher(); start_switcher();
@ -809,19 +809,6 @@ globalkeys = gears.table.join(
{description = "show the menubar", group = "launcher"}), {description = "show the menubar", group = "launcher"}),
awful.key({ modkey }, "d", function() rofi_spawn("rofi -show drun -me-select-entry '' -me-accept-entry 'MousePrimary'") end, awful.key({ modkey }, "d", function() rofi_spawn("rofi -show drun -me-select-entry '' -me-accept-entry 'MousePrimary'") end,
{description = "launch rofi", group = "launcher"}), {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", awful.key({ modkey, "Shift" }, "g",
function (c) function (c)
rofi_spawn("dmenu_script lutris.sh") rofi_spawn("dmenu_script lutris.sh")

@ -1 +1 @@
Subproject commit 76949631dcf79c3f5efdd1d47dd850390123f42a Subproject commit 3bd7b59b2c8f999f39600ab640856342f6436d7c

Binary file not shown.

View File

@ -10,14 +10,14 @@
# be disabled and audio files will only be accepted over ipc socket (using # be disabled and audio files will only be accepted over ipc socket (using
# file:// protocol) or streaming files over an accepted protocol. # 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 # This setting sets the MPD internal playlist directory. The purpose of this
# directory is storage for playlists created by MPD. The server will use # 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 # playlist files not created by the server but only if they are in the MPD
# format. This setting defaults to playlist saving being disabled. # 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 # 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 # 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 # MPD to accept files over ipc socket (using file:// protocol) or streaming
# files over an accepted protocol. # 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 settings are the locations for the daemon log files for the daemon.
# These logs are great for troubleshooting, depending on your log_level # 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 # The special value "syslog" makes MPD use the local syslog daemon. This
# setting defaults to logging to syslog. # 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 # 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 # for use of mpd --kill and some init scripts. This setting is disabled by
# default and the pid file will not be stored. # 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 # 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 # 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 # it was brought down. This setting is disabled by default and the server
# state will be reset on server start up. # 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 # The location of the sticker database. This is a database which
# manages dynamic information attached to songs. # 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" #bind_to_address "any"
# #
# And for Unix Socket # 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 # This setting is the TCP port that is desired for the daemon to get assigned
# to. # to.

View File

@ -1,7 +1,15 @@
This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 01 A Three-Legged Workhorse.flac Music/This Will Destroy You/Young Mountain/01 Quiet.flac
This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 02 Villa del Refugio.flac Music/This Will Destroy You/Young Mountain/02 The World is Our ___.flac
This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 03 Threads.flac Music/This Will Destroy You/Young Mountain/03 I Believe in Your Victory.flac
This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 04 Leather Wings.flac Music/This Will Destroy You/Young Mountain/04 Grandfather Clock.flac
This Will Destroy You/This Will Destroy You - THIS WILL DESTROY YOU - S-T - 05 The Mighty Rio Grande.flac Music/This Will Destroy You/Young Mountain/05 Happiness_ Were All in it Together.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 Music/This Will Destroy You/Young Mountain/06 There are Some Remedies Worse Than the Disease.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/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

View File

@ -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

Binary file not shown.

View File

@ -50,6 +50,15 @@ call plug#end() " required
filetype plugin indent on " 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:jsx_ext_required = 0
let g:neosnippet#enable_completed_snippet = 1 let g:neosnippet#enable_completed_snippet = 1
@ -215,7 +224,19 @@ set expandtab
let g:C_Mapfeader = ',' let g:C_Mapfeader = ','
nnoremap <cr> :noh<CR><CR>:<backspace> nnoremap <cr> :noh<CR><CR>:<backspace>
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>" imap <C-k> <Plug>(neosnippet_expand_or_jump)
smap <C-k> <Plug>(neosnippet_expand_or_jump)
xmap <C-k> <Plug>(neosnippet_expand_target)
imap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)"
\: pumvisible() ? "\<C-n>" : "\<TAB>"
smap <expr><TAB> neosnippet#expandable_or_jumpable() ?
\ "\<Plug>(neosnippet_expand_or_jump)"
\: "\<TAB>"
let g:deoplete#enable_smart_case = 1
imap <expr><CR> pumvisible() ? deoplete#close_popup() : "\<CR>"
:tnoremap <Esc> <C-\><C-n> :tnoremap <Esc> <C-\><C-n>
inoremap <silent><expr> <TAB> inoremap <silent><expr> <TAB>

35
.zshrc
View File

@ -1,9 +1,11 @@
# If you come from bash you might have to change your $PATH. # If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$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 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. # Path to your oh-my-zsh installation.
#POWERLEVEL9K_MODE='nerdfont-complete' #POWERLEVEL9K_MODE='nerdfont-complete'
@ -68,7 +70,7 @@ alias nodeindex="node lib/index.js"
plugins=( plugins=(
git git
archlinux 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 ZSH_COMPDUMP=/tmp/zcompdump-$USER
@ -165,7 +167,7 @@ export WORKON_HOME=~/Documents/Development/Python/virtualenvs
py() { py() {
PY_PREV_DIR=$PWD PY_PREV_DIR=$PWD
source "$1/bin/activate" # source "$1/bin/activate" # commented out by conda initialize
} }
depy() { depy() {
@ -216,6 +218,9 @@ alias vim="nvim"
alias vi="vim" alias vi="vim"
alias v="vi" alias v="vi"
alias sys="systemctl"
alias sysu="systemctl --user"
# Scripts # Scripts
alias rotate="~/.config/i3/rotate.sh" alias rotate="~/.config/i3/rotate.sh"
@ -236,6 +241,13 @@ twitch() {
mpv "https://twitch.tv/$1" 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() { copy() {
echo "${PWD}/${1}" | xclip -i echo "${PWD}/${1}" | xclip -i
} }
@ -255,7 +267,6 @@ wakezolder() {
wol -p 8009 -i 192.168.1.200 d4:3d:7e:fc:0e:32 wol -p 8009 -i 192.168.1.200 d4:3d:7e:fc:0e:32
} }
# /!\ do not use with zsh-autosuggestions # /!\ do not use with zsh-autosuggestions
# /!\ zsh-syntax-highlighting and then zsh-autosuggestions must be at the end # /!\ 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'
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 #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 <<<

View File

@ -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"