Lotsofstuf

This commit is contained in:
Geoffrey Frogeye 2018-10-14 16:59:49 +02:00
parent 3d24d97d51
commit 45c3bfe4d4
16 changed files with 190 additions and 43 deletions

View file

@ -1,3 +1,4 @@
https://i.imgur.com/yVtVucs.jpg # Doctor Who Series 11
# Derivate of these ones https://wallpapers.wallhaven.cc/wallpapers/full/wallhaven-230622.png
https://geoffrey.frogeye.fr/files/backgrounds/VertBleu.png
# https://geoffrey.frogeye.fr/files/backgrounds/VertBleu.png
# https://geoffrey.frogeye.fr/files/backgrounds/BleuVert.png

View file

@ -61,6 +61,7 @@ bindsym $mod+F7 exec pactl suspend-sink @DEFAULT_SINK@ 1; exec pactl suspend-sin
bindsym XF86AudioPrev exec mpc prev
bindsym XF86AudioPlay exec mpc toggle
bindsym XF86AudioNext exec mpc next
bindsym $mod+F10 exec ~/.scripts/showKeyboardLayout
bindsym $mod+F11 exec urxvtc -e 'pacmixer'
bindsym $mod+F12 exec urxvtc -e 'pacmixer'
@ -252,6 +253,13 @@ bindsym $mod+Shift+r restart
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exit
# Set shut down, restart and locking features
set $mode_kblock Keyboard lock
mode "$mode_kblock" {
bindsym $mod+Shift+Escape mode "$mode_kblock"
}
bindsym $mod+Shift+Escape mode "$mode_kblock"
# Set shut down, restart and locking features
set $locker $HOME/.config/i3/lock
set $mode_system [L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction
@ -347,7 +355,7 @@ set_from_resource $color15 i3wm.color15 #cfd0c2
# Inactivity settings
exec --no-startup-id xautolock -time 10 -locker 'xset dpms force standby' -killtime 1 -killer '$locker'
bindsym $mod+F1 exec --no-startup-id xset dpms force off
bindsym $mod+F1 exec --no-startup-id sh -c "sleep .25 && xset dpms force off"
bindsym $mod+F4 exec --no-startup-id xautolock -disable
bindsym $mod+F5 exec --no-startup-id xautolock -enable

View file

@ -8,8 +8,8 @@ path = ~/.vdirsyncer/contacts/contacts/
[general]
debug = no
default_action = list
editor = vim
merge_editor = vimdiff
editor = nvim
merge_editor = nvim
[contact table]
# display names by first or last name: first_name / last_name

View file

@ -9,6 +9,7 @@ import signal
import subprocess
import logging
import coloredlogs
import updaters
coloredlogs.install(level='DEBUG', fmt='%(levelname)s %(message)s')
log = logging.getLogger()
@ -23,6 +24,7 @@ log = logging.getLogger()
# TODO Use default colors of lemonbar sometimes
# TODO Adapt bar height with font height
# TODO OPTI Static text objects that update its parents if modified
# TODO OPTI Updater locks, do not LB screen util every updater finished
class BarGroupType(enum.Enum):
@ -118,7 +120,6 @@ class Bar:
Bar.actionsF2H[function] = handle
Bar.actionsH2F[handle] = function
log.debug("Registered action {}{}".format(handle, function))
return handle
@staticmethod
@ -292,8 +293,10 @@ class SectionThread(threading.Thread):
ANIMATION_START = 0.025
ANIMATION_STOP = 0.001
ANIMATION_EVOLUTION = 0.9
def run(self):
while Section.somethingChanged.wait():
updaters.notBusy.wait()
Section.updateAll()
animTime = self.ANIMATION_START
frameTime = time.perf_counter()

View file

@ -488,10 +488,14 @@ class NotmuchUnreadProvider(ColorCountsSection, InotifyUpdater):
queryStr = 'folder:/{}/ and tag:unread'.format(account)
query = notmuch.Query(db, queryStr)
nbMsgs = query.count_messages()
if account == 'frogeye':
global q
q = query
print(489, self.dir, queryStr, nbMsgs)
if nbMsgs < 1:
continue
counts.append((nbMsgs, self.colors[account]))
db.close()
# db.close()
return counts
def __init__(self, dir='~/.mail/', theme=None):

View file

@ -0,0 +1,13 @@
coloredlogs==10.0
enum-compat==0.0.2
humanfriendly==4.16.1
i3ipc==1.6.0
ifaddr==0.1.4
ipaddress==1.0.22
psutil==5.4.7
pulsectl==18.8.0
pyinotify==0.9.6
python-mpd2==1.0.0
python-uinput==0.11.2
yoke==0.1.1
zeroconf==0.21.3

View file

@ -16,12 +16,14 @@ log = logging.getLogger()
# TODO Sync bar update with PeriodicUpdater updates
notBusy = threading.Event()
class Updater:
@staticmethod
def init():
PeriodicUpdater.init()
InotifyUpdater.init()
notBusy.set()
def updateText(self, text):
print(text)
@ -49,15 +51,18 @@ class PeriodicUpdaterThread(threading.Thread):
# TODO Sync with system clock
counter = 0
while True:
notBusy.set()
if PeriodicUpdater.intervalsChanged \
.wait(timeout=PeriodicUpdater.intervalStep):
# ↑ sleeps here
notBusy.clear()
PeriodicUpdater.intervalsChanged.clear()
counter = 0
for providerList in PeriodicUpdater.intervals.copy().values():
for provider in providerList.copy():
provider.refreshData()
else:
notBusy.clear()
counter += PeriodicUpdater.intervalStep
counter = counter % PeriodicUpdater.intervalLoop
for interval in PeriodicUpdater.intervals.keys():

View file

@ -0,0 +1 @@
/usr/lib/systemd/user/syncthing.service

View file

@ -0,0 +1,6 @@
[Unit]
Description=Meh mail client new mail fetcher
[Service]
Type=oneshot
ExecStart=/home/geoffrey/.scripts/mel fetch

View file

@ -0,0 +1,10 @@
[Unit]
Description=Meh mail client fetcher timer
[Timer]
OnBootSec=2m
OnUnitActiveSec=5m
Unit=melfetch.service
[Install]
WantedBy=timers.target

View file

@ -0,0 +1 @@
/home/geoffrey/.config/systemd/user/melfetch.timer