[Misc] switching to new repo for org files
This commit is contained in:
parent
566861ee28
commit
4e7e98c28b
@ -1,2 +0,0 @@
|
||||
--theme="Nord"
|
||||
--map-syntax='.spacemacs*:Lisp'
|
@ -1,56 +0,0 @@
|
||||
alias s systemctl $*
|
||||
|
||||
alias nmcli nmcli -p -c auto $*
|
||||
|
||||
alias chgrp chgrp --preserve-root $*
|
||||
alias chmod chmod --preserve-root $*
|
||||
alias chown chown --preserve-root $*
|
||||
|
||||
alias df df -H $*
|
||||
alias du du -ch $*
|
||||
|
||||
alias grep grep --color=auto $*
|
||||
alias lsl exa -halg@ --group-directories-first --git $*
|
||||
alias lns ln -si $*
|
||||
alias mkdir mkdir -p $*
|
||||
|
||||
alias rm rm -I $*
|
||||
alias rmd rm --preserve-root -Ir $*
|
||||
alias rmdf rm --preserve-root -Irf $*
|
||||
alias rmf rm --preserve-root -If $*
|
||||
|
||||
alias cdebug cmake -DCMAKE_BUILD_TYPE=Debug $*
|
||||
alias crelease cmake -DCMAKE_BUILD_TYPE=Release $*
|
||||
alias g++ g++ -Wall -std=c++17 $*
|
||||
alias gcc gcc -Wall -std=c11 $*
|
||||
alias clang++ clang++ -Wall -std=c++17 $*
|
||||
alias clang clang -Wall -std=c11 $*
|
||||
|
||||
alias dcd docker-compose down
|
||||
alias dcu docker-compose up
|
||||
alias dcud docker-compose up -d
|
||||
alias dcp docker-compose pull
|
||||
|
||||
alias flac youtube-dl -x --audio-format flac --audio-quality 0 $*
|
||||
alias mp3 youtube-dl -x --audio-format flac --audio-quality 0 $*
|
||||
alias wget wget -c $*
|
||||
alias rsync rsync -ruvtEhl --progress $*
|
||||
|
||||
alias remove sudo pacman -Rsc $*
|
||||
|
||||
alias gpumeminfo grep -i --color memory /var/log/Xorg.0.log
|
||||
alias diskspace sudo df -h | grep -E "sd|lv|Size" | sort
|
||||
alias meminfo free -m -l -t
|
||||
alias cpuinfo lscpu
|
||||
alias pscpu ps auxf | sort -nr -k 3
|
||||
alias pscpu10 ps auxf | sort -nr -k 3 | head -10
|
||||
alias psmem ps auxf | sort -nr -k 4
|
||||
alias psmem10 ps auxf | sort -nr -k 4 | head -10
|
||||
|
||||
alias q exit
|
||||
alias exti exit
|
||||
alias exi exit
|
||||
alias clean clear
|
||||
|
||||
alias less view-file $1
|
||||
alias bat view-file $1
|
@ -1,138 +0,0 @@
|
||||
# -*- indent-tabs-mode: t; -*-
|
||||
|
||||
[user]
|
||||
email = lucien@phundrak.com
|
||||
name = Lucien Cartier-Tilet
|
||||
signingkey = BD7789E705CB8DCA
|
||||
|
||||
[core]
|
||||
editor = emacsclient -c -a emacs
|
||||
whitespace = fix,-indent-with-non-tab,trailing-space
|
||||
excludesfile = /home/phundrak/.gitignore_global
|
||||
|
||||
[pull]
|
||||
rebase = true
|
||||
|
||||
[init]
|
||||
defaultBranch = main
|
||||
|
||||
[color]
|
||||
ui = auto
|
||||
|
||||
[web]
|
||||
browser = firefox
|
||||
|
||||
[alias]
|
||||
a = add --all
|
||||
aca = !git add --all && git commit --amend
|
||||
acan = !git add --all && git commit --amend --no-edit
|
||||
b = branch
|
||||
bd = branch -d
|
||||
bdd = branch -D
|
||||
c = commit -S
|
||||
ca = commit -Sa
|
||||
can = commit -Sa --no-edit
|
||||
cm = commit -Sm
|
||||
cam = commit -Sam
|
||||
co = checkout
|
||||
cob = checkout -b
|
||||
cod = checkout develop
|
||||
cl = clone
|
||||
cl1 = clone --depth 1
|
||||
f = fetch
|
||||
fp = fetch --prune
|
||||
ps = push
|
||||
psf = push --force-with-lease
|
||||
pso = push origin
|
||||
psfo = push --force-with-lease origin
|
||||
pushall = !git remote | xargs -L1 git push
|
||||
psl = !git remote | xargs -L1 git push
|
||||
pullall = !git remote | xargs -L1 git pull
|
||||
pll = !git remote | xargs -L1 git pull
|
||||
pl = pull
|
||||
pb = pull --rebase
|
||||
r = rebase
|
||||
ra = rebase --abort
|
||||
rc = rebase --continue
|
||||
rd = rebase develop
|
||||
ri = rebase -i
|
||||
rmf = rm -f
|
||||
rmd = rm -r
|
||||
rmdf = rm -rf
|
||||
sm = submodule
|
||||
sms = submodule status
|
||||
sma = submodule add
|
||||
smu = submodule update
|
||||
smui = submodule update --init
|
||||
smuir = submodule update --init --recursive
|
||||
st = stash
|
||||
stc = stash clear
|
||||
stp = stash pop
|
||||
stw = stash show
|
||||
u = reset --
|
||||
unstage = reset --
|
||||
d = diff -w
|
||||
l = log --oneline --graph --decorate
|
||||
s = status
|
||||
staged = diff --cached
|
||||
upstream = !git push -u origin HEAD
|
||||
|
||||
[sendemail]
|
||||
smtpserver = mail.phundrak.com
|
||||
smtpuser = lucien@phundrak.com
|
||||
smtpencryption = tls
|
||||
smtpserverport = 587
|
||||
|
||||
[credentials "smtp://lucien@phundrak.com@mail.phundrak.com:587"]
|
||||
helper = "secret-tool lookup password email_lucien-phundrak-com"
|
||||
|
||||
[magithub]
|
||||
online = true
|
||||
[magithub "status"]
|
||||
includeStatusHeader = true
|
||||
includePullRequestsSection = true
|
||||
includeIssuesSection = true
|
||||
|
||||
[gpg]
|
||||
program = gpg2
|
||||
[commit]
|
||||
gpgsign = true
|
||||
|
||||
[merge]
|
||||
tool = ediff
|
||||
|
||||
[mergetool.ediff]
|
||||
cmd = emacs --eval \" (progn (defun ediff-write-merge-buffer () (let ((file ediff-merge-store-file)) (set-buffer ediff-buffer-C) (write-region (point-min) (point-max) file) (message \\\"Merge buffer saved in: %s\\\" file) (set-buffer-modified-p nil) (sit-for 1))) (setq ediff-quit-hook 'kill-emacs ediff-quit-merge-hook 'ediff-write-merge-buffer) (ediff-merge-files-with-ancestor \\\"$LOCAL\\\" \\\"$REMOTE\\\" \\\"$BASE\\\" nil \\\"$MERGED\\\"))\"
|
||||
|
||||
[pager]
|
||||
diff = delta
|
||||
log = delta
|
||||
reflog = delta
|
||||
show = delta
|
||||
|
||||
[delta]
|
||||
features = side-by-side line-numbers decorations
|
||||
whitespace-error-style = 22 reverse
|
||||
|
||||
[delta "decorations"]
|
||||
commit-decoration-style = bold yellow box ul
|
||||
file-style = bold yellow ul
|
||||
file-decoration-style = none
|
||||
|
||||
[interactive]
|
||||
diffFilter = delta --color-only
|
||||
|
||||
[github]
|
||||
user = phundrak
|
||||
|
||||
[url "https://phundrak@github.com"]
|
||||
insteadOf = https://github.com
|
||||
|
||||
[url "https://phundrak@labs.phundrak.com"]
|
||||
insteadOf = https://labs.phundrak.com
|
||||
|
||||
[filter "lfs"]
|
||||
required = true
|
||||
clean = git-lfs clean -- %f
|
||||
smudge = git-lfs smudge -- %f
|
||||
process = git-lfs filter-process
|
@ -1,50 +0,0 @@
|
||||
# vim:ft=kitty
|
||||
## name: Nord
|
||||
## author: Connor Holyday
|
||||
## license: MIT
|
||||
## upstream: https://raw.githubusercontent.com/connorholyday/nord-kitty/master/nord.conf
|
||||
## blurb: An arctic, north-bluish clean and elegant Kitty theme.
|
||||
|
||||
# Nord Colorscheme for Kitty
|
||||
# Based on:
|
||||
# - https://gist.github.com/marcusramberg/64010234c95a93d953e8c79fdaf94192
|
||||
# - https://github.com/arcticicestudio/nord-hyper
|
||||
|
||||
foreground #D8DEE9
|
||||
background #2E3440
|
||||
selection_foreground #000000
|
||||
selection_background #FFFACD
|
||||
url_color #0087BD
|
||||
cursor #81A1C1
|
||||
|
||||
# black
|
||||
color0 #3B4252
|
||||
color8 #4C566A
|
||||
|
||||
# red
|
||||
color1 #BF616A
|
||||
color9 #BF616A
|
||||
|
||||
# green
|
||||
color2 #A3BE8C
|
||||
color10 #A3BE8C
|
||||
|
||||
# yellow
|
||||
color3 #EBCB8B
|
||||
color11 #EBCB8B
|
||||
|
||||
# blue
|
||||
color4 #81A1C1
|
||||
color12 #81A1C1
|
||||
|
||||
# magenta
|
||||
color5 #B48EAD
|
||||
color13 #B48EAD
|
||||
|
||||
# cyan
|
||||
color6 #88C0D0
|
||||
color14 #8FBCBB
|
||||
|
||||
# white
|
||||
color7 #E5E9F0
|
||||
color15 #ECEFF4
|
File diff suppressed because it is too large
Load Diff
@ -1,101 +0,0 @@
|
||||
[Added Associations]
|
||||
application/epub+zip=emacsclient.desktop;firefox.desktop;
|
||||
application/octet-stream=emacsclient.desktop;
|
||||
application/pdf=org.pwmt.zathura.desktop;xreader.desktop;
|
||||
application/vnd.rar=org.gnome.FileRoller.desktop;
|
||||
application/x-7z-compressed=org.gnome.FileRoller.desktop;
|
||||
application/x-alpm-package=org.gnome.FileRoller.desktop;
|
||||
application/x-apple-diskimage=org.gnome.FileRoller.desktop
|
||||
application/x-bzip=org.gnome.FileRoller.desktop;
|
||||
application/x-cd-image=org.gnome.FileRoller.desktop;
|
||||
application/x-compressed-tar=org.gnome.FileRoller.desktop;
|
||||
application/x-java-archive=javaws.desktop;org.gnome.FileRoller.desktop;
|
||||
application/x-java-jnlp-file=javaws.desktop;
|
||||
application/x-shellscript=emacsclient.desktop;
|
||||
application/x-wine-extension-ini=emacsclient.desktop;
|
||||
application/x-xz-compressed-tar=org.gnome.FileRoller.desktop;
|
||||
application/xhtml+xml=firefox.desktop;
|
||||
application/zip=org.gnome.FileRoller.desktop;
|
||||
audio/mpeg=mpv.desktop;
|
||||
audio/x-mod=mpv.desktop;
|
||||
audio/x-wav=mpv.desktop;
|
||||
image/bmp=nsxiv.desktop;nomacs.desktop;
|
||||
image/gif=nsxiv.desktop;nomacs.desktop;
|
||||
image/jpeg=nsxiv.desktop;nomacs.desktop;com.github.weclaw1.ImageRoll.desktop;
|
||||
image/png=nsxiv.desktop;nomacs.desktop;com.github.weclaw1.ImageRoll.desktop;
|
||||
image/svg+xml=nsxiv.desktop;emacsclient.desktop;nomacs.desktop;org.nomacs.ImageLounge.desktop;org.inkscape.Inkscape.desktop;
|
||||
image/vnd.djvu+multipage=org.pwmt.zathura.desktop;
|
||||
image/webp=nsxiv.desktop;nomacs.desktop;
|
||||
image/x-canon-cr2=nomacs.desktop;
|
||||
inode/directory=nemo.desktop;
|
||||
text/csv=libreoffice-calc.desktop;emacsclient.desktop;
|
||||
text/html=emacsclient.desktop;firefox.desktop;
|
||||
text/markdown=emacsclient.desktop;
|
||||
text/mml=firefox.desktop;
|
||||
text/plain=emacsclient.desktop;sent.desktop;
|
||||
text/troff=emacsclient.desktop;
|
||||
text/vtt=emacsclient.desktop;
|
||||
text/x-csrc=emacsclient.desktop;
|
||||
text/x-java=emacsclient.desktop;
|
||||
text/x-matlab=emacsclient.desktop;
|
||||
text/x-python=emacsclient.desktop;
|
||||
text/xml=firefox.desktop;
|
||||
video/3gpp=mpv.desktop;
|
||||
video/mp4=mpv.desktop;
|
||||
video/mpeg=mpv.desktop;
|
||||
video/webm=mpv.desktop;
|
||||
video/x-matroska=mpv.desktop;
|
||||
video/x-ms-wmv=mpv.desktop;
|
||||
video/x-msvideo=mpv.desktop;
|
||||
x-scheme-handler/https=firefox.desktop;
|
||||
x-scheme-handler/mailto=mu4e.desktop
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
|
||||
audio/x-ms-wma=mpv.desktop;
|
||||
application/x-mobipocket-ebook=FBReader.desktop;
|
||||
application/json=emacsclient.desktop;
|
||||
|
||||
[Default Applications]
|
||||
application/epub+zip=emacsclient.desktop
|
||||
application/octet-stream=emacsclient.desktop
|
||||
application/pdf=org.pwmt.zathura.desktop
|
||||
application/x-wine-extension-ini=emacsclient.desktop
|
||||
application/xhtml+xml=firefox.desktop
|
||||
application/xml=emacsclient.desktop
|
||||
audio/mpeg=mpv.desktop
|
||||
audio/x-mod=mpv.desktop
|
||||
audio/x-wav=mpv.desktop
|
||||
image/bmp=com.github.weclaw1.ImageRoll.desktop
|
||||
image/gif=com.github.weclaw1.ImageRoll.desktop
|
||||
image/jpeg=com.github.weclaw1.ImageRoll.desktop
|
||||
image/png=com.github.weclaw1.ImageRoll.desktop
|
||||
image/svg+xml=com.github.weclaw1.ImageRoll.desktop
|
||||
image/vnd.djvu+multipage=org.pwmt.zathura.desktop
|
||||
image/webp=com.github.weclaw1.ImageRoll.desktop
|
||||
image/x-canon-cr2=com.github.weclaw1.ImageRoll.desktop
|
||||
inode/directory=nemo.desktop
|
||||
text/csv=emacsclient.desktop
|
||||
text/html=firefox.desktop
|
||||
text/markdown=emacsclient.desktop
|
||||
text/mml=firefox.desktop
|
||||
text/plain=sent.desktop
|
||||
text/xml=firefox.desktop
|
||||
video/mp4=mpv.desktop
|
||||
video/mpeg=mpv.desktop
|
||||
video/webm=mpv.desktop
|
||||
video/x-matroska=mpv.desktop
|
||||
video/x-msvideo=mpv.desktop
|
||||
x-scheme-handler/about=firefox.desktop
|
||||
x-scheme-handler/discord-474605546457137157=discord-474605546457137157.desktop
|
||||
x-scheme-handler/http=firefox.desktop
|
||||
x-scheme-handler/https=firefox.desktop
|
||||
x-scheme-handler/lbry=lbry.desktop
|
||||
x-scheme-handler/magnet=qBittorrent.desktop
|
||||
x-scheme-handler/mailto=mu4e.desktop
|
||||
x-scheme-handler/unknown=firefox.desktop
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop
|
||||
x-scheme-handler/discord-693493612754763907=discord-693493612754763907.desktop
|
||||
audio/x-ms-wma=mpv.desktop
|
||||
x-scheme-handler/flashpoint=flashpoint-launcher.desktop
|
||||
x-scheme-handler/msteams=teams.desktop
|
||||
application/x-mobipocket-ebook=FBReader.desktop
|
||||
application/json=emacsclient.desktop
|
@ -1,184 +0,0 @@
|
||||
# mpv keybindings
|
||||
#
|
||||
# Location of user-defined bindings: ~/.config/mpv/input.conf
|
||||
#
|
||||
# Lines starting with # are comments. Use SHARP to assign the # key.
|
||||
# Copy this file and uncomment and edit the bindings you want to change.
|
||||
#
|
||||
# List of commands and further details: DOCS/man/input.rst
|
||||
# List of special keys: --input-keylist
|
||||
# Keybindings testing mode: mpv --input-test --force-window --idle
|
||||
#
|
||||
# Use 'ignore' to unbind a key fully (e.g. 'ctrl+a ignore').
|
||||
#
|
||||
# Strings need to be quoted and escaped:
|
||||
# KEY show-text "This is a single backslash: \\ and a quote: \" !"
|
||||
#
|
||||
# You can use modifier-key combinations like Shift+Left or Ctrl+Alt+x with
|
||||
# the modifiers Shift, Ctrl, Alt and Meta (may not work on the terminal).
|
||||
#
|
||||
# The default keybindings are hardcoded into the mpv binary.
|
||||
# You can disable them completely with: --no-input-default-bindings
|
||||
|
||||
# Developer note:
|
||||
# On compilation, this file is baked into the mpv binary, and all lines are
|
||||
# uncommented (unless '#' is followed by a space) - thus this file defines the
|
||||
# default key bindings.
|
||||
|
||||
# If this is enabled, treat all the following bindings as default.
|
||||
#default-bindings start
|
||||
|
||||
#MBTN_LEFT ignore # don't do anything
|
||||
#MBTN_LEFT_DBL cycle fullscreen # toggle fullscreen on/off
|
||||
#MBTN_RIGHT cycle pause # toggle pause on/off
|
||||
|
||||
# Mouse wheels, touchpad or other input devices that have axes
|
||||
# if the input devices supports precise scrolling it will also scale the
|
||||
# numeric value accordingly
|
||||
#WHEEL_UP seek 10
|
||||
#WHEEL_DOWN seek -10
|
||||
#WHEEL_LEFT add volume -2
|
||||
#WHEEL_RIGHT add volume 2
|
||||
|
||||
## Seek units are in seconds, but note that these are limited by keyframes
|
||||
#RIGHT seek 5
|
||||
#LEFT seek -5
|
||||
#UP seek 60
|
||||
#DOWN seek -60
|
||||
# Do smaller, always exact (non-keyframe-limited), seeks with shift.
|
||||
# Don't show them on the OSD (no-osd).
|
||||
#Shift+RIGHT no-osd seek 1 exact
|
||||
#Shift+LEFT no-osd seek -1 exact
|
||||
#Shift+UP no-osd seek 5 exact
|
||||
#Shift+DOWN no-osd seek -5 exact
|
||||
# Skip to previous/next subtitle (subject to some restrictions; see manpage)
|
||||
#Ctrl+LEFT no-osd sub-seek -1
|
||||
#Ctrl+RIGHT no-osd sub-seek 1
|
||||
#PGUP add chapter 1 # skip to next chapter
|
||||
#PGDWN add chapter -1 # skip to previous chapter
|
||||
#Shift+PGUP seek 600
|
||||
#Shift+PGDWN seek -600
|
||||
#[ multiply speed 0.9091 # scale playback speed
|
||||
#] multiply speed 1.1
|
||||
#{ multiply speed 0.5
|
||||
#} multiply speed 2.0
|
||||
#BS set speed 1.0 # reset speed to normal
|
||||
#q quit
|
||||
Q quit-watch-later
|
||||
#q {encode} quit 4
|
||||
#ESC set fullscreen no
|
||||
#ESC {encode} quit 4
|
||||
#p cycle pause # toggle pause/playback mode
|
||||
#. frame-step # advance one frame and pause
|
||||
#, frame-back-step # go back by one frame and pause
|
||||
#SPACE cycle pause
|
||||
#> playlist-next # skip to next file
|
||||
#ENTER playlist-next # skip to next file
|
||||
#< playlist-prev # skip to previous file
|
||||
#O no-osd cycle-values osd-level 3 1 # cycle through OSD mode
|
||||
#o show-progress
|
||||
P show-progress
|
||||
#z add sub-delay -0.1 # subtract 100 ms delay from subs
|
||||
#x add sub-delay +0.1 # add
|
||||
#ctrl++ add audio-delay 0.100 # this changes audio/video sync
|
||||
#ctrl+- add audio-delay -0.100
|
||||
#9 add volume -2
|
||||
/ add volume -2
|
||||
#0 add volume 2
|
||||
* add volume 2
|
||||
m cycle mute
|
||||
#1 add contrast -1
|
||||
#2 add contrast 1
|
||||
#3 add brightness -1
|
||||
#4 add brightness 1
|
||||
#5 add gamma -1
|
||||
#6 add gamma 1
|
||||
#7 add saturation -1
|
||||
#8 add saturation 1
|
||||
#Alt+0 set window-scale 0.5
|
||||
#Alt+1 set window-scale 1.0
|
||||
#Alt+2 set window-scale 2.0
|
||||
# toggle deinterlacer (automatically inserts or removes required filter)
|
||||
#d cycle deinterlace
|
||||
#r add sub-pos -1 # move subtitles up
|
||||
#t add sub-pos +1 # down
|
||||
#v cycle sub-visibility
|
||||
# stretch SSA/ASS subtitles with anamorphic videos to match historical
|
||||
#V cycle sub-ass-vsfilter-aspect-compat
|
||||
# switch between applying no style overrides to SSA/ASS subtitles, and
|
||||
# overriding them almost completely with the normal subtitle style
|
||||
#u cycle-values sub-ass-override "force" "no"
|
||||
#j cycle sub # cycle through subtitles
|
||||
#J cycle sub down # ...backwards
|
||||
#SHARP cycle audio # switch audio streams
|
||||
#_ cycle video
|
||||
#T cycle ontop # toggle video window ontop of other windows
|
||||
#f cycle fullscreen # toggle fullscreen
|
||||
#s async screenshot # take a screenshot
|
||||
#S async screenshot video # ...without subtitles
|
||||
#Ctrl+s async screenshot window # ...with subtitles and OSD, and scaled
|
||||
#Alt+s screenshot each-frame # automatically screenshot every frame
|
||||
#w add panscan -0.1 # zoom out with -panscan 0 -fs
|
||||
#e add panscan +0.1 # in
|
||||
# cycle video aspect ratios; "-1" is the container aspect
|
||||
#A cycle-values video-aspect "16:9" "4:3" "2.35:1" "-1"
|
||||
#POWER quit
|
||||
#PLAY cycle pause
|
||||
#PAUSE cycle pause
|
||||
#PLAYPAUSE cycle pause
|
||||
#STOP quit
|
||||
#FORWARD seek 60
|
||||
#REWIND seek -60
|
||||
#NEXT playlist-next
|
||||
#PREV playlist-prev
|
||||
#VOLUME_UP add volume 2
|
||||
#VOLUME_DOWN add volume -2
|
||||
#MUTE cycle mute
|
||||
#CLOSE_WIN quit
|
||||
#CLOSE_WIN {encode} quit 4
|
||||
#E cycle edition # next edition
|
||||
#l ab-loop # Set/clear A-B loop points
|
||||
#L cycle-values loop-file "inf" "no" # toggle infinite looping
|
||||
#ctrl+c quit 4
|
||||
|
||||
# Apple Remote section
|
||||
#AR_PLAY cycle pause
|
||||
#AR_PLAY_HOLD quit
|
||||
#AR_CENTER cycle pause
|
||||
#AR_CENTER_HOLD quit
|
||||
#AR_NEXT seek 10
|
||||
#AR_NEXT_HOLD seek 120
|
||||
#AR_PREV seek -10
|
||||
#AR_PREV_HOLD seek -120
|
||||
#AR_MENU show-progress
|
||||
#AR_MENU_HOLD cycle mute
|
||||
#AR_VUP add volume 2
|
||||
#AR_VUP_HOLD add chapter 1
|
||||
#AR_VDOWN add volume -2
|
||||
#AR_VDOWN_HOLD add chapter -1
|
||||
|
||||
#
|
||||
# Legacy bindings (may or may not be removed in the future)
|
||||
#
|
||||
#! add chapter -1 # skip to previous chapter
|
||||
#@ add chapter 1 # next
|
||||
|
||||
#
|
||||
# Not assigned by default
|
||||
# (not an exhaustive list of unbound commands)
|
||||
#
|
||||
|
||||
# ? add sub-scale +0.1 # increase subtitle font size
|
||||
# ? add sub-scale -0.1 # decrease subtitle font size
|
||||
# ? sub-step -1 # immediately display next subtitle
|
||||
# ? sub-step +1 # previous
|
||||
# ? cycle angle # switch DVD/Bluray angle
|
||||
# ? add balance -0.1 # adjust audio balance in favor of left
|
||||
# ? add balance 0.1 # right
|
||||
# ? cycle sub-forced-only # toggle DVD forced subs
|
||||
# ? cycle program # cycle transport stream programs
|
||||
# ? stop # stop playback (quit or enter idle mode)
|
||||
I vf toggle format=yuv420p,vapoursynth=~~/motioninterpolation.vpy:4:4
|
||||
M vf toggle hflip
|
||||
|
||||
Ctrl+r cycle_values video-rotate "90" "180" "270" "0"
|
@ -1,153 +0,0 @@
|
||||
#
|
||||
# Example mpv configuration file
|
||||
#
|
||||
# Warning:
|
||||
#
|
||||
# The commented example options usually do _not_ set the default values. Call
|
||||
# mpv with --list-options to see the default values for most options. There is
|
||||
# no builtin or example mpv.conf with all the defaults.
|
||||
#
|
||||
#
|
||||
# Configuration files are read system-wide from /usr/local/etc/mpv.conf
|
||||
# and per-user from ~/.config/mpv/mpv.conf, where per-user settings override
|
||||
# system-wide settings, all of which are overridden by the command line.
|
||||
#
|
||||
# Configuration file settings and the command line options use the same
|
||||
# underlying mechanisms. Most options can be put into the configuration file
|
||||
# by dropping the preceding '--'. See the man page for a complete list of
|
||||
# omeone explain to me how est of at least 10 milliptions.
|
||||
#
|
||||
# Lines starting with '#' are comments and are ignored.
|
||||
#
|
||||
# See the CONFIGURATION FILES section in the man page
|
||||
# for a detailed description of the syntax.
|
||||
#
|
||||
# Profiles should be placed at the bottom of the configuration file to ensure
|
||||
# that settings wanted as defaults are not restricted to specific profiles.
|
||||
|
||||
input-ipc-server=/tmp/mpvsocket
|
||||
|
||||
##################
|
||||
# video settings #
|
||||
##################
|
||||
|
||||
# Start in fullscreen mode by default.
|
||||
#fs=yes
|
||||
|
||||
# force starting with centered window
|
||||
geometry=50%:50%
|
||||
|
||||
# don't allow a new window to have a size larger than 90% of the screen size
|
||||
autofit-larger=90%x90%
|
||||
|
||||
# Do not close the window on exit.
|
||||
keep-open=no
|
||||
|
||||
# Do not wait with showing the video window until it has loaded. (This will
|
||||
# resize the window once video is loaded. Also always shows a window with
|
||||
# audio.)
|
||||
force-window=immediate
|
||||
|
||||
# Disable the On Screen Controller (OSC).
|
||||
osc=yes
|
||||
|
||||
# Keep the player window on top of all other windows.
|
||||
#ontop=yes
|
||||
|
||||
# Specify high quality video rendering preset (for OpenGL VO only)
|
||||
# Can cause performance problems with some drivers and GPUs.
|
||||
# profile=opengl-hq
|
||||
# scale=ewa_lanczossharp
|
||||
# cscale=ewa_lanczossharp
|
||||
# video-sync=display-resample
|
||||
# interpolation
|
||||
# tscale=oversample
|
||||
|
||||
# Force video to lock on the display's refresh rate, and change video and audio
|
||||
# speed to some degree to ensure synchronous playback - can cause problems
|
||||
# with some drivers and desktop environments.
|
||||
video-sync=display-resample
|
||||
|
||||
# Enable hardware decoding if available. Often, this does not work with all
|
||||
# video outputs, but should work well with default settings on most systems.
|
||||
# If performance or energy usage is an issue, forcing the vdpau or vaapi VOs
|
||||
# may or may not help.
|
||||
hwdec=auto-copy
|
||||
|
||||
##################
|
||||
# audio settings #
|
||||
##################
|
||||
|
||||
# Specify default audio device. You can list devices with: --audio-device=help
|
||||
# The option takes the device string (the stuff between the '...').
|
||||
#audio-device=alsa/default
|
||||
|
||||
# Do not filter audio to keep pitch when changing playback speed.
|
||||
#audio-pitch-correction=no
|
||||
|
||||
# Output 5.1 audio natively, and upmix/downmix audio with a different format.
|
||||
#audio-channels=5.1
|
||||
# Disable any automatic remix, _if_ the audio output accepts the audio format.
|
||||
# of the currently played file. See caveats mentioned in the manpage.
|
||||
# (The default is "auto-safe", see manpage.)
|
||||
#audio-channels=auto
|
||||
|
||||
##################
|
||||
# other settings #
|
||||
##################
|
||||
|
||||
# Pretend to be a web browser. Might fix playback with some streaming sites,
|
||||
# but also will break with shoutcast streams.
|
||||
#user-agent="Mozilla/5.0"
|
||||
|
||||
# cache settings
|
||||
#
|
||||
# Use 150MB input cache by default. The cache is enabled for network streams only.
|
||||
#cache-default=153600
|
||||
#
|
||||
# Use 150MB input cache for everything, even local files.
|
||||
#cache=153600
|
||||
#
|
||||
# Disable the behavior that the player will pause if the cache goes below a
|
||||
# certain fill size.
|
||||
#cache-pause=no
|
||||
#
|
||||
# Read ahead about 5 seconds of audio and video packets.
|
||||
#demuxer-readahead-secs=5.0
|
||||
#
|
||||
# Raise readahead from demuxer-readahead-secs to this value if a cache is active.
|
||||
#cache-secs=50.0
|
||||
|
||||
# Display English subtitles if available.
|
||||
slang=en,fr
|
||||
|
||||
# Play English audio if available, fall back to French otherwise.
|
||||
alang=en,fr
|
||||
|
||||
# Change subtitle encoding. For Arabic subtitles use 'cp1256'.
|
||||
# If the file seems to be valid UTF-8, prefer UTF-8.
|
||||
# (You can add '+' in front of the codepage to force it.)
|
||||
sub-codepage=UTF-8
|
||||
|
||||
# You can also include other configuration files.
|
||||
#include=/path/to/the/file/you/want/to/include
|
||||
|
||||
############
|
||||
# Profiles #
|
||||
############
|
||||
|
||||
# The options declared as part of profiles override global default settings,
|
||||
# but only take effect when the profile is active.
|
||||
|
||||
# The following profile can be enabled on the command line with: --profile=eye-cancer
|
||||
|
||||
[eye-cancer]
|
||||
sharpen=5
|
||||
|
||||
[qualitatif]
|
||||
profile=opengl-hq
|
||||
scale=ewa_lanczossharp
|
||||
cscale=ewa_lanczossharp
|
||||
video-sync=display-resample
|
||||
interpolation
|
||||
tscale=oversample
|
@ -1,357 +0,0 @@
|
||||
# -*- mode: conf -*-
|
||||
##############################################################################
|
||||
## This is the example configuration file. Copy it to $HOME/.ncmpcpp/config ##
|
||||
## or $XDG_CONFIG_HOME/ncmpcpp/config and set up your preferences. ##
|
||||
##############################################################################
|
||||
#
|
||||
##### directories ######
|
||||
ncmpcpp_directory = ~/.config/ncmpcpp
|
||||
lyrics_directory = ~/.lyrics
|
||||
|
||||
##### MPD #####
|
||||
mpd_host = localhost
|
||||
mpd_port = 6600
|
||||
mpd_music_dir = ~/Music
|
||||
mpd_connection_timeout = 5
|
||||
mpd_crossfade_time = 0
|
||||
|
||||
##### music visualizer #####
|
||||
# visualizer_fifo_path = /tmp/mpd.fifo
|
||||
visualizer_output_name = "my_fifo"
|
||||
visualizer_in_stereo = yes
|
||||
# visualizer_sync_interval = 10
|
||||
visualizer_type = "spectrum" ## Available values: spectrum, wave, wave_filled, ellipse.
|
||||
visualizer_look = "+|"
|
||||
visualizer_color = blue, cyan, green, yellow, magenta, red
|
||||
|
||||
##### system encoding #####
|
||||
system_encoding = "UTF-8"
|
||||
|
||||
##### delays #####
|
||||
#playlist_disable_highlight_delay = 5
|
||||
#message_delay_time = 5
|
||||
|
||||
##### song format #####
|
||||
##
|
||||
## For a song format you can use:
|
||||
##
|
||||
## %l - length
|
||||
## %f - filename
|
||||
## %D - directory
|
||||
## %a - artist
|
||||
## %A - album artist
|
||||
## %t - title
|
||||
## %b - album
|
||||
## %y - date
|
||||
## %n - track number (01/12 -> 01)
|
||||
## %N - full track info (01/12 -> 01/12)
|
||||
## %g - genre
|
||||
## %c - composer
|
||||
## %p - performer
|
||||
## %d - disc
|
||||
## %C - comment
|
||||
## %P - priority
|
||||
## $R - begin right alignment
|
||||
##
|
||||
## If you want to make sure that a part of the format is displayed only when
|
||||
## certain tags are present, you can archieve it by grouping them with brackets,
|
||||
## e.g. '{%a - %t}' will be evaluated to 'ARTIST - TITLE' if both tags are
|
||||
## present or '' otherwise. It is also possible to define a list of alternatives
|
||||
## by providing several groups and separating them with '|', e.g. '{%t}|{%f}'
|
||||
## will be evaluated to 'TITLE' or 'FILENAME' if the former is not present.
|
||||
##
|
||||
## Note: If you want to set limit on maximal length of a tag, just put the
|
||||
## appropriate number between % and character that defines tag type, e.g. to
|
||||
## make album take max. 20 terminal cells, use '%20b'.
|
||||
##
|
||||
## In addition, formats support markers used for text attributes. They are
|
||||
## followed by character '$'. After that you can put:
|
||||
##
|
||||
## - 0 - default window color (discards all other colors)
|
||||
## - 1 - black
|
||||
## - 2 - red
|
||||
## - 3 - green
|
||||
## - 4 - yellow
|
||||
## - 5 - blue
|
||||
## - 6 - magenta
|
||||
## - 7 - cyan
|
||||
## - 8 - white
|
||||
## - 9 - end of current color
|
||||
## - b - bold text
|
||||
## - u - underline text
|
||||
## - r - reverse colors
|
||||
## - a - use alternative character set
|
||||
##
|
||||
## If you don't want to use a non-color attribute anymore, just put it again,
|
||||
## but this time insert character '/' between '$' and attribute character, e.g.
|
||||
## {$b%t$/b}|{$r%f$/r} will display bolded title tag or filename with reversed
|
||||
## colors.
|
||||
##
|
||||
## If you want to use 256 colors and/or background colors in formats (the naming
|
||||
## scheme is described below in section about color definitions), it can be done
|
||||
## with the syntax $(COLOR), e.g. to set the artist tag to one of the
|
||||
## non-standard colors and make it have yellow background, you need to write
|
||||
## $(197_yellow)%a$(end). Note that for standard colors this is interchangable
|
||||
## with attributes listed above.
|
||||
##
|
||||
## Note: colors can be nested.
|
||||
##
|
||||
#
|
||||
song_list_format = (6)[]{} (23)[red]{a} (26)[yellow]{t|f} (40)[green]{b} (4)[blue]{l}
|
||||
#song_status_format = {{%a{ "%b"{ (%y)}} - }{%t}}|{%f}
|
||||
#song_library_format = {%n - }{%t}|{%f}
|
||||
#alternative_header_first_line_format = $b$1$aqqu$/a$9 {%t}|{%f} $1$atqq$/a$9$/b
|
||||
#alternative_header_second_line_format = {{$4$b%a$/b$9}{ - $7%b$9}{ ($4%y$9)}}|{%D}
|
||||
#current_item_prefix = $(yellow)$r
|
||||
#current_item_suffix = $/r$(end)
|
||||
#current_item_inactive_column_prefix = $(white)$r
|
||||
#current_item_inactive_column_suffix = $/r$(end)
|
||||
now_playing_prefix = $b
|
||||
now_playing_suffix = $8$/b
|
||||
#browser_playlist_prefix = "$2playlist$9 "
|
||||
#selected_item_prefix = $6
|
||||
#selected_item_suffix = $9
|
||||
#modified_item_prefix = $3> $9
|
||||
#song_window_title_format = {%a - }{%t}|{%f}
|
||||
|
||||
##
|
||||
## Note: Below variables are used for sorting songs in browser. The sort mode
|
||||
## determines how songs are sorted, and can be used in combination with a sort
|
||||
## format to specify a custom sorting format. Available values for
|
||||
## browser_sort_mode are "name", "mtime", "format" and "noop".
|
||||
##
|
||||
#
|
||||
#browser_sort_mode = name
|
||||
#browser_sort_format = {%a - }{%t}|{%f} {(%l)}
|
||||
|
||||
##### columns settings #####
|
||||
##
|
||||
## syntax of song columns list format is "column column etc."
|
||||
##
|
||||
## - syntax for each column is:
|
||||
##
|
||||
## (width of the column)[color of the column]{displayed tag}
|
||||
##
|
||||
## Note: Width is by default in %, if you want a column to have fixed size, add
|
||||
## 'f' after the value, e.g. (10)[white]{a} will be the column that take 10% of
|
||||
## screen (so the real width will depend on actual screen size), whereas
|
||||
## (10f)[white]{a} will take 10 terminal cells, no matter how wide the screen
|
||||
## is.
|
||||
##
|
||||
## - color is optional (if you want the default one, leave the field empty).
|
||||
##
|
||||
## Note: You can give a column additional attributes by putting appropriate
|
||||
## character after displayed tag character. Available attributes are:
|
||||
##
|
||||
## - r - column will be right aligned
|
||||
## - E - if tag is empty, empty tag marker won't be displayed
|
||||
##
|
||||
## You can also:
|
||||
##
|
||||
## - give a column custom name by putting it after attributes, separated with
|
||||
## character ':', e.g. {lr:Length} gives you right aligned column of lengths
|
||||
## named "Length".
|
||||
##
|
||||
## - define sequence of tags, that have to be displayed in case predecessor is
|
||||
## empty in a way similar to the one in classic song format, i.e. using '|'
|
||||
## character, e.g. {a|c|p:Owner} creates column named "Owner" that tries to
|
||||
## display artist tag and then composer and performer if previous ones are not
|
||||
## available.
|
||||
##
|
||||
song_columns_list_format = (6)[]{} (23)[red]{a} (26)[yellow]{t|f} (40)[green]{b} (4)[blue]{l}
|
||||
|
||||
##### various settings #####
|
||||
|
||||
##
|
||||
## Note: Custom command that will be executed each time song changes. Useful for
|
||||
## notifications etc.
|
||||
##
|
||||
#execute_on_song_change = "~/.ncmpcpp/art.sh"
|
||||
#song_list_format = " $2%t $R$5%a "
|
||||
|
||||
##
|
||||
## Note: Custom command that will be executed each time player state changes.
|
||||
## The environment variable MPD_PLAYER_STATE is set to the current state (either
|
||||
## unknown, play, pause, or stop) for its duration.
|
||||
##
|
||||
#execute_on_player_state_change = ""
|
||||
#playlist_show_mpd_host = no
|
||||
#playlist_show_remaining_time = no
|
||||
playlist_shorten_total_times = yes
|
||||
#playlist_separate_albums = no
|
||||
|
||||
##
|
||||
## Note: Possible display modes: classic, columns.
|
||||
##
|
||||
playlist_display_mode = columns
|
||||
browser_display_mode = "columns"
|
||||
search_engine_display_mode = "columns"
|
||||
playlist_editor_display_mode = "columns"
|
||||
#discard_colors_if_item_is_selected = yes
|
||||
#show_duplicate_tags = yes
|
||||
#incremental_seeking = yes
|
||||
#seek_time = 1
|
||||
#volume_change_step = 2
|
||||
autocenter_mode = yes
|
||||
centered_cursor = yes
|
||||
|
||||
##
|
||||
## Note: You can specify third character which will be used to build 'empty'
|
||||
## part of progressbar.
|
||||
##
|
||||
progressbar_look = "─> "
|
||||
#default_place_to_search_in = database ## Available values: database, playlist.
|
||||
#user_interface = classic ## Available values: classic, alternative.
|
||||
#data_fetching_delay = yes
|
||||
#media_library_primary_tag = artist ## Available values: artist, album_artist, date, genre, composer, performer.
|
||||
#media_library_albums_split_by_date = yes
|
||||
#default_find_mode = wrapped ## Available values: wrapped, normal.
|
||||
#default_tag_editor_pattern = %n - %t
|
||||
header_visibility = no
|
||||
statusbar_visibility = no
|
||||
titles_visibility = no
|
||||
#header_text_scrolling = yes
|
||||
#cyclic_scrolling = no
|
||||
#lines_scrolled = 2
|
||||
#lyrics_fetchers = lyricwiki, azlyrics, genius, sing365, lyricsmania, metrolyrics, justsomelyrics, jahlyrics, plyrics, tekstowo, internet
|
||||
#follow_now_playing_lyrics = no
|
||||
#fetch_lyrics_for_current_song_in_background = no
|
||||
#store_lyrics_in_song_dir = no
|
||||
#generate_win32_compatible_filenames = yes
|
||||
allow_for_physical_item_deletion = yes
|
||||
|
||||
##
|
||||
## Note: If you set this variable, ncmpcpp will try to get info from last.fm in
|
||||
## language you set and if it fails, it will fall back to english. Otherwise it
|
||||
## will use english the first time.
|
||||
##
|
||||
## Note: Language has to be expressed as an ISO 639 alpha-2 code.
|
||||
##
|
||||
lastfm_preferred_language = en
|
||||
space_add_mode = add_remove
|
||||
#show_hidden_files_in_local_browser = no
|
||||
|
||||
##
|
||||
## How shall screen switcher work?
|
||||
##
|
||||
## - "previous" - switch between the current and previous screen.
|
||||
## - "screen1,...,screenN" - switch between given sequence of screens.
|
||||
##
|
||||
## Screens available for use: help, playlist, browser, search_engine,
|
||||
## media_library, playlist_editor, tag_editor, outputs, visualizer, clock,
|
||||
## lyrics, last_fm.
|
||||
##
|
||||
#screen_switcher_mode = playlist, browser
|
||||
|
||||
##
|
||||
## Note: You can define startup screen by choosing screen from the list above.
|
||||
##
|
||||
#startup_screen = playlist
|
||||
|
||||
##
|
||||
## Note: You can define startup slave screen by choosing screen from the list
|
||||
## above or an empty value for no slave screen.
|
||||
##
|
||||
#startup_slave_screen = ""
|
||||
#startup_slave_screen_focus = no
|
||||
|
||||
##
|
||||
## Default width of locked screen (in %). Acceptable values are from 20 to 80.
|
||||
##
|
||||
locked_screen_width_part = 50
|
||||
ask_for_locked_screen_width_part = yes
|
||||
jump_to_now_playing_song_at_start = yes
|
||||
ask_before_clearing_playlists = yes
|
||||
clock_display_seconds = no
|
||||
display_volume_level = yes
|
||||
display_bitrate = no
|
||||
display_remaining_time = yes
|
||||
|
||||
## Available values: none, basic, extended, perl.
|
||||
regular_expressions = extended
|
||||
|
||||
##
|
||||
## Note: if below is enabled, ncmpcpp will ignore leading "The" word while
|
||||
## sorting items in browser, tags in media library, etc.
|
||||
##
|
||||
ignore_leading_the = yes
|
||||
|
||||
##
|
||||
## Note: if below is enabled, ncmpcpp will ignore diacritics while searching and
|
||||
## filtering lists. This takes an effect only if boost was compiled with ICU
|
||||
## support.
|
||||
##
|
||||
ignore_diacritics = yes
|
||||
#block_search_constraints_change_if_items_found = yes
|
||||
mouse_support = no
|
||||
#mouse_list_scroll_whole_page = yes
|
||||
#empty_tag_marker = <empty>
|
||||
tags_separator = " ; "
|
||||
#tag_editor_extended_numeration = no
|
||||
#media_library_sort_by_mtime = no
|
||||
enable_window_title = yes
|
||||
|
||||
##
|
||||
## Note: You can choose default search mode for search engine. Available modes
|
||||
## are:
|
||||
##
|
||||
## - 1 - use mpd built-in searching (no regexes, pattern matching)
|
||||
##
|
||||
## - 2 - use ncmpcpp searching (pattern matching with support for regexes, but
|
||||
## if your mpd is on a remote machine, downloading big database to process
|
||||
## it can take a while
|
||||
##
|
||||
## - 3 - match only exact values (this mode uses mpd function for searching in
|
||||
## database and local one for searching in current playlist)
|
||||
##
|
||||
search_engine_default_search_mode = 1
|
||||
external_editor = emacsclient -c
|
||||
## Note: set to yes if external editor is a console application.
|
||||
use_console_editor = yes
|
||||
|
||||
##### colors definitions #####
|
||||
##
|
||||
## It is possible to set a background color by setting a color value
|
||||
## "<foreground>_<background>", e.g. red_black will set foregound color to red
|
||||
## and background color to black.
|
||||
##
|
||||
## In addition, for terminals that support 256 colors it is possible to set one
|
||||
## of them by using a number in range [1, 256] instead of color name, e.g.
|
||||
## numerical value corresponding to red_black is 2_1. To find out if the
|
||||
## terminal supports 256 colors, run ncmpcpp and check out the bottom of the
|
||||
## help screen for list of available colors and their numerical values.
|
||||
##
|
||||
## What is more, there are two special values for the background color:
|
||||
## "transparent" and "current". The first one explicitly sets the background to
|
||||
## be transparent, while the second one allows you to preserve current
|
||||
## background color and change only the foreground one. It's used implicitly
|
||||
## when background color is not specified.
|
||||
##
|
||||
## Moreover, it is possible to attach format information to selected color
|
||||
## variables by appending to their end a colon followed by one or more format
|
||||
## flags, e.g. black:b or red:ur. The following variables support this syntax:
|
||||
## visualizer_color, color1, color2, empty_tag_color, volume_color,
|
||||
## state_line_color, state_flags_color, progressbar_color,
|
||||
## progressbar_elapsed_color, player_state_color, statusbar_time_color,
|
||||
## alternative_ui_separator_color.
|
||||
##
|
||||
## Note: due to technical limitations of older ncurses version, if 256 colors
|
||||
## are used there is a possibility that you'll be able to use only colors with
|
||||
## transparent background.
|
||||
colors_enabled = yes
|
||||
#empty_tag_color = cyan
|
||||
#header_window_color = default
|
||||
volume_color = default
|
||||
#state_line_color = default
|
||||
#state_flags_color = default:b
|
||||
#main_window_color = yellow
|
||||
#color1 = white
|
||||
#color2 = green
|
||||
progressbar_color = "black"
|
||||
progressbar_elapsed_color = "white"
|
||||
statusbar_color = "white"
|
||||
#statusbar_time_color = default:b
|
||||
#player_state_color = default:b
|
||||
#alternative_ui_separator_color = black:b
|
||||
#window_border_color = green
|
||||
#active_window_border = red
|
@ -1,423 +0,0 @@
|
||||
from __future__ import annotations
|
||||
from typing import Callable, Any
|
||||
|
||||
import os
|
||||
import time
|
||||
import logging
|
||||
import psutil
|
||||
import subprocess
|
||||
import dbus
|
||||
import docker
|
||||
|
||||
docker_client = docker.from_env()
|
||||
|
||||
from newm.layout import Layout
|
||||
from newm.helper import BacklightManager, WobRunner, PaCtl
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
debug_windows = False
|
||||
|
||||
|
||||
def run_shell(command: str):
|
||||
"""Run a shell command asynchronously
|
||||
If the shell command doesn't already end with "&", add it.
|
||||
"""
|
||||
if not command.endswith("&"):
|
||||
command = command + " &"
|
||||
os.system(command)
|
||||
|
||||
|
||||
def command_is_running(command: str):
|
||||
for proc in psutil.process_iter():
|
||||
try:
|
||||
cmdline = proc.cmdline()
|
||||
except psutil.NoSuchProcess:
|
||||
continue
|
||||
if command in cmdline[0]:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
def on_reconfigure():
|
||||
run_shell('notify-send newm "Reloaded config"')
|
||||
|
||||
|
||||
def on_startup():
|
||||
run_shell("mpc stop")
|
||||
run_shell("dunst")
|
||||
run_shell("pactl load-module module-switch-on-connect")
|
||||
run_shell("xfce-polkit")
|
||||
run_shell("kdeconnectd")
|
||||
os.system(
|
||||
"systemctl --user import-environment DISPLAY \
|
||||
WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
)
|
||||
os.system(
|
||||
"dbus-update-activation-environment && \
|
||||
dbus-update-activation-environment --systemd DISPLAY \
|
||||
WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
|
||||
)
|
||||
|
||||
|
||||
with open("{}/.cache/wallpaper".format(os.environ["HOME"])) as wp_cache:
|
||||
background = {
|
||||
"path": wp_cache.read().strip(),
|
||||
"anim": True,
|
||||
}
|
||||
|
||||
pywm = {
|
||||
"xkb_layout": "fr",
|
||||
"xkb_variant": "bepo_afnor",
|
||||
"xkb_options": "caps:ctrl_modifier",
|
||||
"enable_xwayland": True,
|
||||
"natural_scroll": False,
|
||||
"focus_follows_mouse": True,
|
||||
"encourage_csd": False,
|
||||
}
|
||||
|
||||
outputs = [
|
||||
{"name": "eDP-1", "mHz": 120_000},
|
||||
{
|
||||
"name": "HDMI-A-1",
|
||||
"pos_x": -2560,
|
||||
"pos_y": 0,
|
||||
"width": 2560,
|
||||
"height": 1080,
|
||||
},
|
||||
]
|
||||
|
||||
wob_runner = WobRunner("wob -a bottom -M 100")
|
||||
backlight_manager = BacklightManager(anim_time=1.0, bar_display=wob_runner)
|
||||
kbdlight_manager = BacklightManager(
|
||||
args="--device='*::kbd_backlight'", anim_time=1.0, bar_display=wob_runner
|
||||
)
|
||||
|
||||
|
||||
def synchronous_update() -> None:
|
||||
backlight_manager.update()
|
||||
kbdlight_manager.update()
|
||||
|
||||
|
||||
def rules(m_view):
|
||||
blur_apps = ("kitty", "wofi", "rofi", "emacsclient", "emacs")
|
||||
float_apps = ("Rofi", "xfce-polkit")
|
||||
nonfloat_apps = ("discord", "Discord")
|
||||
m_rules = {}
|
||||
if m_view.app_id in blur_apps:
|
||||
m_rules.update({"blur": {"radius": 6, "passes": 2}})
|
||||
if m_view.app_id in float_apps:
|
||||
m_rules.update({"float": True})
|
||||
if m_view.app_id in nonfloat_apps:
|
||||
m_rules.update({"float": False})
|
||||
if debug_windows:
|
||||
with open("/tmp/newm_windows.txt", "a", encoding="utf-8") as file:
|
||||
file.write(f"{str(m_view.app_id)}\t{m_rules}\n")
|
||||
return m_rules
|
||||
|
||||
|
||||
pactl = PaCtl(0, wob_runner)
|
||||
|
||||
focus = {
|
||||
"animate_on_change": False,
|
||||
"distance": 6,
|
||||
"width": 2,
|
||||
"color": "#5E81ACDD",
|
||||
"anim_time": 0.1,
|
||||
}
|
||||
|
||||
view = {
|
||||
"corner_radius": 8,
|
||||
"padding": 20,
|
||||
"rules": rules,
|
||||
"floating_min_size": False,
|
||||
}
|
||||
|
||||
|
||||
leader: str = "L-Spc "
|
||||
|
||||
|
||||
def key_bindings(layout: Layout) -> list[tuple[str, Callable[[], Any]]]:
|
||||
return [
|
||||
("L-Return", lambda: os.system("kitty &")),
|
||||
(leader + "a r b", lambda: run_shell("bluetooth-connect")),
|
||||
(
|
||||
leader + "a r r",
|
||||
lambda: run_shell("rofi -combi-modi drun,window -show combi"),
|
||||
),
|
||||
(leader + "a b", lambda: run_shell("firefox")),
|
||||
(leader + "a d", lambda: run_shell("discord")),
|
||||
(leader + "a e", lambda: run_shell("emacsclient -c")),
|
||||
(leader + "l", layout.ensure_locked),
|
||||
(leader + "w f", layout.toggle_fullscreen),
|
||||
(leader + "w v", layout.toggle_focused_view_floating),
|
||||
(leader + "w +", lambda: layout.basic_scale(1)),
|
||||
(leader + "w -", lambda: layout.basic_scale(-1)),
|
||||
("L-o", layout.move_workspace),
|
||||
("L-O", layout.move_workspace),
|
||||
(leader + "w c", lambda: layout.move(-1, 0)),
|
||||
(leader + "w t", lambda: layout.move(0, 1)),
|
||||
(leader + "w s", lambda: layout.move(0, -1)),
|
||||
(leader + "w r", lambda: layout.move(1, 0)),
|
||||
(leader + "w n", lambda: layout.move_in_stack(1)),
|
||||
("L-Tab", lambda: layout.move_in_stack(1)),
|
||||
(leader + "w p", lambda: layout.move_in_stack(-1)),
|
||||
(leader + "w C", lambda: layout.move_focused_view(-1, 0)),
|
||||
(leader + "w T", lambda: layout.move_focused_view(0, 1)),
|
||||
(leader + "w S", lambda: layout.move_focused_view(0, -1)),
|
||||
(leader + "w R", lambda: layout.move_focused_view(1, 0)),
|
||||
(leader + "b d", layout.close_focused_view),
|
||||
(leader + "q l", lambda: layout.ensure_locked(dim=False)),
|
||||
(leader + "q q", layout.terminate),
|
||||
(leader + "u", layout.update_config),
|
||||
("L-c", lambda: layout.move(-1, 0)),
|
||||
("L-t", lambda: layout.move(0, 1)),
|
||||
("L-s", lambda: layout.move(0, -1)),
|
||||
("L-r", lambda: layout.move(1, 0)),
|
||||
("L-plus", lambda: layout.basic_scale(-1)),
|
||||
("L-minus", lambda: layout.basic_scale(1)),
|
||||
("L-C", lambda: layout.move_focused_view(-1, 0)),
|
||||
("L-T", lambda: layout.move_focused_view(0, 1)),
|
||||
("L-S", lambda: layout.move_focused_view(0, -1)),
|
||||
("L-R", lambda: layout.move_focused_view(1, 0)),
|
||||
(leader + "w r c", lambda: layout.resize_focused_view(-1, 0)),
|
||||
(leader + "w r t", lambda: layout.resize_focused_view(0, 1)),
|
||||
(leader + "w r s", lambda: layout.resize_focused_view(0, -1)),
|
||||
(leader + "w r r", lambda: layout.resize_focused_view(1, 0)),
|
||||
("L-", lambda: layout.toggle_overview(only_active_workspace=True)),
|
||||
(
|
||||
"XF86MonBrightnessUp",
|
||||
lambda: backlight_manager.set(backlight_manager.get() + 0.1),
|
||||
),
|
||||
(
|
||||
"XF86MonBrightnessDown",
|
||||
lambda: backlight_manager.set(backlight_manager.get() - 0.1),
|
||||
),
|
||||
(
|
||||
"XF86KbdBrightnessUp",
|
||||
lambda: kbdlight_manager.set(kbdlight_manager.get() + 0.1),
|
||||
),
|
||||
(
|
||||
"XF86KbdBrightnessDown",
|
||||
lambda: kbdlight_manager.set(kbdlight_manager.get() - 0.1),
|
||||
),
|
||||
("XF86AudioPlay", lambda: run_shell("playerctl play-pause")),
|
||||
("XF86AudioPause", lambda: run_shell("playerctl pause")),
|
||||
("XF86AudioStop", lambda: run_shell("playerctl stop")),
|
||||
("XF86AudioPrev", lambda: run_shell("playerctl previous")),
|
||||
("XF86AudioNext", lambda: run_shell("playerctl next")),
|
||||
("XF86AudioForward", lambda: run_shell("playerctl position +1")),
|
||||
("XF86AudioRewind", lambda: run_shell("playerctl position -1")),
|
||||
("XF86AudioRaiseVolume", lambda: pactl.volume_adj(5)),
|
||||
("XF86AudioLowerVolume", lambda: pactl.volume_adj(-5)),
|
||||
("XF86AudioMute", pactl.mute),
|
||||
("Print", lambda: run_shell("env XDG_CURRENT_DESKTOP=Sway flameshot gui")),
|
||||
]
|
||||
|
||||
|
||||
battery_icons = {
|
||||
100: {True: "", False: ""},
|
||||
90: {True: "", False: ""},
|
||||
80: {True: "", False: ""},
|
||||
70: {True: "", False: ""},
|
||||
60: {True: "", False: ""},
|
||||
50: {True: "", False: ""},
|
||||
40: {True: "", False: ""},
|
||||
30: {True: "", False: ""},
|
||||
20: {True: "", False: ""},
|
||||
10: {True: "", False: ""},
|
||||
0: {True: "", False: ""},
|
||||
}
|
||||
|
||||
|
||||
def battery_status() -> str:
|
||||
battery = psutil.sensors_battery()
|
||||
percent = format(battery.percent, ".1f")
|
||||
minutes = battery.secsleft // 60
|
||||
remaining = "{0:0>2}:{1:0>2}".format(minutes // 60, minutes % 60)
|
||||
icon = battery_icons[(int(float(percent)) // 10) * 10][battery.power_plugged]
|
||||
return f"{icon} {percent}% ({remaining})"
|
||||
|
||||
|
||||
def unread_emails() -> str:
|
||||
unread = subprocess.run(
|
||||
["mu", "find", "flag:unread AND (maildir:/Inbox OR maildir:/Junk)"],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
check=True,
|
||||
).stdout
|
||||
nbr_unread: int = len(str(unread).strip().split("\n"))
|
||||
return f" {nbr_unread}"
|
||||
|
||||
|
||||
def cpu_usage() -> str:
|
||||
cpu: str = format(psutil.cpu_percent(interval=1), ".1f")
|
||||
return f" {cpu}%"
|
||||
|
||||
|
||||
def mem_usage() -> str:
|
||||
mem: str = format(psutil.virtual_memory().percent, ".1f")
|
||||
return f" {mem}%"
|
||||
|
||||
|
||||
def get_bluetooth_devices() -> str:
|
||||
import xml.etree.ElementTree as ET
|
||||
|
||||
bus = dbus.SystemBus()
|
||||
service_name = "org.bluez"
|
||||
|
||||
# Verify if bluetooth is turned on
|
||||
proxy = bus.get_object(service_name, "/org/bluez/hci0")
|
||||
props = dbus.Interface(proxy, "org.freedesktop.DBus.Properties")
|
||||
if not props.Get("org.bluez.Adapter1", "Powered"):
|
||||
return ""
|
||||
|
||||
# Grab all known devices
|
||||
bt_intro_iface = dbus.Interface(proxy, "org.freedesktop.DBus.Introspectable")
|
||||
bt_intro = str(bt_intro_iface.Introspect())
|
||||
root_node = ET.fromstring(bt_intro)
|
||||
known_devices = [n.get("name") for n in root_node.findall("node")]
|
||||
|
||||
# Check if all devices are connected
|
||||
counter = 0
|
||||
for device in known_devices:
|
||||
object_path = f"/org/bluez/hci0/{device}"
|
||||
proxy = bus.get_object(service_name, object_path)
|
||||
props = dbus.Interface(proxy, "org.freedesktop.DBus.Properties")
|
||||
if props.Get("org.bluez.Device1", "Connected"):
|
||||
counter = counter + 1
|
||||
return f" {counter}"
|
||||
|
||||
|
||||
def get_wifi_name(iface) -> str:
|
||||
bus = dbus.SystemBus()
|
||||
service_name = "org.freedesktop.NetworkManager"
|
||||
proxy = bus.get_object(service_name, "/org/freedesktop/NetworkManager/Settings")
|
||||
|
||||
# Get the device object path based on interface name
|
||||
proxy = bus.get_object(service_name, "/org/freedesktop/NetworkManager")
|
||||
nm = dbus.Interface(proxy, "org.freedesktop.NetworkManager")
|
||||
devpath = nm.GetDeviceByIpIface(iface)
|
||||
|
||||
# Get a proxy to the wifi device and get the active access point's object path
|
||||
proxy = bus.get_object(service_name, devpath)
|
||||
props = dbus.Interface(proxy, "org.freedesktop.DBus.Properties")
|
||||
active_ap_path = props.Get(
|
||||
"org.freedesktop.NetworkManager.Device.Wireless", "ActiveAccessPoint"
|
||||
)
|
||||
if active_ap_path == "/":
|
||||
return ""
|
||||
|
||||
# Get the active access point's SSID and BSSID
|
||||
ap_proxy = bus.get_object(service_name, active_ap_path)
|
||||
ap_props = dbus.Interface(ap_proxy, "org.freedesktop.DBus.Properties")
|
||||
raw_ssid = ap_props.Get("org.freedesktop.NetworkManager.AccessPoint", "Ssid")
|
||||
ssid = b"".join([bytes([v]) for v in raw_ssid]).decode("utf-8")
|
||||
return ssid
|
||||
|
||||
|
||||
def get_local_address(wifi_iface, eth_iface) -> str:
|
||||
if_addrs = psutil.net_if_addrs()
|
||||
wifi = if_addrs.get(wifi_iface)
|
||||
eth = if_addrs.get(eth_iface)
|
||||
wifi_addr = wifi[0].address if wifi else ""
|
||||
eth_addr = eth[0].address if eth else ""
|
||||
wifi_addr = wifi_addr if not ":" in wifi_addr else ""
|
||||
eth_addr = eth_addr if not ":" in eth_addr else ""
|
||||
return wifi_addr or eth_addr
|
||||
|
||||
|
||||
def get_network() -> str:
|
||||
wifi_interface = "wlp8s0"
|
||||
eth_interface = "enp9s0f1"
|
||||
network_name = get_wifi_name(wifi_interface)
|
||||
network_name = f" {network_name}" if network_name else " eth"
|
||||
addr = get_local_address(wifi_interface, eth_interface)
|
||||
return f"{network_name} ({addr})" if addr else "睊 disconnected"
|
||||
|
||||
|
||||
def get_playerctl_bus():
|
||||
bus = dbus.SessionBus()
|
||||
service_name = "org.mpris.MediaPlayer2.playerctld"
|
||||
service_props = "org.mpris.MediaPlayer2.Player"
|
||||
proxy = bus.get_object(service_name, "/org/mpris/MediaPlayer2")
|
||||
return (service_props, proxy)
|
||||
|
||||
|
||||
def get_currently_playing():
|
||||
(service_props, proxy) = get_playerctl_bus()
|
||||
props = dbus.Interface(proxy, "org.freedesktop.DBus.Properties")
|
||||
metadata = props.Get(service_props, "Metadata")
|
||||
status = str(props.Get(service_props, "PlaybackStatus"))
|
||||
if status != "Playing":
|
||||
return ""
|
||||
artist = ", ".join(metadata.get("xesam:artist"))
|
||||
title = metadata.get("xesam:title")
|
||||
return f" {artist} — {title}"
|
||||
|
||||
|
||||
def display_docker() -> str:
|
||||
containers = docker_client.containers.list(sparse=True)
|
||||
return f" {len(containers)}"
|
||||
|
||||
|
||||
def get_time() -> str:
|
||||
return time.strftime("%a %Y-%m-%d %X")
|
||||
|
||||
|
||||
def bar_text() -> str:
|
||||
return " | ".join(
|
||||
[
|
||||
f
|
||||
for f in [
|
||||
get_currently_playing(),
|
||||
# get_network(),
|
||||
display_docker(),
|
||||
# get_bluetooth_devices(),
|
||||
unread_emails(),
|
||||
cpu_usage(),
|
||||
mem_usage(),
|
||||
get_time(),
|
||||
battery_status(),
|
||||
]
|
||||
if f
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
def max_width(strings: list[str]) -> int:
|
||||
r_max_width: int = 0
|
||||
for s in strings:
|
||||
if len(s) > r_max_width:
|
||||
r_max_width = len(s)
|
||||
return r_max_width
|
||||
|
||||
|
||||
panels = {
|
||||
"lock": {
|
||||
"cmd": "kitty -e newm-panel-basic lock",
|
||||
},
|
||||
"launcher": {"cmd": "kitty -e newm-panel-basic launcher"},
|
||||
"top_bar": {
|
||||
"native": {
|
||||
"font": "JetBrainsMono Nerd Font",
|
||||
"enabled": True,
|
||||
"texts": lambda: [
|
||||
bar_text(),
|
||||
],
|
||||
},
|
||||
},
|
||||
"bottom_bar": {
|
||||
"native": {
|
||||
"enabled": False,
|
||||
"texts": lambda: ["newm", "powered by pywm"],
|
||||
"color": (0.5, 0.5, 0.5, 0.1),
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
energy = {
|
||||
"idle_callback": backlight_manager.callback,
|
||||
"idle_times": [5 * 60, 30 * 60, 24 * 60 * 60],
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
# pylint: disable=C0111
|
||||
from qutebrowser.config.configfiles import ConfigAPI # noqa: F401
|
||||
from qutebrowser.config.config import ConfigContainer # noqa: F401
|
||||
config: ConfigAPI = config # noqa: F821 pylint: disable=E0602,C0103
|
||||
c: ConfigContainer = c # noqa: F821 pylint: disable=E0602,C0103
|
||||
|
||||
# Number of commands to save in the command history. 0: no history / -1:
|
||||
# unlimited
|
||||
# Type: Int
|
||||
c.completion.cmd_history_max_items = 200
|
||||
|
||||
# Delay (in milliseconds) before updating completions after typing a
|
||||
# character.
|
||||
# Type: Int
|
||||
c.completion.delay = 150
|
||||
|
||||
# Default filesystem autocomplete suggestions for :open. The elements of
|
||||
# this list show up in the completion window under the Filesystem
|
||||
# category when the command line contains `:open` but no argument.
|
||||
# Type: List of String
|
||||
c.completion.favorite_paths = []
|
||||
|
||||
# Height (in pixels or as percentage of the window) of the completion.
|
||||
# Type: PercOrInt
|
||||
c.completion.height = '33%'
|
||||
|
||||
# Minimum amount of characters needed to update completions.
|
||||
# Type: Int
|
||||
c.completion.min_chars = 2
|
||||
|
||||
# Which categories to show (in which order) in the :open completion.
|
||||
# Type: FlagList
|
||||
# Valid values:
|
||||
# - searchengines
|
||||
# - quickmarks
|
||||
# - bookmarks
|
||||
# - history
|
||||
# - filesystem
|
||||
c.completion.open_categories = [
|
||||
'searchengines',
|
||||
'quickmarks',
|
||||
'bookmarks',
|
||||
'history',
|
||||
'filesystem'
|
||||
]
|
||||
|
||||
# Move on to the next part when there's only one possible completion
|
||||
# left.
|
||||
# Type: Bool
|
||||
c.completion.quick = True
|
||||
|
||||
# Padding (in pixels) of the scrollbar handle in the completion window.
|
||||
# Type: Int
|
||||
c.completion.scrollbar.padding = 1
|
||||
|
||||
# Width (in pixels) of the scrollbar in the completion window.
|
||||
# Type: Int
|
||||
c.completion.scrollbar.width = 5
|
||||
|
||||
# When to show the autocompletion window.
|
||||
# Type: String
|
||||
# Valid values:
|
||||
# - always: Whenever a completion is available.
|
||||
# - auto: Whenever a completion is requested.
|
||||
# - never: Never.
|
||||
c.completion.show = 'always'
|
||||
|
||||
# Shrink the completion to be smaller than the configured size if there
|
||||
# are no scrollbars.
|
||||
# Type: Bool
|
||||
c.completion.shrink = True
|
||||
|
||||
# Format of timestamps (e.g. for the history completion). See
|
||||
# https://sqlite.org/lang_datefunc.html and
|
||||
# https://docs.python.org/3/library/datetime.html#strftime-strptime-
|
||||
# behavior for allowed substitutions, qutebrowser uses both sqlite and
|
||||
# Python to format its timestamps.
|
||||
# Type: String
|
||||
c.completion.timestamp_format = '%Y-%m-%d %H:%M'
|
||||
|
||||
# Execute the best-matching command on a partial match.
|
||||
# Type: Bool
|
||||
c.completion.use_best_match = True
|
||||
|
||||
# A list of patterns which should not be shown in the history. This only
|
||||
# affects the completion. Matching URLs are still saved in the history
|
||||
# (and visible on the `:history` page), but hidden in the completion.
|
||||
# Changing this setting will cause the completion history to be
|
||||
# regenerated on the next start, which will take a short while.
|
||||
# Type: List of UrlPattern
|
||||
c.completion.web_history.exclude = []
|
||||
|
||||
# Number of URLs to show in the web history. 0: no history / -1:
|
||||
# unlimited
|
||||
# Type: Int
|
||||
c.completion.web_history.max_items = -1
|
@ -1,45 +0,0 @@
|
||||
# pylint: disable=C0111
|
||||
|
||||
# This is here so configs done via the GUI are still loaded.
|
||||
# Remove it to not load settings done via the GUI.
|
||||
config.load_autoconfig(False)
|
||||
|
||||
# Aliases for commands. The keys of the given dictionary are the
|
||||
# aliases, while the values are the commands they map to.
|
||||
# Type: Dict
|
||||
c.aliases = {
|
||||
'w': 'session-save',
|
||||
'q': 'close',
|
||||
'qa': 'quit',
|
||||
'wq': 'quit --save',
|
||||
'wqa': 'quit --save'
|
||||
}
|
||||
|
||||
# Time interval (in milliseconds) between auto-saves of
|
||||
# config/cookies/etc.
|
||||
# Type: Int
|
||||
c.auto_save.interval = 15000
|
||||
|
||||
# Enable smooth scrolling for web pages. Note smooth scrolling does not
|
||||
# work with the `:scroll-px` command.
|
||||
# Type: Bool
|
||||