Compare commits

...

4 commits

Author SHA1 Message Date
xeruf
a817833f66 Adjust setup for Mac compatibility 2025-07-09 01:38:19 +02:00
xeruf
aee439343e config/k9s: stackspin config 2025-06-08 12:22:40 +02:00
xeruf
c6ae684aa7 commit updates 2025-06-08 12:15:07 +02:00
xeruf
5255212796 config/doom: small modernisations 2025-05-28 14:33:39 +02:00
58 changed files with 1352 additions and 443 deletions

8
.asoundrc Normal file
View file

@ -0,0 +1,8 @@
pcm.!default {
type pulse
fallback "sysdefault"
hint.description "PulseAudio Sound Server"
}
ctl.!default {
type pulse
}

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<preferences xmlns='http://josm.openstreetmap.de/preferences-1.0' version='18463'> <preferences xmlns='http://josm.openstreetmap.de/preferences-1.0' version='18822'>
<tag key='cache.capabilities1637351842' value='1660595298'/> <tag key='cache.capabilities1637351842' value='1704276020'/>
<tag key='cache.motd.html' value='1660595299'/> <tag key='cache.motd.html' value='1703185778'/>
<tag key='cache.motd.html.java' value='11.0.16'/> <tag key='cache.motd.html.java' value='1.8.0_392'/>
<tag key='cache.motd.html.lang' value='En:'/> <tag key='cache.motd.html.lang' value='En:'/>
<tag key='cache.motd.html.version' value='18463'/> <tag key='cache.motd.html.version' value='18822'/>
<tag key='changeset.lastHeight' value='0'/> <tag key='changeset.lastHeight' value='0'/>
<tag key='changesetdialog.lastHeight' value='0'/> <tag key='changesetdialog.lastHeight' value='0'/>
<tag key='commandstack.lastHeight' value='0'/> <tag key='commandstack.lastHeight' value='0'/>
@ -12,8 +12,22 @@
<tag key='conflict.minimized' value='true'/> <tag key='conflict.minimized' value='true'/>
<tag key='conflict.visible' value='true'/> <tag key='conflict.visible' value='true'/>
<tag key='download.osm.notes' value='true'/> <tag key='download.osm.notes' value='true'/>
<list key='download.places.history'>
<entry value='mombasa'/>
<entry value='kerugoya'/>
<entry value='longonot'/>
<entry value='Ponta do Sol'/>
<entry value='Ponte do Sol'/>
<entry value='Funchal'/>
<entry value='Madeira'/>
<entry value='Nablus'/>
</list>
<tag key='expert' value='true'/> <tag key='expert' value='true'/>
<list key='file-open.history'> <list key='file-open.history'>
<entry value='/home/janek/data/4-media/osm/KENYA.osm'/>
<entry value='/home/janek/data/4-media/osm/PT-madeira.osm'/>
<entry value='/home/janek/data/4-media/osm/BAV-bayreuth.osm'/>
<entry value='/home/janek/data/4-media/osm/IS.osm'/>
<entry value='/home/janek/data/4-media/osm/MV-Ruegen.osm'/> <entry value='/home/janek/data/4-media/osm/MV-Ruegen.osm'/>
<entry value='/home/janek/data/4-media/osm/BY-bayreuth.osm'/> <entry value='/home/janek/data/4-media/osm/BY-bayreuth.osm'/>
<entry value='/home/janek/data/2-standards/osm/BY-bayreuth.osm'/> <entry value='/home/janek/data/2-standards/osm/BY-bayreuth.osm'/>
@ -25,16 +39,12 @@
<entry value='/home/janek/data/2-standards/osm/SN-saxony.jos'/> <entry value='/home/janek/data/2-standards/osm/SN-saxony.jos'/>
<entry value='/home/janek/data/2-standards/osm/SN-vogtland.osm'/> <entry value='/home/janek/data/2-standards/osm/SN-vogtland.osm'/>
<entry value='/home/janek/data/2-standards/osm/tracks/rec/2021-07-31_06-40_Sat_Hof-Auerbach.gpx'/> <entry value='/home/janek/data/2-standards/osm/tracks/rec/2021-07-31_06-40_Sat_Hof-Auerbach.gpx'/>
<entry value='/home/janek/data/2-standards/osm/BY-forchheim.osm'/>
<entry value='/home/janek/data/2-standards/osm/BY-siegritz.osm'/>
<entry value='/home/janek/data/2-standards/osm/BY-siegritz.osn'/>
<entry value='/home/janek/data/2-standards/osm/haeusling.osm'/>
</list> </list>
<tag key='filter.lastHeight' value='0'/> <tag key='filter.lastHeight' value='0'/>
<tag key='geoimage.docked' value='false'/> <tag key='geoimage.docked' value='false'/>
<tag key='geoimage.geometry' value='x=690,y=413,width=540,height=249'/> <tag key='geoimage.geometry' value='x=690,y=413,width=540,height=249'/>
<tag key='geoimage.lastHeight' value='200'/> <tag key='geoimage.lastHeight' value='200'/>
<tag key='gui.geometry' value='x=0,y=-5,width=960,height=1085'/> <tag key='gui.geometry' value='x=0,y=30,width=2256,height=1474'/>
<tag key='gui.maximized' value='true'/> <tag key='gui.maximized' value='true'/>
<maps key='imagery.entries'> <maps key='imagery.entries'>
<map> <map>
@ -107,28 +117,9 @@
<tag key='customHttpHeaders' value='{}'/> <tag key='customHttpHeaders' value='{}'/>
<tag key='category' value='photo'/> <tag key='category' value='photo'/>
</map> </map>
<map>
<tag key='max-zoom' value='22'/>
<tag key='noTileChecksums' value='{&quot;MD5&quot;:[&quot;08d6916814b216570e5241732c41d5e5&quot;]}'/>
<tag key='valid-georeference' value='true'/>
<tag key='transparent' value='true'/>
<tag key='minimumTileExpire' value='3600'/>
<tag key='name' value='Maxar Premium Imagery'/>
<tag key='id' value='Maxar-Premium'/>
<tag key='type' value='tms'/>
<tag key='url' value='https://services.digitalglobe.com/earthservice/tmsaccess/tms/1.0.0/DigitalGlobe:ImageryTileService@EPSG:3857@jpg/{zoom}/{x}/{-y}.jpg?connectId={apikey}'/>
<tag key='attribution-text' value='Terms &amp; Feedback'/>
<tag key='attribution-url' value='https://wiki.openstreetmap.org/wiki/DigitalGlobe'/>
<tag key='cookies' value=''/>
<tag key='icon' value='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEX9sBz3qx3GjiO6hyWZcyo+PDY6OjcXiwAvAAAA50lEQVR42s2TwQ3CMAxFv5kgBwZAFRuUBYrUCUiyQbv/CMT0W64bOHBrTlGeXvxtJVh/LJwXLKVUOyi6N/AchjtJHtrewHIDZN7AC8Cl7gCu9Sug0oNEpQGJhlDpr6ISwDoJEqtEkPV4U/I4jg/vfAJApbRlQBVhsDArKhbMABUGO4LFgkVAhVUcxCo9SKzSXyVUDHiLQiXG1VhUYoO6kivwsAIP5kMUPUxUCHwgPmQCPUgic06fC6/+rjgOZji8EpkZIgDW1CEjgqQCG41XqaDK0VCByg7YN7A94/Kz2Gr7eorv/Bd4A5pJU8mYQ1uTAAAAAElFTkSuQmCC'/>
<tag key='description' value='Maxar Premium is a mosaic composed of Maxar basemap with select regions filled with +Vivid or custom area of interest imagery, 50cm resolution or better, and refreshed more frequently with ongoing updates.'/>
<tag key='customHttpHeaders' value='{}'/>
<tag key='category' value='photo'/>
</map>
<map> <map>
<tag key='max-zoom' value='19'/> <tag key='max-zoom' value='19'/>
<tag key='valid-georeference' value='true'/> <tag key='valid-georeference' value='true'/>
<tag key='modTileFeatures' value='true'/>
<tag key='transparent' value='true'/> <tag key='transparent' value='true'/>
<tag key='minimumTileExpire' value='3600'/> <tag key='minimumTileExpire' value='3600'/>
<tag key='name' value='OpenStreetMap Carto (Standard)'/> <tag key='name' value='OpenStreetMap Carto (Standard)'/>
@ -149,15 +140,14 @@
<entry value='EsriWorldImagery'/> <entry value='EsriWorldImagery'/>
<entry value='EsriWorldImageryClarity'/> <entry value='EsriWorldImageryClarity'/>
<entry value='Mapbox'/> <entry value='Mapbox'/>
<entry value='Maxar-Premium'/>
<entry value='standard'/> <entry value='standard'/>
</list> </list>
<maps key='imagery.offsetbookmarks'> <maps key='imagery.offsetbookmarks'>
</maps> </maps>
<tag key='iodb.modify.toolbar' value='false'/> <tag key='iodb.modify.toolbar' value='false'/>
<tag key='josm.version' value='18463'/> <tag key='josm.version' value='18822'/>
<tag key='lastDirectory' value='/home/janek/data/4-media/osm'/> <tag key='lastDirectory' value='/home/janek/data/4-media/osm'/>
<tag key='layerlist.lastHeight' value='138'/> <tag key='layerlist.lastHeight' value='226'/>
<tag key='mappaint.renderer-class-name' value='org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer'/> <tag key='mappaint.renderer-class-name' value='org.openstreetmap.josm.data.osm.visitor.paint.StyledMapRenderer'/>
<list key='mappaint.style.known-defaults'> <list key='mappaint.style.known-defaults'>
<entry value='resource://styles/standard/elemstyles.mapcss'/> <entry value='resource://styles/standard/elemstyles.mapcss'/>
@ -166,6 +156,8 @@
<tag key='mapstyle.lastHeight' value='0'/> <tag key='mapstyle.lastHeight' value='0'/>
<tag key='message.delete_relations' value='false'/> <tag key='message.delete_relations' value='false'/>
<tag key='message.delete_relations.value' value='0'/> <tag key='message.delete_relations.value' value='0'/>
<tag key='message.overwriteAddKey' value='false'/>
<tag key='message.overwriteAddKey.value' value='1'/>
<tag key='minimap.lastHeight' value='0'/> <tag key='minimap.lastHeight' value='0'/>
<list key='mirror./home/janek/.cache/JOSM/images.https://josm.openstreetmap.de/browser/trunk/resources/images/cancel.svg?format_raw'> <list key='mirror./home/janek/.cache/JOSM/images.https://josm.openstreetmap.de/browser/trunk/resources/images/cancel.svg?format_raw'>
<entry value='1623789870975'/> <entry value='1623789870975'/>
@ -179,13 +171,21 @@
<entry value='1623789870903'/> <entry value='1623789870903'/>
<entry value='/home/janek/.cache/JOSM/images/mirror_https___josm.openstreetmap.de_browser_trunk_resources_images_ok.svg_format_raw'/> <entry value='/home/janek/.cache/JOSM/images/mirror_https___josm.openstreetmap.de_browser_trunk_resources_images_ok.svg_format_raw'/>
</list> </list>
<list key='mirror./home/janek/.cache/JOSM/images.https://map.valentim.org/favicon.png'>
<entry value='1699812707933'/>
<entry value='/home/janek/.cache/JOSM/images/mirror_https___map.valentim.org_favicon.png'/>
</list>
<list key='mirror./home/janek/.local/cache/JOSM/images.https://geoportal.bayern.de/bayernatlas/favicon/favicon-32x32.png'> <list key='mirror./home/janek/.local/cache/JOSM/images.https://geoportal.bayern.de/bayernatlas/favicon/favicon-32x32.png'>
<entry value='1633952469206'/> <entry value='1633952469206'/>
<entry value='/home/janek/.local/cache/JOSM/images/mirror_https___geoportal.bayern.de_bayernatlas_favicon_favicon-32x32.png'/> <entry value='/home/janek/.local/cache/JOSM/images/mirror_https___geoportal.bayern.de_bayernatlas_favicon_favicon-32x32.png'/>
</list> </list>
<list key='mirror./home/janek/.local/cache/JOSM/images.https://israelhiking.osm.org.il/content/favicons/favicon.ico'>
<entry value='1674922283434'/>
<entry value='/home/janek/.local/cache/JOSM/images/mirror_https___israelhiking.osm.org.il_content_favicons_favicon.ico'/>
</list>
<list key='mirror.https://josm.openstreetmap.de/maps'> <list key='mirror.https://josm.openstreetmap.de/maps'>
<entry value='1660595302989'/> <entry value='1703185930408'/>
<entry value='/home/janek/.local/cache/JOSM/mirror_https___josm.openstreetmap.de_maps'/> <entry value='/home/janek/.cache/JOSM/mirror_https___josm.openstreetmap.de_maps'/>
</list> </list>
<list key='mirror.https://josm.openstreetmap.de/presets'> <list key='mirror.https://josm.openstreetmap.de/presets'>
<entry value='1635460787084'/> <entry value='1635460787084'/>
@ -196,76 +196,56 @@
<entry value='/home/janek/.local/cache/JOSM/mirror_https___josm.openstreetmap.de_proj_BETA2007.gsb'/> <entry value='/home/janek/.local/cache/JOSM/mirror_https___josm.openstreetmap.de_proj_BETA2007.gsb'/>
</list> </list>
<list key='mirror.https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json'> <list key='mirror.https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json'>
<entry value='1660595299798'/> <entry value='1703185778624'/>
<entry value='/home/janek/.local/cache/JOSM/mirror_https___josm.openstreetmap.de_remote_geofabrik-index-v1-nogeom.json'/> <entry value='/home/janek/.cache/JOSM/mirror_https___josm.openstreetmap.de_remote_geofabrik-index-v1-nogeom.json'/>
</list> </list>
<list key='mirror.https://josm.openstreetmap.de/tested'> <list key='mirror.https://josm.openstreetmap.de/tested'>
<entry value='1633952185297'/> <entry value='1633952185297'/>
<entry value='/home/janek/.local/cache/JOSM/mirror_https___josm.openstreetmap.de_tested'/> <entry value='/home/janek/.local/cache/JOSM/mirror_https___josm.openstreetmap.de_tested'/>
</list> </list>
<tag key='notes/note_open.lastHeight' value='187'/> <tag key='notes/note_open.lastHeight' value='275'/>
<tag key='notes/note_open.visible' value='true'/> <tag key='notes/note_open.visible' value='true'/>
<tag key='oauth.access-token.key' value='YGtDqRUspIjinRFJwYJhzSDbOWSHeCfJRYsstgtu'/> <tag key='oauth.access-token.key' value='YGtDqRUspIjinRFJwYJhzSDbOWSHeCfJRYsstgtu'/>
<tag key='oauth.access-token.secret' value='DqACmTu5PcW1k94TrGZIF4XaPqbUy2SMxPTyjcEa'/> <tag key='oauth.access-token.secret' value='DqACmTu5PcW1k94TrGZIF4XaPqbUy2SMxPTyjcEa'/>
<tag key='org.openstreetmap.josm.actions.OpenLocationAction.geometry' value='x=778,y=425,width=363,height=225'/> <tag key='oauth.use-for-all-requests' value='false'/>
<tag key='org.openstreetmap.josm.actions.OpenLocationAction.geometry' value='x=382,y=278,width=363,height=225'/>
<tag key='org.openstreetmap.josm.gui.NoteInputDialog.geometry' value='x=760,y=387,width=400,height=300'/> <tag key='org.openstreetmap.josm.gui.NoteInputDialog.geometry' value='x=760,y=387,width=400,height=300'/>
<tag key='org.openstreetmap.josm.gui.dialogs.properties.TagEditHelper$AddTagsDialog.geometry' value='x=746,y=441,width=918,height=470'/> <tag key='org.openstreetmap.josm.gui.dialogs.properties.TagEditHelper$AddTagsDialog.geometry' value='x=669,y=556,width=918,height=421'/>
<tag key='org.openstreetmap.josm.gui.dialogs.properties.TagEditHelper$EditTagDialog.geometry' value='x=814,y=428,width=801,height=212'/> <tag key='org.openstreetmap.josm.gui.dialogs.properties.TagEditHelper$EditTagDialog.geometry' value='x=727,y=685,width=801,height=163'/>
<tag key='org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor.geometry' value='x=610,y=212,width=700,height=650'/> <tag key='org.openstreetmap.josm.gui.dialogs.relation.GenericRelationEditor.geometry' value='x=778,y=442,width=700,height=650'/>
<tag key='org.openstreetmap.josm.gui.download.DownloadDialog.geometry' value='x=460,y=233,width=1000,height=600'/> <tag key='org.openstreetmap.josm.gui.download.DownloadDialog.geometry' value='x=623,y=467,width=1010,height=600'/>
<tag key='org.openstreetmap.josm.gui.help.HelpBrowser.geometry' value='x=0,y=-13,width=960,height=1093'/> <tag key='org.openstreetmap.josm.gui.help.HelpBrowser.geometry' value='x=0,y=-13,width=960,height=1093'/>
<tag key='org.openstreetmap.josm.gui.io.UploadDialog.geometry' value='x=386,y=330,width=800,height=600'/> <tag key='org.openstreetmap.josm.gui.io.UploadDialog.geometry' value='x=728,y=467,width=800,height=600'/>
<tag key='org.openstreetmap.josm.gui.oauth.OAuthAuthorizationWizard.geometry' value='x=590,y=314,width=739,height=438'/> <tag key='org.openstreetmap.josm.gui.oauth.OAuthAuthorizationWizard.geometry' value='x=590,y=314,width=739,height=438'/>
<tag key='org.openstreetmap.josm.gui.preferences.PreferenceDialog.geometry' value='x=357,y=99,width=1001,height=811'/> <tag key='org.openstreetmap.josm.gui.preferences.PreferenceDialog.geometry' value='x=627,y=391,width=1001,height=752'/>
<tag key='osm-download.bounds' value='54.5625077;13.1588745;54.6770072;13.3950806'/> <tag key='osm-download.bounds' value='-4.0256428;39.7270551;-3.9959636;39.7456188'/>
<tag key='osm-server.auth-method' value='oauth'/>
<tag key='osm-server.upload-strategy' value='singlerequest'/>
<tag key='plugin.continuos_download.max_area' value='0.004'/> <tag key='plugin.continuos_download.max_area' value='0.004'/>
<tag key='plugin.continuos_download.max_areas' value='2'/> <tag key='plugin.continuos_download.max_areas' value='2'/>
<tag key='pluginmanager.lastupdate' value='1658813943390'/> <tag key='pluginmanager.lastupdate' value='1703185770809'/>
<tag key='pluginmanager.version' value='18463'/> <tag key='pluginmanager.time-based-update.policy' value='always'/>
<tag key='pluginmanager.version' value='18822'/>
<tag key='pluginmanager.version-based-update.policy' value='always'/> <tag key='pluginmanager.version-based-update.policy' value='always'/>
<list key='plugins'> <list key='plugins'>
<entry value='FastDraw'/>
<entry value='auto_tools'/> <entry value='auto_tools'/>
<entry value='buildings_tools'/>
<entry value='changeset-viewer'/>
<entry value='continuosDownload'/>
<entry value='imagery_offset_db'/> <entry value='imagery_offset_db'/>
<entry value='jts'/> <entry value='jts'/>
<entry value='changeset-viewer'/> <entry value='libphonenumber'/>
<entry value='turnlanes'/>
<entry value='FastDraw'/>
<entry value='continuosDownload'/>
<entry value='utilsplugin2'/>
<entry value='openvisible'/> <entry value='openvisible'/>
<entry value='phonenumber'/>
<entry value='turnlanes'/>
<entry value='undelete'/> <entry value='undelete'/>
<entry value='buildings_tools'/> <entry value='utilsplugin2'/>
<entry value='wikipedia'/> <entry value='wikipedia'/>
</list> </list>
<tag key='preferences.reset.draw.rawgps.lines' value='true'/> <tag key='preferences.reset.draw.rawgps.lines' value='true'/>
<tag key='progressdialog.size' value='229'/> <tag key='progressdialog.size' value='385'/>
<list key='properties.recent-tags'> <list key='properties.recent-tags'>
<entry value='man_made'/>
<entry value='watermill'/>
<entry value='disused'/>
<entry value='yes'/>
<entry value='watermill:disused'/>
<entry value='yes'/>
<entry value='description'/>
<entry value='einstige Wasserversorgung Siegritz'/>
<entry value='year_of_construction'/>
<entry value='1871'/>
<entry value='start_date'/>
<entry value='1871'/>
<entry value='note'/>
<entry value='naturbelassen, ggf. Bäume im Weg'/>
<entry value='height'/>
<entry value='8'/>
<entry value='source:height'/>
<entry value='survey'/>
<entry value='height'/>
<entry value='5'/>
<entry value='fixme'/>
<entry value='5'/>
<entry value='fixme'/>
<entry value='continue'/>
<entry value='incline'/>
<entry value='up'/>
<entry value='steepness'/> <entry value='steepness'/>
<entry value='steep'/> <entry value='steep'/>
<entry value='barrier'/> <entry value='barrier'/>
@ -278,8 +258,6 @@
<entry value='lounger'/> <entry value='lounger'/>
<entry value='drinking_water'/> <entry value='drinking_water'/>
<entry value='yes'/> <entry value='yes'/>
<entry value='highway'/>
<entry value='track'/>
<entry value='bicycle'/> <entry value='bicycle'/>
<entry value='no'/> <entry value='no'/>
<entry value='url'/> <entry value='url'/>
@ -300,14 +278,43 @@
<entry value='footway'/> <entry value='footway'/>
<entry value='access'/> <entry value='access'/>
<entry value='yes'/> <entry value='yes'/>
<entry value='facebook'/>
<entry value='https://www.facebook.com/wardnablusrestaurant/'/>
<entry value='facebook'/>
<entry value='https://www.facebook.com/wardelshamcafe/'/>
<entry value='sac_scale'/>
<entry value='demanding_alpine_hiking'/>
<entry value='trail_visibility'/>
<entry value='bad'/>
<entry value='note'/>
<entry value='There was supposedly a staircase downwards here, but everything is overgrown, no way'/>
<entry value='note'/>
<entry value='Roughly drawn from memory'/>
<entry value='sac_scale'/>
<entry value='demanding_mountain_hiking'/>
<entry value='note'/>
<entry value='Roughly drawn from memory. There is a refreshing natural waterfall along the way'/>
<entry value='surface'/>
<entry value='grass'/>
<entry value='highway'/>
<entry value='track'/>
<entry value='highway'/>
<entry value='tertiary'/>
<entry value='smoothness'/>
<entry value='bad'/>
<entry value='smoothness'/>
<entry value='intermediate'/>
<entry value='surface'/>
<entry value='asphalt'/>
</list> </list>
<tag key='propertiesdialog.lastHeight' value='188'/> <tag key='propertiesdialog.lastHeight' value='276'/>
<tag key='relationlist.lastHeight' value='0'/> <tag key='relationlist.lastHeight' value='0'/>
<tag key='relationlist.visible' value='false'/> <tag key='relationlist.visible' value='false'/>
<list key='search.history'> <list key='search.history'>
<entry value='R Hinter der Kirche 13a'/>
<entry value='R modified'/> <entry value='R modified'/>
</list> </list>
<tag key='selectionlist.lastHeight' value='188'/> <tag key='selectionlist.lastHeight' value='276'/>
<list key='shortcut.entry.core:movedown'> <list key='shortcut.entry.core:movedown'>
<entry value='Move objects down'/> <entry value='Move objects down'/>
<entry value='40'/> <entry value='40'/>
@ -389,9 +396,9 @@
<entry value='false'/> <entry value='false'/>
<entry value='true'/> <entry value='true'/>
</list> </list>
<tag key='simplify-way.max-error' value='2.0'/> <tag key='simplify-way.max-error' value='1.0'/>
<tag key='sourcetag.value' value='local_knowledge'/> <tag key='sourcetag.value' value='maxar'/>
<tag key='toggleDialogs.width' value='712'/> <tag key='toggleDialogs.width' value='379'/>
<list key='toolbar'> <list key='toolbar'>
<entry value='open'/> <entry value='open'/>
<entry value='save'/> <entry value='save'/>
@ -428,11 +435,20 @@
</list> </list>
<tag key='turnlanes.png.lastHeight' value='0'/> <tag key='turnlanes.png.lastHeight' value='0'/>
<list key='upload.comment.history'> <list key='upload.comment.history'>
<entry value='Mombasa Roads simplification'/>
<entry value='Mombasa Road qualities'/>
<entry value=''/>
<entry value='Kerugoyah street checks'/>
<entry value='Gase Förster'/>
<entry value='nablus: cafe alsham'/>
<entry value='Edit Kreptitzer paths'/> <entry value='Edit Kreptitzer paths'/>
</list> </list>
<tag key='upload.comment.last-used' value='1660600244'/> <tag key='upload.comment.last-used' value='1704732893'/>
<list key='upload.source.history'> <list key='upload.source.history'>
<entry value='survey'/> <entry value='survey'/>
<entry value='Notes'/>
<entry value=''/>
<entry value='https://www.11880.com/branchenbuch/bayreuth/252211874B26425827/foerster-werner.html'/>
</list> </list>
<tag key='upload.source.obtainautomatically' value='true'/> <tag key='upload.source.obtainautomatically' value='true'/>
<tag key='userlist.lastHeight' value='0'/> <tag key='userlist.lastHeight' value='0'/>
@ -451,7 +467,7 @@
<entry value='Browse element [demo, =Ctrl-Shift-I]'/> <entry value='Browse element [demo, =Ctrl-Shift-I]'/>
<entry value='https://www.openstreetmap.org/{#type}/{#id}'/> <entry value='https://www.openstreetmap.org/{#type}/{#id}'/>
</list> </list>
<tag key='validator.lastHeight' value='188'/> <tag key='validator.lastHeight' value='276'/>
<list key='validator.skip'> <list key='validator.skip'>
</list> </list>
<list key='validator.skipBeforeUpload'> <list key='validator.skipBeforeUpload'>

View file

@ -23,6 +23,7 @@
"mainColor": "#633738", "mainColor": "#633738",
"miniBreakColor": "#478484", "miniBreakColor": "#478484",
"transparentMode": false, "transparentMode": false,
"blurredBackground": false,
"opacity": 0.8, "opacity": 0.8,
"audio": "crystal-glass", "audio": "crystal-glass",
"miniBreakAudio": "crystal-glass", "miniBreakAudio": "crystal-glass",
@ -467,6 +468,11 @@
"appExclusionsCheckInterval": 1000, "appExclusionsCheckInterval": 1000,
"pauseForSuspendOrLock": true, "pauseForSuspendOrLock": true,
"pauseBreaksToggleShortcut": "", "pauseBreaksToggleShortcut": "",
"pauseBreaksFor30MinutesShortcut": "",
"pauseBreaksFor1HourShortcut": "",
"pauseBreaksFor2HoursShortcut": "",
"pauseBreaksFor5HoursShortcut": "",
"pauseBreaksUntilMorningShortcut": "",
"screen": "primary", "screen": "primary",
"timeToBreakInTray": false, "timeToBreakInTray": false,
"currentTimeInBreaks": false, "currentTimeInBreaks": false,
@ -475,11 +481,12 @@
"skipToNextMiniBreakShortcut": "", "skipToNextMiniBreakShortcut": "",
"skipToNextLongBreakShortcut": "", "skipToNextLongBreakShortcut": "",
"resetBreaksShortcut": "", "resetBreaksShortcut": "",
"showTrayMenuInStrictMode": false,
"pauseBreaksShortcut": "", "pauseBreaksShortcut": "",
"resumeBreaksShortcut": "", "resumeBreaksShortcut": "",
"__internal__": { "__internal__": {
"migrations": { "migrations": {
"version": "1.15.1" "version": "1.17.2"
} }
} }
} }

View file

@ -1,6 +1,12 @@
Convert the following contact details into carddav format importable by nextcloud. Convert the following contact details into a carddav format compatible with nextcloud.
A blank line separates another contact. Output only the raw vcard without markup without backticks.
Output one long file.
Ensure that TYPE= is used for TEL. Always include TYPE= for TEL.
Convert phone numbers into E.123 international notation defaulting to Germany +49 as national prefix. Convert phone numbers into E.123 international notation defaulting to Germany +49 as national prefix.
Ignore fax numbers and post boxes.
Put extra information such as opening hours into notes.
Use LANG field if appropriate.
Assign a "Services" category for organizations and healthcare providers.
Create a unique UID. Create a unique UID.

View file

@ -2,39 +2,88 @@ PrefsVersion=1.1.1r1
TEST=1 TEST=1
MenuBar=File,Edit,Select,View,Transport,Tracks,Generate,Effect,Analyze,Tools,Optional,Help MenuBar=File,Edit,Select,View,Transport,Tracks,Generate,Effect,Analyze,Tools,Optional,Help
AudioTimeFormat=hh:mm:ss AudioTimeFormat=hh:mm:ss
Importers=PCM,OGG,FLAC,MP3,LOF,FFmpeg Importers=PCM,OGG,FLAC,MP3,LOF,FFmpeg,AUP,WavPack,Opus,portsmf
Preferences=Device,Playback,Recording,MidiIO,Quality,GUI,Tracks,ImportExport,Library,Directories,Warnings,Effects,KeyConfig,Mouse,Module Preferences=Device,Playback,Recording,MidiIO,Quality,GUI,Tracks,ImportExport,Library,Directories,Warnings,Effects,KeyConfig,Mouse,Module
Exporters=PCM,MP3,OGG,FLAC,MP2,CommandLine,FFmpeg,WavPack,Opus
NumericConverterRegistry=parsed
SnapFunctions=beats,time,frames
SelectionFormat=hh:mm:ss + milliseconds
FrequencySelectionFormatName=Hz
BandwidthSelectionFormatName=octaves
LibraryPreferences=MP3,FFmpeg
SelectionToolbarMode=1
DefaultOpenType=All files
LastOpenType=
StatusBarFieldRegistry=state,main,rate
[Version] [Version]
Major=2 Major=3
Minor=4 Minor=7
Micro=1 Micro=3
[Directories] [Directories]
TempDir=/var/tmp/audacity-janek TempDir=/var/tmp/audacity-janek
[Directories/Export]
LastUsed=/home/janek/data/2-box/uni/sts-bodywork
Default=
[Directories/Save]
LastUsed=/home/janek/data/4-media/record
Default=
[Directories/Open]
Default=
LastUsed=/home/janek/data/4-media/record
[Directories/Import]
Default=
[Directories/MacrosOut]
Default=
[AudioIO] [AudioIO]
RecordingDevice=default RecordingDevice=pulse
Host=ALSA Host=ALSA
PlaybackDevice=default PlaybackDevice=pipewire
RecordingSourceIndex=0 RecordingSourceIndex=-1
RecordingSource= RecordingSource=
RecordChannels=2 RecordChannels=2
PlaybackSource=
PlaybackVolume=0.890351
Duplex=1
SWPlaythrough=0
SoundActivatedRecord=0
SilenceLevel=-50
PreRoll=5
Crossfade=10
EffectsPreviewLen=6
CutPreviewBeforeLen=2
CutPreviewAfterLen=1
SeekShortPeriod=1
SeekLongPeriod=15
Microfades=0
UnpinnedScrubbing=1
LatencyDuration=100
LatencyCorrection=-170
[SamplingRate] [SamplingRate]
DefaultProjectSampleRate=44100 DefaultProjectSampleRate=44100
DefaultProjectSampleFormatChoice=Format32BitFloat
[MenuBar] [MenuBar]
File=Basic,Save,Import-Export,Print,Exit
[MenuBar/Optional] [MenuBar/Optional]
[MenuBar/Optional/Extra] [MenuBar/Optional/Extra]
Part1=Transport,Tools,Mixer,Edit,PlayAtSpeed,Seek,Device,Select Part1=Transport,Tools,Mixer,Edit,PlayAtSpeed,Seek,Device,Select,Import-Export
Part2=Navigation,Focus,Cursor,Track,Scriptables1,Scriptables2,Misc Part2=Navigation,Focus,Cursor,Track,Scriptables1,Scriptables2,Misc
[MenuBar/Optional/Extra/Part1] [MenuBar/Optional/Extra/Part1]
Transport=Play,Stop,PlayOneSec,PlayToSelection,PlayBeforeSelectionStart,PlayAfterSelectionStart,PlayBeforeSelectionEnd,PlayAfterSelectionEnd,PlayBeforeAndAfterSelectionStart,PlayBeforeAndAfterSelectionEnd,PlayCutPreview,KeyboardScrubbing Transport=Play,Stop,PlayOneSec,PlayToSelection,PlayBeforeSelectionStart,PlayAfterSelectionStart,PlayBeforeSelectionEnd,PlayAfterSelectionEnd,PlayBeforeAndAfterSelectionStart,PlayBeforeAndAfterSelectionEnd,PlayCutPreview,KeyboardScrubbing
Edit=DeleteKey,DeleteKey2,TimeShift
Select=SnapToOff,SnapToNearest,SnapToPrior,SelStart,SelEnd,SelExtLeft,SelExtRight,SelSetExtLeft,SelSetExtRight,SelCntrLeft,SelCntrRight,MoveToLabel
PlayAtSpeed=PlayAtSpeed,PlayAtSpeedCutPreview,PlayAtSpeedLooped,PlaySpeedDec,PlaySpeedInc,SetPlaySpeed
[MenuBar/Optional/Extra/Part2] [MenuBar/Optional/Extra/Part2]
Cursor=CursorLeft,CursorRight,CursorShortJumpLeft,CursorShortJumpRight,CursorLongJumpLeft,CursorLongJumpRight,Clip Cursor=CursorLeft,CursorRight,CursorShortJumpLeft,CursorShortJumpRight,CursorLongJumpLeft,CursorLongJumpRight,Clip
Scriptables1=SelectTime,SelectFrequencies,SelectTracks,SetTrackStatus,SetTrackAudio,SetTrackVisuals,GetPreference,SetPreference,SetClip,SetEnvelope,SetLabel,SetProject
Scriptables2=Select,SetTrack,GetInfo,Message,Help,Import2,Export2,OpenProject2,SaveProject2,Drag,CompareAudio
[MenuBar/View] [MenuBar/View]
Windows=UndoHistory,Karaoke,MixerBoard Windows=UndoHistory,MixerBoard
Other=Toolbars,ShowExtraMenus,ShowClipping Other=Toolbars,ShowExtraMenus,ShowClipping,ShowRMS
[MenuBar/View/Other] [MenuBar/View/Other]
Toolbars=Toolbars,Timeline
[MenuBar/View/Other/Toolbars] [MenuBar/View/Other/Toolbars]
[MenuBar/View/Other/Toolbars/Toolbars] [MenuBar/View/Other/Toolbars/Toolbars]
Other=ShowTransportTB,ShowToolsTB,ShowRecordMeterTB,ShowPlayMeterTB,ShowMixerTB,ShowEditTB,ShowTranscriptionTB,ShowScrubbingTB,ShowDeviceTB,ShowSelectionTB,ShowTimeTB,ShowSpectralSelectionTB Other=ShowTransportTB,ShowToolsTB,ShowRecordMeterTB,ShowPlayMeterTB,ShowEditTB,ShowCutCopyPasteTB,ShowTranscriptionTB,ShowDeviceTB,ShowSelectionTB,ShowTimeTB,ShowSpectralSelectionTB,ShowAudioSetupTB,ShowSnappingTB,ShowTimeSignatureTB
[MenuBar/Analyze] [MenuBar/Analyze]
[MenuBar/Analyze/Analyzers] [MenuBar/Analyze/Analyzers]
Windows=ContrastAnalyser,PlotSpectrum Windows=ContrastAnalyser,PlotSpectrum
@ -42,33 +91,143 @@ Windows=ContrastAnalyser,PlotSpectrum
Basic=Play,Record,Scrubbing,Cursor Basic=Play,Record,Scrubbing,Cursor
[MenuBar/Transport/Basic] [MenuBar/Transport/Basic]
Cursor=CursSelStart,CursSelEnd,CursTrackStart,CursTrackEnd,Clip,CursProjectStart,CursProjectEnd Cursor=CursSelStart,CursSelEnd,CursTrackStart,CursTrackEnd,Clip,CursProjectStart,CursProjectEnd
Record=Record1stChoice,Record2ndChoice,TimerRecord,PunchAndRoll,Pause
[MenuBar/Transport/Other]
[MenuBar/Transport/Other/Options]
Part2=PinnedHead,Overdub,SWPlaythrough
[MenuBar/Edit] [MenuBar/Edit]
Other=Clip,LabelEditMenus,EditMetaData Other=Clip,LabelEditMenus,EditMetaData
[MenuBar/Edit/Other]
Clip=RenameClip,ChangePitchAndSpeed,PitchDown,PitchUp,RenderPitchAndSpeed
[MenuBar/Select] [MenuBar/Select]
Basic=SelectAll,SelectNone,Tracks,Region,Spectral,Clip Basic=SelectAll,SelectNone,Tracks,Region,Spectral,Clip
[MenuBar/Tracks]
[MenuBar/Tracks/Add]
Add=NewMonoTrack,NewStereoTrack,NewLabelTrack,NewTimeTrack
[MenuBar/Help]
[MenuBar/Help/Other]
Diagnostics=DeviceInfo,MidiDeviceInfo,Log,CrashReport
[MenuBar/File]
[MenuBar/File/Import-Export]
Export=ExportMp3,ExportWav,ExportOgg,Export,ExportSel,ExportLabels,ExportMultiple,ExportMIDI
Import=ImportAudio,ImportMIDI,ImportLabels,ImportRaw
ExportOther=ExportLabels,ExportMIDI
[MenuBar/Tools]
Manage=ManageTools,Macros
Other=ConfigReset,FancyScreenshot,Benchmark
[FFmpeg] [FFmpeg]
Enabled=1 Enabled=1
[Preferences]
Tracks=TracksBehaviors,Spectrum
ImportExport=ExtImport
[Prefs]
Width=1092
Height=697
PrefsCategory=0
[Prefs/KeyConfig]
ViewBy=tree
[Module]
mod-script-pipe=4
mod-aup=1
mod-cl=1
mod-ffmpeg=1
mod-flac=1
mod-lof=1
mod-mp2=1
mod-mp3=1
mod-mpg123=1
mod-ogg=1
mod-opus=1
mod-pcm=1
mod-wavpack=1
mod-midi-import-export=1
[ModulePath]
mod-script-pipe=/usr/lib/audacity/modules/mod-script-pipe.so
mod-aup=/usr/lib/audacity/modules/mod-aup.so
mod-cl=/usr/lib/audacity/modules/mod-cl.so
mod-ffmpeg=/usr/lib/audacity/modules/mod-ffmpeg.so
mod-flac=/usr/lib/audacity/modules/mod-flac.so
mod-lof=/usr/lib/audacity/modules/mod-lof.so
mod-mp2=/usr/lib/audacity/modules/mod-mp2.so
mod-mp3=/usr/lib/audacity/modules/mod-mp3.so
mod-mpg123=/usr/lib/audacity/modules/mod-mpg123.so
mod-ogg=/usr/lib/audacity/modules/mod-ogg.so
mod-opus=/usr/lib/audacity/modules/mod-opus.so
mod-pcm=/usr/lib/audacity/modules/mod-pcm.so
mod-wavpack=/usr/lib/audacity/modules/mod-wavpack.so
mod-midi-import-export=/usr/lib/audacity/modules/mod-midi-import-export.so
[ModuleDateTime]
mod-script-pipe=2025-04-03T13:00:43
mod-aup=2025-04-03T13:00:43
mod-cl=2025-04-03T13:00:43
mod-ffmpeg=2025-04-03T13:00:43
mod-flac=2025-04-03T13:00:43
mod-lof=2025-04-03T13:00:43
mod-mp2=2025-04-03T13:00:43
mod-mp3=2025-04-03T13:00:43
mod-mpg123=2025-04-03T13:00:43
mod-ogg=2025-04-03T13:00:43
mod-opus=2025-04-03T13:00:43
mod-pcm=2025-04-03T13:00:43
mod-wavpack=2025-04-03T13:00:43
mod-midi-import-export=2025-04-03T13:00:43
[GUI] [GUI]
EmptyCanBeDirty=1
SelectAllOnNone=0
EnableCutLines=0
AdjustSelectionEdges=1
EditClipCanMove=0
CircularTrackNavigation=0
TypeToCreateLabel=0
DialogForNameNewLabel=0
ScrollBeyondZero=0
VerticalZooming=0
Solo=Simple
AudioTrackPastePolicy=Ask
TracksFitVerticallyZoomed=0
ShowTrackNameInWaveform=0
CollapseToHalfWave=0
AutoScroll=1
DefaultViewModeChoiceNew=Waveform
DefaultWaveformScaleChoice=Linear
SampleViewChoice=StemPlot
ZoomPreset1Choice=ZoomDefault
ZoomPreset2Choice=FourPixelsPerSample
Theme=light
EnvdBRange=60
ShowExtraMenus=0
BeepOnCompletion=0
RetainLabels=0
BlendThemes=1
RtlWorkaround=1
PreferNewTrackRecord=0
ShowSplashScreen=0 ShowSplashScreen=0
[GUI/TrackNames]
RecordingNameCustom=0
RecodingTrackName=Recorded_Audio
TrackNumber=0
DateStamp=0
TimeStamp=0
[GUI/ToolBars] [GUI/ToolBars]
[GUI/ToolBars/Control]
DockV2=1
Dock=1
Path=0
Show=1
X=-1
Y=-1
W=327
H=55
[GUI/ToolBars/Tools] [GUI/ToolBars/Tools]
MultiToolActive=0
DockV2=1 DockV2=1
Dock=1 Dock=1
Path=0,0 Path=0,0
Show=1 Show=1
X=-1 X=-1
Y=-1 Y=-1
W=94 W=67
H=55 H=63
[GUI/ToolBars/Audio\ Setup]
DockV2=1
Dock=1
Path=0,0,0,0
Show=1
X=-1
Y=-1
W=104
H=63
[GUI/ToolBars/CombinedMeter] [GUI/ToolBars/CombinedMeter]
DockV2=1 DockV2=1
Dock=0 Dock=0
@ -76,111 +235,256 @@ Show=0
X=-1 X=-1
Y=-1 Y=-1
W=338 W=338
H=27 H=31
[GUI/ToolBars/RecordMeter] [GUI/ToolBars/Control]
DockV2=1
Dock=1
Path=0
Show=1
X=-1
Y=-1
W=417
H=63
[GUI/ToolBars/CutCopyPaste]
DockV2=1
Dock=0
Show=0
X=-1
Y=-1
W=67
H=63
[GUI/ToolBars/Device]
DockV2=1
Dock=0
Show=0
X=-1
Y=-1
W=883
H=31
[GUI/ToolBars/Edit]
DockV2=1 DockV2=1
Dock=1 Dock=1
Path=0,0,0 Path=0,0,0
Show=1 Show=1
X=-1 X=-1
Y=-1 Y=-1
W=460 W=148
H=27 H=63
[GUI/ToolBars/PlayMeter] [GUI/ToolBars/PlayMeter]
DockV2=1 DockV2=1
Dock=1 Dock=1
Path=0,0,0,0 Path=0,0,0,0,1
Show=1 Show=1
X=-1 X=-1
Y=-1 Y=-1
W=460 W=290
H=27 H=31
[GUI/ToolBars/Mixer] [GUI/ToolBars/RecordMeter]
DockV2=1 DockV2=1
Dock=1 Dock=1
Path=0,0,0,0,0 Path=0,0,0,0,0
Show=1 Show=1
X=-1 X=-1
Y=-1 Y=-1
W=327 W=290
H=27 H=31
[GUI/ToolBars/Edit]
DockV2=1
Dock=1
Path=0,0,0,0,0,0
Show=1
X=-1
Y=-1
W=363
H=27
[GUI/ToolBars/Transcription]
DockV2=1
Dock=1
Path=0,0,0,0,0,0,0
Show=1
X=-1
Y=-1
W=191
H=27
[GUI/ToolBars/Scrub]
DockV2=1
Dock=0
Show=0
X=-1
Y=-1
W=92
H=27
[GUI/ToolBars/Device]
DockV2=1
Dock=1
Path=1
Show=1
X=-1
Y=-1
W=883
H=27
[GUI/ToolBars/Selection] [GUI/ToolBars/Selection]
DockV2=2 DockV2=2
Dock=2 Dock=2
Path=0 Path=0,0,0,0
Show=1 Show=1
X=-1 X=-1
Y=-1 Y=-1
W=660 W=240
H=83 H=63
[GUI/ToolBars/SpectralSelection] [GUI/ToolBars/Snapping]
DockV2=2
Dock=0
Show=0
X=-1
Y=-1
W=312
H=83
[GUI/ToolBars/Time]
DockV2=2 DockV2=2
Dock=2 Dock=2
Path=0,0 Path=0,0
Show=1 Show=1
X=-1 X=-1
Y=-1 Y=-1
W=171
H=63
[GUI/ToolBars/SpectralSelection]
DockV2=2
Dock=0
Show=0
X=-1
Y=-1
W=244
H=63
[GUI/ToolBars/Time]
DockV2=2
Dock=2
Path=0,0,0
Show=1
X=-1
Y=-1
W=250 W=250
H=55 H=63
[GUI/ToolBars/TimeSignature]
DockV2=2
Dock=2
Path=0
Show=1
X=-1
Y=-1
W=230
H=63
[GUI/ToolBars/Transcription]
DockV2=2
Dock=2
Path=0,0,0,0,0
Show=1
X=-1
Y=-1
W=191
H=31
[Window] [Window]
X=0 X=0
Y=-5 Y=30
Width=1920 Width=2560
Height=1036 Height=1410
Maximized=0 Maximized=1
Normal_X=0 Normal_X=500
Normal_Y=-5 Normal_Y=1440
Normal_Width=1920 Normal_Width=1120
Normal_Height=1036 Normal_Height=160
Iconized=0 Iconized=0
[Preferences] [FileFormats]
Tracks=TracksBehaviors,Spectrum ExportFormat_SF1=131072
ImportExport=ExtImport MP3RateModeChoice=SET
[Prefs] MP3Bitrate=3
Width=1092 MP3ChannelModeChoice=JOINT
Height=697 MP3SetRate=2
MP3VbrRate=2
MP3AbrRate=192
MP3CbrRate=192
OggExportQuality=50
FLACLevel=5
FLACBitDepth=16
MP2Bitrate=160
ExternalProgramShowOutput=0
ExternalProgramExportCommand=lame - "%f"
AACQuality=160
AC3BitRate=160000
AMRNBBitRate=12200
OPUSBitrate=192000
OPUSCompression=10
OPUSFrameDuration=20
OPUSVbrMode=on
OPUSApplication=audio
OPUSCutoff=0
WMABitRate=128000
WavPackEncodeQuality=1
WavPackBitDepth=16
WavPackHybridMode=0
WavPackCreateCorrectionFile=0
WavPackBitrate=40
ExportDownMixChoice=MixDown
LabelStyleChoice=Standard
AllegroStyleChoice=Seconds
[FileFormats/ExportFormat_SF1_Type]
WAV_10000=2
AIFF_20000=2
[FileFormats/ExternalProgramHistory]
file01=ffmpeg -i - "%f.opus"
file02=ffmpeg -i - "%f.wav"
file03=ffmpeg -i - "%f"
file04=lame - "%f"
[FileFormats/OPUS]
Bitrate=-1000
Quality=8
FrameDuration=200
VbrMode=1
Application=2049
Cutoff=-1000
[TagsEditorDialog]
x=0
y=0
width=510
height=477
[Export]
Format=OPUS
[Snap]
To=seconds
[AudioFiles]
ShowId3Dialog=0
SkipSilenceAtBeginning=0
[Warnings]
FirstProjectSave=0
MixMono=1
MixStereo=0
MixUnknownChannels=1
MissingExtension=1
DropoutDetected=1
[Effects]
GroupBy=default
RealtimeGroupBy=groupby:type:publisher
[Effects/NoiseReduction]
Sensitivity=6
Gain=20
AttackTime=0.02
ReleaseTime=0.1
FreqSmoothing=6
OldSensitivity=0
ReductionChoice=0
WindowTypes=2
WindowSize=8
StepsPerWindow=1
Method=1
[ExtendedImport]
OverrideExtendedImportByOpenFileDialogChoice=1
[Spectrum]
ColorScheme=SpecColorNew
MaxFreq=20000
Algorithm=0
EnableSpectralSelection=1
ScaleType=2
WindowType=3
ZeroPaddingFactor=2
FFTSize=2048
FrequencyGain=0
Gain=20
Range=80
MinFreq=0
[Locale]
Language=System
[QuickPlay]
ToolTips=1
ScrubbingEnabled=0
[Quality]
DitherAlgorithmChoice=None
LibsoxrHQSampleRateConverterChoice=BestQuality
HQDitherAlgorithmChoice=Shaped
[MidiIO]
Host=ALSA
SynthLatency=5
PlaybackDevice=ALSA: Midi Through Port-0
[WaveTrackMenu]
[WaveTrackMenu/SubViews]
Extra=WaveColor,SpectrogramSettings
[RecentFiles] [RecentFiles]
file01=/home/janek/.local/cache/yay/stretchly-xeruf-git/src/stretchly/app/audio/crystal-glass.wav file01=/home/janek/data/4-media/record/audacity/231013_psalm23.aup3
file02=/home/janek/data/2-box/uni/sts-bodywork/231013_psalm23.m4a
file03=231014_iridion_einfuehrung.mp4
file04=/home/janek/data/4-media/record/2022-07-10 21.54.08 Sing Bathtub.wav
file05=/home/janek/data/4-media/record/audacity/231211_taliyah-[ractice.aup3
file06=/home/janek/data/2-box/uni/2402_polygon-pitch.aup3
file07=/home/janek/data/4-media/record/240220_cloud-server.aup3
file08=/home/janek/data/4-media/video/course/voice/240227_oliver-wrapup.opus
file09=/home/janek/data/4-media/record/worship/practice/240405_oceans-practice.aup3
file10=/home/janek/data/4-media/record/240407_oceans-morning.aup3
file11=/home/janek/data/4-media/record/2024-04-25_10-50-37_atieno-therapy.aup3
file12=01 Vibration (One More Time).flac
[ActiveProjects]
[ExportAudioDialog]
Format=WAV
DefaultPath=/home/janek/data/4-media/record
ExportRange=project
SkipSilenceAtBeginning=0
SplitMode=tracks
IncludeAudioBeforeFirstLabel=0
SplitNamePolicy=name
OverwriteExisting=0

View file

@ -5,9 +5,10 @@ which pfetch >/dev/null 2>&1 && pfetch
alias myip='curl -4 ifconfig.me && printf "\n" && curl -6 ifconfig.me' alias myip='curl -4 ifconfig.me && printf "\n" && curl -6 ifconfig.me'
ds() { ds() {
df -B1M -x tmpfs -x devtmpfs -x squashfs -x overlay | df -B1M -x tmpfs -x devtmpfs -x squashfs -x overlay "$@" |
grep -v '\b/[^/ ]*/[^/]*/[^/]*$' | grep -v '\b/[^/ ]*/[^/]*/[^/]*$' | # needed for NAS to hide overly long submounts
awk -v a="\033[31m" -v b="\033[33m" -v c="\033[35m" -v n="\033[0m" 'NR==1 {printf "%-20s %6s %7s %9s %s\n",$1,$5,$3,$4,$6} NR>1 {u=$5; printf (u > 98) ? a : (u > 96) ? b : (u > 90) ? c : ""; printf "%-20s %6s %6.1fG %8.1fG %s\n",$1,$5,$3/1024,$4/1024,$6; printf n}'; awk -v a="\033[31m" -v b="\033[33m" -v c="\033[35m" -v n="\033[0m" 'NR==1 {printf "%-20s %6s %7s %9s %s\n",$1,$5,$3,$4,$6} NR>1 {u=$5; printf (u > 98) ? a : (u > 96) ? b : (u > 90) ? c : ""; printf "%-20s %6s %6.1fG %8.1fG %s\n",$1,$5,$3/1024,$4/1024,$6; printf n}' |
column -t
} }
export -f ds export -f ds
timeout 1s bash -c ds timeout 1s bash -c ds
@ -44,10 +45,12 @@ xtrace () {
highlight() { echo; echo "$1"; } highlight() { echo; echo "$1"; }
status() { status() {
highlight 'System' highlight 'System'
df -h -T --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=squashfs --exclude-type=overlay ds -T
#df -h -T --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=squashfs --exclude-type=overlay
zfs list -d 0 2>/dev/null zfs list -d 0 2>/dev/null
free -h free -h
sudo certbot certificates 2>/dev/null $sudo certbot certificates 2>/dev/null
test $? -eq 1 && local sudo=""
highlight 'Internet' highlight 'Internet'
#--color=always #--color=always
@ -61,15 +64,21 @@ status() {
$sudo systemctl --no-pager list-units --failed --no-legend || service --status-all $sudo systemctl --no-pager list-units --failed --no-legend || service --status-all
echo '== WEBSERVER' echo '== WEBSERVER'
{ sudo lsof -i :443 || sudo lsof -i :80; } | head -4 { sudo lsof -i :443 || sudo lsof -i :80; } | head -4
sudo lsof -i :22
echo echo
if type docker &>/dev/null if type docker &>/dev/null
then then
echo '== DOCKER' echo '== DOCKER'
$sudo docker ps || $sudo systemctl status docker $sudo docker ps -n 6 || $sudo systemctl status docker
fi
if type kubectl &>/dev/null
then
echo '== KUBERNETES NODE'
sudo -E kubectl get nodes -o wide
fi fi
} }
disks() { alldisks() {
{ {
sudo df -h -T --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=squashfs --exclude-type=overlay sudo df -h -T --exclude-type=tmpfs --exclude-type=devtmpfs --exclude-type=squashfs --exclude-type=overlay
sudo blkid sudo blkid

View file

@ -1,7 +1,12 @@
set -o pipefail set -o pipefail
alias localip="ip addr show | grep -E '(ens|eth)' | grep -oP '"'(?<=inet\s)\d+(\.\d+){3}'"' | head -1" alias localip="ip addr show | grep -E '(ens|eth)' | grep -oP '"'(?<=inet\s)\d+(\.\d+){3}'"' | head -1"
IP=$(localip) test "$PS1" && IP=$(localip)
goto() {
local dir=$(sudo find /home -maxdepth 3 -name "$1*" | fzf -0 -1)
cd "$dir"
}
logs() { logs() {
if test $# -eq 0 if test $# -eq 0
@ -23,10 +28,12 @@ hestia() {
echo '>' sudo "$(which $command)" "$@" >&2 echo '>' sudo "$(which $command)" "$@" >&2
export SHELLOPTS export SHELLOPTS
sudo --preserve-env=SHELLOPTS timeout 30s $(which $command) "$@" sudo --preserve-env=SHELLOPTS timeout 30s $(which $command) "$@"
res=$?
set +x set +x
return $res
} }
accessible() { make_accessible() {
dir=/home/*/web/$1/public_html dir=/home/*/web/$1/public_html
sudo chmod -v 755 $dir sudo chmod -v 755 $dir
sudo chown -v :sudo $dir sudo chown -v :sudo $dir
@ -112,6 +119,58 @@ list() {
fi fi
} }
## BILLING scripts for InvoiceNinja
invoice() {
local prefixes='^(d|dp|xe)'
if test $# -eq 0
then
for user in $(list users | grep -E "${prefixes}[0-9]")
do userdomains "$user"
invoice "$user"
echo
done
return $?
fi
local userid="$1"
shift
local userinfo
for username in "$userid" "dp$userid" "xe$userid"
do userinfo="$(hestia v-list-user "$username")" && break
done
local package=$(echo "$userinfo" | grep PACKAGE | cut -d: -f2)
local name=$(echo "$userinfo" | grep FULL | cut -d: -f2)
echo "Client Name,Invoice Number,Item Quantity,Item Cost,Item Notes,Item Product,Item Discount"
local prefix="$name,DR$(date +%y%m)-$userid,"
for domain
do invoiceline "$domain" "$prefix"
done
for domain in $(list dns-domains "$username")
do invoiceline "$domain" "$prefix"
done
echo "${prefix}12,9,Januar 2025 - Dezember 2025,Webpaket $package,20"
# TODO recurring, batch
}
increment_day() {
awk -F. '{print $3"-"$2"-"$1}' | xargs -I{} date -d "{} +1 day" "+%d.%m.%Y"
}
invoiceline() {
local domain=$1
local prefix=$2
date=$(grep "$domain (" cu_invoicelineitems.csv | grep -v SSL | tail -1 | cut -d\" -f8 | sed -sE 's/.* - (.*)\).*/\1/' | increment_day)
datec=$(grep ",$domain," portfolio_domains_2025-01-13.csv | cut -d, -f3 | cut -dT -f1)
renew=$(grep ",$domain," domains.csv | cut -d, -f10 || grep ",$domain," portfolio_domains_2025-01-13.csv | cut -d, -f6 | cut -dT -f1)
echo "${prefix}2,7,$domain (${date:-${datec:-$(date '+%d.%m.%Y')}} - $(date -d "${renew:-+1 year} -1 day" '+%d.%m.%Y')),.de-Domain,0"
}
domain() { domain() {
if test $# -eq 0 if test $# -eq 0
then while read -r domain then while read -r domain
@ -120,7 +179,10 @@ domain() {
done done
return $? return $?
fi fi
echo
local color
case "$1" in (--color) color=true; shift;; esac
for domain; do for domain; do
domain=$(echo "$domain" | rev | cut -d. -f-2 | rev) domain=$(echo "$domain" | rev | cut -d. -f-2 | rev)
@ -129,28 +191,79 @@ domain() {
contact=$(grep ",$domain," domains.csv | cut -d, -f3 || grep ",$domain," portfolio_domains_2025-01-13.csv | cut -d, -f25) contact=$(grep ",$domain," domains.csv | cut -d, -f3 || grep ",$domain," portfolio_domains_2025-01-13.csv | cut -d, -f25)
renew=$(grep ",$domain," domains.csv | cut -d, -f10 || grep ",$domain," portfolio_domains_2025-01-13.csv | cut -d, -f6 | cut -dT -f1) renew=$(grep ",$domain," domains.csv | cut -d, -f10 || grep ",$domain," portfolio_domains_2025-01-13.csv | cut -d, -f6 | cut -dT -f1)
iddomain="$(idn2 "$domain")" iddomain="$(idn2 "$domain")"
echo "$(timeout .3s dig +short NS "$iddomain" | sort | head -1 | grep . || echo " ") $(timeout .3s dig +short A "$iddomain" | head -1 | grep . || echo " ") ${date:-C$datec} ${renew:- } $domain $contact" dns="$(timeout .3s dig +short NS "$iddomain" | sort | cut -c-15 | head -1)"
dnsa="$(timeout .3s dig +short A "$iddomain" | head -1)"
case "$dns" in
("") style=3;;
("ns1.iridion.it.") style=0;;
(*) style=2;;
esac
if test "$color" || test -t 1
then styling="[${style}m "
fi
printf "%s${dns:- } ${dnsa:- } ${date:-C$datec} ${renew:- } $domain $contact%s\n" $styling
#echo "[${style}m${dns:- } $(timeout .3s dig +short A "$iddomain" | head -1 | grep . || echo " ") ${date:-C$datec} ${renew:- } $domain $contact"
done done
} }
domains() { userdomains() {
set -o pipefail user="$1"
sudo $HESTIA/bin/v-list-users | tail +3 | grep -v ssh- | while read user shift
do #CONTACT: local -A contacts=()
name="$($HESTIA/bin/v-list-user $(echo "$user" | cut -d\ -f1) | grep 'FULL NAME:' | cut -d: -f2)" name="$("$HESTIA/bin/v-list-user" $(echo "$user" | cut -d\ -f1) | grep 'FULL NAME:' | cut -d: -f2)"
if test -t 1 if test -t 1 # Avoid special symbols if not a terminal
then echo "$user" | awk '{print ""$3" "$1" '"$(echo $name)"'"}' then echo "$user" | awk '{print ""$3" "$1" '"$(echo $name)"'"}'
else echo "$user" | awk '{print "\n"$3" "$1" '"$(echo $name)"'"}' | tr '[a-z]' '[A-Z]' else echo "$user" | awk '{print "\n"$3" "$1" '"$(echo $name)"'"}' | tr '[a-z]' '[A-Z]'
fi fi
sudo $HESTIA/bin/v-list-dns-domains $(echo "$user" | cut -d\ -f1) | tail +3 | while read domain
do domain="${domain%% *}" local color=""
if test $(echo "$domain" | tr -cd '.' | wc -c) -ne 1 if test $# -gt 0
then #echo "Ignoring invalid DNS-Domain $domain" >&2 then
continue for domain
fi do test "$domain" && domain "$domain"
domain "$domain"
done
done done
color="--color"
fi
outfile="/tmp/${user}-domains.csv"
sudo "$HESTIA/bin/v-list-dns-domains" $(echo "$user" | cut -d\ -f1) | tail +3 | sort | while read domain
do domain="${domain%% *}"
if test $(echo "$domain" | tr -cd '.' | wc -c) -ne 1
then #echo "Ignoring invalid DNS-Domain $domain" >&2
continue
fi
domain $color "$domain"
#CONTACT: contact=$(grep ",$domain," domains.csv | cut -d, -f3 || grep ",$domain," portfolio_domains_2025-01-13.csv | cut -d, -f25)
#CONTACT: if test -n "$contact" && [[ -z "${contacts["$contact"]}" ]]
#CONTACT: then contacts["$contact"]="$contact"
#CONTACT: fi
done | tee "$outfile"
#CONTACT: for contact in "${!contacts[@]}"; do echo "C $contact"; done
if test $# -eq 0
then
contacts="$outfile-contacts"
cat "$outfile" | rev | cut -d\ -f1 | rev | sort | uniq | grep . > "$contacts"
test -s "$contacts" || return
echo
echo Domains for $(cat "$contacts")
domains --file "$contacts"
fi
}
# Domains of all users plus list from all providers as of last export
# If arg is provided, only from that domain contact
domains() {
if test $# -gt 0
then grep --no-filename "$@" ./portfolio_domains_2025-01-13.csv ./domains.csv |
cut -d, -f$(case "$1" in (-*) echo '2-3';; (*) echo '1-3,25';; esac) |
sort | column -s, -t
return $?
fi
set -o pipefail
sudo "$HESTIA/bin/v-list-users" | tail +3 | grep -v ssh- |
while read user; do userdomains "$user"; done
echo echo
if test -t 1 if test -t 1

View file

@ -17,3 +17,12 @@ lyrics:
auto: true auto: true
sources: genius lrclib sources: genius lrclib
synced: yes synced: yes
playlist:
relative_to: library
playlist_dir: "/home/janek/data/4-media/music/Playlists"
smartplaylist:
relative_to: "/home/janek/data/4-media/music"
playlist_dir: "/home/janek/data/4-media/music/Playlists"
playlists:
- name: besomorph.m3u
query: 'besomorph'

View file

@ -1247,6 +1247,18 @@ This is 0.3 red + 0.59 green + 0.11 blue and always between 0 and 255."
(ispell-hunspell-add-multi-dic ispell-dictionary) (ispell-hunspell-add-multi-dic ispell-dictionary)
) )
(defun ediff-compare-region-clipboard (begin end)
(interactive "r")
(save-excursion
(let ((selected-region (buffer-substring begin end))
(clipboard-buffer (get-buffer-create "*ediff-clipboard*"))
(region-buffer (get-buffer-create "*ediff-region*")))
(with-current-buffer clipboard-buffer
(insert (car kill-ring)))
(with-current-buffer region-buffer
(insert selected-region))
(ediff-buffers clipboard-buffer region-buffer))))
; uncomment this to exit loading the config prematurely ; uncomment this to exit loading the config prematurely
;(with-current-buffer " *load*" ;(with-current-buffer " *load*"
; (goto-char (point-max))) ; (goto-char (point-max)))

View file

@ -21,9 +21,11 @@
:completion :completion
company ; the ultimate code completion backend company ; the ultimate code completion backend
;;corfu
;;helm ; the *other* search engine for love and life ;;helm ; the *other* search engine for love and life
;;ido ; the other *other* search engine... ;;ido ; the other *other* search engine...
ivy ; a search engine for love and life ;;ivy ; a search engine for love and life
vertico
:ui :ui
;;deft ; notational velocity for Emacs ;;deft ; notational velocity for Emacs
@ -32,9 +34,8 @@
;;doom-quit ; DOOM quit-message prompts when you quit Emacs ;;doom-quit ; DOOM quit-message prompts when you quit Emacs
;;fill-column ; a `fill-column' indicator ;;fill-column ; a `fill-column' indicator
hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW
;;hydra
indent-guides ; highlighted indent columns indent-guides ; highlighted indent columns
;;ligatures ; ligatures and symbols to make your code pretty again ligatures ; ligatures and symbols to make your code pretty again
minimap ; show a map of the code on the side minimap ; show a map of the code on the side
modeline ; snazzy, Atom-inspired modeline, plus API modeline ; snazzy, Atom-inspired modeline, plus API
nav-flash ; blink cursor line after big motions nav-flash ; blink cursor line after big motions
@ -84,7 +85,7 @@
:tools :tools
;;ansible ;;ansible
;;debugger ; FIXME stepping through code, to help you add bugs debugger
direnv direnv
docker docker
editorconfig ; let someone else argue about tabs vs spaces editorconfig ; let someone else argue about tabs vs spaces
@ -97,8 +98,6 @@
make ; run make tasks from Emacs make ; run make tasks from Emacs
pass ; password manager for nerds pass ; password manager for nerds
pdf ; pdf enhancements pdf ; pdf enhancements
;;prodigy ; FIXME managing external services & code builders
;;rgb ; creating color strings
;;taskrunner ; taskrunner for all your projects ;;taskrunner ; taskrunner for all your projects
;;terraform ; infrastructure as code ;;terraform ; infrastructure as code
;;tmux ; an API for interacting with tmux ;;tmux ; an API for interacting with tmux

View file

@ -41,4 +41,5 @@
(add-to-list 'recentf-list (expand-file-name "5-incubator/download/" user-data-dir)) (add-to-list 'recentf-list (expand-file-name "5-incubator/download/" user-data-dir))
(setq recentf-list (append (list-non-hidden-directories user-data-dir) recentf-list)) (setq recentf-list (append (list-non-hidden-directories user-data-dir) recentf-list))
(setq recentf-keep '(recentf-keep-default-predicate file-remote-p "/ssh:.*")) (setq recentf-keep '(recentf-keep-default-predicate file-remote-p "/ssh:.*"))
(recentf-cleanup)
) )

View file

@ -9,6 +9,7 @@ matches:
cmd: env cmd: env
shell: bash shell: bash
debug: true debug: true
# {{{1 EMAILS # {{{1 EMAILS
- trigger: ";ep" - trigger: ";ep"
replace: "{{output}}" replace: "{{output}}"
@ -148,8 +149,16 @@ matches:
type: shell type: shell
params: params:
cmd: pass info/banking/dkb | head -1 cmd: pass info/banking/dkb | head -1
# {{{1 EXTRAS # {{{1 EXTRAS
# TODO turn into emacs template # TODO turn into emacs template
- trigger: ";gref"
replace: "{{output}}"
vars:
- name: output
type: shell
params:
cmd: pass business/ftt/signature
- trigger: ";sigo" - trigger: ";sigo"
replace: |- replace: |-
#+ATTR_ORG: :width 200 #+ATTR_ORG: :width 200

View file

@ -1,27 +1,27 @@
[General] [General]
DiskFolders=@Variant(\0\0\0\t\0\0\0\x1\0\0\0\n\0\0\0\x16\0/\0h\0o\0m\0\x65\0/\0j\0\x61\0n\0\x65\0k) DiskFolders=@Variant(\0\0\0\t\0\0\0\x1\0\0\0\n\0\0\0\x16\0/\0h\0o\0m\0\x65\0/\0j\0\x61\0n\0\x65\0k)
Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\b\xcf\0\0\x5\xc1\0\0\0\0\0\0\0\0\0\0\x4\x14\0\0\x2\xe4\0\0\0\0\x2\0\0\0\b\xd0\0\0\0\0\0\0\0\0\0\0\b\xcf\0\0\x5\xc1) Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x4g\0\0\x2\xd1\0\0\0\0\0\0\0\0\0\0\x4\x14\0\0\x2\xe4\0\0\0\0\x2\0\0\0\x4h\0\0\0\0\0\0\0\0\0\0\x4g\0\0\x2\xd1)
HorizontalScrollBarValue=1206 HorizontalScrollBarValue=1454
LastBPM=0 LastBPM=0
ShowKeyboard=true ShowKeyboard=true
ShowMeters=true ShowMeters=true
ShowSidePanel=true ShowSidePanel=true
ShowToolbar=true ShowToolbar=true
VerticalScrollBarValue=936 VerticalScrollBarValue=1129
[Canvas] [Canvas]
Antialiasing=1 Antialiasing=1
AutoHideGroups=true AutoHideGroups=true
AutoSelectItems=false AutoSelectItems=false
EyeCandy2=true EyeCandy2=true
FancyEyeCandy=false FancyEyeCandy=true
FullRepaints=false FullRepaints=false
HQAntialiasing=false HQAntialiasing=false
InlineDisplays=false InlineDisplays=false
Size=3100x2400 Size=3100x2400
Theme=Modern Dark Theme=Modern Dark
UseBezierLines=true UseBezierLines=true
UseOpenGL=false UseOpenGL=true
[Engine] [Engine]
AudioDriver=JACK AudioDriver=JACK
@ -30,10 +30,10 @@ ManageUIs=true
MaxParameters=200 MaxParameters=200
PreferPluginBridges=false PreferPluginBridges=false
PreferUiBridges=true PreferUiBridges=true
ProcessMode=1 ProcessMode=2
ResetXruns=false ResetXruns=false
TransportExtra= TransportExtra=
TransportMode=2 TransportMode=1
UIsAlwaysOnTop=false UIsAlwaysOnTop=false
UiBridgesTimeout=4000 UiBridgesTimeout=4000
@ -49,7 +49,7 @@ WineBridges=true
ClassicSkin=false ClassicSkin=false
ConfirmExit=true ConfirmExit=true
Experimental=true Experimental=true
ProThemeColor=System ProThemeColor=Black
ProjectFolder=/home/janek/data/4-media/sound/carla ProjectFolder=/home/janek/data/4-media/sound/carla
RefreshInterval=20 RefreshInterval=20
ShowLogs=true ShowLogs=true

View file

@ -1,6 +1,6 @@
[PluginDatabase] [PluginDatabase]
Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\x4\0\0\0\0\0\0\x4O\0\0\x2\xaa\0\0\0\x4\0\0\0\0\0\0\x4O\0\0\x2\xaa\0\0\0\0\0\0\0\0\x4h\0\0\0\x4\0\0\0\0\0\0\x4O\0\0\x2\xaa) Geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\0\0\0\0\0\0\0\0\0\0\x4K\0\0\x2\xaa\0\0\0\0\0\0\0\0\0\0\x4K\0\0\x2\xaa\0\0\0\0\0\0\0\0\x4h\0\0\0\0\0\0\0\0\0\0\x4K\0\0\x2\xaa)
SearchText= SearchText=delay
ShowAU=false ShowAU=false
ShowBridged=true ShowBridged=true
ShowBridgedWine=true ShowBridgedWine=true

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,3 @@
AAAAB
AAAAF
AAABB

View file

@ -148,7 +148,7 @@
cme = commit -v --edit --message # Commit with message from CLI but edit it cme = commit -v --edit --message # Commit with message from CLI but edit it
cad = !git diff-tree --no-commit-id --name-only -r HEAD | git commit -v --amend --pathspec-from-file=- # Amend commit with all already changed files cad = !git diff-tree --no-commit-id --name-only -r HEAD | git commit -v --amend --pathspec-from-file=- # Amend commit with all already changed files
cap = !git commit --amend --no-edit && git push --force-with-lease cap = !git commit --amend --no-edit && git push --force-with-lease
journal = !command git -C $DATA commit -v $DATA/2-box/journal* journal = !command git -C $DATA commit -v -m "box/journal: " --edit $DATA/2-box/journal* $DATA/2-box/messages*
cp = cherry-pick cp = cherry-pick
cpc = cherry-pick --continue cpc = cherry-pick --continue

View file

@ -10,9 +10,8 @@ encrypt: false
highlight: true highlight: true
indent_character: '|' indent_character: '|'
journals: journals:
default: ~/data/2-box/journal/jrnl.txt default: ~/data/2-box/journal/jrnl.jrnl
tug: ~/data/2-box/journal/tug.txt nug: ~/data/2-box/journal/nug.jrnl
intentions: ~/data/2-box/journal/intentions.txt
linewrap: 99 linewrap: 99
tagsymbols: '@' tagsymbols: '@'
template: false template: false

9
.config/k9s/aliases.yaml Normal file
View file

@ -0,0 +1,9 @@
aliases:
dp: deployments
sec: v1/secrets
jo: jobs
cr: clusterroles
crb: clusterrolebindings
ro: roles
rb: rolebindings
np: networkpolicies

41
.config/k9s/config.yaml Normal file
View file

@ -0,0 +1,41 @@
k9s:
liveViewAutoRefresh: false
screenDumpDir: /home/janek/.local/state/k9s/screen-dumps
refreshRate: 2
maxConnRetry: 5
readOnly: false
noExitOnCtrlC: false
ui:
enableMouse: false
headless: false
logoless: false
crumbsless: false
reactive: false
noIcons: false
skipLatestRevCheck: false
disablePodCounting: false
shellPod:
image: busybox:1.35.0
namespace: default
limits:
cpu: 100m
memory: 100Mi
imageScans:
enable: false
exclusions:
namespaces: []
labels: {}
logger:
tail: 100
buffer: 5000
sinceSeconds: -1
fullScreen: false
textWrap: false
showTime: false
thresholds:
cpu:
critical: 90
warn: 70
memory:
critical: 90
warn: 70

56
.config/k9s/config.yml Normal file
View file

@ -0,0 +1,56 @@
k9s:
liveViewAutoRefresh: false
refreshRate: 2
maxConnRetry: 5
enableMouse: false
enableImageScan: false
headless: false
logoless: false
crumbsless: false
readOnly: false
noExitOnCtrlC: false
noIcons: false
shellPod:
image: busybox:1.35.0
namespace: default
limits:
cpu: 100m
memory: 100Mi
skipLatestRevCheck: false
logger:
tail: 100
buffer: 5000
sinceSeconds: 300
fullScreenLogs: false
textWrap: false
showTime: false
currentContext: ftt.gmbh
currentCluster: ftt.gmbh
keepMissingClusters: false
clusters:
ftt.gmbh:
namespace:
active: all
lockFavorites: false
favorites:
- stackspin
- stackspin-apps
- flux-system
- velero
- stackspout
- all
- default
view:
active: pod
featureGates:
nodeShell: false
portForwardAddress: localhost
thresholds:
cpu:
critical: 90
warn: 70
memory:
critical: 90
warn: 70
screenDumpDir: /tmp/k9s-screens-janek
disablePodCounting: false

99
.config/k9s/plugin.yml Executable file
View file

@ -0,0 +1,99 @@
# https://github.com/derailed/k9s/blob/master/plugins/flux.yaml
# move selected line to chosen resource in K9s, then:
# Shift-T (with confirmation) to toggle helm releases or kustomizations suspend and resume
# Shift-R (no confirmation) to reconcile a git source or a helm release or a kustomization
plugin:
toggle-helmrelease:
shortCut: Shift-T
confirm: true
scopes:
- helmreleases
description: Toggle to suspend or resume a HelmRelease
command: sh
background: true
args:
- -c
- "flux $([ $(kubectl get helmreleases -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1) = \"true\" ] && echo \"resume\" || echo \"suspend\") helmrelease -n $NAMESPACE $NAME | less"
toggle-kustomization:
shortCut: Shift-T
confirm: true
scopes:
- kustomizations
description: Toggle to suspend or resume a Kustomization
command: sh
background: true
args:
- -c
- "flux $([ $(kubectl get kustomizations -n $NAMESPACE $NAME -o=custom-columns=TYPE:.spec.suspend | tail -1) = \"true\" ] && echo \"resume\" || echo \"suspend\") kustomization -n $NAMESPACE $NAME | less"
reconcile-git:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- gitrepositories
command: sh
# background: false
background: true
args:
- -c
- "flux reconcile source git -n $NAMESPACE $NAME | less"
reconcile-hr:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- helmreleases
command: sh
# background: false
background: true
args:
- -c
- "flux reconcile helmrelease -n $NAMESPACE $NAME | less"
reconcile-ks:
shortCut: Shift-R
confirm: false
description: Flux reconcile
scopes:
- kustomizations
command: sh
# background: false
background: true
args:
- -c
- "flux reconcile kustomization -n $NAMESPACE $NAME | less"
getall-ns:
shortCut: Shift-G
confirm: false
description: Get All Resources in NS
scopes:
- namespaces
command: sh
background: false
args:
- -c
- "kubectl get all -n $NAME | less"
# https://github.com/derailed/k9s/issues/1017#issuecomment-769005253
# requires https://github.com/rajatjindal/kubectl-modify-secret installed
# i.e. by krew install modify-secret
edit-secret:
shortCut: Ctrl-X
confirm: false
description: "Edit Decoded Secret"
scopes:
- secrets
command: kubectl
background: false
args:
- modify-secret
- --namespace
- $NAMESPACE
- --context
- $CONTEXT
- $NAME

View file

@ -10,5 +10,8 @@ visual_bell_duration 0.2
visual_bell_color #222 visual_bell_color #222
window_alert_on_bell yes window_alert_on_bell yes
font_size 20
include pager.conf include pager.conf
include local.conf include local.conf
include theme.conf

44
.config/mako/config Normal file
View file

@ -0,0 +1,44 @@
default-timeout=8000
sort=-time
history=1
max-history=20
width=400
height=200
padding=10
margin=10
anchor=bottom-right
layer=overlay
background-color=#141a1b88
text-color=#ffffffcc
border-size=3
border-color=#88c0d0
border-radius=15
#font=monospace 14
font=16
icons=1
icon-location=right
max-icon-size=64
[urgency=low]
border-color=#cccccc
[urgency=normal]
border-color=#d08770
[urgency=high]
border-color=#bf616a
text-color=#ffffffff
default-timeout=0
[category=mpd]
default-timeout=2000
group-by=category
[mode=do-not-disturb urgency=low]
invisible=1
[mode=do-not-disturb urgency=normal]
invisible=1

View file

@ -22,13 +22,13 @@ application/x-java-archive=java-2.desktop;
application/x-ms-shortcut=firefox.desktop; application/x-ms-shortcut=firefox.desktop;
application/x-mswinurl=firefox.desktop; application/x-mswinurl=firefox.desktop;
application/xhtml+xml=firefox.desktop; application/xhtml+xml=firefox.desktop;
application/zip=org.kde.ark.desktop; application/zip=java-java17-openjdk.desktop
audio/flac=mpc.desktop; audio/flac=mpc.desktop;
audio/mp4=mpc.desktop; audio/mp4=mpc.desktop;
audio/mpeg=mpc.desktop; audio/mpeg=mpc.desktop;
audio/x-wav=mpc.desktop; audio/x-wav=mpc.desktop;
image/jpeg=org.kde.showfoto.desktop; image/jpeg=com.interversehq.qView.desktop
image/png=org.kde.showfoto.desktop; image/png=vimiv.desktop
inode/directory=pcmanfm.desktop; inode/directory=pcmanfm.desktop;
text/html=firefox.desktop; text/html=firefox.desktop;
x-scheme-handler/discord-757737740241731714=discord-757737740241731714.desktop; x-scheme-handler/discord-757737740241731714=discord-757737740241731714.desktop;
@ -36,6 +36,7 @@ x-scheme-handler/etcher=balena-etcher.desktop
x-scheme-handler/ferdi=ferdi.desktop x-scheme-handler/ferdi=ferdi.desktop
x-scheme-handler/http=firefox.desktop; x-scheme-handler/http=firefox.desktop;
x-scheme-handler/https=firefox.desktop; x-scheme-handler/https=firefox.desktop;
x-scheme-handler/mailto=mailto-handler.desktop;
x-scheme-handler/jitsi-meet=Jitsi Meet.desktop; x-scheme-handler/jitsi-meet=Jitsi Meet.desktop;
x-scheme-handler/org-protocol=org-protocol.desktop; x-scheme-handler/org-protocol=org-protocol.desktop;
x-scheme-handler/sgnl=signal-desktop.desktop; x-scheme-handler/sgnl=signal-desktop.desktop;
@ -47,3 +48,8 @@ video/x-m4v=vlc.desktop
text/vcard=emacs.desktop text/vcard=emacs.desktop
text/plain=emacs.desktop text/plain=emacs.desktop
image/webp=com.interversehq.qView.desktop image/webp=com.interversehq.qView.desktop
audio/ogg=mpc.desktop
application/vnd.microsoft.portable-executable=wine.desktop
image/x-xcf=gimp.desktop
video/webm=vlc.desktop
text/csv=emacsclient.desktop

View file

@ -21,6 +21,7 @@ let g:firenvim_config = {
\ '://wiki\..*': { 'priority': 9, 'takeover': 'never', }, \ '://wiki\..*': { 'priority': 9, 'takeover': 'never', },
\ '.*openstreetmap\.org.*': { 'priority': 9, 'takeover': 'once', }, \ '.*openstreetmap\.org.*': { 'priority': 9, 'takeover': 'once', },
\ '.*openstreetmap\.de.*': { 'priority': 9, 'takeover': 'once', }, \ '.*openstreetmap\.de.*': { 'priority': 9, 'takeover': 'once', },
\ '.*leonardo\.ai.*': { 'priority': 9, 'takeover': 'never', },
\ \
\ '.*mail.*': { 'priority': 9, 'takeover': 'once', }, \ '.*mail.*': { 'priority': 9, 'takeover': 'once', },
\ '.*church\.tools.*': { 'priority': 9, 'takeover': 'empty', }, \ '.*church\.tools.*': { 'priority': 9, 'takeover': 'empty', },
@ -39,6 +40,7 @@ let g:firenvim_config = {
\ '.*contacts\.google\.com.*': { 'priority': 9, 'takeover': 'never', }, \ '.*contacts\.google\.com.*': { 'priority': 9, 'takeover': 'never', },
\ '.*cloud\.atomtoast\.xyz.*': { 'priority': 9, 'takeover': 'never', }, \ '.*cloud\.atomtoast\.xyz.*': { 'priority': 9, 'takeover': 'never', },
\ '://notion\.so.*': { 'priority': 9, 'takeover': 'never', }, \ '://notion\.so.*': { 'priority': 9, 'takeover': 'never', },
\ '://www.notion\.so.*': { 'priority': 9, 'takeover': 'never', },
\ '://bbb\..*': { 'priority': 9, 'takeover': 'never', }, \ '://bbb\..*': { 'priority': 9, 'takeover': 'never', },
\ '://bigbluebutton.*': { 'priority': 9, 'takeover': 'never', }, \ '://bigbluebutton.*': { 'priority': 9, 'takeover': 'never', },
\ '://dhall-lang.org.*': { 'priority': 9, 'takeover': 'never', }, \ '://dhall-lang.org.*': { 'priority': 9, 'takeover': 'never', },

View file

@ -55,7 +55,9 @@ Plug 'mhinz/vim-signify' " VCS info on the left
Plug 'tpope/vim-fugitive' " Difftool usage Plug 'tpope/vim-fugitive' " Difftool usage
Plug 'xeruf/vim-fossil' Plug 'xeruf/vim-fossil'
Plug 'austintraver/vim-jrnl' Plug 'austintraver/vim-jrnl'
Plug 'weinshec/vim-dictcc' " TODO do not hang without internet if has('python3')
Plug 'weinshec/vim-dictcc' " TODO do not hang without internet
endif
Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } } Plug 'glacambre/firenvim', { 'do': { _ -> firenvim#install(0) } }
Plug 'mipmip/vim-scimark' " Edit markdown tables with sc-im Plug 'mipmip/vim-scimark' " Edit markdown tables with sc-im
Plug 'alx741/vinfo' Plug 'alx741/vinfo'

View file

@ -53,3 +53,4 @@ Minecraft; Theme; Liquid
Classique Classique
Film Film
Indie; Canto Indie; Canto
Jazz, Gospel

View file

@ -1,6 +1,6 @@
{ {
"info": { "info": {
"version": "30" "version": "33"
}, },
"shortcuts": { "shortcuts": {
"__dirpath/album/track": "Alt+Meta+1" "__dirpath/album/track": "Alt+Meta+1"
@ -17,7 +17,6 @@
"&Play", "&Play",
"separator", "separator",
"&Delete", "&Delete",
"Delete &Without Confirmation",
"separator", "separator",
"&Refresh", "&Refresh",
"Refresh &Selected", "Refresh &Selected",

View file

@ -18,7 +18,7 @@
}, },
"main": { "main": {
"lang": "auto", "lang": "auto",
"lastfolder": "/home/janek/data/4-media/music", "lastfolder": "/home/janek/data/4-media/music/Electronic/Defqwop",
"maximized": true "maximized": true
}, },
"playlist": { "playlist": {
@ -45,9 +45,9 @@
"fontsize": 10, "fontsize": 10,
"rowsize": 43, "rowsize": 43,
"sort_fields": [ "sort_fields": [
"__path" "album"
], ],
"sort_reverse": false "sort_reverse": true
}, },
"extendedtags": { "extendedtags": {
"add": [ "add": [
@ -92,7 +92,8 @@
"BPM", "BPM",
"Comment", "Comment",
"Tags", "Tags",
"Dirpath" "Dirpath",
"Label"
], ],
"tags": [ "tags": [
"__path", "__path",
@ -109,7 +110,8 @@
"bpm", "bpm",
"comment", "comment",
"version", "version",
"__dirpath" "__dirpath",
"label"
] ]
}, },
"editor": { "editor": {
@ -124,7 +126,7 @@
"%artist% - %track% - %title%", "%artist% - %track% - %title%",
"%artist% - %album% - %track% - %title%" "%artist% - %album% - %track% - %title%"
], ],
"index": 0 "index": 4
}, },
"functions": { "functions": {
"last_used": "remove_dupes" "last_used": "remove_dupes"
@ -132,8 +134,7 @@
"actions": { "actions": {
"checked": [ "checked": [
"Standard", "Standard",
"Genre Splitting", "Genre Splitting"
"Genre: Christian"
] ]
}, },
"quick_actions": { "quick_actions": {

View file

@ -1,16 +1,20 @@
{ {
"info": {
"version": "33"
},
"shortcut13": { "shortcut13": {
"name": "&Text File->Tag", "name": "&Text File->Tag",
"command": "text_file_to_tag", "command": "text_file_to_tag",
"control": "mainwin", "control": "mainwin",
"enabled": "filesselected", "enabled": "filesselected",
"icon": ":/text-tag.png" "icon_name": "puddletag.textfiletotag"
}, },
"shortcut12": { "shortcut12": {
"name": "&Format", "name": "&Format",
"command": "format", "command": "format",
"control": "mainwin", "control": "mainwin",
"enabled": "filesselected", "enabled": "filesselected",
"tooltip": "Format the selected field(s) using the pattern.",
"status": "formatstatus" "status": "formatstatus"
}, },
"shortcut52": { "shortcut52": {
@ -53,7 +57,7 @@
}, },
"shortcut10": { "shortcut10": {
"name": "Autonumbering &Wizard...", "name": "Autonumbering &Wizard...",
"icon": ":/track.png", "icon_name": "puddletag.autonumber",
"command": "auto_numbering", "command": "auto_numbering",
"control": "mainwin", "control": "mainwin",
"enabled": "filesselected", "enabled": "filesselected",
@ -70,16 +74,14 @@
"command": "openPrefs", "command": "openPrefs",
"control": "mainwin", "control": "mainwin",
"enabled": "always", "enabled": "always",
"icon": ":/preferences.png",
"icon_name": "configure" "icon_name": "configure"
}, },
"shortcut15": { "shortcut15": {
"name": "&Actions", "name": "&Actions",
"command": "run_action", "command": "run_action",
"icon": ":/action.png",
"control": "mainwin", "control": "mainwin",
"enabled": "filesselected", "enabled": "filesselected",
"icon_name": "keith" "icon_name": "quickopen"
}, },
"shortcut14": { "shortcut14": {
"name": "&Import Music Library...", "name": "&Import Music Library...",
@ -96,7 +98,6 @@
"Shift+Ins" "Shift+Ins"
], ],
"enabled": "filesselected", "enabled": "filesselected",
"icon": ":/paste.png",
"icon_name": "edit-paste" "icon_name": "edit-paste"
}, },
"shortcut30": { "shortcut30": {
@ -105,14 +106,14 @@
"control": "mainwin", "control": "mainwin",
"shortcut": "Ctrl+C", "shortcut": "Ctrl+C",
"enabled": "filesselected", "enabled": "filesselected",
"icon": ":/copy.png" "icon_name": "edit-copy"
}, },
"shortcut19": { "shortcut19": {
"name": "&Rename Directories", "name": "&Rename Directories",
"command": "rename_dirs", "command": "rename_dirs",
"control": "mainwin", "control": "mainwin",
"enabled": "filesselected", "enabled": "filesselected",
"icon": ":/renamedirs.png", "icon_name": "puddletag.renamedirs",
"status": "renamedirstatus" "status": "renamedirstatus"
}, },
"shortcut18": { "shortcut18": {
@ -120,7 +121,7 @@
"command": "run_quick_action", "command": "run_quick_action",
"control": "mainwin", "control": "mainwin",
"enabled": "filesselected", "enabled": "filesselected",
"icon": ":/quickaction.png" "icon_name": "quickopen-function"
}, },
"shortcut35": { "shortcut35": {
"name": "&Properties", "name": "&Properties",
@ -133,7 +134,6 @@
"command": "deleteSelected", "command": "deleteSelected",
"control": "table", "control": "table",
"shortcut": "Del", "shortcut": "Del",
"icon": ":/remove.png",
"enabled": "filesselected", "enabled": "filesselected",
"icon_name": "edit-delete" "icon_name": "edit-delete"
}, },
@ -143,16 +143,12 @@
"control": "mainwin", "control": "mainwin",
"enabled": "filesselected" "enabled": "filesselected"
}, },
"info": {
"version": "29"
},
"shortcut9": { "shortcut9": {
"name": "&Undo", "name": "&Undo",
"shortcut": "Ctrl+Z", "shortcut": "Ctrl+Z",
"command": "undo", "command": "undo",
"control": "table", "control": "table",
"enabled": "enableUndo", "enabled": "enableUndo",
"icon": ":/undo.png",
"icon_name": "edit-undo" "icon_name": "edit-undo"
}, },
"shortcut8": { "shortcut8": {
@ -160,14 +156,13 @@
"shortcut": "Ctrl+T", "shortcut": "Ctrl+T",
"command": "filename_to_tag", "command": "filename_to_tag",
"control": "mainwin", "control": "mainwin",
"icon": ":/filetotag.png", "icon_name": "puddletag.filetotag",
"enabled": "filesselected", "enabled": "filesselected",
"tooltip": "Convert filename to tag using the pattern.", "tooltip": "Update the selected files from their filename using the pattern.",
"status": "ftstatus" "status": "ftstatus"
}, },
"shortcut3": { "shortcut3": {
"name": "Load &playlist", "name": "Load &playlist",
"icon": ":/playlist.png",
"control": "mainwin", "control": "mainwin",
"command": "loadPlayList", "command": "loadPlayList",
"enabled": "always", "enabled": "always",
@ -176,7 +171,6 @@
}, },
"shortcut2": { "shortcut2": {
"name": "&Add Folder", "name": "&Add Folder",
"icon": ":/addfolder.png",
"control": "mainwin", "control": "mainwin",
"command": "appendDir", "command": "appendDir",
"enabled": "filesloaded", "enabled": "filesloaded",
@ -185,7 +179,6 @@
}, },
"shortcut1": { "shortcut1": {
"name": "&Open Folder", "name": "&Open Folder",
"icon": ":/open.png",
"control": "mainwin", "control": "mainwin",
"command": "openDir", "command": "openDir",
"enabled": "always", "enabled": "always",
@ -207,7 +200,6 @@
"control": "Tag Panel", "control": "Tag Panel",
"command": "save", "command": "save",
"shortcut": "Ctrl+S", "shortcut": "Ctrl+S",
"icon": ":/save.png",
"enabled": "filesselected", "enabled": "filesselected",
"icon_name": "document-save" "icon_name": "document-save"
}, },
@ -217,7 +209,6 @@
"command": "reloadFiles", "command": "reloadFiles",
"shortcut": "F5", "shortcut": "F5",
"tooltip": "Refresh current file-view.", "tooltip": "Refresh current file-view.",
"icon": ":/reload.png",
"enabled": "filesloaded", "enabled": "filesloaded",
"icon_name": "view-refresh" "icon_name": "view-refresh"
}, },
@ -255,7 +246,6 @@
"command": "removeTags", "command": "removeTags",
"control": "table", "control": "table",
"shortcut": "Ctrl+R", "shortcut": "Ctrl+R",
"icon": ":/remove.png",
"enabled": "filesselected", "enabled": "filesselected",
"icon_name": "edit-delete" "icon_name": "edit-delete"
}, },
@ -266,14 +256,6 @@
"enabled": "filesselected", "enabled": "filesselected",
"shortcut": "Ctrl+Shift+C" "shortcut": "Ctrl+Shift+C"
}, },
"shortcut41": {
"name": "Delete &Without Confirmation",
"command": "deleteSelectedWithoutMessage",
"control": "table",
"enabled": "filesselected",
"shortcut": "Shift+Delete",
"icon_name": "edit-delete"
},
"shortcut42": { "shortcut42": {
"name": "In &Library", "name": "In &Library",
"command": "in_lib", "command": "in_lib",
@ -322,7 +304,6 @@
"control": "mainwin", "control": "mainwin",
"shortcut": "Ctrl+X", "shortcut": "Ctrl+X",
"enabled": "filesselected", "enabled": "filesselected",
"icon": ":/cut.png",
"icon_name": "edit-cut" "icon_name": "edit-cut"
}, },
"shortcut23": { "shortcut23": {
@ -334,7 +315,6 @@
}, },
"shortcut20": { "shortcut20": {
"name": "&Exit", "name": "&Exit",
"icon": ":/remove.png",
"control": "mainwin", "control": "mainwin",
"enabled": "always", "enabled": "always",
"command": "close", "command": "close",
@ -347,7 +327,8 @@
"enabled": "filesselected", "enabled": "filesselected",
"command": "tag_to_file", "command": "tag_to_file",
"shortcut": "Ctrl+F", "shortcut": "Ctrl+F",
"icon": ":/tagtofile.png", "icon_name": "puddletag.tagtofile",
"tooltip": "Rename the selected files using the pattern.",
"status": "tfstatus" "status": "tfstatus"
}, },
"shortcut26": { "shortcut26": {
@ -384,6 +365,6 @@
"control": "Filesystem", "control": "Filesystem",
"enabled": "filesselected", "enabled": "filesselected",
"tooltip": "Focuses the current file's parent folder in the Filesystem view", "tooltip": "Focuses the current file's parent folder in the Filesystem view",
"icon": ":/target.png" "icon_name": "view-sidetree"
} }
} }

View file

@ -17,7 +17,7 @@
], ],
"useragent": "puddletag/1.0.5", "useragent": "puddletag/1.0.5",
"track_bound": 80, "track_bound": 80,
"lastsource": "AcoustID" "lastsource": "Amazon"
}, },
"tagsourcetags": { "tagsourcetags": {
"MusicBrainz": [], "MusicBrainz": [],

View file

@ -8,10 +8,10 @@ alias yau='sudo systemctl start --show-transaction reflector && noglob yay'
alias yays='noglob yay -Sy --needed --noprovides' alias yays='noglob yay -Sy --needed --noprovides'
alias yayr='noglob yay -R --cascade --recursive' alias yayr='noglob yay -R --cascade --recursive'
_yayre_params="-S --rebuild --noprovides --nodiffmenu --noconfirm" _yayre_params="-S --rebuild --answerdiff NotInstalled --noconfirm"
# Reinstall given packages with all dependencies - https://www.reddit.com/r/archlinux/comments/33cety # Reinstall given packages with all dependencies - https://www.reddit.com/r/archlinux/comments/33cety
yayre() { yayre() {
yay $(echo $_yayre_params) --asdeps $(yay -Si "$@" | grep Depends | cut -d':' -f2) && yay $(echo $_yayre_params) --asdeps $(COLUMNS=1 yay -Si "$@" | grep Depends | cut -d':' -f2) &&
yay $(echo $_yayre_params) "$@" yay $(echo $_yayre_params) "$@"
} }
@ -21,7 +21,7 @@ yzf() {
shift shift
sed "s/ /\t/g" | sed "s/ /\t/g" |
fzf --nth=$pos --multi --history="${FZF_HISTDIR:-$XDG_STATE_HOME/fzf}/history-yzf$pos" \ fzf --nth=$pos --multi --history="${FZF_HISTDIR:-$XDG_STATE_HOME/fzf}/history-yzf$pos" \
--preview-window=60%,border-left \ --preview-window=60%,border-left,wrap \
--bind="alt-bspace:clear-query,double-click:execute(xdg-open 'https://archlinux.org/packages/{$pos}'),alt-enter:execute(xdg-open 'https://aur.archlinux.org/packages?K={$pos}&SB=p&SO=d&PP=100')" \ --bind="alt-bspace:clear-query,double-click:execute(xdg-open 'https://archlinux.org/packages/{$pos}'),alt-enter:execute(xdg-open 'https://aur.archlinux.org/packages?K={$pos}&SB=p&SO=d&PP=100')" \
"$@" | cut -f$pos | xargs "$@" | cut -f$pos | xargs
} }
@ -45,7 +45,7 @@ yas() {
) )
if test -n "$pkg" if test -n "$pkg"
then echo "Installing $pkg..." then echo "Installing $pkg..."
cmd="yay -S --batchinstall --rebuildall $pkg" cmd="yay -S --batchinstall --rebuildall --rebuildtree --rebuild $pkg"
print -s $cmd print -s $cmd
eval "$cmd" eval "$cmd"
rehash rehash

View file

@ -3,7 +3,7 @@
if test "$ZSH_NAME" = "zsh" if test "$ZSH_NAME" = "zsh"
then then
alias -g ___='"$(eval "$(fc -ln -1)" | tail -n 1)"' alias -g ___='"$(eval "$(fc -ln -1)" | tail -n 1)"'
alias -g B="| xargs bat" alias -g XB="| xargs bat"
alias -g G="| grp" alias -g G="| grp"
alias -g X="| xargs -d '\n' -L 1" alias -g X="| xargs -d '\n' -L 1"
alias -g X1="| xargs -d '\n' -n 1" alias -g X1="| xargs -d '\n' -n 1"
@ -53,6 +53,12 @@ unalias diff 2>/dev/null
# Alias on some systems? # Alias on some systems?
unalias rd 2>/dev/null unalias rd 2>/dev/null
alias ai='aichat --session'
alias ky='aichat --role swahili'
alias en='aichat --role en'
alias aish='aichat --role shell --session'
alias write='aichat --role write --save-session --session'
# System help {{{1 # System help {{{1
compdef tldr=man compdef tldr=man
@ -86,7 +92,9 @@ xtrace() {
} }
retry() { retry() {
while ! "$@"; do sleep 2; done duration=2
case "$1" in ([0-9]|[0-9][0-9]) duration=$1; shift;; esac
while ! "$@"; do sleep $duration; done
} }
# Shows source for given command, resolving nested aliases # Shows source for given command, resolving nested aliases
@ -290,7 +298,7 @@ u() {
fi fi
if command -v topgrade >/dev/null if command -v topgrade >/dev/null
then then
nice -10 topgrade --disable node emacs remotes rustup nix nice -15 topgrade --disable node emacs remotes rustup nix
if test -d "$XDG_CONFIG_HOME/emacs" if test -d "$XDG_CONFIG_HOME/emacs"
then then
builtin cd $XDG_CONFIG_HOME/emacs builtin cd $XDG_CONFIG_HOME/emacs
@ -312,12 +320,13 @@ u() {
# Networking # Networking
alias rdns='drill -x' alias rdns='drill -x'
dns() { dns() {
local dig="drill -Q" local dig='drill -Q'
which drill >/dev/null || dig="dig +short" which drill >/dev/null || dig='dig +short'
local server=1.1.1.1 local server=1.1.1.1
# TODO allow changing DNS server with @ case "$*" in (*@*) server="${*##*@}";; esac
# TODO implement rdns via -x # TODO implement rdns via -x
for arg; do for arg; do
case "$arg" in (@*) return;; esac
local trimmed="${arg##*//}" local trimmed="${arg##*//}"
local cut="${trimmed%%/*}" local cut="${trimmed%%/*}"
if which host >/dev/null 2>&1 if which host >/dev/null 2>&1
@ -328,6 +337,7 @@ dns() {
fi fi
done done
} }
alias sshk="$(case $TERM in (*-kitty) echo 'TERM=xterm-256color kitty +kitten';; esac) ssh" alias sshk="$(case $TERM in (*-kitty) echo 'TERM=xterm-256color kitty +kitten';; esac) ssh"
sshl() { sshl() {
test "$1" = "-a" && shift && local all=true test "$1" = "-a" && shift && local all=true
@ -383,9 +393,9 @@ alias pmd='pandoc -t markdown_strict-raw_html'
alias clr='diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33 | less -F' alias clr='diffr --colors refine-added:none:background:0x33,0x66,0x33:bold --colors added:none:background:0x33,0x44,0x33 --colors refine-removed:none:background:0x66,0x33,0x33:bold --colors removed:none:background:0x44,0x33,0x33 | less -F'
# Fossil # Fossil
alias f='fossil' alias fs='fossil'
alias fl='fossil timeline --format "[%d] %h %c <%a>"' alias fl='fossil timeline --format "[%d] %h %c <%a>"'
alias fs='fossil status' alias ft='fossil status'
alias fc='fossil commit -v' alias fc='fossil commit -v'
fdf() { fdf() {
fossil diff "$@" | clr fossil diff "$@" | clr
@ -519,17 +529,21 @@ killm() {
# Files {{{1 # Files {{{1
which exa >/dev/null && if which exa >/dev/null
alias l='exa --icons --group-directories-first' && then alias l='exa --group-directories-first --icons'
alias ll='l --long --git --all' alias ll='l --long --git --all'
else alias l='ls -F'
alias ll='l -lAh'
fi
if which fd >/dev/null 2>&1 if which fd >/dev/null 2>&1
then then
# [F]ind [n]o ignore # [F]ind [n]o ignore
fn() { $(command -v fd || echo fdfind) --hidden --no-ignore-vcs --one-file-system "$@" | less -F; } fn() { $(command -v fd || echo fdfind) -E env --hidden --no-ignore-vcs --one-file-system "$@" | less -F; }
# [F]ind [F]ile # [F]ind [F]ile
alias ff="noglob fn --color=always " alias f="noglob fn --color=always "
compdef ff=fd alias ff=f
compdef f=fd
compdef fn=fd compdef fn=fd
else else
alias ff='find -not -path "*.sync*" -and -not \( -name daten -prune \) -iname' alias ff='find -not -path "*.sync*" -and -not \( -name daten -prune \) -iname'
@ -542,13 +556,15 @@ alias rcn='rsync -v --recursive --human-readable --links --dry-run'
rcd() { rcn --size-only "$@" | tail +2 | tree --fromfile . | less -F; } rcd() { rcn --size-only "$@" | tail +2 | tree --fromfile . | less -F; }
compdef rcd=rsync compdef rcd=rsync
# TODO do not sync times to FAT # TODO do not sync times to FAT
alias rc='rcs --links --hard-links --times' alias rc='rcs --safe-links --hard-links --times'
alias rcu='rc --existing --size-only' alias rcu='rc --existing --size-only'
alias rcr='rcs --compress --size-only --times' alias rcr='rcs --compress --size-only --times'
alias rcs='rsync --recursive --info=progress2,remove,symsafe,flist,del --human-readable' alias rcs='rsync --recursive --info=progress2,remove,symsafe,flist,del --human-readable'
alias dsync='rc --delete --specials' alias dsync='rc --delete --specials'
alias move='rc --remove-source-files' alias move='rc --remove-source-files'
alias rdiff='rsync --recursive --checksum --delete --links --dry-run' # https://unix.stackexchange.com/questions/57305/rsync-compare-directories/177946
# You need to add a / at the end of source but NOT target: rsync -avnc $SOURCE/ $TARGET
alias rdiff='rsync --info=name --recursive --checksum --delete --links --dry-run'
alias rdiffe='rdiff --existing --size-only' alias rdiffe='rdiff --existing --size-only'
# Swap the names of two files # Swap the names of two files
@ -633,7 +649,7 @@ umoul() {
for mountpoint in $mountpoints; do for mountpoint in $mountpoints; do
while true; do while true; do
case "$PWD" in case "$PWD" in
("$mountpoint"*) popd || builtin cd "$(dirname "$mountpoint")";; ("$mountpoint"*) popd 2>/dev/null || builtin cd "$(dirname "$mountpoint")";;
(*) break;; (*) break;;
esac esac
done done
@ -656,6 +672,7 @@ function zipdiff() {
# SWAP # SWAP
alias memstat='free -h | awk '"'"'NR==2 {printf "Free memory:\t %s/%s\t(%d%)\n",$7,$2,$7*100/$2} NR==3 {if($2 != "0B") printf "Used swap:\t%s/%s\t(%d%)\n",$3,$2,$2*100/$3}'"'" alias memstat='free -h | awk '"'"'NR==2 {printf "Free memory:\t %s/%s\t(%d%)\n",$7,$2,$7*100/$2} NR==3 {if($2 != "0B") printf "Used swap:\t%s/%s\t(%d%)\n",$3,$2,$2*100/$3}'"'"
# Force all swapped memory to live memory by deallocating it
stopswap() { stopswap() {
memstat memstat
swap_used=$(cat /proc/meminfo | grep SwapFree | awk '{print $2}') swap_used=$(cat /proc/meminfo | grep SwapFree | awk '{print $2}')
@ -672,6 +689,7 @@ stopswap() {
fi fi
} }
# Extrace proxmox vma archive
extrac() { extrac() {
test "$#" -lt 1 && echo "$0 <archive.vma[.lzo]>..." && return 2 test "$#" -lt 1 && echo "$0 <archive.vma[.lzo]>..." && return 2
for var; do for var; do

View file

@ -1,6 +1,6 @@
# Pop up a message, for long running commands # Pop up a message, for long running commands
command -v notify-send >/dev/null && command -v notify-send >/dev/null &&
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(echo "$history[$HISTCMD]" | sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"' alias alert='notify-send --urgency=normal -i "$([ $? = 0 ] && echo terminal || echo error)" "$(echo "$history[$HISTCMD]" | sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
if which jrnl >/dev/null; then if which jrnl >/dev/null; then
j(){ jrnl "$@" && jrnl-tag; } j(){ jrnl "$@" && jrnl-tag; }
@ -56,7 +56,7 @@ themeswitch() {
kitty="$XDG_CONFIG_HOME/kitty/theme.conf" kitty="$XDG_CONFIG_HOME/kitty/theme.conf"
case "$theme" in case "$theme" in
(light) (light)
alias ai='aichat --light-theme' alias aichat='aichat --light-theme'
# LESS_TERMCAP_DEBUG=true man man # LESS_TERMCAP_DEBUG=true man man
export LESS_TERMCAP_md=$'\e[1;34m' # bold blue export LESS_TERMCAP_md=$'\e[1;34m' # bold blue
export BAT_THEME="OneHalfLight" export BAT_THEME="OneHalfLight"
@ -66,7 +66,7 @@ themeswitch() {
#mozedit $mozfile '/light@mozilla/,/"enabled"/ s/\("enabled":.*\)false/\1true/; /dark@mozilla/,/"enabled"/ s/\("enabled":.*\)true/\1false/' #mozedit $mozfile '/light@mozilla/,/"enabled"/ s/\("enabled":.*\)false/\1true/; /dark@mozilla/,/"enabled"/ s/\("enabled":.*\)true/\1false/'
;; ;;
(dark) (dark)
alias ai=aichat alias aichat='aichat'
export BAT_THEME="OneHalfDark" export BAT_THEME="OneHalfDark"
#konsoleprofile colors="Breeze" #konsoleprofile colors="Breeze"
rm -f "$kitty" rm -f "$kitty"
@ -81,9 +81,6 @@ export THEME=${THEME:-$theme_default}
themeswitch $THEME themeswitch $THEME
alias ts='themeswitch' alias ts='themeswitch'
alias ky='ai --role swahili'
alias en='ai --role en'
test "$XDG_CURRENT_DESKTOP" = "KDE" || return 0 test "$XDG_CURRENT_DESKTOP" = "KDE" || return 0
# Fix errors regarding broken mim database # Fix errors regarding broken mim database

View file

@ -46,11 +46,12 @@ stack() {
;; ;;
(activate) (activate)
test -d "$STACKSPIN" && . "$STACKSPIN/env/bin/activate" test -d "$STACKSPIN" && . "$STACKSPIN/env/bin/activate"
test $# -gt 0 && "$cmdname" select "$@"
;; ;;
(setup) # https://docs.stackspin.net/en/latest/installation/install_cli.html (setup) # https://docs.stackspin.net/en/latest/installation/install_cli.html
cd "$STACKSPIN" && cd "$STACKSPIN" &&
python3 -m venv env && python3 -m venv env &&
"$0" activate "$cmdname" activate
;; ;;
(override) (override)
cd "$STACKSPIN/../stackspout/overrides" cd "$STACKSPIN/../stackspout/overrides"
@ -80,7 +81,7 @@ data:
fi;; fi;;
(user|app) (user|app)
if test "$1" = "init" if test "$1" = "init"
then test $# -gt 2 || { echo "$0 $command $1 MAIL NAME"; return 2; } then test $# -gt 2 || { echo "Usage: $cmdname $command $1 MAIL NAME"; return 2; }
mail="$2" mail="$2"
shift 2 shift 2
"$cmdname" user create "$mail" && "$cmdname" user create "$mail" &&
@ -90,7 +91,7 @@ data:
fi;; fi;;
(invite) ( (invite) (
# Mail invitation to new users # Mail invitation to new users
test $# -gt 0 || { printf "$0 $command MAIL [NAME] [TEMPLATE]\nName can be omitted if mail is firstname.lastname@domain\n"; return 2; }; test $# -gt 0 || { printf "Usage: $cmdname $command MAIL [NAME] [TEMPLATE]\nName can be omitted if mail is firstname.lastname@domain\n"; return 2; };
export mail=$1 export mail=$1
export name=${2:-$(echo $mail | sed -E 's/(.*)\.(.*)@.*/\u\1 \u\2/' )} export name=${2:-$(echo $mail | sed -E 's/(.*)\.(.*)@.*/\u\1 \u\2/' )}
#echo "$mail,$name" #echo "$mail,$name"
@ -117,21 +118,22 @@ data:
esac esac
;; ;;
(reconcile) (reconcile)
app=$1 local app=$1
namespace=${2:-stackspout} local namespace=${2:-stackspout}
if flux suspend helmrelease -n $namespace $app shift $(expr $# \& $# \< 2 \| 2)
then flux resume helmrelease -n $namespace $app if flux suspend helmrelease -n $namespace $app "$@"
else flux suspend helmrelease -n stackspin-apps $app then flux resume helmrelease -n $namespace $app "$@"
flux resume helmrelease -n stackspin-apps $app else flux suspend helmrelease -n stackspin-apps $app "$@"
flux resume helmrelease -n stackspin-apps $app "$@"
fi fi
flux suspend kustomization $app flux suspend kustomization $app "$@"
flux resume kustomization $app flux resume kustomization $app "$@"
;; ;;
(edit) (edit)
# Edit the URL for an application # Edit the URL for an application
app=$1 local app=$1
kubectl edit configmap -n flux-system stackspin-$app-kustomization-variables kubectl edit configmap -n flux-system stackspin-$app-kustomization-variables
"$0" reconcile $app "$cmdname" reconcile $app
;; ;;
# Velero # Velero
(restic) (restic)
@ -150,20 +152,20 @@ data:
if test $# -gt 0 if test $# -gt 0
then velero "$@" then velero "$@"
else else
backupname=$(date +%y%m%d.%H%m) local backupname=$(date +%y%m%d.%H%m)
velero create backup $backupname --exclude-namespaces velero --wait velero create backup $backupname --exclude-namespaces velero --wait
velero backup logs $backupname velero backup logs $backupname
fi;; fi;;
(restore) (restore)
if test $# -lt 2 if test $# -lt 2
then echo "$0 $command <backup> <app> [namespace]" then echo "Usage: $cmdname $command <backup> <app> [namespace]"
echo "Recent Backups:" echo "Recent Completed Backups:"
velero backup get | grep Completed | awk '{print $5 "\t" $1}' | sort -r | head -9 velero backup get | grep Completed | awk '{print $5 "\t" $1}' | sort -r | head -9
return 1 return 1
fi fi
backup=$1; app=$2 local backup=$1; app=$2
namespace=${3:-stackspin-apps} # TODO automatically handle stackspout apps local namespace=${3:-stackspin-apps} # TODO automatically handle stackspout apps
restore="${backup}-$app-$(date +%s)" local restore="${backup}-$app-$(date +%s)"
if test "$app" = dashboard if test "$app" = dashboard
then kust=single-sign-on then kust=single-sign-on
hr="$kust-database" hr="$kust-database"
@ -173,12 +175,17 @@ data:
fi fi
flux suspend kustomization $kust flux suspend kustomization $kust
flux suspend helmrelease -n $namespace $hr flux suspend helmrelease -n $namespace $hr
(
test $# -gt 3 && shift 3 || shift $#
set -e
kubectl delete all -n $namespace -l stackspin.net/backupSet=$app kubectl delete all -n $namespace -l stackspin.net/backupSet=$app
kubectl delete secret -n $namespace -l stackspin.net/backupSet=$app kubectl delete secret -n $namespace -l stackspin.net/backupSet=$app
kubectl delete configmap -n $namespace -l stackspin.net/backupSet=$app kubectl delete configmap -n $namespace -l stackspin.net/backupSet=$app
kubectl delete pvc -n $namespace -l stackspin.net/backupSet=$app kubectl delete pvc -n $namespace -l stackspin.net/backupSet=$app
velero restore create $restore --from-backup=$backup -l stackspin.net/backupSet=$app echo "Creating $app velero restore..."
echo "Waiting a few seconds for $app backup to restore..." velero restore create "$restore" --from-backup=$backup --selector stackspin.net/backupSet=$app --existing-resource-policy update "$@"
velero restore create "$restore-secrets" --from-backup=$backup --include-resources Secret --selector kustomize.toolkit.fluxcd.io/name=$app-secrets --existing-resource-policy update
echo "Waiting a few seconds for $app backup restore to start..."
sleep 10 sleep 10
local readresult local readresult
while test -z "$readresult" while test -z "$readresult"
@ -187,13 +194,16 @@ data:
read readresult read readresult
done done
test $app = dashboard && test $app = dashboard &&
"$cmdname" mariar stackspin-database hydra -e 'DELETE FROM hydra_client;' &&
kubectl delete secret -n stackspin hydra && kubectl delete secret -n stackspin hydra &&
flux reconcile helmrelease -n stackspin hydra flux reconcile helmrelease -n stackspin hydra
)
flux resume helmrelease -n $namespace $hr # TODO timeout flux resume helmrelease -n $namespace $hr # TODO timeout
flux resume kustomization $kust flux resume kustomization $kust
;; ;;
(restore-pvc) (restore-pvc)
test $# -lt 1 && echo "$0 $command <app> [dir]" >&2 && return 1 # Restore PVC for app from local directory
test $# -lt 1 && echo "Usage: $cmdname $command <app> [dir]" >&2 && return 1
local app=$1 local app=$1
if test -d "$2" if test -d "$2"
then dir="$2" then dir="$2"
@ -209,23 +219,38 @@ data:
;; ;;
# KUBE # KUBE
# app clis # app clis
(nc-apps)
"$cmdname" reconcile nextcloud stackspin-apps --timeout 2m
kubectl get -n stackspin-apps configmap nc-setup-apps -o jsonpath='{.data.setup-apps\.sh}' | kubectl exec -i -n $(kubectl get pods --all-namespaces --field-selector="status.phase=Running" -o=custom-columns=S:.metadata.namespace,N:.metadata.name --no-headers "$@" | grep nextcloud) -- /bin/bash
;;
(occ) "$cmdname" exec nc-nextcloud -c nextcloud -it -- su www-data -s /bin/bash -c "php $command $*";; (occ) "$cmdname" exec nc-nextcloud -c nextcloud -it -- su www-data -s /bin/bash -c "php $command $*";;
(zulip) "$cmdname" exec zulip -- su zulip -c "/home/zulip/deployments/current/scripts/$* || /home/zulip/deployments/current/manage.py $*";; (zulip) "$cmdname" exec zulip -- su zulip -c "/home/zulip/deployments/current/scripts/$* || /home/zulip/deployments/current/manage.py $*";;
(vikunja*) (vikunja*)
local pod=$command local pod=$command
poddir="$(basename "$CLUSTER_DIR"):$(kubectl describe pv -n stackspout | grep _$pod-files | awk '{print $2}')"
case "$1" in case "$1" in
(dump|export) cd "$PROJECTS/vikunja" (dump|export) cd "$PROJECTS/vikunja"
"$cmdname" exec "$pod-api" -- \ filename="$pod-dump_$(date +%F).zip"
sh -c 'rm -f *.zip && ./vikunja dump >/dev/null && ls --color -lAhF >&2 && cat *.zip' >"$pod-dump_$(date +%F).zip" if ! "$cmdname" exec "$pod-api" -- sh -c 'rm -f *.zip && ./vikunja dump >/dev/null && ls --color -lAhF >&2 && cat *.zip' >"$filename"
then "$cmdname" exec "$pod" -- ./vikunja dump -p /app/vikunja/files &&
scp "$poddir/*.zip" "$filename"
fi &&
(
cur="$PWD/${filename}"
cd "$(mktemp -d --suffix=_$filename)"
unzip "$cur"
zip "${cur}_noconfig.zip" VERSION .env database/*
)
;; ;;
(restore) (restore)
if ! test -f "$2"
then echo "Usage: $0 vikunja[suffix] restore <file>" >&2
return 2
fi
file=$2 file=$2
"$cmdname" upload "$pod-api" "$file" if ! test -f "$file"
"$cmdname" exec "$pod-api" -it -- ./vikunja restore "$file" then echo "Usage: $cmdname vikunja[suffix] restore <file>" >&2
else
scp "$file" "$poddir/"
#"$cmdname" upload "$pod" "$file"
fi
"$cmdname" exec "$pod" -it -- ./vikunja restore "/app/vikunja/files/$(basename $file)"
;; ;;
(psql) (psql)
kubectl exec -it -n $("$cmdname" pod "$pod-postgresql") -- \ kubectl exec -it -n $("$cmdname" pod "$pod-postgresql") -- \
@ -248,7 +273,8 @@ data:
;; ;;
(exec) command="$2" (exec) command="$2"
shift 2 shift 2
kubectl exec -it -n $("$cmdname" pod "$app-postgresql") -- sh -c "PGPASSWORD=$(kubectl get secret --namespace stackspout $app-postgresql -o jsonpath='{.data.password}' | base64 --decode) $command -h localhost -U $app -p 5432 $*" echo '\\du+ (users) \\l (databases, then \\c DATABASE) \\dt (tables, then \\d+ TABLE)'
kubectl exec -it -n $("$cmdname" pod "$app-postgresql") -- sh -c "PGPASSWORD=$(kubectl get secret --namespace stackspout $app-postgresql -o jsonpath='{.data.password}' | base64 --decode) $command -h localhost -U $(echo $app | cut -d- -f1) -p 5432 $*"
;; ;;
(*) (*)
"$cmdname" psql "$app" exec psql "$@" "$cmdname" psql "$app" exec psql "$@"
@ -263,23 +289,42 @@ data:
(wordpress) n=wordpress-database;; (wordpress) n=wordpress-database;;
(*) n=$app-mariadb;; (*) n=$app-mariadb;;
esac esac
"$cmdname" exec $n -it -- env "MYSQL_PWD=$pw" mysql -u $app "$@" "$cmdname" exec $n -it -- env "MYSQL_PWD=$pw" mysql -u "$app" "$@"
;; ;;
(mariar) (mariar)
name="$1-mariadb" local app="$1"
shift shift
pod="$(kubectl get secret --all-namespaces -o=custom-columns=S:.metadata.namespace,N:.metadata.name --no-headers | grep --color=never -- "$name")" && kubesecret="$(kubectl get secret --all-namespaces -o=custom-columns=S:.metadata.namespace,N:.metadata.name --no-headers | command grep -- " $app")" ||
"$cmdname" exec "$name" -it -- env "MYSQL_PWD=$(kubectl get secret -n $pod -o jsonpath='{.data.mariadb-root-password}' | base64 -d)" mysql -u root "$@" { echo "Cannot find database pod"; return 2; }
local db=${kubesecret##*-}
local databasepod="$app-$db"
local mysql_pwd="$(kubectl get secret -n $kubesecret -o "jsonpath={.data.${db}-root-password}" | base64 -d)"
local execline="$cmdname exec $databasepod -it -- env MYSQL_PWD=$mysql_pwd"
if test "$1" = dump
then
dumpfile="$(date +%y%m%d)_${databasepod}"
echo "Dumping into $dumpfile..."
$execline mysqldump --extended-insert=FALSE -u root --all-databases >"${dumpfile}.sql"
$execline mysqldump --no-data -u root --all-databases >"${dumpfile}_schema.sql"
else echo "MySQL Reference --- SHOW databases; USE <db>; SHOW tables; DESC <table>;"
$execline mysql --silent -u root "${@:-${app%-database}}"
fi
;; ;;
# high-level # high-level
(all)
case $1 in (-*);; (*) args="-A -l stackspin.net/backupSet=$1";; esac
kubectl api-resources --verbs=list --namespaced -o name | xargs -n 1 kubectl get -o custom-columns=KIND:.kind,NS:.metadata.namespace,NAME:.metadata.name,AGE:.metadata.creationTimestamp --no-headers ${args:-$@}
;;
(list) (list)
flux get all | grep "$1" flux get all | grep --color=never "$1"
kubectl get all -A | grep "$1";; kubectl get all -A --no-headers | grep --color=never "$1"
;;
(shell) (shell)
local container=$1 local container=$1
shift shift
test "$1" = "-c" && pod=$2 && shift 2 test "$1" = "-c" && pod=$2 && shift 2
"$cmdname" exec "$container" -c "$pod" -it -- /bin/sh "$@";; "$cmdname" exec "$container" -c "$pod" -it -- /bin/sh "$@"
;;
(ls) (ls)
if test $# -gt 1 && ! [[ "$2" =~ ".*/.*" ]] if test $# -gt 1 && ! [[ "$2" =~ ".*/.*" ]]
then "$cmdname" exec "$1" "$2" "$3" -it -- ls -lAhF --group-directories-first "${@:4}" then "$cmdname" exec "$1" "$2" "$3" -it -- ls -lAhF --group-directories-first "${@:4}"
@ -292,33 +337,44 @@ data:
kubectl cp "$2" -n $("$cmdname" pod "$1$pod_suffix"):$2 "${@:3}" kubectl cp "$2" -n $("$cmdname" pod "$1$pod_suffix"):$2 "${@:3}"
"$cmdname" ls "$1" "${@:3}";; "$cmdname" ls "$1" "${@:3}";;
(exec) "$cmdname" kube exec "$@";; (exec) "$cmdname" kube exec "$@";;
(logs) test $# -gt 0 || { echo "$0 $command <pod> [lnav-args...]"; return; } (logs) test $# -gt 0 || { echo "$cmdname $command <pod> [lnav-args...]"; return; }
podname="$1" podname="$1" || return $?
shift shift
"$cmdname" kube logs "$podname" -f | $(command which ${LOGPAGER:-lnav} || { which bat >/dev/null && echo "bat --number -l toml" } || echo 'less -RF') "$@";; "$cmdname" kube logs "$podname" -f | $(command which ${LOGPAGER:-lnav} || { which bat >/dev/null && echo "bat --number -l toml" } || echo 'less -RF') "$@" ||
kubectl describe pod -n $("$cmdname" pod "$podname" --field-selector='')
;;
# low-level # low-level
(kube) (kube)
test $# -gt 1 || { echo "Please provide a command and pod name" >&2 && return 1; } test $# -gt 1 || { echo "Please provide a command and pod name" >&2; return 1; }
local pods=$("$cmdname" pod "$2$pod_suffix") || { echo "No pod found for $2" >&2 && return 1; } local pods="$("$cmdname" pod "$2$pod_suffix")"
test -n "$pods" || return $?
local subcommand=$1 local subcommand=$1
shift 2 shift 2
local commands=() local commands=()
for arg for arg
do case "$arg" in (-*) break;; (*) commands+="$arg"; shift;; esac do case "$arg" in (-*) break;; (*) commands+="$arg"; shift;; esac
done done
namespacedpod="$pods" if test $(echo "$pods" | wc -l) -gt 1
#while IFS= read -r namespacedpod; do then
for namespacedpod in "${(f)pods}"
do test "$subcommand" = get ||
highlight "Running $subcommand on $namespacedpod" >&2
kubectl "$subcommand" "${commands[@]}" -n $namespacedpod "$@"
done
else
namespacedpod="$pods"
test "$subcommand" = get || test "$subcommand" = get ||
highlight "Running $subcommand on $namespacedpod" >&2 highlight "Running $subcommand on $namespacedpod" >&2
kubectl "$subcommand" "${commands[@]}" -n $namespacedpod "$@" kubectl "$subcommand" "${commands[@]}" -n $namespacedpod "$@"
#done <<< "$pods" fi
;; ;;
(pod) (pod)
test $# -gt 0 && local podname=$1 && shift test $# -gt 0 && local podname=$1 && shift
if ! kubectl get pods --all-namespaces --field-selector="status.phase=Running" -o=custom-columns=S:.metadata.namespace,N:.metadata.name --no-headers "$@" | grep --color=never -- "$podname" if ! kubectl get pods --all-namespaces --field-selector="status.phase=Running" -o=custom-columns=S:.metadata.namespace,N:.metadata.name --no-headers "$@" | grep --color=never -- "$podname"
then code=$? then
echo "No pod found for $podname" >&2 code=$?
return $code echo "No running pod found for $podname" >&2
return $(expr $code \| 1)
fi fi
;; ;;
(clean-pods) (clean-pods)
@ -327,6 +383,13 @@ data:
awk '{print "--namespace=" $1 " " $2}' | awk '{print "--namespace=" $1 " " $2}' |
xargs -L 1 kubectl delete pod;; xargs -L 1 kubectl delete pod;;
# stackspin bare # stackspin bare
(upgrade)
"$cmdname" backup
git switch v2
git pull upstream v2
git push
flux resume source git stackspin
;;
(*) if which "$cmdname-$command" >/dev/null 2>&1 (*) if which "$cmdname-$command" >/dev/null 2>&1
then "$cmdname-$command" "$@" then "$cmdname-$command" "$@"
return $? return $?
@ -338,12 +401,12 @@ data:
case "$1" in case "$1" in
([a-z]*) ([a-z]*)
for arg for arg
do kubectl exec -n stackspin deploy/dashboard -c backend -- flask cli app install "$arg" do kubectl exec -n stackspin deploy/dashboard-backend -- flask cli app install "$arg"
done;; done;;
(""|-*) (""|-*)
python3 -m pip install --upgrade pip python -m pip install --upgrade pip
python3 -m pip install -r requirements.txt python -m pip install -r requirements.txt
python3 -m stackspin "$@" "$_cluster_name" "$command" python -m stackspin "$@" "${_cluster_name}" "$command"
cp -nv "install/.flux.env.example" "clusters/$_cluster_name/.flux.env" && cp -nv "install/.flux.env.example" "clusters/$_cluster_name/.flux.env" &&
$EDITOR "clusters/$_cluster_name/.flux.env" $EDITOR "clusters/$_cluster_name/.flux.env"
cp -nv install/kustomization.yaml $CLUSTER_DIR/ cp -nv install/kustomization.yaml $CLUSTER_DIR/
@ -351,7 +414,8 @@ data:
kubectl apply -k $CLUSTER_DIR kubectl apply -k $CLUSTER_DIR
ssh "root@${_cluster_name}" mkdir /etc/nftables.d ssh "root@${_cluster_name}" mkdir /etc/nftables.d
ssh "root@${_cluster_name}" echo 'tcp dport { 2222 } counter accept' | tee /etc/nftables.d/ssh.nft ssh "root@${_cluster_name}" "echo 'tcp dport { 2222 } counter accept' | tee /etc/nftables.d/ssh.nft"
ssh "root@${_cluster_name}" "echo 'udp dport { 22222 } counter accept' | tee /etc/nftables.d/mosh.nft"
./install/install-stackspin.sh ./install/install-stackspin.sh
;; ;;
@ -364,16 +428,15 @@ data:
cat "$_stackspin_cluster_cache" 2>/dev/null | cat "$_stackspin_cluster_cache" 2>/dev/null |
while read cluster; do stack select "$cluster"; done while read cluster; do stack select "$cluster"; done
test -z "$DISPLAY" && test "$XDG_VTNR" != 1 || return 0
# The following runs only on headless machines # Run following code only on headless machines
test -z "$DISPLAY" && test "$XDG_VTNR" != 1 && ! pgrep -qx "SystemUIServer" || return 0
which kubectl >/dev/null || which kubectl >/dev/null ||
{ kubectl() { sudo k3s kubectl "$@"; } && export -f kubectl; } { kubectl() { sudo k3s kubectl "$@"; } && export -f kubectl; }
export PATH="$PATH:$HOME/.local/bin/server" export PATH="$PATH:$HOME/.local/bin/server"
test -d "$MUSIC" || export MUSIC="/srv/funkwhale/data/music/janek"
test -f "$HOME/.rvm/scripts/rvm" && test -f "$HOME/.rvm/scripts/rvm" &&
source "$HOME/.rvm/scripts/rvm" && # Load RVM into a shell session *as a function* source "$HOME/.rvm/scripts/rvm" && # Load RVM into a shell session *as a function*
rvm use 3.0 rvm use 3.0

View file

@ -2,5 +2,10 @@ input * {
xkb_layout eu,de,us xkb_layout eu,de,us
xkb_variant basic,nodeadkeys,euro xkb_variant basic,nodeadkeys,euro
xkb_numlock enabled xkb_numlock enabled
xkb_options caps:escape_shifted_capslock #xkb_options caps:escape_shifted_capslock
repeat_delay 300
repeat_rate 50
repeat_rate 0
repeat_rate 30
} }

View file

@ -8,7 +8,7 @@ pre_sudo = true
#assume_yes = ["emacs"] #assume_yes = ["emacs"]
# Disable specific steps - same options as the command line flag # Disable specific steps - same options as the command line flag
disable = ["containers", "config_update", "node", "firmware"] disable = ["containers", "config_update", "poetry", "auto_cpufreq"]
# Ignore failures for these steps # Ignore failures for these steps
#ignore_failures = ["powershell"] #ignore_failures = ["powershell"]
@ -58,7 +58,8 @@ repos = [
[linux] [linux]
# Arguments to pass yay when updating packages # Arguments to pass yay when updating packages
yay_arguments = "--diffmenu=false --overwrite /usr/lib/node_modules/node-gyp/**,/usr/lib/node_modules/npm/**,/usr/lib/** --ignore linux,zoom,qt*,zulip*,webcord*,brave*,*openjfx,android-studio*,clion*,intellij-idea-*,webstorm*,texlive-full" #qt*,
yay_arguments = "--diffmenu=false --overwrite /usr/lib/node_modules/node-gyp/**,/usr/lib/node_modules/npm/**,/usr/lib/**,/usr/include/** --ignore ggml-git,bitmask-vpn,linux,zoom,zulip*,webcord*,brave*,android-studio*,clion*,intellij-idea-*,webstorm*,rubymine*,rustrover*,slack*,texlive-full,jdk,*openjfx,invoiceninja*"
#trizen_arguments = "--devel" #trizen_arguments = "--devel"
#enable_tlmgr = true #enable_tlmgr = true
#emerge_sync_flags = "-q" #emerge_sync_flags = "-q"
@ -82,4 +83,4 @@ use_sudo = true
[firmware] [firmware]
# Offer to update firmware; if false just check for and display available updates # Offer to update firmware; if false just check for and display available updates
#upgrade = true upgrade = true

View file

@ -5,12 +5,12 @@
# Arrange displays in a ROW (default, left to right) or a COLUMN (top to bottom) # Arrange displays in a ROW (default, left to right) or a COLUMN (top to bottom)
#ARRANGE: COLUMN ARRANGE: COLUMN
ARRANGE: ROW
# Align ROWs at the TOP (default), MIDDLE or BOTTOM # Align ROWs at the TOP (default), MIDDLE or BOTTOM
# Align COLUMNs at the LEFT (default), MIDDLE or RIGHT # Align COLUMNs at the LEFT (default), MIDDLE or RIGHT
ALIGN: MIDDLE #ALIGN: MIDDLE
#ALIGN: BOTTOM
# The default ORDER is simply the order in which the displays are discovered. # The default ORDER is simply the order in which the displays are discovered.
@ -20,8 +20,9 @@ ORDER:
- 'LOEWE' - 'LOEWE'
- 'DP-4' # left port - 'DP-4' # left port
- 'VFV' - 'VFV'
- 'BOE' #internal
- 'DP-3' - 'DP-3'
- 'DP-2' # right port adapter
- 'BOE' #internal
- 'DP-1' # right port - 'DP-1' # right port
# The default is to scale each display by DPI. # The default is to scale each display by DPI.
@ -38,6 +39,8 @@ SCALE:
SCALE: 1 SCALE: 1
- NAME_DESC: 'LOEWE' # CODE Big - NAME_DESC: 'LOEWE' # CODE Big
SCALE: 2 SCALE: 2
- NAME_DESC: 'LG Ultra' # Home 4k
SCALE: 2
#- NAME_DESC: 'BOE' # Framework internal #- NAME_DESC: 'BOE' # Framework internal
# SCALE: 2 # SCALE: 2
@ -46,15 +49,15 @@ SCALE:
# for a possible workaround. # for a possible workaround.
MODE: MODE:
# Resolution and refresh # Resolution and refresh
#- NAME_DESC: HDMI-A-1 - NAME_DESC: BOE
# WIDTH: 1920 WIDTH: 2560
# HEIGHT: 1080 HEIGHT: 1600
# HZ: 60 HZ: 60.002
# Resolution with highest refresh - NAME_DESC: '5K'
#- NAME_DESC: 'monitor description' WIDTH: 3440
# WIDTH: 2560 HEIGHT: 1440
# HEIGHT: 1440 HZ: 30
# Highest available # Highest available
#- NAME_DESC: DP-2 #- NAME_DESC: DP-2
@ -66,10 +69,11 @@ MODE:
# One of: ERROR, WARNING, INFO (default), DEBUG # One of: ERROR, WARNING, INFO (default), DEBUG
LOG_THRESHOLD: INFO LOG_THRESHOLD: DEBUG
# Disable the specified displays. # Disable the specified displays.
DISABLED: #DISABLED:
#- "eDP-1" # - "eDP-1"
#VRR_OFF:
# - DP-4

View file

@ -17,9 +17,9 @@ subhighlight "password-free reboot"
echo "$USER ALL = NOPASSWD: /usr/bin/halt, /usr/bin/shutdown, /usr/bin/reboot, /usr/bin/poweroff, /bin/reboot, /bin/shutdown. /usr/bin/umount" | echo "$USER ALL = NOPASSWD: /usr/bin/halt, /usr/bin/shutdown, /usr/bin/reboot, /usr/bin/poweroff, /bin/reboot, /bin/shutdown. /usr/bin/umount" |
sudo tee /etc/sudoers.d/shutdown sudo tee /etc/sudoers.d/shutdown
highlight "Set default user in tty1,2,3" highlight "Set default user in tty1-4"
agetty="$(sudo which agetty)" && agetty="$(sudo which agetty)" &&
sudo mkdir -p /etc/systemd/system/getty@tty{1,2,3}.service.d && sudo mkdir -p /etc/systemd/system/getty@tty{1,2,3,4}.service.d &&
echo "[Service] echo "[Service]
Restart=Never Restart=Never
ExecStart= ExecStart=
@ -61,6 +61,7 @@ template "$XDG_CONFIG_HOME/MuseScore/MuseScore3.template.ini"
if command -v nvim >/dev/null 2>&1; then if command -v nvim >/dev/null 2>&1; then
echo "Updating NeoVim Plugins" echo "Updating NeoVim Plugins"
# TODO pynvim?
nvim '+PlugClean!' '+PlugUpgrade' '+PlugUpdate' '+qall' nvim '+PlugClean!' '+PlugUpgrade' '+PlugUpdate' '+qall'
fi fi

View file

@ -21,8 +21,9 @@
() { () {
emulate -L zsh -o extended_glob emulate -L zsh -o extended_glob
# Unset all configuration options. This allows you to apply configuration changes without # Unset all configuration options.
# restarting zsh. Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`. # This allows you to apply configuration changes without restarting zsh.
# Edit ~/.p10k.zsh and type `source ~/.p10k.zsh`.
unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR' unset -m '(POWERLEVEL9K_*|DEFAULT_USER)~POWERLEVEL9K_GITSTATUS_DIR'
# Zsh >= 5.1 is required. # Zsh >= 5.1 is required.

View file

@ -26,7 +26,6 @@ HYPHEN_INSENSITIVE="true" # - and _ interchangeable
COMPLETION_WAITING_DOTS="true" # Dots while waiting for completion COMPLETION_WAITING_DOTS="true" # Dots while waiting for completion
DISABLE_UNTRACKED_FILES_DIRTY="true" # DOn't mark untracked files as dirty - speeds up status check DISABLE_UNTRACKED_FILES_DIRTY="true" # DOn't mark untracked files as dirty - speeds up status check
# Plugins can be found in $ZSH/plugins/ # Plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
plugins=( plugins=(
@ -45,9 +44,11 @@ ZSH_COMPDUMP="$XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION" # Cache completions
DISABLE_UPDATE_PROMPT=true DISABLE_UPDATE_PROMPT=true
ZSH_DISABLE_COMPFIX=true ZSH_DISABLE_COMPFIX=true
# For fresh systems # Fallback for fresh systems
test -d "$ZSH" || source $HOME/.zshenv if test -d "$ZSH"
source $ZSH/oh-my-zsh.sh then source $ZSH/oh-my-zsh.sh
else source $HOME/.zshenv
fi
## Functions ## Functions
@ -177,6 +178,12 @@ alias zcp='noglob zmv -C'
alias zln='noglob zmv -L' alias zln='noglob zmv -L'
alias zsy='noglob zmv -Ls' alias zsy='noglob zmv -Ls'
test -d /opt/homebrew && eval "$(/opt/homebrew/bin/brew shellenv)"
autoload -Uz compinit
compinit
for file in $CONFIG_SHELLS/* for file in $CONFIG_SHELLS/*
do source $file do source $file
done done
@ -201,6 +208,7 @@ source_existing /usr/share/fzf/key-bindings.zsh /usr/share/fzf/completion.zsh
source_existing "$NVM_DIR/nvm.sh" source_existing "$NVM_DIR/nvm.sh"
source_existing "$NVM_DIR/bash_completion" source_existing "$NVM_DIR/bash_completion"
source_existing /opt/asdf-vm/asdf.sh
source_existing $XDG_CONFIG_HOME/broot/launcher/bash/br source_existing $XDG_CONFIG_HOME/broot/launcher/bash/br
which zoxide >/dev/null && which zoxide >/dev/null &&
@ -209,5 +217,4 @@ which zoxide >/dev/null &&
source_existing $HOME/.nix-profile/etc/profile.d/nix.sh source_existing $HOME/.nix-profile/etc/profile.d/nix.sh
which direnv >/dev/null && eval "$(direnv hook zsh)" which direnv >/dev/null && eval "$(direnv hook zsh)"
true
l l

17
.jq Normal file
View file

@ -0,0 +1,17 @@
# generic
def partition_by(sel):
reduce .[] as $item
( {}
; ($item | sel | tostring) as $res | .[$res] = (.[$res] // []) + [$item]
)
;
def partition: partition_by(.);
def count_by(sel): partition_by(sel) | to_entries | map(.value = (.value | length)) | from_entries;
# nostr-related functions
def tags(tagName): .tags | map(select(.[0] == tagName));
def tag(tagName): tags(tagName) | .[0];
def tag_value(tagName): tag(tagName)[1];
def has_tag(tagName): (tags(tagName) | length) > 0;
def hasnt_tag(tagName): (tags(tagName) | length) == 0;

View file

@ -99,7 +99,7 @@ for arg; do
timg+=("${tmpfile%.*}.png");; timg+=("${tmpfile%.*}.png");;
(*/x-xcf*) (*/x-xcf*)
echo Converting "$arg" echo Converting "$arg"
convert -flatten "$arg" png:"$tmpfile" magick -flatten "$arg" png:"$tmpfile"
timg+=("$tmpfile");; timg+=("$tmpfile");;
# TODO .raw .img # TODO .raw .img
(*/x-iso*|*/x-qemu-disk*) fdisk -l "$arg";; (*/x-iso*|*/x-qemu-disk*) fdisk -l "$arg";;
@ -197,7 +197,7 @@ if test "$timg"; then
fi fi
fi fi
pager="${PAGER:-'less -rF'}" pager="${PAGER:-less -rF}"
# bat: unknown files # bat: unknown files
# batplain: files to print without header # batplain: files to print without header
if test "$bat" -o "$batplain"; then if test "$bat" -o "$batplain"; then
@ -260,7 +260,8 @@ if test "$ls" -o $# -le $(echo "$flags" | wc -w); then
then $elevate tree -a --dirsfirst --du -h -C -L 3 $flags -- "${ls[@]:-.}" then $elevate tree -a --dirsfirst --du -h -C -L 3 $flags -- "${ls[@]:-.}"
elif which exa 2>/dev/null >&2 elif which exa 2>/dev/null >&2
then $elevate exa --icons --color=always --long --group --classify --all --all --sort=modified --reverse $flags -- "${ls[@]:-.}" then $elevate exa --icons --color=always --long --group --classify --all --all --sort=modified --reverse $flags -- "${ls[@]:-.}"
else $elevate ls -l $(test $# -gt ${#ls[@]} && echo '-d') --color=always --human-readable --si --group-directories-first --file-type --dereference-command-line-symlink-to-dir --all $flags -- "${ls[@]:-.}" else ls -lGhFa $flags -- "${ls[@]:-.}"
# replaced for wider compatibility: else $elevate ls -l $(test $# -gt ${#ls[@]} && echo '-d') --color=always --human-readable --si --group-directories-first --file-type --dereference-command-line-symlink-to-dir --all $flags -- "${ls[@]:-.}"
fi fi
#" || $elevate ls $(test $# -gt ${#ls[@]} && echo "-d") --color=always --human-readable --si --dereference-command-line --all --sort=none $flags -- "${ls[@]:-.}" #" || $elevate ls $(test $# -gt ${#ls[@]} && echo "-d") --color=always --human-readable --si --dereference-command-line --all --sort=none $flags -- "${ls[@]:-.}"
} | $pager --quit-if-one-screen } | $pager --quit-if-one-screen

View file

@ -1,8 +1,9 @@
#!/bin/sh -e #!/bin/sh -ex
# Backup linux system and user files with borg # Backup linux system and user files with borg
# Usage: bag [-n] [--dry-run] [--home] [--root MOUNTED_ROOT] # Usage: bag [-n] [--dry-run] [--home] [--root MOUNTED_ROOT]
root="/" root="/"
args="--progress --stats" args="--progress --stats"
# TODO proper ssh handling with local root access
case $BORG_REPO in (*:*) run=borg;; esac case $BORG_REPO in (*:*) run=borg;; esac
while test $# -gt 0; do while test $# -gt 0; do
case "$1" in case "$1" in
@ -20,7 +21,7 @@ name="::$(test -n "$name" && echo "$name" || cat /etc/hostname)_${1:-system}_$(d
echo "Backing up as $name" echo "Backing up as $name"
# TODO ignore electron caches # TODO ignore electron caches
${run:-sudo --preserve-env=BORG_REPO BORG_PASSPHRASE="$($BORG_PASSCOMMAND)" borg} create --exclude-caches $args \ ${run:-sudo --preserve-env=BORG_REPO BORG_PASSPHRASE="$($BORG_PASSCOMMAND)" borg} create --exclude-caches $args \
$(echo $DIRS_IGNORE_SAFE -x .snapshots -x 'software-challenge/**/build' -x state/emacs -x state/go -x .local/lib -x .cpan -x *cache -x $HOME/.gem | $(echo $DIRS_IGNORE_SAFE -x .snapshot-2411 -x .snapshot -x .snapshots -x 'software-challenge/**/build' -x state/emacs -x state/go -x .local/lib -x .cpan -x *cache -x $HOME/.gem |
sed 's|-x \([^ ]\+\)|-e sh:**/\1|g') \ sed 's|-x \([^ ]\+\)|-e sh:**/\1|g') \
"$name" $(test $# -eq 0 && echo etc $HOME root || test $# -eq 1 && echo $1) "${@:2}" 2>&1 "$name" $(test $# -eq 0 && echo etc $HOME root || test $# -eq 1 && echo $1) "${@:2}" 2>&1
test -n "$run" || sudo chown -R $USER:$USER "$BORG_REPO" test -n "$run" || sudo chown -R $USER:$USER "$BORG_REPO"

View file

@ -1,6 +1,6 @@
#!/bin/sh -e #!/bin/sh -e
# Suspend screen until enter is pressed or interrupted # Suspend screen until enter is pressed or interrupted
test "$1" && sleep $1 $(which timer || sleep) "${1:-3}"
dpms() { dpms() {
if test $XDG_SESSION_TYPE = wayland if test $XDG_SESSION_TYPE = wayland
then swaymsg "output * dpms $*" then swaymsg "output * dpms $*"
@ -9,6 +9,7 @@ dpms() {
} }
dpms off dpms off
trap 'dpms on' INT trap 'dpms on' INT
test $# -gt 1 && shift && save "$@"
sleep 3 sleep 3
read _ read _
dpms on dpms on

View file

@ -5,8 +5,8 @@
typeset -A _clean_map typeset -A _clean_map
_clean_map=([h]=$XDG_CACHE_HOME [t]=/var/tmp [l]=/var/log [v]=/var/cache) _clean_map=([h]=$XDG_CACHE_HOME [t]=/var/tmp [l]=/var/log [v]=/var/cache)
# TODO .mix - outdated version in socha # TODO .mix - outdated version in socha
_clean_home=(.ant .autopsy .bundle .cargo .cpanm .docker .stack .hex .nix-defexpr .parallel .surf .pub-cache _clean_home=(.ant .autopsy .bundle .cpanm .docker .stack .hex .nix-defexpr .parallel .surf .pub-cache
#.cache #.cache .cargo
.yarn .node_modules .npm .pnpm-store .node-gyp .nv .electron .electron-gyp .yarn .node_modules .npm .pnpm-store .node-gyp .nv .electron .electron-gyp
.gradle .gradle-kotlin-dsl .java .kscript .konan .m2 .openjfx .gradle .gradle-kotlin-dsl .java .kscript .konan .m2 .openjfx
.log luametatex-cache luatex-cache .texlive .log luametatex-cache luatex-cache .texlive
@ -78,7 +78,7 @@ highlight "c :: clean electron caches"
highlight "o :: optimize space extensively" highlight "o :: optimize space extensively"
if [[ $1 =~ "o" ]]; then if [[ $1 =~ "o" ]]; then
sudo find /root/.cache $XDG_CACHE_HOME /var/cache /var/log /var/tmp -not -name CACHEDIR.TAG -mindepth 1 -maxdepth 2 -atime +2 -exec rm -r {} + -prune sudo find /root/.cache $XDG_CACHE_HOME /var/cache /var/log /var/tmp -mindepth 1 -maxdepth 2 -not -name CACHEDIR.TAG -atime +9 -exec rm -r {} + -prune
if test -f "/var/log/apt/history.log"; then if test -f "/var/log/apt/history.log"; then
aptclean_cur=$(cat "/var/log/apt/history.log" | wc -l) aptclean_cur=$(cat "/var/log/apt/history.log" | wc -l)
@ -90,8 +90,9 @@ if [[ $1 =~ "o" ]]; then
sudo rm -rf "$XDG_DATA_HOME/baloo" sudo rm -rf "$XDG_DATA_HOME/baloo"
# https://www.cyberciti.biz/faq/delete-remove-orphaned-unused-packages-arch-linux-pacman-command/ # https://www.cyberciti.biz/faq/delete-remove-orphaned-unused-packages-arch-linux-pacman-command/
which pacman &>/dev/null && # Does not work anymore
pacman -Qqdt | sudo pacman -Rsu - #which pacman &>/dev/null &&
# pacman -Qqdt | sudo pacman -Rsu -
which yay &>/dev/null && which yay &>/dev/null &&
yay -Sc --noconfirm yay -Sc --noconfirm
nix-collect-garbage -d 2>/dev/null && nix-collect-garbage -d 2>/dev/null &&

View file

@ -1,20 +1,24 @@
#!/bin/sh -e #!/bin/sh -e
# Process raw contact data into a vcard and save it to nextcloud # Process raw contact data into a vcard and save it to nextcloud
echo "Finish input with Ctrl-D" >&2 echo "Finish input with Ctrl-D" >&2
inputfile=/tmp/aichat-contact inputfile=/tmp/aichat-contact-$(date +%s)
cat >"$inputfile" cat >"$inputfile"
while test "$accept" != "y" while test "$accept" != "y"
do printf "\nProcessing...\n" >&2 do printf "\nProcessing...\n" >&2
vcard="$(aichat --role carddav <"$inputfile")" vcard="$(aichat --role carddav <"$inputfile")"
echo "$vcard" echo "$vcard"
printf "Accept? ([y]es/[n]o/[c]ancel) " >&2 printf 'Accept? ([y]es/[n]o/[a]mend/[c]ancel) ' >&2
read -r accept read -r accept
test "$accept" != "c" || exit $? test "$accept" != 'c' || exit $?
test "$accept" = 'a' && cat >>"$inputfile"
done done
uid=$(echo "$vcard" | grep UID | grep --only-matching '[-0-9a-fx]\{36\}')
echo echo
uid=$(echo "$vcard" | grep UID | grep --only-matching '[-0-9a-fx]\{36\}')
dir="$XDG_DATA_HOME/contacts"
test -d "$dir" && echo "$vcard">"$dir/$uid.vcf"
ncfields=$(pass show service/nextcloud) ncfields=$(pass show service/nextcloud)
ncfield() { ncfield() {
echo "$ncfields" | head -$1 | tail -1 echo "$ncfields" | head -$1 | tail -1

View file

@ -4,5 +4,5 @@
tmux new-session -d -s ledmatrix \; \ tmux new-session -d -s ledmatrix \; \
send-keys 'retry inputmodule-control led-matrix --clock' C-m \; \ send-keys 'retry inputmodule-control led-matrix --clock' C-m \; \
split-window -v \; \ split-window -v \; \
send-keys "while test $(expr 12 - $(date +%H) | tr -d -) -lt 4; do inputmodule-control led-matrix --breathing; done send-keys 'while test $(expr 12 - $(date +%H) | tr -d -) -lt 4; do inputmodule-control led-matrix --breathing; done
autolight" C-m autolight' C-m

View file

@ -6,7 +6,7 @@
# TODO fix broken alt-enter not opening editor --bind='alt-enter:change-prompt(hi>)' # TODO fix broken alt-enter not opening editor --bind='alt-enter:change-prompt(hi>)'
# using bash because of pipefail # using bash because of pipefail
set -eo pipefail set -exo pipefail
fzfpipe() { fzfpipe() {
# Take nul-separated input from git-status short/porcelain # Take nul-separated input from git-status short/porcelain
@ -27,6 +27,7 @@ case "$1" in
grep -zv '^\\w ' | fzfpipe | grep -zv '^\\w ' | fzfpipe |
xargs -rd '\n' -L 1 git -c advice.addEmptyPathspec=false add --verbose "$@";; xargs -rd '\n' -L 1 git -c advice.addEmptyPathspec=false add --verbose "$@";;
(*) git status -z --porcelain --no-renames $wd | (*) git status -z --porcelain --no-renames $wd |
grep -vzE '\.config/(audacity|puddletag|Stretchly|falkTX|JOSM)/' | # this is specific for my yadm
sed -z 's/^\\(\\w\\) / \\1/' | fzfpipe >"$prefix/files" sed -z 's/^\\(\\w\\) / \\1/' | fzfpipe >"$prefix/files"
cat "$prefix/files" | xargs -rd '\n' ls -fd 2>/dev/null >"$prefix/files-existing" || true cat "$prefix/files" | xargs -rd '\n' ls -fd 2>/dev/null >"$prefix/files-existing" || true
git -c advice.addEmptyPathspec=false add --intent-to-add --pathspec-from-file="$prefix/files-existing" git -c advice.addEmptyPathspec=false add --intent-to-add --pathspec-from-file="$prefix/files-existing"

View file

@ -1,8 +1,16 @@
#!/bin/sh -e #!/bin/sh -e
# Lists the latest modified files in the given directory or pwd # Lists the latest modified files in the given directory or pwd
test "$1" = "-a" && all=true && shift # up to a depth of 4
count=5
case "$1" in
(-a) all=true; shift;;
(--) shift;;
(-*) args="$1 $2"; shift 2;;
([0-9]) count=$(expr $1 \* 10); shift;;
esac
for f in "${@:-$PWD}" for f in "${@:-$PWD}"
do test $# -gt 1 && highlight "$f" do test $# -gt 1 && { highlight "$f" || echo "$f"; }
find "$f" -maxdepth 4 -type f -printf '%.16T+ %P\n' | find "$f" -maxdepth 4 $args -printf '%.16T+ %P\n' |
sort -r | $(test "$all" && echo "less" || echo "head") sort -r | $(test "$all" && echo "less" || echo "head -$count")
done done

View file

@ -76,8 +76,8 @@ shift $(expr 2 \& $# \> 2 \| $#)
if ! mountpoint "$mountpoint" 2>/dev/null if ! mountpoint "$mountpoint" 2>/dev/null
then mp="/run/media/$USER/$arg" && test -e "$mp" && mountpoint="$mp" then mp="/run/media/$USER/$arg" && test -e "$mp" && mountpoint="$mp"
sudo mount -vo users,X-mount.mkdir,noatime,umask=003,gid=users,uid=$USER $params "$partition" "$mountpoint" "$@" || sudo mount -vo users,X-mount.mkdir,noatime,umask=003,gid=users,uid=$USER $params "$partition" "$mountpoint" "$@" ||
sudo mount -vo users,X-mount.mkdir,noatime $params "$partition" "$mountpoint" "$@" sudo mount -vo users,X-mount.mkdir,noatime,exec $params "$partition" "$mountpoint" "$@"
fi fi
cd $mountpoint cd "$mountpoint"
df -x tmpfs -x devtmpfs -x squashfs --human-readable df -x tmpfs -x devtmpfs -x squashfs --human-readable
exec $SHELL exec $SHELL

4
.local/bin/scripts/relock Executable file
View file

@ -0,0 +1,4 @@
#!/bin/sh -e
# Restart Swaylock from TTY
pkill swaylock
WAYLAND_DISPLAY=wayland-1 swaylock

View file

@ -4,7 +4,7 @@
export chars=$(expr $(tput cols) - 60) export chars=$(expr $(tput cols) - 60)
case "$1" in (+*) size=${1#+}G; depth=2; shift;; esac case "$1" in (+*) size=${1#+}G; depth=2; shift;; esac
case "$1" in ([0-9]) depth=$1; shift;; esac case "$1" in ([0-9]) depth=$1; shift;; esac
du="du --max-depth '${depth:-1}' -xha" du="du --max-depth ${depth:-1} -xha"
($du -t ${size:-50M} "$@" | sort -h | grep -v "^0") | ($du -t ${size:-50M} "$@" | sort -h | grep -v "^0") |
while read line; do echo "$(tput smso)$line$(tput rmso) $(pacman -Qqo $(echo $line | awk '{print $2}') 2>/dev/null | paste -s -d',' | sed "s/\(.\{${chars}\}\).*/\1.../")"; done || #| column -t || while read line; do echo "$(tput smso)$line$(tput rmso) $(pacman -Qqo $(echo $line | awk '{print $2}') 2>/dev/null | paste -s -d',' | sed "s/\(.\{${chars}\}\).*/\1.../")"; done || #| column -t ||
($du "$@" | sort -h | tail) ($du "$@" | sort -h | tail)

View file

@ -8,6 +8,7 @@ while true
(-q) quality="$2"; shift;; (-q) quality="$2"; shift;;
(x*) resolution="$1"; resize="-resize $resolution";; (x*) resolution="$1"; resize="-resize $resolution";;
(-v) set -x;; (-v) set -x;;
(-png) format=png;;
(*) break;; (*) break;;
esac esac
shift shift
@ -24,7 +25,7 @@ if test -n "$out"
then process "$out" "$@" then process "$out" "$@"
else else
for arg for arg
do process "${arg}${resolution:--shrinked}.jpeg" "$arg" do process "${arg}${resolution:--shrinked}.${format:-jpeg}" "$arg"
done done
fi fi
printf "Shrinked $1(%s) to $out(%s) - reduced to %s%%\n" \ printf "Shrinked $1(%s) to $out(%s) - reduced to %s%%\n" \

View file

@ -165,6 +165,25 @@ data:
hostname: "\${${app}_domain}" hostname: "\${${app}_domain}"
tls: true tls: true
certManager: true certManager: true
# TODO if using postgresql
#postgresql:
# enabled: true
# commonLabels:
# stackspin.net/backupSet: "${app}"
# global:
# postgresql:
# auth:
# database: ${app}
# username: ${app}
# password: "${postgresql_password}"
# postgresPassword: "${postgresql_admin_password}"
# primary:
# persistence:
# existingClaim: vikunja-postgres
# podAnnotations:
# backup.velero.io/backup-volumes: "data"
# TODO Adjust $app Mailing config # TODO Adjust $app Mailing config
# mailer: # mailer:
# enabled: "\${outgoing_mail_enabled}" # enabled: "\${outgoing_mail_enabled}"
@ -173,6 +192,7 @@ data:
# username: "\${outgoing_mail_smtp_user}" # username: "\${outgoing_mail_smtp_user}"
# password: "\${outgoing_mail_smtp_password}" # password: "\${outgoing_mail_smtp_password}"
# fromemail: "\${outgoing_mail_from_address}" # fromemail: "\${outgoing_mail_from_address}"
# TODO Adjust $app OpenID Connect Single Sign-On Configuration # TODO Adjust $app OpenID Connect Single Sign-On Configuration
# - name: Stackspin # - name: Stackspin
# key: "\${client_id}" # key: "\${client_id}"
@ -245,7 +265,9 @@ metadata:
namespace: flux-system namespace: flux-system
spec: spec:
fields: fields:
- fieldName: password # TODO if using postgresql
- fieldName: postgresql_password
- fieldName: postgresql_postgres_password
EOF EOF
cat <<EOF >"$app-secrets/$app-oauth-secret.yaml" cat <<EOF >"$app-secrets/$app-oauth-secret.yaml"
--- ---

View file

@ -7,6 +7,7 @@ case "$1" in
then printf "Device ppp0 already in use - press Enter to kill" then printf "Device ppp0 already in use - press Enter to kill"
read -r _ read -r _
sudo killall openfortivpn sudo killall openfortivpn
sleep 3
fi fi
sudo tmux new-session -s "$1" ' sudo tmux new-session -s "$1" '
set -x set -x

25
.zshenv
View file

@ -8,7 +8,7 @@ export_existing() {
export_existing DATA $HOME/daten $HOME/data export_existing DATA $HOME/daten $HOME/data
export MUSIC="$DATA/4-media/music" export MUSIC="$DATA/4-media/music"
export BORG_REPO='admin@172.16.0.2:/mnt/b/user/janek/backup/janek-borg' export BORG_REPO='janek@172.16.0.2:/mnt/b/user/janek/backup/janek-borg'
export BORG_PASSCOMMAND='pass service/device/borg/backup' export BORG_PASSCOMMAND='pass service/device/borg/backup'
# xdg # xdg
@ -40,6 +40,7 @@ export WINEPREFIX="$XDG_DATA_HOME"/wine
## Development tools ## Development tools
export GOPATH="$XDG_STATE_HOME"/go export GOPATH="$XDG_STATE_HOME"/go
export GOMODCACHE="$XDG_CACHE_HOME"/go/mod
export KREW_ROOT="$XDG_DATA_HOME"/krew export KREW_ROOT="$XDG_DATA_HOME"/krew
export CARGO_HOME="$XDG_STATE_HOME"/cargo export CARGO_HOME="$XDG_STATE_HOME"/cargo
@ -63,6 +64,8 @@ export RBENV_ROOT="$XDG_STATE_HOME"/rbenv
export R_LIBS="$XDG_STATE_HOME"/R/lib export R_LIBS="$XDG_STATE_HOME"/R/lib
export FVM_CACHE_PATH="$XDG_DATA_HOME"/fvm
# Java & Android # Java & Android
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java" export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME/java"
export GRADLE_USER_HOME="$XDG_STATE_HOME"/gradle export GRADLE_USER_HOME="$XDG_STATE_HOME"/gradle
@ -83,7 +86,8 @@ mkdir -p "$XDG_STATE_HOME/zsh"
# environment # environment
BIN="$HOME/.local/bin" BIN="$HOME/.local/bin"
export PATH="$BIN/scripts:$BIN:$RBENV_ROOT/shims:$PATH:$XDG_CONFIG_HOME/emacs/bin:$N_PREFIX:$GOPATH/bin:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin:$KREW_ROOT/bin:$XDG_DATA_HOME/gem/ruby/3.0.0/bin:$HOME/.rvm/bin" ruby_bins="$(ls -d $XDG_DATA_HOME/gem/ruby/*/bin | head -1)"
export PATH="$BIN/scripts:$BIN:$RBENV_ROOT/shims:$PATH:$XDG_CONFIG_HOME/emacs/bin:$N_PREFIX:$GOPATH/bin:$ANDROID_SDK_ROOT/platform-tools:$CARGO_HOME/bin:$KREW_ROOT/bin:$ruby_bins:$HOME/.rvm/bin"
export ALTERNATE_EDITOR="$( export ALTERNATE_EDITOR="$(
if which nvim >/dev/null if which nvim >/dev/null
then echo nvim then echo nvim
@ -98,12 +102,12 @@ export EDITOR="$(
export IHP_EDITOR="$BIN/scripts/emacs-line" export IHP_EDITOR="$BIN/scripts/emacs-line"
export LS_OPTIONS='--color=auto --human-readable --si --group-directories-first --file-type --dereference-command-line' export LS_OPTIONS='--color=auto --human-readable --si --group-directories-first --file-type --dereference-command-line'
export LESS="--raw-control-chars --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)" export LESS="--raw-control-chars --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | grep -o '\d\+' | head -1) -ge 590 && echo --incsearch)"
# TODO put into config file and use --exclude-from # TODO put into config file and use --exclude-from
# -x 'System Volume Information' # -x 'System Volume Information'
export DIRS_GENERATED="-x generated -x .gradle -x cmake_build -x dist-newstyle -x node_modules -x __pycache__ -x .pytest_cache" export DIRS_GENERATED="-x generated -x .gradle -x cmake_build -x dist-newstyle -x node_modules -x __pycache__ -x .pytest_cache"
export DIRS_IGNORE_SAFE="-x .cache -x .cpan -x *Cache -x .dtrash -x .pyenv -x .local/cache -x .config/DeltaChat -x .config/discord -x .config/Slack -x .config/syncthing -x share/baloo -x share/cabal -x share/cargo -x share/digikam -x share/gem -x share/JetBrains -x share/tldr -x share/syncthing -x share/Steam/ubuntu* -x share/Steam/package -x share/virtualenv -x share/Zeal -x state/gradle -x state/android -x Ferdi/Partitions -x oh-my-zsh -x wine/drive_c/windows -x vendor/cache $DIRS_GENERATED" export DIRS_IGNORE_SAFE="-x .cache -x .cpan -x *Cache -x .dtrash -x .pyenv -x .local/cache -x .config/DeltaChat -x .config/discord -x .config/Slack -x .config/syncthing -x share/baloo -x share/cabal -x share/cargo -x share/digikam -x share/gem -x share/JetBrains -x share/tldr -x share/syncthing -x share/Steam/ubuntu* -x share/Steam/package -x share/virtualenv -x share/Zeal -x state/gradle -x state/android -x Ferdi/Partitions -x oh-my-zsh -x wine/drive_c/windows -x vendor/cache $DIRS_GENERATED"
export DIRS_IGNORE="-x .archive -x .sync -x .stfolder -x *build -x .git -x .idea -x env -x out -x cache -x Partitions -x vendor/bundle -x log $DIRS_IGNORE_SAFE" export DIRS_IGNORE="-x .archive -x .sync -x .stfolder -x *build -x .git -x .idea* -x env -x out -x cache -x Partitions -x vendor/bundle -x log $DIRS_IGNORE_SAFE"
# red stderr # red stderr
test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}" test -f "/usr/lib/libstderred.so" && export LD_PRELOAD="/usr/lib/libstderred.so${LD_PRELOAD:+:$LD_PRELOAD}"
# software config # software config
@ -138,7 +142,7 @@ ctrl-alt-h:backward-kill-word
$($_fzf_latest && echo "shift-down:preview-half-page-down,shift-up:preview-half-page-up $($_fzf_latest && echo "shift-down:preview-half-page-down,shift-up:preview-half-page-up
alt-j:preview-half-page-down,alt-k:preview-half-page-up alt-j:preview-half-page-down,alt-k:preview-half-page-up
alt-shift-down:preview-down,alt-shift-up:preview-up,esc:close") alt-shift-down:preview-down,alt-shift-up:preview-up,esc:close")
" | xargs -I% echo -n "%," | head -c-1) " | sed '/./!d' | paste -s -d, -)
#alt-r:preview(bat {}), #alt-r:preview(bat {}),
export FZF_HISTDIR="$XDG_STATE_HOME/fzf" export FZF_HISTDIR="$XDG_STATE_HOME/fzf"
mkdir -p "$XDG_STATE_HOME/fzf" mkdir -p "$XDG_STATE_HOME/fzf"
@ -148,8 +152,15 @@ $($_fzf_latest && echo '--preview-window=60%,border-left --marker=o')"
FD_BASE="fd --hidden --color=always --no-ignore-vcs" FD_BASE="fd --hidden --color=always --no-ignore-vcs"
export FZF_DEFAULT_COMMAND="$FD_BASE --type file" export FZF_DEFAULT_COMMAND="$FD_BASE --type file"
export FZF_CTRL_T_COMMAND="$FD_BASE -d 7" export FZF_CTRL_T_COMMAND="$FD_BASE -d 7"
# Calculate spare cores as two thirds of the efficiency cores
case "$(uname)" in
(Darwin) efficiency_cores=$(sysctl -n hw.perflevel1.physicalcpu);;
(*) efficiency_cores=$(lscpu --extended | awk '{print $7}' | sort | uniq -c | head -1 | awk '{print $1}');;
esac
export SPARE_CORES=$(expr $efficiency_cores \* 2 / 3)
## cplusplus - ctest, cmake, ninja ## cplusplus - ctest, cmake, ninja
export SPARE_CORES=$(expr $(lscpu --extended | awk '{print $7}' | sort | uniq -c | head -1 | awk '{print $1}') \* 2 / 3)
export CMAKE_BUILD_PARALLEL_LEVEL=${SPARE_CORES} export CMAKE_BUILD_PARALLEL_LEVEL=${SPARE_CORES}
export CTEST_PARALLEL_LEVEL=${SPARE_CORES} export CTEST_PARALLEL_LEVEL=${SPARE_CORES}
export CTEST_PROGRESS_OUTPUT=1 export CTEST_PROGRESS_OUTPUT=1
@ -159,6 +170,6 @@ export CARGO_BUILD_JOBS=${SPARE_CORES}
# TODO move to proper place - is also called when firenvim starts # TODO move to proper place - is also called when firenvim starts
#autolight #autolight
#export TZ='Europe/Dublin' #export TZ='Europe/Dublin'
export TZ='Africa/Nairobi' #export TZ='Africa/Nairobi'
export CONTEST_NETWORK=lan-restricted-dev export CONTEST_NETWORK=lan-restricted-dev