Compare commits
No commits in common. "d0c743ec3094b2630fb198df90cdd6b3c5768869" and "0316638e21f388dfb2d800968fa860137fd522f0" have entirely different histories.
d0c743ec30
...
0316638e21
4
config/nix/hm/frobar/frobar/__init__.py → config/lemonbar/bar.py
Normal file → Executable file
4
config/nix/hm/frobar/frobar/__init__.py → config/lemonbar/bar.py
Normal file → Executable file
|
@ -1,10 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from frobar.providers import *
|
from providers import *
|
||||||
|
|
||||||
# TODO If multiple screen, expand the sections and share them
|
# TODO If multiple screen, expand the sections and share them
|
||||||
# TODO Graceful exit
|
# TODO Graceful exit
|
||||||
|
|
||||||
def run():
|
if __name__ == "__main__":
|
||||||
Bar.init()
|
Bar.init()
|
||||||
Updater.init()
|
Updater.init()
|
||||||
|
|
16
config/nix/hm/frobar/frobar/display.py → config/lemonbar/display.py
Normal file → Executable file
16
config/nix/hm/frobar/frobar/display.py → config/lemonbar/display.py
Normal file → Executable file
|
@ -1,17 +1,15 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
import logging
|
import threading
|
||||||
|
import time
|
||||||
|
import i3ipc
|
||||||
import os
|
import os
|
||||||
import signal
|
import signal
|
||||||
import subprocess
|
import subprocess
|
||||||
import threading
|
import logging
|
||||||
import time
|
|
||||||
|
|
||||||
import coloredlogs
|
import coloredlogs
|
||||||
import i3ipc
|
import updaters
|
||||||
|
|
||||||
from frobar.notbusy import notBusy
|
|
||||||
|
|
||||||
coloredlogs.install(level="DEBUG", fmt="%(levelname)s %(message)s")
|
coloredlogs.install(level="DEBUG", fmt="%(levelname)s %(message)s")
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
@ -170,6 +168,7 @@ class Bar:
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def updateAll():
|
def updateAll():
|
||||||
|
|
||||||
if Bar.running:
|
if Bar.running:
|
||||||
Bar.string = ""
|
Bar.string = ""
|
||||||
for bar in Bar.everyone:
|
for bar in Bar.everyone:
|
||||||
|
@ -296,7 +295,7 @@ class SectionThread(threading.Thread):
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
while Section.somethingChanged.wait():
|
while Section.somethingChanged.wait():
|
||||||
notBusy.wait()
|
updaters.notBusy.wait()
|
||||||
Section.updateAll()
|
Section.updateAll()
|
||||||
animTime = self.ANIMATION_START
|
animTime = self.ANIMATION_START
|
||||||
frameTime = time.perf_counter()
|
frameTime = time.perf_counter()
|
||||||
|
@ -312,6 +311,7 @@ class SectionThread(threading.Thread):
|
||||||
|
|
||||||
|
|
||||||
class Section:
|
class Section:
|
||||||
|
|
||||||
# TODO Update all of that to base16
|
# TODO Update all of that to base16
|
||||||
# COLORS = ['#272822', '#383830', '#49483e', '#75715e', '#a59f85', '#f8f8f2',
|
# COLORS = ['#272822', '#383830', '#49483e', '#75715e', '#a59f85', '#f8f8f2',
|
||||||
# '#f5f4f1', '#f9f8f5', '#f92672', '#fd971f', '#f4bf75', '#a6e22e',
|
# '#f5f4f1', '#f9f8f5', '#f92672', '#fd971f', '#f4bf75', '#a6e22e',
|
13
config/lemonbar/launch.sh
Executable file
13
config/lemonbar/launch.sh
Executable file
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
|
||||||
|
|
||||||
|
ex="$DIR/bar.py"
|
||||||
|
|
||||||
|
# Terminate already running bar instances
|
||||||
|
ps x | grep "python3 $ex" | grep -v grep | awk '{print $1}' | while read p; do kill $p; done
|
||||||
|
killall -q lemonbar
|
||||||
|
|
||||||
|
$ex
|
||||||
|
|
||||||
|
|
29
config/nix/hm/frobar/frobar/providers.py → config/lemonbar/providers.py
Normal file → Executable file
29
config/nix/hm/frobar/frobar/providers.py → config/lemonbar/providers.py
Normal file → Executable file
|
@ -1,21 +1,20 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
import ipaddress
|
from updaters import *
|
||||||
import json
|
from display import *
|
||||||
import logging
|
|
||||||
import random
|
|
||||||
import socket
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
import coloredlogs
|
|
||||||
import mpd
|
|
||||||
import notmuch
|
|
||||||
import psutil
|
|
||||||
import pulsectl
|
import pulsectl
|
||||||
|
import psutil
|
||||||
from frobar.display import *
|
import subprocess
|
||||||
from frobar.updaters import *
|
import socket
|
||||||
|
import ipaddress
|
||||||
|
import logging
|
||||||
|
import coloredlogs
|
||||||
|
import json
|
||||||
|
import notmuch
|
||||||
|
import mpd
|
||||||
|
import random
|
||||||
|
import math
|
||||||
|
|
||||||
coloredlogs.install(level="DEBUG", fmt="%(levelname)s %(message)s")
|
coloredlogs.install(level="DEBUG", fmt="%(levelname)s %(message)s")
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
@ -44,6 +43,7 @@ def randomColor(seed=0):
|
||||||
|
|
||||||
|
|
||||||
class TimeProvider(StatefulSection, PeriodicUpdater):
|
class TimeProvider(StatefulSection, PeriodicUpdater):
|
||||||
|
|
||||||
FORMATS = ["%H:%M", "%m-%d %H:%M:%S", "%a %y-%m-%d %H:%M:%S"]
|
FORMATS = ["%H:%M", "%m-%d %H:%M:%S", "%a %y-%m-%d %H:%M:%S"]
|
||||||
NUMBER_STATES = len(FORMATS)
|
NUMBER_STATES = len(FORMATS)
|
||||||
DEFAULT_STATE = 1
|
DEFAULT_STATE = 1
|
||||||
|
@ -257,6 +257,7 @@ class PulseaudioProvider(StatefulSection, ThreadedUpdater):
|
||||||
|
|
||||||
|
|
||||||
class NetworkProviderSection(StatefulSection, Updater):
|
class NetworkProviderSection(StatefulSection, Updater):
|
||||||
|
|
||||||
NUMBER_STATES = 5
|
NUMBER_STATES = 5
|
||||||
DEFAULT_STATE = 1
|
DEFAULT_STATE = 1
|
||||||
|
|
13
config/lemonbar/requirements.txt
Normal file
13
config/lemonbar/requirements.txt
Normal 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>=23.5.2<24
|
||||||
|
pyinotify==0.9.6
|
||||||
|
python-mpd2>=3.0.0<4
|
||||||
|
python-uinput==0.11.2
|
||||||
|
yoke==0.1.1
|
||||||
|
zeroconf==0.21.3
|
15
config/nix/hm/frobar/frobar/updaters.py → config/lemonbar/updaters.py
Normal file → Executable file
15
config/nix/hm/frobar/frobar/updaters.py → config/lemonbar/updaters.py
Normal file → Executable file
|
@ -1,24 +1,22 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import functools
|
|
||||||
import logging
|
|
||||||
import math
|
import math
|
||||||
import os
|
import functools
|
||||||
import threading
|
import threading
|
||||||
|
import pyinotify
|
||||||
|
import os
|
||||||
import time
|
import time
|
||||||
|
import logging
|
||||||
import coloredlogs
|
import coloredlogs
|
||||||
import i3ipc
|
import i3ipc
|
||||||
import pyinotify
|
from display import Text
|
||||||
|
|
||||||
from frobar.display import Text
|
|
||||||
from frobar.notbusy import notBusy
|
|
||||||
|
|
||||||
coloredlogs.install(level="DEBUG", fmt="%(levelname)s %(message)s")
|
coloredlogs.install(level="DEBUG", fmt="%(levelname)s %(message)s")
|
||||||
log = logging.getLogger()
|
log = logging.getLogger()
|
||||||
|
|
||||||
# TODO Sync bar update with PeriodicUpdater updates
|
# TODO Sync bar update with PeriodicUpdater updates
|
||||||
|
|
||||||
|
notBusy = threading.Event()
|
||||||
|
|
||||||
|
|
||||||
class Updater:
|
class Updater:
|
||||||
|
@ -243,6 +241,7 @@ class I3Updater(ThreadedUpdater):
|
||||||
|
|
||||||
|
|
||||||
class MergedUpdater(Updater):
|
class MergedUpdater(Updater):
|
||||||
|
|
||||||
# TODO OPTI Do not update until end of periodic batch
|
# TODO OPTI Do not update until end of periodic batch
|
||||||
def fetcher(self):
|
def fetcher(self):
|
||||||
text = Text()
|
text = Text()
|
0
config/scripts/linuxColors → config/linuxColors.sh
Executable file → Normal file
0
config/scripts/linuxColors → config/linuxColors.sh
Executable file → Normal file
1
config/llpp.conf
Normal file
1
config/llpp.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
savepath-command='echo %s'
|
0
config/mpd/.dfrecur
Normal file
0
config/mpd/.dfrecur
Normal file
413
config/mpd/mpd.conf
Normal file
413
config/mpd/mpd.conf
Normal file
|
@ -0,0 +1,413 @@
|
||||||
|
# An example configuration file for MPD.
|
||||||
|
# Read the user manual for documentation: http://www.musicpd.org/doc/user/
|
||||||
|
|
||||||
|
|
||||||
|
# Files and directories #######################################################
|
||||||
|
#
|
||||||
|
# This setting controls the top directory which MPD will search to discover the
|
||||||
|
# available audio files and add them to the daemon's online database. This
|
||||||
|
# setting defaults to the XDG directory, otherwise the music directory will be
|
||||||
|
# be disabled and audio files will only be accepted over ipc socket (using
|
||||||
|
# file:// protocol) or streaming files over an accepted protocol.
|
||||||
|
#
|
||||||
|
music_directory "~/Musiques"
|
||||||
|
#
|
||||||
|
# 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"
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# server is not up. This setting defaults to disabled which will allow
|
||||||
|
# MPD to accept files over ipc socket (using file:// protocol) or streaming
|
||||||
|
# files over an accepted protocol.
|
||||||
|
#
|
||||||
|
db_file "~/.cache/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
|
||||||
|
# settings.
|
||||||
|
#
|
||||||
|
# The special value "syslog" makes MPD use the local syslog daemon. This
|
||||||
|
# setting defaults to logging to syslog, otherwise logging is disabled.
|
||||||
|
#
|
||||||
|
log_file "~/.cache/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 "~/.cache/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 "~/.cache/mpd/state"
|
||||||
|
#
|
||||||
|
# The location of the sticker database. This is a database which
|
||||||
|
# manages dynamic information attached to songs.
|
||||||
|
#
|
||||||
|
sticker_file "~/.cache/mpd/sticker.sql"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# General music daemon options ################################################
|
||||||
|
#
|
||||||
|
# This setting specifies the user that MPD will run as. MPD should never run as
|
||||||
|
# root and you may use this setting to make MPD change its user ID after
|
||||||
|
# initialization. This setting is disabled by default and MPD is run as the
|
||||||
|
# current user.
|
||||||
|
#
|
||||||
|
#user "nobody"
|
||||||
|
#
|
||||||
|
# This setting specifies the group that MPD will run as. If not specified
|
||||||
|
# primary group of user specified with "user" setting will be used (if set).
|
||||||
|
# This is useful if MPD needs to be a member of group such as "audio" to
|
||||||
|
# have permission to use sound card.
|
||||||
|
#
|
||||||
|
#group "nogroup"
|
||||||
|
#
|
||||||
|
# This setting sets the address for the daemon to listen on. Careful attention
|
||||||
|
# should be paid if this is assigned to anything other then the default, any.
|
||||||
|
# This setting can deny access to control of the daemon.
|
||||||
|
#
|
||||||
|
# For network
|
||||||
|
#bind_to_address "any"
|
||||||
|
#
|
||||||
|
# And for Unix Socket
|
||||||
|
#bind_to_address "~/.mpd/socket"
|
||||||
|
#
|
||||||
|
# This setting is the TCP port that is desired for the daemon to get assigned
|
||||||
|
# to.
|
||||||
|
#
|
||||||
|
#port "6600"
|
||||||
|
#
|
||||||
|
# This setting controls the type of information which is logged. Available
|
||||||
|
# setting arguments are "default", "secure" or "verbose". The "verbose" setting
|
||||||
|
# argument is recommended for troubleshooting, though can quickly stretch
|
||||||
|
# available resources on limited hardware storage.
|
||||||
|
#
|
||||||
|
log_level "default"
|
||||||
|
#
|
||||||
|
# If you have a problem with your MP3s ending abruptly it is recommended that
|
||||||
|
# you set this argument to "no" to attempt to fix the problem. If this solves
|
||||||
|
# the problem, it is highly recommended to fix the MP3 files with vbrfix
|
||||||
|
# (available from <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
|
||||||
|
# point gapless MP3 playback can be enabled.
|
||||||
|
#
|
||||||
|
#gapless_mp3_playback "yes"
|
||||||
|
#
|
||||||
|
# Setting "restore_paused" to "yes" puts MPD into pause mode instead
|
||||||
|
# of starting playback after startup.
|
||||||
|
#
|
||||||
|
restore_paused "yes"
|
||||||
|
#
|
||||||
|
# This setting enables MPD to create playlists in a format usable by other
|
||||||
|
# music players.
|
||||||
|
#
|
||||||
|
#save_absolute_paths_in_playlists "no"
|
||||||
|
#
|
||||||
|
# This setting defines a list of tag types that will be extracted during the
|
||||||
|
# audio file discovery process. The complete list of possible values can be
|
||||||
|
# found in the user manual.
|
||||||
|
#metadata_to_use "artist,album,title,track,name,genre,date,composer,performer,disc"
|
||||||
|
#
|
||||||
|
# This setting enables automatic update of MPD's database when files in
|
||||||
|
# music_directory are changed.
|
||||||
|
#
|
||||||
|
auto_update "yes"
|
||||||
|
#
|
||||||
|
# Limit the depth of the directories being watched, 0 means only watch
|
||||||
|
# the music directory itself. There is no limit by default.
|
||||||
|
#
|
||||||
|
#auto_update_depth "3"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Symbolic link behavior ######################################################
|
||||||
|
#
|
||||||
|
# If this setting is set to "yes", MPD will discover audio files by following
|
||||||
|
# symbolic links outside of the configured music_directory.
|
||||||
|
#
|
||||||
|
#follow_outside_symlinks "yes"
|
||||||
|
#
|
||||||
|
# If this setting is set to "yes", MPD will discover audio files by following
|
||||||
|
# symbolic links inside of the configured music_directory.
|
||||||
|
#
|
||||||
|
#follow_inside_symlinks "yes"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Zeroconf / Avahi Service Discovery ##########################################
|
||||||
|
#
|
||||||
|
# If this setting is set to "yes", service information will be published with
|
||||||
|
# Zeroconf / Avahi.
|
||||||
|
#
|
||||||
|
#zeroconf_enabled "yes"
|
||||||
|
#
|
||||||
|
# The argument to this setting will be the Zeroconf / Avahi unique name for
|
||||||
|
# this MPD server on the network.
|
||||||
|
#
|
||||||
|
#zeroconf_name "Music Player"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Permissions #################################################################
|
||||||
|
#
|
||||||
|
# If this setting is set, MPD will require password authorization. The password
|
||||||
|
# can setting can be specified multiple times for different password profiles.
|
||||||
|
#
|
||||||
|
#password "password@read,add,control,admin"
|
||||||
|
#
|
||||||
|
# This setting specifies the permissions a user has who has not yet logged in.
|
||||||
|
#
|
||||||
|
#default_permissions "read,add,control,admin"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Database #######################################################################
|
||||||
|
#
|
||||||
|
|
||||||
|
#database {
|
||||||
|
# plugin "proxy"
|
||||||
|
# host "other.mpd.host"
|
||||||
|
# port "6600"
|
||||||
|
#}
|
||||||
|
|
||||||
|
# Input #######################################################################
|
||||||
|
#
|
||||||
|
|
||||||
|
input {
|
||||||
|
plugin "curl"
|
||||||
|
# proxy "proxy.isp.com:8080"
|
||||||
|
# proxy_user "user"
|
||||||
|
# proxy_password "password"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Audio Output ################################################################
|
||||||
|
#
|
||||||
|
# MPD supports various audio output types, as well as playing through multiple
|
||||||
|
# audio outputs at the same time, through multiple audio_output settings
|
||||||
|
# blocks. Setting this block is optional, though the server will only attempt
|
||||||
|
# autodetection for one sound card.
|
||||||
|
#
|
||||||
|
# An example of an ALSA output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "alsa"
|
||||||
|
# name "My ALSA Device"
|
||||||
|
## device "hw:0,0" # optional
|
||||||
|
## mixer_type "hardware" # optional
|
||||||
|
## mixer_device "default" # optional
|
||||||
|
## mixer_control "PCM" # optional
|
||||||
|
## mixer_index "0" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of an OSS output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "oss"
|
||||||
|
# name "My OSS Device"
|
||||||
|
## device "/dev/dsp" # optional
|
||||||
|
## mixer_type "hardware" # optional
|
||||||
|
## mixer_device "/dev/mixer" # optional
|
||||||
|
## mixer_control "PCM" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a shout output (for streaming to Icecast):
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "shout"
|
||||||
|
# encoding "ogg" # optional
|
||||||
|
# name "My Shout Stream"
|
||||||
|
# host "localhost"
|
||||||
|
# port "8000"
|
||||||
|
# mount "/mpd.ogg"
|
||||||
|
# password "hackme"
|
||||||
|
# quality "5.0"
|
||||||
|
# bitrate "128"
|
||||||
|
# format "44100:16:1"
|
||||||
|
## protocol "icecast2" # optional
|
||||||
|
## user "source" # optional
|
||||||
|
## description "My Stream Description" # optional
|
||||||
|
## url "http://example.com" # optional
|
||||||
|
## genre "jazz" # optional
|
||||||
|
## public "no" # optional
|
||||||
|
## timeout "2" # optional
|
||||||
|
## mixer_type "software" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a recorder output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "recorder"
|
||||||
|
# name "My recorder"
|
||||||
|
# encoder "vorbis" # optional, vorbis or lame
|
||||||
|
# path "/var/lib/mpd/recorder/mpd.ogg"
|
||||||
|
## quality "5.0" # do not define if bitrate is defined
|
||||||
|
# bitrate "128" # do not define if quality is defined
|
||||||
|
# format "44100:16:1"
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of a httpd output (built-in HTTP streaming server):
|
||||||
|
#
|
||||||
|
audio_output {
|
||||||
|
type "httpd"
|
||||||
|
name "geoffrey-music-httpd"
|
||||||
|
encoder "vorbis" # optional, vorbis or lame
|
||||||
|
port "8600"
|
||||||
|
bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
|
||||||
|
# quality "5.0" # do not define if bitrate is defined
|
||||||
|
bitrate "128" # do not define if quality is defined
|
||||||
|
format "44100:16:1"
|
||||||
|
max_clients "0" # optional 0=no limit
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# An example of a pulseaudio output (streaming to a remote pulseaudio server)
|
||||||
|
#
|
||||||
|
audio_output {
|
||||||
|
type "pulse"
|
||||||
|
name "geoffrey-music-pulse"
|
||||||
|
## server "remote_server" # optional
|
||||||
|
## sink "remote_server_sink" # optional
|
||||||
|
}
|
||||||
|
#
|
||||||
|
# An example of a winmm output (Windows multimedia API).
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "winmm"
|
||||||
|
# name "My WinMM output"
|
||||||
|
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||||
|
# or
|
||||||
|
## device "0" # optional
|
||||||
|
## mixer_type "hardware" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# An example of an openal output.
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "openal"
|
||||||
|
# name "My OpenAL output"
|
||||||
|
## device "Digital Audio (S/PDIF) (High Definition Audio Device)" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
## Example "pipe" output:
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "pipe"
|
||||||
|
# name "my pipe"
|
||||||
|
# command "aplay -f cd 2>/dev/null"
|
||||||
|
## Or if you're want to use AudioCompress
|
||||||
|
# command "AudioCompress -m | aplay -f cd 2>/dev/null"
|
||||||
|
## Or to send raw PCM stream through PCM:
|
||||||
|
# command "nc example.org 8765"
|
||||||
|
# format "44100:16:2"
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
## An example of a null output (for no audio output):
|
||||||
|
#
|
||||||
|
#audio_output {
|
||||||
|
# type "null"
|
||||||
|
# name "My Null Output"
|
||||||
|
# mixer_type "none" # optional
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
# If MPD has been compiled with libsamplerate support, this setting specifies
|
||||||
|
# the sample rate converter to use. Possible values can be found in the
|
||||||
|
# mpd.conf man page or the libsamplerate documentation. By default, this is
|
||||||
|
# setting is disabled.
|
||||||
|
#
|
||||||
|
#samplerate_converter "Fastest Sinc Interpolator"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Normalization automatic volume adjustments ##################################
|
||||||
|
#
|
||||||
|
# This setting specifies the type of ReplayGain to use. This setting can have
|
||||||
|
# the argument "off", "album", "track" or "auto". "auto" is a special mode that
|
||||||
|
# chooses between "track" and "album" depending on the current state of
|
||||||
|
# random playback. If random playback is enabled then "track" mode is used.
|
||||||
|
# See <http://www.replaygain.org> for more details about ReplayGain.
|
||||||
|
# This setting is off by default.
|
||||||
|
#
|
||||||
|
replaygain "auto"
|
||||||
|
#
|
||||||
|
# This setting sets the pre-amp used for files that have ReplayGain tags. By
|
||||||
|
# default this setting is disabled.
|
||||||
|
#
|
||||||
|
#replaygain_preamp "0"
|
||||||
|
#
|
||||||
|
# This setting sets the pre-amp used for files that do NOT have ReplayGain tags.
|
||||||
|
# By default this setting is disabled.
|
||||||
|
#
|
||||||
|
#replaygain_missing_preamp "0"
|
||||||
|
#
|
||||||
|
# This setting enables or disables ReplayGain limiting.
|
||||||
|
# MPD calculates actual amplification based on the ReplayGain tags
|
||||||
|
# and replaygain_preamp / replaygain_missing_preamp setting.
|
||||||
|
# If replaygain_limit is enabled MPD will never amplify audio signal
|
||||||
|
# above its original level. If replaygain_limit is disabled such amplification
|
||||||
|
# might occur. By default this setting is enabled.
|
||||||
|
#
|
||||||
|
#replaygain_limit "yes"
|
||||||
|
#
|
||||||
|
# This setting enables on-the-fly normalization volume adjustment. This will
|
||||||
|
# result in the volume of all playing audio to be adjusted so the output has
|
||||||
|
# equal "loudness". This setting is disabled by default.
|
||||||
|
#
|
||||||
|
#volume_normalization "no"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
# Character Encoding ##########################################################
|
||||||
|
#
|
||||||
|
# If file or directory names do not display correctly for your locale then you
|
||||||
|
# may need to modify this setting.
|
||||||
|
#
|
||||||
|
#filesystem_charset "UTF-8"
|
||||||
|
#
|
||||||
|
# This setting controls the encoding that ID3v1 tags should be converted from.
|
||||||
|
#
|
||||||
|
#id3v1_encoding "ISO-8859-1"
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# SIDPlay decoder #############################################################
|
||||||
|
#
|
||||||
|
# songlength_database:
|
||||||
|
# Location of your songlengths file, as distributed with the HVSC.
|
||||||
|
# The sidplay plugin checks this for matching MD5 fingerprints.
|
||||||
|
# See http://www.c64.org/HVSC/DOCUMENTS/Songlengths.faq
|
||||||
|
#
|
||||||
|
# default_songlength:
|
||||||
|
# This is the default playing time in seconds for songs not in the
|
||||||
|
# songlength database, or in case you're not using a database.
|
||||||
|
# A value of 0 means play indefinitely.
|
||||||
|
#
|
||||||
|
# filter:
|
||||||
|
# Turns the SID filter emulation on or off.
|
||||||
|
#
|
||||||
|
#decoder {
|
||||||
|
# plugin "sidplay"
|
||||||
|
# songlength_database "/media/C64Music/DOCUMENTS/Songlengths.txt"
|
||||||
|
# default_songlength "120"
|
||||||
|
# filter "true"
|
||||||
|
#}
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
|
0
config/mpv/.dfrecur
Normal file
0
config/mpv/.dfrecur
Normal file
71
config/mpv/lua-settings/mpv_thumbnail_script.conf
Normal file
71
config/mpv/lua-settings/mpv_thumbnail_script.conf
Normal file
|
@ -0,0 +1,71 @@
|
||||||
|
# The thumbnail cache directory.
|
||||||
|
# On Windows this defaults to %TEMP%\mpv_thumbs_cache,
|
||||||
|
# and on other platforms to /tmp/mpv_thumbs_cache.
|
||||||
|
# The directory will be created automatically, but must be writeable!
|
||||||
|
# Use absolute paths, and take note that environment variables like %TEMP% are unsupported (despite the default)!
|
||||||
|
# cache_directory=%HOME%/.cache/mpv/thumbnails
|
||||||
|
cache_directory=/tmp/my_mpv_thumbnails
|
||||||
|
# THIS IS NOT A WINDOWS PATH. COMMENT IT OUT OR ADJUST IT YOURSELF.
|
||||||
|
|
||||||
|
# Whether to generate thumbnails automatically on video load, without a keypress
|
||||||
|
# Defaults to yes
|
||||||
|
autogenerate=no
|
||||||
|
|
||||||
|
# Only automatically thumbnail videos shorter than this (in seconds)
|
||||||
|
# You will have to press T (or your own keybind) to enable the thumbnail previews
|
||||||
|
# Set to 0 to disable the check, ie. thumbnail videos no matter how long they are
|
||||||
|
# Defaults to 3600 (one hour)
|
||||||
|
autogenerate_max_duration=3600
|
||||||
|
|
||||||
|
# Use mpv to generate thumbnail even if ffmpeg is found in PATH
|
||||||
|
# ffmpeg is slightly faster than mpv but lacks support for ordered chapters in MKVs,
|
||||||
|
# which can break the resulting thumbnails. You have been warned.
|
||||||
|
# Defaults to yes (don't use ffmpeg)
|
||||||
|
prefer_mpv=no
|
||||||
|
|
||||||
|
# Explicitly disable subtitles on the mpv sub-calls
|
||||||
|
# mpv can and will by default render subtitles into the thumbnails.
|
||||||
|
# If this is not what you wish, set mpv_no_sub to yes
|
||||||
|
# Defaults to no
|
||||||
|
mpv_no_sub=no
|
||||||
|
|
||||||
|
# Enable to disable the built-in keybind ("T") to add your own, see after the block
|
||||||
|
disable_keybinds=no
|
||||||
|
|
||||||
|
# The maximum dimensions of the thumbnails, in pixels
|
||||||
|
# Defaults to 200 and 200
|
||||||
|
thumbnail_width=200
|
||||||
|
thumbnail_height=200
|
||||||
|
|
||||||
|
# The thumbnail count target
|
||||||
|
# (This will result in a thumbnail every ~10 seconds for a 25 minute video)
|
||||||
|
thumbnail_count=150
|
||||||
|
|
||||||
|
# The above target count will be adjusted by the minimum and
|
||||||
|
# maximum time difference between thumbnails.
|
||||||
|
# The thumbnail_count will be used to calculate a target separation,
|
||||||
|
# and min/max_delta will be used to constrict it.
|
||||||
|
|
||||||
|
# In other words, thumbnails will be:
|
||||||
|
# - at least min_delta seconds apart (limiting the amount)
|
||||||
|
# - at most max_delta seconds apart (raising the amount if needed)
|
||||||
|
# Defaults to 5 and 90, values are seconds
|
||||||
|
min_delta=5
|
||||||
|
max_delta=90
|
||||||
|
# 120 seconds aka 2 minutes will add more thumbnails only when the video is over 5 hours long!
|
||||||
|
|
||||||
|
# Below are overrides for remote urls (you generally want less thumbnails, because it's slow!)
|
||||||
|
# Thumbnailing network paths will be done with mpv (leveraging youtube-dl)
|
||||||
|
|
||||||
|
# Allow thumbnailing network paths (naive check for "://")
|
||||||
|
# Defaults to no
|
||||||
|
thumbnail_network=no
|
||||||
|
# Override thumbnail count, min/max delta, as above
|
||||||
|
remote_thumbnail_count=60
|
||||||
|
remote_min_delta=15
|
||||||
|
remote_max_delta=120
|
||||||
|
|
||||||
|
# Try to grab the raw stream and disable ytdl for the mpv subcalls
|
||||||
|
# Much faster than passing the url to ytdl again, but may cause problems with some sites
|
||||||
|
# Defaults to yes
|
||||||
|
remote_direct_stream=yes
|
4
config/mpv/mpv.conf
Normal file
4
config/mpv/mpv.conf
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
no-audio-display
|
||||||
|
save-position-on-quit
|
||||||
|
# Required by thumbnails script
|
||||||
|
osc=no
|
1
config/mpv/scripts/mpv_thumbnail_script_client_osc.lua
Symbolic link
1
config/mpv/scripts/mpv_thumbnail_script_client_osc.lua
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/mpv/scripts/mpv_thumbnail_script_client_osc.lua
|
1
config/mpv/scripts/mpv_thumbnail_script_server.lua
Symbolic link
1
config/mpv/scripts/mpv_thumbnail_script_server.lua
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
/usr/share/mpv/scripts/mpv_thumbnail_script_server.lua
|
7
config/mypy/config
Normal file
7
config/mypy/config
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[mypy]
|
||||||
|
cache_dir = ~/.cache/mypy
|
||||||
|
ignore_missing_imports = True
|
||||||
|
disallow_untyped_defs = True
|
||||||
|
disallow_untyped_calls = True
|
||||||
|
disallow_incomplete_defs = True
|
||||||
|
disallow_untyped_decorators = True
|
|
@ -25,7 +25,7 @@ in
|
||||||
commonRc = lib.strings.concatLines ([
|
commonRc = lib.strings.concatLines ([
|
||||||
''
|
''
|
||||||
# Colored ls
|
# Colored ls
|
||||||
# TODO Doesn't allow completion. Check out lsd instead
|
# TODO Doesn't allow completion
|
||||||
_colored_ls() {
|
_colored_ls() {
|
||||||
\ls -lh --color=always $@ | awk '
|
\ls -lh --color=always $@ | awk '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
|
@ -324,6 +324,7 @@ in
|
||||||
};
|
};
|
||||||
xdg = {
|
xdg = {
|
||||||
configFile = {
|
configFile = {
|
||||||
|
# TODO Should be xdg.configFile
|
||||||
"ccache.conf" = {
|
"ccache.conf" = {
|
||||||
text = "ccache_dir = ${config.xdg.cacheHome}/ccache";
|
text = "ccache_dir = ${config.xdg.cacheHome}/ccache";
|
||||||
};
|
};
|
||||||
|
@ -345,12 +346,6 @@ in
|
||||||
log-scale: yes
|
log-scale: yes
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
"pythonstartup.py" = {
|
|
||||||
text = (builtins.readFile ./pythonstartup.py);
|
|
||||||
};
|
|
||||||
"screenrc" = {
|
|
||||||
text = (builtins.readFile ./screenrc);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home = {
|
home = {
|
||||||
|
|
|
@ -329,59 +329,7 @@
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
# Browser
|
# Browser
|
||||||
qutebrowser = {
|
qutebrowser.enable = true;
|
||||||
enable = true;
|
|
||||||
keyBindings = {
|
|
||||||
normal = {
|
|
||||||
# Match tab behaviour to i3. Not that I use them.
|
|
||||||
"H" = "tab-prev";
|
|
||||||
"J" = "back";
|
|
||||||
"K" = "forward";
|
|
||||||
"L" = "tab-next";
|
|
||||||
# "T" = null;
|
|
||||||
"af" = "spawn --userscript freshrss"; # TODO Broken?
|
|
||||||
"as" = "spawn --userscript shaarli"; # TODO I don't use shaarli anymore
|
|
||||||
# "d" = null;
|
|
||||||
"u" = "undo --window";
|
|
||||||
# TODO Unbind d and T (?)
|
|
||||||
};
|
|
||||||
};
|
|
||||||
loadAutoconfig = true; # FIXME Salvage stuff from autoconfig.yml
|
|
||||||
searchEngines = rec {
|
|
||||||
DEFAULT = ecosia;
|
|
||||||
ampwhat = "http://www.amp-what.com/unicode/search/{}";
|
|
||||||
aw = ampwhat;
|
|
||||||
ddg = duckduckgo;
|
|
||||||
duckduckgo = "https://duckduckgo.com/?q={}&ia=web";
|
|
||||||
ecosia = "https://www.ecosia.org/search?q={}";
|
|
||||||
github = "https://github.com/search?q={}";
|
|
||||||
google = "https://www.google.fr/search?q={}";
|
|
||||||
g = google;
|
|
||||||
npm = "https://www.npmjs.com/search?q={}";
|
|
||||||
q = qwant;
|
|
||||||
qwant = "https://www.qwant.com/?t=web&q={}";
|
|
||||||
wolfram = "https://www.wolframalpha.com/input/?i={}";
|
|
||||||
youtube = "https://www.youtube.com/results?search_query={}";
|
|
||||||
yt = youtube;
|
|
||||||
};
|
|
||||||
settings = {
|
|
||||||
downloads.location.prompt = false;
|
|
||||||
tabs = {
|
|
||||||
show = "never";
|
|
||||||
tabs_are_windows = true;
|
|
||||||
};
|
|
||||||
url = {
|
|
||||||
open_base_url = true;
|
|
||||||
start_pages = "https://geoffrey.frogeye.fr/blank.html";
|
|
||||||
};
|
|
||||||
content = {
|
|
||||||
# I had this setting below, not sure if it did something special
|
|
||||||
# config.set("content.cookies.accept", "no-3rdparty", "chrome://*/*")
|
|
||||||
cookies.accept = "no-3rdparty";
|
|
||||||
prefers_reduced_motion = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Terminal
|
# Terminal
|
||||||
alacritty = {
|
alacritty = {
|
||||||
|
@ -430,26 +378,8 @@
|
||||||
rofi = {
|
rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
pass.enable = true;
|
pass.enable = true;
|
||||||
extraConfig = {
|
|
||||||
lazy-grab = false;
|
|
||||||
matching = "regex";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
autorandr.enable = true;
|
autorandr.enable = true;
|
||||||
mpv = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
audio-display = false;
|
|
||||||
save-position-on-quit = true;
|
|
||||||
osc = false; # # Required by thumbnail script
|
|
||||||
};
|
|
||||||
scripts = with pkgs.mpvScripts; [ thumbnail ];
|
|
||||||
scriptOpts = {
|
|
||||||
mpv_thumbnail_script = {
|
|
||||||
cache_directory = "/tmp/mpv_thumbs_${config.home.username}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
|
@ -463,49 +393,7 @@
|
||||||
"x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop";
|
"x-scheme-handler/unknown" = "org.qutebrowser.qutebrowser.desktop";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
userDirs = {
|
userDirs.enable = true; # TODO Which ones do we want?
|
||||||
enable = true; # TODO Which ones do we want?
|
|
||||||
createDirectories = true;
|
|
||||||
# French, because then it there's a different initial for each, making navigation easier
|
|
||||||
desktop = null;
|
|
||||||
download = "${config.home.homeDirectory}/Téléchargements";
|
|
||||||
music = "${config.home.homeDirectory}/Musiques";
|
|
||||||
pictures = "${config.home.homeDirectory}/Images";
|
|
||||||
publicShare = null;
|
|
||||||
templates = null;
|
|
||||||
videos = "${config.home.homeDirectory}/Vidéos";
|
|
||||||
extraConfig = {
|
|
||||||
XDG_SCREENSHOTS_DIR = "${config.home.homeDirectory}/Screenshots";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
configFile = {
|
|
||||||
"pulse/client.conf" = {
|
|
||||||
text = ''cookie-file = .config/pulse/pulse-cookie'';
|
|
||||||
};
|
|
||||||
"xinitrc" =
|
|
||||||
let
|
|
||||||
nixgl = import
|
|
||||||
(builtins.fetchGit {
|
|
||||||
url = "https://github.com/nix-community/nixGL";
|
|
||||||
rev = "489d6b095ab9d289fe11af0219a9ff00fe87c7c5";
|
|
||||||
})
|
|
||||||
{ };
|
|
||||||
in
|
|
||||||
{
|
|
||||||
# TODO Configurable
|
|
||||||
source = pkgs.writeShellScript "xinitrc" ''
|
|
||||||
${pkgs.xorg.xrdb}/bin/xrdb ${config.xresources.path}
|
|
||||||
${nixgl.nixVulkanIntel}/bin/nixVulkanIntel ${nixgl.nixGLIntel}/bin/nixGLIntel ${config.xsession.windowManager.command}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"rofimoji.rc" = {
|
|
||||||
text = ''
|
|
||||||
skin-tone = neutral
|
|
||||||
files = [emojis, math]
|
|
||||||
action = clipboard
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
unclutter.enable = true;
|
unclutter.enable = true;
|
||||||
|
@ -545,22 +433,29 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
mpd = {
|
mpd.enable = true;
|
||||||
enable = true;
|
|
||||||
network = {
|
|
||||||
listenAddress = "0.0.0.0"; # So it can be controlled from home
|
|
||||||
# TODO ... and whoever is the Wi-Fi network I'm using, which, not great
|
|
||||||
port = 8601; # FIXME Chose a different one for testing, should revert
|
|
||||||
startWhenNeeded = true;
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
restore_paused "yes"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
autorandr.enable = true;
|
autorandr.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
|
file =
|
||||||
|
let
|
||||||
|
nixgl = import
|
||||||
|
(builtins.fetchGit {
|
||||||
|
url = "https://github.com/nix-community/nixGL";
|
||||||
|
rev = "489d6b095ab9d289fe11af0219a9ff00fe87c7c5";
|
||||||
|
})
|
||||||
|
{ };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"${config.xdg.configHome}/xinitrc" = {
|
||||||
|
# TODO Configurable
|
||||||
|
source = pkgs.writeShellScript "xinitrc" ''
|
||||||
|
${pkgs.xorg.xrdb}/bin/xrdb ${config.xresources.path}
|
||||||
|
${nixgl.nixVulkanIntel}/bin/nixVulkanIntel ${nixgl.nixGLIntel}/bin/nixGLIntel ${config.xsession.windowManager.command}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# remote
|
# remote
|
||||||
tigervnc
|
tigervnc
|
||||||
|
@ -573,6 +468,8 @@
|
||||||
# multimedia common
|
# multimedia common
|
||||||
gimp
|
gimp
|
||||||
inkscape
|
inkscape
|
||||||
|
mpv
|
||||||
|
mpvScripts.thumbnail
|
||||||
libreoffice
|
libreoffice
|
||||||
|
|
||||||
# data management
|
# data management
|
||||||
|
@ -599,20 +496,16 @@
|
||||||
simplescreenrecorder
|
simplescreenrecorder
|
||||||
trayer
|
trayer
|
||||||
xclip
|
xclip
|
||||||
|
lemonbar-xft
|
||||||
keynav
|
keynav
|
||||||
xorg.xinit
|
xorg.xinit
|
||||||
xorg.xbacklight
|
xorg.xbacklight
|
||||||
# TODO Make this clean. Service?
|
|
||||||
(callPackage (import ./frobar) { }) # FIXME Call it where needed
|
|
||||||
|
|
||||||
|
|
||||||
# organisation
|
# organisation
|
||||||
pass
|
pass
|
||||||
thunderbird
|
thunderbird
|
||||||
];
|
];
|
||||||
sessionVariables = {
|
|
||||||
MPD_PORT = "${toString config.services.mpd.network.port}";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
2
config/nix/hm/frobar/.gitignore
vendored
2
config/nix/hm/frobar/.gitignore
vendored
|
@ -1,2 +0,0 @@
|
||||||
dist/*
|
|
||||||
frobar.egg-info/*
|
|
|
@ -1,31 +0,0 @@
|
||||||
{ pkgs ? import <nixpkgs> { config = { }; overlays = [ ]; } }:
|
|
||||||
# Tried using pyproject.nix but mpd2 dependency wouldn't resolve,
|
|
||||||
# is called pyton-mpd2 on PyPi but mpd2 in nixpkgs.
|
|
||||||
let
|
|
||||||
frobar = pkgs.python3Packages.buildPythonApplication {
|
|
||||||
pname = "frobar";
|
|
||||||
version = "2.0";
|
|
||||||
|
|
||||||
propagatedBuildInputs = with pkgs.python3Packages; [
|
|
||||||
coloredlogs
|
|
||||||
notmuch
|
|
||||||
i3ipc
|
|
||||||
mpd2
|
|
||||||
psutil
|
|
||||||
pulsectl
|
|
||||||
pyinotify
|
|
||||||
];
|
|
||||||
|
|
||||||
src = ./.;
|
|
||||||
};
|
|
||||||
frobar_launcher = pkgs.writeShellApplication
|
|
||||||
{
|
|
||||||
name = "frobar_launcher";
|
|
||||||
runtimeInputs = with pkgs; [ lemonbar-xft wirelesstools ];
|
|
||||||
text = ''
|
|
||||||
${pkgs.procps}/bin/pkill /bin/frobar || true
|
|
||||||
${frobar}/bin/frobar
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
frobar_launcher
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import threading
|
|
||||||
|
|
||||||
notBusy = threading.Event()
|
|
|
@ -1,20 +0,0 @@
|
||||||
from setuptools import setup
|
|
||||||
|
|
||||||
setup(
|
|
||||||
name="frobar",
|
|
||||||
version="2.0",
|
|
||||||
install_requires=[
|
|
||||||
"coloredlogs",
|
|
||||||
"notmuch",
|
|
||||||
"i3ipc",
|
|
||||||
"python-mpd2",
|
|
||||||
"psutil",
|
|
||||||
"pulsectl",
|
|
||||||
"pyinotify",
|
|
||||||
],
|
|
||||||
entry_points={
|
|
||||||
"console_scripts": [
|
|
||||||
"frobar = frobar:run",
|
|
||||||
]
|
|
||||||
},
|
|
||||||
)
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
nixvim = import (builtins.fetchGit {
|
nixvim = import (builtins.fetchGit {
|
||||||
url = "https://github.com/nix-community/nixvim";
|
url = "https://github.com/nix-community/nixvim";
|
||||||
|
@ -178,23 +178,10 @@ in
|
||||||
};
|
};
|
||||||
isort.enabled = true;
|
isort.enabled = true;
|
||||||
mccabe.enabled = true;
|
mccabe.enabled = true;
|
||||||
pycodestyle = {
|
pycodestyle.enabled = true;
|
||||||
enabled = true;
|
|
||||||
maxLineLength = 88; # Compatibility with Black
|
|
||||||
};
|
|
||||||
pyflakes.enabled = true;
|
pyflakes.enabled = true;
|
||||||
pylint.enabled = true;
|
pylint.enabled = true;
|
||||||
pylsp_mypy = {
|
pylsp_mypy.enabled = true;
|
||||||
enabled = true;
|
|
||||||
overrides = [
|
|
||||||
"--cache-dir=${config.xdg.cacheHome}/mypy"
|
|
||||||
"--ignore-missing-imports"
|
|
||||||
"--disallow-untyped-defs"
|
|
||||||
"--disallow-untyped-calls"
|
|
||||||
"--disallow-incomplete-defs"
|
|
||||||
"--disallow-untyped-decorators"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
# FIXME Somehow no warning is shown
|
# FIXME Somehow no warning is shown
|
||||||
# TODO Could add some, could also remove some
|
# TODO Could add some, could also remove some
|
||||||
};
|
};
|
||||||
|
|
0
config/pulse/.dfrecur
Normal file
0
config/pulse/.dfrecur
Normal file
1
config/pulse/client.conf
Normal file
1
config/pulse/client.conf
Normal file
|
@ -0,0 +1 @@
|
||||||
|
cookie-file = .config/pulse/pulse-cookie
|
3
config/pycodestyle
Normal file
3
config/pycodestyle
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[pycodestyle]
|
||||||
|
# Compatibility with Black
|
||||||
|
max-line-length = 88
|
|
@ -1,11 +1,10 @@
|
||||||
#!/usr/bin/env python3
|
import rlcompleter
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
# From https://github.com/python/cpython/blob/v3.7.0b5/Lib/site.py#L436
|
# From https://github.com/python/cpython/blob/v3.7.0b5/Lib/site.py#L436
|
||||||
# Changing the history file
|
# Changing the history file
|
||||||
def register_readline() -> None:
|
def register_readline():
|
||||||
import atexit
|
import atexit
|
||||||
try:
|
try:
|
||||||
import readline
|
import readline
|
0
config/qutebrowser/.dfrecur
Normal file
0
config/qutebrowser/.dfrecur
Normal file
81
config/qutebrowser/config.py
Normal file
81
config/qutebrowser/config.py
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
import os
|
||||||
|
|
||||||
|
# Public static configuration for qutebrowser
|
||||||
|
# Note that private stuff (permissions, per-site rules)
|
||||||
|
# are in autoconfig in gdotfiles
|
||||||
|
|
||||||
|
# Prompt the user for the download location. If set to false,
|
||||||
|
# `downloads.location.directory` will be used.
|
||||||
|
# Type: Bool
|
||||||
|
c.downloads.location.prompt = False
|
||||||
|
|
||||||
|
# When to show the tab bar.
|
||||||
|
# Type: String
|
||||||
|
# Valid values:
|
||||||
|
# - always: Always show the tab bar.
|
||||||
|
# - never: Always hide the tab bar.
|
||||||
|
# - multiple: Hide the tab bar if only one tab is open.
|
||||||
|
# - switching: Show the tab bar when switching tabs.
|
||||||
|
c.tabs.show = "never"
|
||||||
|
|
||||||
|
# Open a new window for every tab.
|
||||||
|
# Type: Bool
|
||||||
|
c.tabs.tabs_are_windows = True
|
||||||
|
|
||||||
|
# Open base URL of the searchengine if a searchengine shortcut is
|
||||||
|
# invoked without parameters.
|
||||||
|
# Type: Bool
|
||||||
|
c.url.open_base_url = True
|
||||||
|
|
||||||
|
# Search engines which can be used via the address bar. Maps a search
|
||||||
|
# engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}`
|
||||||
|
# placeholder. The placeholder will be replaced by the search term, use
|
||||||
|
# `{{` and `}}` for literal `{`/`}` signs. The search engine named
|
||||||
|
# `DEFAULT` is used when `url.auto_search` is turned on and something
|
||||||
|
# else than a URL was entered to be opened. Other search engines can be
|
||||||
|
# used by prepending the search engine name to the search term, e.g.
|
||||||
|
# `:open google qutebrowser`.
|
||||||
|
# Type: Dict
|
||||||
|
c.url.searchengines = {
|
||||||
|
"DEFAULT": "https://www.ecosia.org/search?q={}",
|
||||||
|
"aw": "http://www.amp-what.com/unicode/search/{}",
|
||||||
|
"ddg": "https://duckduckgo.com/?q={}&ia=web",
|
||||||
|
"duckduckgo": "https://duckduckgo.com/?q={}&ia=web",
|
||||||
|
"ecosia": "https://www.ecosia.org/search?q={}",
|
||||||
|
"github": "https://github.com/search?q={}",
|
||||||
|
"google": "https://www.google.fr/search?q={}",
|
||||||
|
"npm": "https://www.npmjs.com/search?q={}",
|
||||||
|
"q": "https://www.qwant.com/?t=web&q={}",
|
||||||
|
"qwant": "https://www.qwant.com/?t=web&q={}",
|
||||||
|
"wolfram": "https://www.wolframalpha.com/input/?i={}",
|
||||||
|
"youtube": "https://www.youtube.com/results?search_query={}",
|
||||||
|
}
|
||||||
|
|
||||||
|
# Only allow first party cookies
|
||||||
|
config.set("content.cookies.accept", "no-3rdparty", "chrome://*/*")
|
||||||
|
|
||||||
|
# Request websites to reduce non-essential motion/animations
|
||||||
|
config.set("content.prefers_reduced_motion", True)
|
||||||
|
|
||||||
|
# Page(s) to open at the start.
|
||||||
|
# Type: List of FuzzyUrl, or FuzzyUrl
|
||||||
|
c.url.start_pages = "https://geoffrey.frogeye.fr/blank.html"
|
||||||
|
|
||||||
|
# Bindings for normal mode
|
||||||
|
config.bind("H", "tab-prev")
|
||||||
|
config.bind("J", "back")
|
||||||
|
config.bind("K", "forward")
|
||||||
|
config.bind("L", "tab-next")
|
||||||
|
config.unbind("T")
|
||||||
|
config.bind("af", "spawn --userscript freshrss")
|
||||||
|
config.bind("as", "spawn --userscript shaarli")
|
||||||
|
config.bind("u", "undo --window")
|
||||||
|
|
||||||
|
dirname = os.path.dirname(__file__)
|
||||||
|
filename = os.path.join(dirname, "theme.py")
|
||||||
|
if os.path.exists(filename):
|
||||||
|
with open(filename) as file:
|
||||||
|
exec(file.read())
|
||||||
|
|
||||||
|
# Uncomment this to still load settings configured via autoconfig.yml
|
||||||
|
config.load_autoconfig()
|
2
config/rofi/.gitignore
vendored
Normal file
2
config/rofi/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
theme.config
|
||||||
|
theme.rasi
|
4
config/rofi/config
Normal file
4
config/rofi/config
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#include "theme.config"
|
||||||
|
rofi.theme: theme
|
||||||
|
rofi.lazy-grab: false
|
||||||
|
rofi.matching: regex
|
5
config/rofi/config.rasi
Normal file
5
config/rofi/config.rasi
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
configuration {
|
||||||
|
lazy-grab: false;
|
||||||
|
matching: "regex";
|
||||||
|
}
|
||||||
|
@theme "theme"
|
3
config/rofimoji.rc
Normal file
3
config/rofimoji.rc
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
skin-tone = neutral
|
||||||
|
files = [emojis, math]
|
||||||
|
action = clipboard
|
|
@ -1,6 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
|
||||||
# Optimizes everything the script can find in a folder,
|
# Optimizes everything the script can find in a folder,
|
||||||
# meaning it will compress files as much as possible,
|
# meaning it will compress files as much as possible,
|
||||||
# without losing any data (verification will be done
|
# without losing any data (verification will be done
|
||||||
|
@ -9,7 +8,6 @@
|
||||||
|
|
||||||
# TODO Run in parallel
|
# TODO Run in parallel
|
||||||
# TODO Lots of dupplicated code there
|
# TODO Lots of dupplicated code there
|
||||||
# TODO Maybe replace part with https://github.com/toy/image_optim?
|
|
||||||
|
|
||||||
dir=${1:-$PWD}
|
dir=${1:-$PWD}
|
||||||
total=$(mktemp)
|
total=$(mktemp)
|
||||||
|
|
BIN
config/terminfo/a/alacritty
Normal file
BIN
config/terminfo/a/alacritty
Normal file
Binary file not shown.
BIN
config/terminfo/a/alacritty-256color
Normal file
BIN
config/terminfo/a/alacritty-256color
Normal file
Binary file not shown.
BIN
config/terminfo/r/rxvt-unicode
Normal file
BIN
config/terminfo/r/rxvt-unicode
Normal file
Binary file not shown.
BIN
config/terminfo/r/rxvt-unicode-256color
Normal file
BIN
config/terminfo/r/rxvt-unicode-256color
Normal file
Binary file not shown.
Loading…
Reference in a new issue