···44Comment=All-in-one voice and text chat for gamers that's free, secure, and works on both your desktop and phone.
55GenericName=Internet Messenger
66# Exec=/usr/bin/discord --enable-features=WebRTCPipeWireCapturer,VaapiVideoDecoder --ozone-platform-hint=auto --enable-blink-features=MiddleClickAutoScroll --ignore-gpu-blocklist
77-Exec=/usr/bin/discord --enable-features=WaylandWindowDecorations,AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoDecodeLinuxGL,AcceleratedVideoEncoder,TouchpadOverscrollHistoryNavigation,PlatformHEVCDecoderSupport,CanvasOopRasterization --ozone-platform-hint=auto --enable-blink-features=MiddleClickAutoscroll --ignore-gpu-blocklist --enable-gpu-rasterization
77+# Exec=/usr/bin/discord --enable-features=WaylandWindowDecorations,AcceleratedVideoDecodeLinuxZeroCopyGL,AcceleratedVideoDecodeLinuxGL,AcceleratedVideoEncoder,TouchpadOverscrollHistoryNavigation,PlatformHEVCDecoderSupport,CanvasOopRasterization --ozone-platform-hint=auto --enable-blink-features=MiddleClickAutoscroll --ignore-gpu-blocklist --enable-gpu-rasterization
88+Exec=prlimit --core=0 -- fish -c 'exec /usr/bin/discord (grep "^[^#]" ~/.config/discord-flags.conf)'
89Icon=discord
910Type=Application
1011Categories=Network;InstantMessaging;
+383
etc/bluetooth/main.conf
···11+[General]
22+33+# Default adapter name
44+# Defaults to 'BlueZ X.YZ'
55+#Name = BlueZ
66+77+# Default device class. Only the major and minor device class bits are
88+# considered. Defaults to '0x000000'.
99+#Class = 0x000100
1010+1111+# How long to stay in discoverable mode before going back to non-discoverable
1212+# The value is in seconds. Default is 180, i.e. 3 minutes.
1313+# 0 = disable timer, i.e. stay discoverable forever
1414+#DiscoverableTimeout = 0
1515+1616+# Always allow pairing even if there are no agent registered
1717+# Possible values: true, false
1818+# Default: false
1919+#AlwaysPairable = false
2020+2121+# How long to stay in pairable mode before going back to non-discoverable
2222+# The value is in seconds. Default is 0.
2323+# 0 = disable timer, i.e. stay pairable forever
2424+#PairableTimeout = 0
2525+2626+# Use vendor id source (assigner), vendor, product and version information for
2727+# DID profile support. The values are separated by ":" and assigner, VID, PID
2828+# and version.
2929+# Possible vendor id source values: bluetooth, usb (default) or false (disabled)
3030+#DeviceID = bluetooth:1234:5678:abcd
3131+3232+# Do reverse service discovery for previously unknown devices that connect to
3333+# us. For BR/EDR this option is really only needed for qualification since the
3434+# BITE tester doesn't like us doing reverse SDP for some test cases, for LE
3535+# this disables the GATT client functionally so it can be used in system which
3636+# can only operate as peripheral (see also GATT Client option).
3737+# Defaults to 'true'.
3838+#ReverseServiceDiscovery = true
3939+4040+# Enable name resolving after inquiry. Set it to 'false' if you don't need
4141+# remote devices name and want shorter discovery cycle. Defaults to 'true'.
4242+#NameResolving = true
4343+4444+# Enable runtime persistency of debug link keys. Default is false which
4545+# makes debug link keys valid only for the duration of the connection
4646+# that they were created for.
4747+#DebugKeys = false
4848+4949+# Restricts all controllers to the specified transport. Default value
5050+# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
5151+# Possible values: "dual", "bredr", "le"
5252+#ControllerMode = dual
5353+5454+# Maximum number of controllers allowed to be exposed to the system.
5555+# Default=0 (unlimited)
5656+#MaxControllers=0
5757+5858+# Enables Multi Profile Specification support. This allows to specify if
5959+# system supports only Multiple Profiles Single Device (MPSD) configuration
6060+# or both Multiple Profiles Single Device (MPSD) and Multiple Profiles Multiple
6161+# Devices (MPMD) configurations.
6262+# Possible values: "off", "single", "multiple"
6363+#MultiProfile = off
6464+6565+# Permanently enables the Fast Connectable setting for adapters that
6666+# support it. When enabled other devices can connect faster to us,
6767+# however the tradeoff is increased power consumptions. This feature
6868+# will fully work only on kernel version 4.1 and newer. Defaults to
6969+# 'false'.
7070+FastConnectable = true
7171+7272+# Default privacy setting.
7373+# Enables use of private address.
7474+# Possible values for LE mode: "off", "network/on", "device"
7575+# Possible values for Dual mode: "off", "network/on", "device",
7676+# "limited-network", "limited-device"
7777+#
7878+# - off: Local privacy disabled.
7979+#
8080+# - network/on: A device will only accept advertising packets from peer
8181+# devices that contain private addresses. It may not be compatible with some
8282+# legacy devices since it requires the use of RPA(s) all the time.
8383+#
8484+# - device: A device in device privacy mode is only concerned about the
8585+# privacy of the device and will accept advertising packets from peer devices
8686+# that contain their Identity Address as well as ones that contain a private
8787+# address, even if the peer device has distributed its IRK in the past.
8888+8989+# - limited-network: Apply Limited Discoverable Mode to advertising, which
9090+# follows the same policy as to BR/EDR that publishes the identity address when
9191+# discoverable, and Network Privacy Mode for scanning.
9292+#
9393+# - limited-device: Apply Limited Discoverable Mode to advertising, which
9494+# follows the same policy as to BR/EDR that publishes the identity address when
9595+# discoverable, and Device Privacy Mode for scanning.
9696+#
9797+# Defaults to "off"
9898+#Privacy = off
9999+100100+# Specify the policy to the JUST-WORKS repairing initiated by peer
101101+# Possible values: "never", "confirm", "always"
102102+# Defaults to "never"
103103+#JustWorksRepairing = never
104104+105105+# How long to keep temporary devices around
106106+# The value is in seconds. Default is 30.
107107+# 0 = disable timer, i.e. temporary devices stay around forever
108108+#TemporaryTimeout = 30
109109+110110+# Enables the device to issue an SDP request to update known services when
111111+# profile is connected. Defaults to true.
112112+#RefreshDiscovery = true
113113+114114+# Default Secure Connections setting.
115115+# Enables the Secure Connections setting for adapters that support it. It
116116+# provides better crypto algorithms for BT links and also enables CTKD (cross
117117+# transport key derivation) during pairing on any link.
118118+# Possible values: "off", "on", "only"
119119+# - "off": Secure Connections are disabled
120120+# - "on": Secure Connections are enabled when peer device supports them
121121+# - "only": we allow only Secure Connections
122122+# Defaults to "on"
123123+#SecureConnections = on
124124+125125+# Enables D-Bus experimental interfaces
126126+# Possible values: true or false
127127+#Experimental = false
128128+129129+# Enables D-Bus testing interfaces
130130+# Possible values: true or false
131131+#Testing = false
132132+133133+# Enables kernel experimental features, alternatively a list of UUIDs
134134+# can be given.
135135+# Possible values: true,false,<UUID List>
136136+# Possible UUIDS:
137137+# d4992530-b9ec-469f-ab01-6c481c47da1c (BlueZ Experimental Debug)
138138+# 671b10b5-42c0-4696-9227-eb28d1b049d6 (BlueZ Experimental Simultaneous Central and Peripheral)
139139+# 15c0a148-c273-11ea-b3de-0242ac130004 (BlueZ Experimental LL privacy)
140140+# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
141141+# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
142142+# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
143143+# Defaults to false.
144144+#KernelExperimental = false
145145+146146+# The duration to avoid retrying to resolve a peer's name, if the previous
147147+# try failed.
148148+# The value is in seconds. Default is 300, i.e. 5 minutes.
149149+#RemoteNameRequestRetryDelay = 300
150150+151151+# Filter out non-discoverable devices based on discoverable flags (General or
152152+# Limited).
153153+# Defaults to true
154154+# Setting to false is only recommended for an use-case where non-discoverable
155155+# device must be enumerated due to some requirement (e.g. not using GAP
156156+# discoverable modes for some odd reason which seems to be the behavior of
157157+# some stacks) or when testing bad/unintended behavior.
158158+#FilterDiscoverable = true
159159+160160+[BR]
161161+# The following values are used to load default adapter parameters for BR/EDR.
162162+# BlueZ loads the values into the kernel before the adapter is powered if the
163163+# kernel supports the MGMT_LOAD_DEFAULT_PARAMETERS command. If a value isn't
164164+# provided, the kernel will be initialized to it's default value. The actual
165165+# value will vary based on the kernel version and thus aren't provided here.
166166+# The Bluetooth Core Specification should be consulted for the meaning and valid
167167+# domain of each of these values.
168168+169169+# BR/EDR Page scan activity configuration
170170+#PageScanType=
171171+#PageScanInterval=
172172+#PageScanWindow=
173173+174174+# BR/EDR Inquiry scan activity configuration
175175+#InquiryScanType=
176176+#InquiryScanInterval=
177177+#InquiryScanWindow=
178178+179179+# BR/EDR Link supervision timeout
180180+#LinkSupervisionTimeout=
181181+182182+# BR/EDR Page Timeout
183183+#PageTimeout=
184184+185185+# BR/EDR Connection Idle Timeout
186186+#IdleTimeout=
187187+188188+# BR/EDR Sniff Intervals
189189+#MinSniffInterval=
190190+#MaxSniffInterval=
191191+192192+[LE]
193193+# Enable/Disable Central Address Resolution.
194194+# 0: disable
195195+# 1: enable
196196+# Defaults to 1
197197+#CentralAddressResolution = 1
198198+199199+# The following values are used to load default adapter parameters for LE.
200200+# BlueZ loads the values into the kernel before the adapter is powered if the
201201+# kernel supports the MGMT_LOAD_DEFAULT_PARAMETERS command. If a value isn't
202202+# provided, the kernel will be initialized to it's default value. The actual
203203+# value will vary based on the kernel version and thus aren't provided here.
204204+# The Bluetooth Core Specification should be consulted for the meaning and valid
205205+# domain of each of these values.
206206+# LE advertisement interval (used for legacy advertisement interface only)
207207+#MinAdvertisementInterval=
208208+#MaxAdvertisementInterval=
209209+#MultiAdvertisementRotationInterval=
210210+211211+# LE scanning parameters used for passive scanning supporting auto connect
212212+# scenarios
213213+#ScanIntervalAutoConnect=
214214+#ScanWindowAutoConnect=
215215+216216+# LE scanning parameters used for passive scanning supporting wake from suspend
217217+# scenarios
218218+#ScanIntervalSuspend=
219219+#ScanWindowSuspend=
220220+221221+# LE scanning parameters used for active scanning supporting discovery
222222+# procedure
223223+#ScanIntervalDiscovery=
224224+#ScanWindowDiscovery=
225225+226226+# LE scanning parameters used for passive scanning supporting the advertisement
227227+# monitor Apis
228228+#ScanIntervalAdvMonitor=
229229+#ScanWindowAdvMonitor=
230230+231231+# LE scanning parameters used for connection establishment.
232232+#ScanIntervalConnect=
233233+#ScanWindowConnect=
234234+235235+# LE default connection parameters. These values are superseded by any
236236+# specific values provided via the Load Connection Parameters interface
237237+#MinConnectionInterval=
238238+#MaxConnectionInterval=
239239+#ConnectionLatency=
240240+#ConnectionSupervisionTimeout=
241241+#Autoconnecttimeout=
242242+243243+# Scan duration during interleaving scan. Only used when scanning for ADV
244244+# monitors. The units are msec.
245245+# Default: 300
246246+#AdvMonAllowlistScanDuration=
247247+# Default: 500
248248+#AdvMonNoFilterScanDuration=
249249+250250+# Enable/Disable Advertisement Monitor interleave scan for power saving.
251251+# 0: disable
252252+# 1: enable
253253+# Defaults to 1
254254+#EnableAdvMonInterleaveScan=
255255+256256+[GATT]
257257+# GATT attribute cache.
258258+# Possible values:
259259+# always: Always cache attributes even for devices not paired, this is
260260+# recommended as it is best for interoperability, with more consistent
261261+# reconnection times and enables proper tracking of notifications for all
262262+# devices.
263263+# yes: Only cache attributes of paired devices.
264264+# no: Never cache attributes
265265+# Default: always
266266+#Cache = always
267267+268268+# This enables the GATT client functionally, so it can be disabled in system
269269+# which can only operate as a peripheral.
270270+# Defaults to 'true'.
271271+#Client = true
272272+273273+# Minimum required Encryption Key Size for accessing secured characteristics.
274274+# Possible values: 0 and 7-16. 0 means don't care.
275275+# Defaults to 0
276276+#KeySize = 0
277277+278278+# Exchange MTU size.
279279+# Possible values: 23-517
280280+# Defaults to 517
281281+#ExchangeMTU = 517
282282+283283+# Number of ATT channels, 1 is mandatory since it is used for ATT fixed channel
284284+# index 2-6 are used for EATT which is optional.
285285+# Possible values: 1-6 (1 disables EATT)
286286+# Default to 1
287287+#Channels = 1
288288+289289+# Export claimed services by plugins
290290+# Possible values: no, read-only, read-write
291291+# Default: read-only
292292+#ExportClaimedServices = read-only
293293+294294+[CSIS]
295295+# SIRK - Set Identification Resolution Key which is common for all the
296296+# sets. They SIRK key is used to identify its sets. This can be any
297297+# 128 bit value or a string value (e.g. product name) which is then hashed.
298298+# Possible Values:
299299+# 16 byte hexadecimal value: 861FAE703ED681F0C50B34155B6434FB
300300+# String value: "My Product Name"
301301+# Defaults to none
302302+#SIRK =
303303+304304+# SIRK Encryption
305305+# Possible values:
306306+# true: Encrypt SIRK when read
307307+# false: Do not encrypt SIRK when read. (plaintext)
308308+# Defaults to true
309309+#Encryption = true
310310+311311+# Total no of sets belongs to this Profile
312312+# Defaults to 0
313313+#Size = 0
314314+315315+# Rank for the device
316316+# Defaults to 0
317317+#Rank = 0
318318+319319+[AVDTP]
320320+# AVDTP L2CAP Signalling Channel Mode.
321321+# Possible values:
322322+# basic: Use L2CAP Basic Mode
323323+# ertm: Use L2CAP Enhanced Retransmission Mode
324324+#SessionMode = basic
325325+326326+# AVDTP L2CAP Transport Channel Mode.
327327+# Possible values:
328328+# basic: Use L2CAP Basic Mode
329329+# streaming: Use L2CAP Streaming Mode
330330+#StreamMode = basic
331331+332332+[AVRCP]
333333+# Allow SetAbsoluteVolume calls to a peer device that does not advertise the
334334+# AVRCP remote control target profile. If it does advertise this profile, the
335335+# version is ignored.
336336+#VolumeWithoutTarget = false
337337+338338+# Validate that remote AVRCP profiles advertise the category-2 bit before
339339+# allowing SetAbsoluteVolume calls or registering for EVENT_VOLUME_CHANGED
340340+# notifications.
341341+#VolumeCategory = true
342342+343343+[Policy]
344344+#
345345+# The ReconnectUUIDs defines the set of remote services that should try
346346+# to be reconnected to in case of a link loss (link supervision
347347+# timeout). The policy plugin should contain a sane set of values by
348348+# default, but this list can be overridden here. By setting the list to
349349+# empty the reconnection feature gets disabled.
350350+#ReconnectUUIDs=00001112-0000-1000-8000-00805f9b34fb,0000111f-0000-1000-8000-00805f9b34fb,0000110a-0000-1000-8000-00805f9b34fb,0000110b-0000-1000-8000-00805f9b34fb
351351+352352+# ReconnectAttempts define the number of attempts to reconnect after a link
353353+# lost. Setting the value to 0 disables reconnecting feature.
354354+#ReconnectAttempts=7
355355+356356+# ReconnectIntervals define the set of intervals in seconds to use in between
357357+# attempts.
358358+# If the number of attempts defined in ReconnectAttempts is bigger than the
359359+# set of intervals the last interval is repeated until the last attempt.
360360+#ReconnectIntervals=1,2,4,8,16,32,64
361361+362362+# AutoEnable defines option to enable all controllers when they are found.
363363+# This includes adapters present on start as well as adapters that are plugged
364364+# in later on. Defaults to 'true'.
365365+#AutoEnable=true
366366+367367+# Audio devices that were disconnected due to suspend will be reconnected on
368368+# resume. ResumeDelay determines the delay between when the controller
369369+# resumes from suspend and a connection attempt is made. A longer delay is
370370+# better for better co-existence with Wi-Fi.
371371+# The value is in seconds.
372372+# Default: 2
373373+#ResumeDelay = 2
374374+375375+[AdvMon]
376376+# Default RSSI Sampling Period. This is used when a client registers an
377377+# advertisement monitor and leaves the RSSISamplingPeriod unset.
378378+# Possible values:
379379+# 0x00 Report all advertisements
380380+# N = 0xXX Report advertisements every N x 100 msec (range: 0x01 to 0xFE)
381381+# 0xFF Report only one advertisement per device during monitoring period
382382+# Default: 0xFF
383383+#RSSISamplingPeriod=0xFF
+17
etc/fstab
···11+# /etc/fstab: static file system information.
22+#
33+# Use 'blkid' to print the universally unique identifier for a device; this may
44+# be used with UUID= as a more robust way to name devices that works even if
55+# disks are added and removed. See fstab(5).
66+#
77+# <file system> <mount point> <type> <options> <dump> <pass>
88+UUID=2D39-9861 /boot vfat defaults,umask=0022 0 2
99+UUID=37680aff-b9f4-40f0-aa2f-11e1bf9453c0 / btrfs subvol=/@,defaults,noatime,compress=zstd,space_cache=v2,commit=120 0 0
1010+UUID=37680aff-b9f4-40f0-aa2f-11e1bf9453c0 /home btrfs subvol=/@home,defaults,noatime,compress=zstd,space_cache=v2,commit=120 0 0
1111+UUID=37680aff-b9f4-40f0-aa2f-11e1bf9453c0 /root btrfs subvol=/@root,defaults,noatime,compress=zstd,space_cache=v2,commit=120 0 0
1212+UUID=37680aff-b9f4-40f0-aa2f-11e1bf9453c0 /srv btrfs subvol=/@srv,defaults,noatime,compress=zstd,space_cache=v2,commit=120 0 0
1313+UUID=37680aff-b9f4-40f0-aa2f-11e1bf9453c0 /var/cache btrfs subvol=/@cache,defaults,noatime,compress=zstd,space_cache=v2,commit=120 0 0
1414+UUID=37680aff-b9f4-40f0-aa2f-11e1bf9453c0 /var/tmp btrfs subvol=/@tmp,defaults,noatime,compress=zstd,space_cache=v2,commit=120 0 0
1515+UUID=37680aff-b9f4-40f0-aa2f-11e1bf9453c0 /var/log btrfs subvol=/@log,defaults,noatime,compress=zstd,space_cache=v2,commit=120 0 0
1616+tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
1717+/swap/swapfile none swap defaults 0 0
+170
etc/makepkg.conf
···11+#!/usr/bin/env bash
22+#
33+# /etc/makepkg.conf
44+#
55+66+chrt -iap 0 $$
77+88+#########################################################################
99+# SOURCE ACQUISITION
1010+#########################################################################
1111+#
1212+#-- The download utilities that makepkg should use to acquire sources
1313+# Format: 'protocol::agent'
1414+# DLAGENTS=('file::/usr/bin/curl -qgC - -o %o %u'
1515+# 'ftp::/usr/bin/curl -qgfC - --ftp-pasv --retry 3 --retry-delay 3 -o %o %u'
1616+# 'http::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
1717+# 'https::/usr/bin/curl -qgb "" -fLC - --retry 3 --retry-delay 3 -o %o %u'
1818+# 'rsync::/usr/bin/rsync --no-motd -z %u %o'
1919+# 'scp::/usr/bin/scp -C %u %o')
2020+DLAGENTS=('ftp::/usr/bin/aria2c -UWget -s4 -x4 %u -o %o --follow-metalink=mem'
2121+ 'http::/usr/bin/aria2c -UWget -s4 -x4 %u -o %o --follow-metalink=mem'
2222+ 'https::/usr/bin/aria2c -UWget -s4 -x4 %u -o %o --follow-metalink=mem'
2323+ 'rsync::/usr/bin/rsync --no-motd -z %u %o'
2424+ 'scp::/usr/bin/scp -C %u %o')
2525+2626+# Other common tools:
2727+# /usr/bin/snarf
2828+# /usr/bin/lftpget -c
2929+# /usr/bin/wget
3030+3131+#-- The package required by makepkg to download VCS sources
3232+# Format: 'protocol::package'
3333+VCSCLIENTS=('bzr::breezy'
3434+ 'fossil::fossil'
3535+ 'git::git'
3636+ 'hg::mercurial'
3737+ 'svn::subversion')
3838+3939+#########################################################################
4040+# ARCHITECTURE, COMPILE FLAGS
4141+#########################################################################
4242+#
4343+CARCH="x86_64"
4444+CHOST="x86_64-pc-linux-gnu"
4545+4646+#-- Compiler and Linker Flags
4747+#CPPFLAGS=""
4848+CFLAGS="-march=native -O2 -pipe -fno-plt -fexceptions \
4949+ -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security \
5050+ -fstack-clash-protection -fcf-protection \
5151+ -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer"
5252+CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS"
5353+LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now \
5454+ -Wl,-z,pack-relative-relocs -fuse-ld=mold -Wl,--separate-debug-file"
5555+LTOFLAGS="-flto=auto"
5656+#-- Make Flags: change this for DistCC/SMP systems
5757+MAKEFLAGS="-j8"
5858+#-- Debugging flags
5959+DEBUG_CFLAGS="-g"
6060+DEBUG_CXXFLAGS="$DEBUG_CFLAGS"
6161+6262+#########################################################################
6363+# BUILD ENVIRONMENT
6464+#########################################################################
6565+#
6666+# Makepkg defaults: BUILDENV=(!distcc !color !ccache check !sign)
6767+# A negated environment option will do the opposite of the comments below.
6868+#
6969+#-- distcc: Use the Distributed C/C++/ObjC compiler
7070+#-- color: Colorize output messages
7171+#-- ccache: Use ccache to cache compilation
7272+#-- check: Run the check() function if present in the PKGBUILD
7373+#-- sign: Generate PGP signature file
7474+#
7575+BUILDENV=(!distcc color ccache check !sign)
7676+#
7777+#-- If using DistCC, your MAKEFLAGS will also need modification. In addition,
7878+#-- specify a space-delimited list of hosts running in the DistCC cluster.
7979+#DISTCC_HOSTS="bas@haring.bas.sh,cpp,lzo"
8080+#
8181+#-- Specify a directory for package building.
8282+#BUILDDIR=/tmp/makepkg
8383+8484+#########################################################################
8585+# GLOBAL PACKAGE OPTIONS
8686+# These are default values for the options=() settings
8787+#########################################################################
8888+#
8989+# Makepkg defaults: OPTIONS=(!strip docs libtool staticlibs emptydirs !zipman !purge !debug !lto !autodeps)
9090+# A negated option will do the opposite of the comments below.
9191+#
9292+#-- strip: Strip symbols from binaries/libraries
9393+#-- docs: Save doc directories specified by DOC_DIRS
9494+#-- libtool: Leave libtool (.la) files in packages
9595+#-- staticlibs: Leave static library (.a) files in packages
9696+#-- emptydirs: Leave empty directories in packages
9797+#-- zipman: Compress manual (man and info) pages in MAN_DIRS with gzip
9898+#-- purge: Remove files specified by PURGE_TARGETS
9999+#-- debug: Add debugging flags as specified in DEBUG_* variables
100100+#-- lto: Add compile flags for building with link time optimization
101101+#-- autodeps: Automatically add depends/provides
102102+#
103103+OPTIONS=(strip docs !libtool !staticlibs emptydirs zipman purge debug lto)
104104+105105+#-- File integrity checks to use. Valid: md5, sha1, sha224, sha256, sha384, sha512, b2
106106+INTEGRITY_CHECK=(sha256)
107107+#-- Options to be used when stripping binaries. See `man strip' for details.
108108+STRIP_BINARIES="--strip-all"
109109+#-- Options to be used when stripping shared libraries. See `man strip' for details.
110110+STRIP_SHARED="--strip-unneeded"
111111+#-- Options to be used when stripping static libraries. See `man strip' for details.
112112+STRIP_STATIC="--strip-debug"
113113+#-- Manual (man and info) directories to compress (if zipman is specified)
114114+MAN_DIRS=({usr{,/local}{,/share},opt/*}/{man,info})
115115+#-- Doc directories to remove (if !docs is specified)
116116+DOC_DIRS=(usr/{,local/}{,share/}{doc,gtk-doc} opt/*/{doc,gtk-doc})
117117+#-- Files to be removed from all packages (if purge is specified)
118118+PURGE_TARGETS=(usr/{,share}/info/dir .packlist *.pod)
119119+#-- Directory to store source code in for debug packages
120120+DBGSRCDIR="/usr/src/debug"
121121+#-- Prefix and directories for library autodeps
122122+LIB_DIRS=('lib:usr/lib' 'lib32:usr/lib32')
123123+124124+#########################################################################
125125+# PACKAGE OUTPUT
126126+#########################################################################
127127+#
128128+# Default: put built package and cached source in build directory
129129+#
130130+#-- Destination: specify a fixed directory where all packages will be placed
131131+#PKGDEST=/home/packages
132132+#-- Source cache: specify a fixed directory where source files will be cached
133133+#SRCDEST=/home/sources
134134+#-- Source packages: specify a fixed directory where all src packages will be placed
135135+#SRCPKGDEST=/home/srcpackages
136136+#-- Log files: specify a fixed directory where all log files will be placed
137137+#LOGDEST=/home/makepkglogs
138138+#-- Packager: name/email of the person or organization building packages
139139+#PACKAGER="John Doe <john@doe.com>"
140140+#-- Specify a key to use for package signing
141141+#GPGKEY=""
142142+143143+#########################################################################
144144+# COMPRESSION DEFAULTS
145145+#########################################################################
146146+#
147147+COMPRESSGZ=(pigz -c -f -n)
148148+COMPRESSBZ2=(lbzip2 -c -f)
149149+COMPRESSXZ=(xz -c -z -)
150150+COMPRESSZST=(zstd -c -T0 --auto-threads=logical -9 -)
151151+COMPRESSLRZ=(lrzip -q)
152152+COMPRESSLZO=(lzop -q)
153153+COMPRESSZ=(compress -c -f)
154154+COMPRESSLZ4=(lz4 -q)
155155+COMPRESSLZ=(plzip -c -f)
156156+157157+#########################################################################
158158+# EXTENSION DEFAULTS
159159+#########################################################################
160160+#
161161+PKGEXT='.pkg.tar.zst'
162162+SRCEXT='.src.tar.gz'
163163+164164+#########################################################################
165165+# OTHER
166166+#########################################################################
167167+#
168168+#-- Command used to run pacman as root, instead of trying sudo and su
169169+#PACMAN_AUTH=()
170170+# vim: set ft=sh ts=2 sw=2 et:
+19
etc/makepkg.conf.d/rust.conf
···11+#!/hint/bash
22+# shellcheck disable=2034
33+44+#
55+# /etc/makepkg.conf.d/rust.conf
66+#
77+88+#########################################################################
99+# RUST LANGUAGE SUPPORT
1010+#########################################################################
1111+1212+# Flags used for the Rust compiler, similar in spirit to CFLAGS. Read
1313+# linkman:rustc[1] for more details on the available flags.
1414+RUSTFLAGS="-C opt-level=2 -C target-cpu=native -C force-frame-pointers=yes -C link-arg=-fuse-ld=mold"
1515+1616+# Additional compiler flags appended to `RUSTFLAGS` for use in debugging.
1717+# Usually this would include: ``-C debuginfo=2''. Read linkman:rustc[1] for
1818+# more details on the available flags.
1919+DEBUG_RUSTFLAGS="-C debuginfo=2"
+101
etc/pacman.conf
···11+#
22+# /etc/pacman.conf
33+#
44+# See the pacman.conf(5) manpage for option and repository directives
55+66+#
77+# GENERAL OPTIONS
88+#
99+[options]
1010+# The following paths are commented out with their default values listed.
1111+# If you wish to use different paths, uncomment and update the paths.
1212+#RootDir = /
1313+#DBPath = /var/lib/pacman/
1414+#CacheDir = /var/cache/pacman/pkg/
1515+#LogFile = /var/log/pacman.log
1616+#GPGDir = /etc/pacman.d/gnupg/
1717+#HookDir = /etc/pacman.d/hooks/
1818+HoldPkg = pacman glibc
1919+#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
2020+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
2121+#XferCommand = /usr/bin/aria2c -UWget -s4 -x4 %u -o %o --allow-overwrite=true --continue=true --file-allocation=none --log-level=error --max-tries=3 --max-file-not-found=5 --min-split-size=5M --no-conf --remote-time=true --timeout=5 --dir=/
2222+#CleanMethod = KeepInstalled
2323+Architecture = auto
2424+2525+# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
2626+#IgnorePkg =
2727+#IgnoreGroup =
2828+2929+#NoUpgrade =
3030+#NoExtract =
3131+3232+# Misc options
3333+#UseSyslog
3434+Color
3535+#NoProgressBar
3636+CheckSpace
3737+#VerbosePkgLists
3838+ParallelDownloads = 10
3939+DownloadUser = alpm
4040+#DisableSandbox
4141+ILoveCandy
4242+4343+# By default, pacman accepts packages signed by keys that its local keyring
4444+# trusts (see pacman-key and its man page), as well as unsigned packages.
4545+SigLevel = Required DatabaseOptional
4646+LocalFileSigLevel = Optional
4747+#RemoteFileSigLevel = Required
4848+4949+# NOTE: You must run `pacman-key --init` before first using pacman; the local
5050+# keyring can then be populated with the keys of all official Arch Linux
5151+# packagers with `pacman-key --populate archlinux`.
5252+5353+#
5454+# REPOSITORIES
5555+# - can be defined here or included from another file
5656+# - pacman will search repositories in the order defined here
5757+# - local/custom mirrors can be added here or in separate files
5858+# - repositories listed first will take precedence when packages
5959+# have identical names, regardless of version number
6060+# - URLs will have $repo replaced by the name of the current repo
6161+# - URLs will have $arch replaced by the name of the architecture
6262+#
6363+# Repository entries are of the format:
6464+# [repo-name]
6565+# Server = ServerName
6666+# Include = IncludePath
6767+#
6868+# The header [repo-name] is crucial - it must be present and
6969+# uncommented to enable the repo.
7070+#
7171+7272+# The testing repositories are disabled by default. To enable, uncomment the
7373+# repo name header and Include lines. You can add preferred servers immediately
7474+# after the header, and they will be used before the default mirrors.
7575+7676+#[core-testing]
7777+#Include = /etc/pacman.d/mirrorlist
7878+7979+[core]
8080+Include = /etc/pacman.d/mirrorlist
8181+8282+#[extra-testing]
8383+#Include = /etc/pacman.d/mirrorlist
8484+8585+[extra]
8686+Include = /etc/pacman.d/mirrorlist
8787+8888+# If you want to run 32 bit applications on your x86_64 system,
8989+# enable the multilib repositories as required here.
9090+9191+#[multilib-testing]
9292+#Include = /etc/pacman.d/mirrorlist
9393+9494+[multilib]
9595+Include = /etc/pacman.d/mirrorlist
9696+9797+# An example of a custom package repository. See the pacman manpage for
9898+# tips on creating your own repositories.
9999+#[custom]
100100+#SigLevel = Optional TrustAll
101101+#Server = file:///home/custompkgs
+44
etc/systemd/resolved.conf
···11+# This file is part of systemd.
22+#
33+# systemd is free software; you can redistribute it and/or modify it under the
44+# terms of the GNU Lesser General Public License as published by the Free
55+# Software Foundation; either version 2.1 of the License, or (at your option)
66+# any later version.
77+#
88+# Entries in this file show the compile time defaults. Local configuration
99+# should be created by either modifying this file (or a copy of it placed in
1010+# /etc/ if the original file is shipped in /usr/), or by creating "drop-ins" in
1111+# the /etc/systemd/resolved.conf.d/ directory. The latter is generally
1212+# recommended. Defaults can be restored by simply deleting the main
1313+# configuration file and all drop-ins located in /etc/.
1414+#
1515+# Use 'systemd-analyze cat-config systemd/resolved.conf' to display the full config.
1616+#
1717+# See resolved.conf(5) for details.
1818+1919+[Resolve]
2020+# Some examples of DNS servers which may be used for DNS= and FallbackDNS=:
2121+# Cloudflare: 1.1.1.1#cloudflare-dns.com 1.0.0.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 2606:4700:4700::1001#cloudflare-dns.com
2222+# Google: 8.8.8.8#dns.google 8.8.4.4#dns.google 2001:4860:4860::8888#dns.google 2001:4860:4860::8844#dns.google
2323+# Quad9: 9.9.9.9#dns.quad9.net 149.112.112.112#dns.quad9.net 2620:fe::fe#dns.quad9.net 2620:fe::9#dns.quad9.net
2424+#
2525+# Using DNS= configures global DNS servers and does not suppress link-specific
2626+# configuration. Parallel requests will be sent to per-link DNS servers
2727+# configured automatically by systemd-networkd.service(8), NetworkManager(8), or
2828+# similar management services, or configured manually via resolvectl(1). See
2929+# resolved.conf(5) and systemd-resolved(8) for more details.
3030+DNS=1.1.1.1#cloudflare-dns.com 8.8.8.8#dns.google 2606:4700:4700::1111#cloudflare-dns.com 2001:4860:4860::8888#dns.google 9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net
3131+FallbackDNS=9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net 1.1.1.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com 8.8.8.8#dns.google 2001:4860:4860::8888#dns.google
3232+#Domains=
3333+DNSSEC=yes
3434+DNSOverTLS=yes
3535+#MulticastDNS=yes
3636+#LLMNR=yes
3737+Cache=yes
3838+#CacheFromLocalhost=no
3939+DNSStubListener=yes
4040+#DNSStubListenerExtra=
4141+ReadEtcHosts=yes
4242+#ResolveUnicastSingleLabel=no
4343+#StaleRetentionSec=0
4444+#RefuseRecordTypes=
···3535set -l bun_install_boolean_flags yarn production optional development no-save dry-run force no-cache silent verbose global
3636set -l bun_install_boolean_flags_descriptions "Write a yarn.lock file (yarn v1)" "Don't install devDependencies" "Add dependency to optionalDependencies" "Add dependency to devDependencies" "Don't update package.json or save a lockfile" "Don't install anything" "Always request the latest versions from the registry & reinstall all dependencies" "Ignore manifest cache entirely" "Don't output anything" "Excessively verbose logging" "Use global folder"
37373838-set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add init pm x
3939-set -l bun_builtin_cmds_accepting_flags create help bun upgrade discord run init link unlink pm x
3838+set -l bun_builtin_cmds_without_run dev create help bun upgrade discord install remove add update init pm x
3939+set -l bun_builtin_cmds_accepting_flags create help bun upgrade discord run init link unlink pm x update
40404141function __bun_complete_bins_scripts --inherit-variable bun_builtin_cmds_without_run -d "Emit bun completions for bins and scripts"
4242 # Do nothing if we already have a builtin subcommand,
···143143144144for i in (seq (count $bun_install_boolean_flags))
145145 complete -c bun \
146146- -n "__fish_seen_subcommand_from install add remove" -l "$bun_install_boolean_flags[$i]" -d "$bun_install_boolean_flags_descriptions[$i]"
146146+ -n "__fish_seen_subcommand_from install add remove update" -l "$bun_install_boolean_flags[$i]" -d "$bun_install_boolean_flags_descriptions[$i]"
147147end
148148149149complete -c bun \
150150- -n "__fish_seen_subcommand_from install add remove" -l cwd -d 'Change working directory'
150150+ -n "__fish_seen_subcommand_from install add remove update" -l cwd -d 'Change working directory'
151151152152complete -c bun \
153153- -n "__fish_seen_subcommand_from install add remove" -l cache-dir -d 'Choose a cache directory (default: $HOME/.bun/install/cache)'
153153+ -n "__fish_seen_subcommand_from install add remove update" -l cache-dir -d 'Choose a cache directory (default: $HOME/.bun/install/cache)'
154154155155complete -c bun \
156156 -n "__fish_seen_subcommand_from add" -d Popular -a '(__fish__get_bun_packages)'
···165165 -n "__fish_seen_subcommand_from pm; and __fish_seen_subcommand_from cache; and not __fish_seen_subcommand_from (__fish__get_bun_bins) (__fish__get_bun_scripts);" -a rm -f
166166167167# Add built-in subcommands with descriptions.
168168-complete -c bun -n __fish_use_subcommand -a create -f -d "Create a new project from a template"
168168+complete -c bun -n __fish_use_subcommand -a "create c" -f -d "Create a new project from a template"
169169complete -c bun -n __fish_use_subcommand -a "build bun" --require-parameter -F -d "Transpile and bundle one or more files"
170170complete -c bun -n __fish_use_subcommand -a upgrade -d "Upgrade Bun"
171171complete -c bun -n __fish_use_subcommand -a run -d "Run a script or package binary"
172172-complete -c bun -n __fish_use_subcommand -a install -d "Install dependencies from package.json" -f
173173-complete -c bun -n __fish_use_subcommand -a remove -d "Remove a dependency from package.json" -f
174174-complete -c bun -n __fish_use_subcommand -a add -d "Add a dependency to package.json" -f
172172+complete -c bun -n __fish_use_subcommand -a "install i" -d "Install dependencies from package.json" -f
173173+complete -c bun -n __fish_use_subcommand -a "remove rm r" -d "Remove a dependency from package.json" -f
174174+complete -c bun -n __fish_use_subcommand -a "add a" -d "Add a dependency to package.json" -f
175175complete -c bun -n __fish_use_subcommand -a init -d "Initialize a Bun project in this directory" -f
176176complete -c bun -n __fish_use_subcommand -a link -d "Register or link a local npm package" -f
177177complete -c bun -n __fish_use_subcommand -a unlink -d "Unregister a local npm package" -f
178178complete -c bun -n __fish_use_subcommand -a pm -d "Additional package management utilities" -f
179179complete -c bun -n __fish_use_subcommand -a x -d "Execute a package binary, installing if needed" -f
180180complete -c bun -n __fish_use_subcommand -a outdated -d "Display the latest versions of outdated dependencies" -f
181181+complete -c bun -n __fish_use_subcommand -a update -d "Update dependencies to their latest versions" -f
181182complete -c bun -n __fish_use_subcommand -a publish -d "Publish your package from local to npm" -f
+88-17
fish/.config/fish/completions/pnpm.fish
···11-###-begin-pnpm-completion-###
22-function _pnpm_completion
33- set cmd (commandline -o)
44- set cursor (commandline -C)
55- set words (count $cmd)
11+set -g __fish_pnpm_cmdline
22+set -g __fish_pnpm_remove_cmdline
33+44+set -l deps_commands remove rm why update upgrade up
55+set -l up_commands update upgrade up
66+set -l install_commands install i
77+88+complete -c pnpm -f
99+complete -c pnpm -a "(__get_scripts)"
1010+complete -c pnpm -f -l filter -s F -r -a "$(FEATURE=filter pnpm-shell-completion)" -d 'Select specified packages'
1111+complete -c pnpm -n "__fish_use_subcommand; or __has_filter" -f -a 'add remove install update publish'
1212+complete -c pnpm -n "not __fish_use_subcommand" -F
1313+1414+# add relative options
1515+complete -c pnpm -n __could_add_global -l global -s g -d 'Install a global package'
1616+complete -c pnpm -n "__fish_seen_subcommand_from add" -l save-dev -s D -d 'Save package to your `devDependencies`'
1717+complete -c pnpm -n "__fish_seen_subcommand_from add" -l save-peer -d 'Save package to your `peerDependencies` and `devDependencies`'
1818+1919+complete -c pnpm -n "__fish_seen_subcommand_from $deps_commands" -f -a "(__get_deps)"
2020+2121+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l dev -s D -d 'Only `devDependencies` are installed regardless of the `NODE_ENV`'
2222+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l fix-lockfile -d 'Fix broken lockfile entries automatically'
2323+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l force -d 'Force reinstall dependencies'
2424+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l ignore-scripts -d "Don't run lifecycle scripts"
2525+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l lockfile-only -d 'Dependencies are not downloaded. Only `pnpm-lock.yaml` is updated'
2626+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l no-optional -d '`optionalDependencies` are not installed'
2727+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l offline -d 'Trigger an error if any required dependencies are not available in local store'
2828+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l prefer-offline -d 'Skip staleness checks for cached data, but request missing data from the server'
2929+complete -c pnpm -n "__fish_seen_subcommand_from $install_commands" -l prod -s D -d "Packages in `devDependencies` won't be installed"
3030+3131+complete -c pnpm -n "__fish_seen_subcommand_from $up_commands" -l save-dev -s D -d 'Update packages only in "devDependencies"'
3232+complete -c pnpm -n "__fish_seen_subcommand_from $up_commands" -l interactive -s i -d 'Show outdated dependencies and select which ones to update'
3333+complete -c pnpm -n "__fish_seen_subcommand_from $up_commands" -l latest -s L -d 'Ignore version ranges in package.json'
3434+complete -c pnpm -n "__fish_seen_subcommand_from $up_commands" -l no-optional -d "Don't update packages in `optionalDependencies`"
3535+complete -c pnpm -n "__fish_seen_subcommand_from $up_commands" -l prod -s P -d 'Update packages only in "dependencies" and "optionalDependencies"'
3636+complete -c pnpm -n "__fish_seen_subcommand_from $up_commands" -l recursive -s r -d 'Update in every package found in subdirectories or every workspace package'
3737+3838+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l access -x -a 'public restricted' -d 'Tells the registry whether this package should be published as public or restricted'
3939+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l dry-run -d 'Does everything a publish would do except actually publishing to the registry'
4040+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l force -d 'Packages are proceeded to be published even if their current version is already in the registry'
4141+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l ignore-scripts -d 'Ignores any publish related lifecycle scripts (prepublishOnly, postpublish, and the like)'
4242+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l no-git-checks -d "Don't check if current branch is your publish branch, clean, and up to date"
4343+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l otp -d 'Specify a one-time password'
4444+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l publish-branch -d 'Sets branch name to publish'
4545+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l recursive -s r -d 'Publish all packages from the workspace'
4646+complete -c pnpm -n "__fish_seen_subcommand_from publish" -l tag -x -d 'Registers the published package with the given tag'
4747+4848+function __get_scripts
4949+ set -l cmdline (commandline -c)
5050+ if set -q __fish_pnpm_cmdline; and test "$cmdline" = "$__fish_pnpm_cmdline"
5151+ return 0
5252+ end
5353+5454+ set -g __fish_pnpm_cmdline $cmdline
65577- set completions (eval env DEBUG=\"" \"" COMP_CWORD=\""$words\"" COMP_LINE=\""$cmd \"" COMP_POINT=\""$cursor\"" SHELL=fish pnpm completion-server -- $cmd)
5656+ set -l tokens (commandline -opc)
5757+ set -e tokens[1] # assume the first token is `pnpm`
5858+ argparse 'F/filter=' -- $tokens 2>/dev/null
5959+ TARGET_PKG=$_flag_filter FEATURE=scripts pnpm-shell-completion
6060+end
86199- if [ "$completions" = "__tabtab_complete_files__" ]
1010- set -l matches (commandline -ct)*
1111- if [ -n "$matches" ]
1212- __fish_complete_path (commandline -ct)
1313- end
1414- else
1515- for completion in $completions
1616- echo -e $completion
1717- end
6262+function __get_deps
6363+ set -l cmdline (commandline -c)
6464+ if set -q __fish_pnpm_remove_cmdline; and test "$cmdline" = "$__fish_pnpm_remove_cmdline"
6565+ return 0
1866 end
6767+6868+ set -g __fish_pnpm_remove_cmdline $cmdline
6969+7070+ set -l tokens (commandline -opc)
7171+ set -e tokens[1] # assume the first token is `pnpm`
7272+ argparse 'F/filter=' -- $tokens 2>/dev/null
7373+ TARGET_PKG=$_flag_filter FEATURE=deps pnpm-shell-completion
1974end
20752121-complete -f -d 'pnpm' -c pnpm -a "(_pnpm_completion)"
2222-###-end-pnpm-completion-###
7676+function __has_filter
7777+ set -l tokens (commandline -opc)
7878+ set -e tokens[1] # assume the first token is `pnpm`
7979+ argparse 'F/filter=' -- $tokens 2>/dev/null
8080+ if not count $_flag_filter
8181+ return 1
8282+ end
8383+ return 0
8484+end
23858686+function __could_add_global
8787+ if __has_filter
8888+ return 1
8989+ end
9090+ if __fish_seen_subcommand_from add
9191+ return 0
9292+ end
9393+ return 1
9494+end
···11+# This file was created by fish when upgrading to version 4.3, to migrate
22+# the 'fish_key_bindings' variable from its old default scope (universal)
33+# to its new default scope (global). We recommend you delete this file
44+# and configure key bindings in ~/.config/fish/config.fish if needed.
55+66+set --global fish_key_bindings fish_hybrid_key_bindings
77+88+# Prior to version 4.3, fish shipped an event handler that runs
99+# `set --universal fish_key_bindings fish_default_key_bindings`
1010+# whenever the fish_key_bindings variable is erased.
1111+# This means that as long as any fish < 4.3 is still running on this system,
1212+# we cannot complete the migration.
1313+# As a workaround, erase the universal variable at every shell startup.
1414+set --erase --universal fish_key_bindings
+48
fish/.config/fish/conf.d/fish_frozen_theme.fish
···11+# This file was created by fish when upgrading to version 4.3, to migrate
22+# theme variables from universal to global scope.
33+# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
44+# To customize your theme, delete this file and see
55+# help interactive#syntax-highlighting
66+# or
77+# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
88+# for appropriate commands to add to ~/.config/fish/config.fish instead.
99+# See also the release notes for fish 4.3.0 (run `help relnotes`).
1010+1111+set --global fish_color_autosuggestion 4c566a
1212+set --global fish_color_cancel --reverse
1313+set --global fish_color_command 88c0d0
1414+set --global fish_color_comment 4c566a --italics
1515+set --global fish_color_cwd 5e81ac
1616+set --global fish_color_cwd_root bf616a
1717+set --global fish_color_end 81a1c1
1818+set --global fish_color_error bf616a
1919+set --global fish_color_escape ebcb8b
2020+set --global fish_color_history_current e5e9f0 --bold
2121+set --global fish_color_host a3be8c
2222+set --global fish_color_host_remote
2323+set --global fish_color_keyword
2424+set --global fish_color_match --background=brblue
2525+set --global fish_color_normal normal
2626+set --global fish_color_operator 81a1c1
2727+set --global fish_color_option
2828+set --global fish_color_param d8dee9
2929+set --global fish_color_quote a3be8c
3030+set --global fish_color_redirection b48ead --bold
3131+set --global fish_color_search_match --bold --background=434c5e
3232+set --global fish_color_selection d8dee9 --bold --background=434c5e
3333+set --global fish_color_status red
3434+set --global fish_color_user a3be8c
3535+set --global fish_color_valid_path --underline
3636+set --global fish_pager_color_background
3737+set --global fish_pager_color_completion e5e9f0
3838+set --global fish_pager_color_description ebcb8b --italics
3939+set --global fish_pager_color_prefix normal --bold --underline
4040+set --global fish_pager_color_progress 3b4252 --background=d08770
4141+set --global fish_pager_color_secondary_background
4242+set --global fish_pager_color_secondary_completion
4343+set --global fish_pager_color_secondary_description
4444+set --global fish_pager_color_secondary_prefix
4545+set --global fish_pager_color_selected_background --background=434c5e
4646+set --global fish_pager_color_selected_completion
4747+set --global fish_pager_color_selected_description
4848+set --global fish_pager_color_selected_prefix
+30-1
fish/.config/fish/config.fish
···5353type -q atuin && atuin init fish --disable-up-arrow | source
5454type -q keylightctl && keylightctl completion fish | source
55555656+# why does this break autocomplete for the tmux command
5757+# test ! -e "$HOME/.x-cmd.root/local/data/fish/rc.fish" || source "$HOME/.x-cmd.root/local/data/fish/rc.fish"
5858+5959+# functions -c fish_prompt __fish_prompt
6060+# function fish_prompt
6161+# set _status $status
6262+# echo "check $(date +%s%3N) $did_tmux_restore" | systemd-cat
6363+# if set -q did_tmux_restore
6464+# # functions -e fish_prompt
6565+# # functions -c __fish_prompt fish_prompt
6666+# # functions -e __fish_prompt
6767+# # printf '\e[u'
6868+# return
6969+# else
7070+# # forwarding the original $status to the actual prompt
7171+# test $_status -eq 0
7272+# __fish_prompt
7373+# # printf '\e[s'
7474+# end
7575+# end
7676+5677if test -e $__fish_user_data_dir/plugins/plug.fish/conf.d/plugin_load.fish
5778 source $__fish_user_data_dir/plugins/plug.fish/conf.d/plugin_load.fish
5879else
5980 if not set -q plugins
6060- set -U plugins https://github.com/kidonng/plug.fish
8181+ set -Ux plugins https://github.com/kidonng/plug.fish
6182 end
6283 curl -L https://github.com/kidonng/plug.fish/raw/v3/conf.d/plugin_load.fish | source
6384end
···80101 end
81102end
82103104104+function last_history_item
105105+ echo $history[1]
106106+end
107107+abbr -a !! --position anywhere --function last_history_item
108108+109109+# TODO: fix empty line on suspending again
110110+# bind -M insert \cz 'functions -c fish_job_summary _fish_job_summary; function fish_job_summary; end; fg 2>/dev/null; commandline -f repaint; functions -e fish_job_summary; functions -c _fish_job_summary fish_job_summary; functions -e _fish_job_summary'
111111+bind -M insert \cz 'fg; commandline -f repaint'
···11+# TODO: prompt to update/add existing files/directories
22+33+function dotfiles_add --description 'Move directory to the dotfiles repo and stow it'
44+ if not test -d ~/dotfiles
55+ echo "~/dotfiles does not exist."
66+ return 1
77+ end
88+99+ if count $argv >/dev/null && test $argv[1] != -h && test $argv[1] != --help
1010+ set source $argv[1]
1111+ else
1212+ echo "Usage: dotfiles_add <directory>"
1313+ return 1
1414+ end
1515+1616+ if test -d $source
1717+ set package (path basename $source)
1818+ set target ~/dotfiles/$package/$(realpath -s --relative-to=$HOME $source)
1919+2020+ if test -d $target
2121+ echo "Directory $target already exists."
2222+ return 1
2323+ end
2424+ else
2525+ echo "$source does not exist."
2626+ return 1
2727+ end
2828+2929+ echo "Moving $source to $target"
3030+ mv $source $target
3131+ stow $package
3232+end
···11+# from https://gist.github.com/NotTheDr01ds/6357e48b511735c42b94c4cc081ac5dc
22+# from https://stackoverflow.com/a/70491301/5082094
33+function fish_load_sudo_alias
44+ function sudo
55+ if functions -q -- "$argv[1]"
66+ # Create a string which quotes each of the original arguments
77+ # so that they can be safely passed into the new fish
88+ # instance that is called by sudo.
99+ set cmdline (
1010+ for arg in $argv
1111+ printf "\"%s\" " $arg
1212+ end
1313+ )
1414+ # We need to pass the function source to another fish instance.
1515+ # Since it is multi-line, any attempt to store the function in a
1616+ # variable results in an array, which also can't be passed to
1717+ # another fish instance.
1818+ #
1919+ # So first we escape the existing function (mostly in case it
2020+ # has '\n' literals in it, then we join it on "\n".
2121+ #
2222+ # After passing it into fish, the new shell splits it,
2323+ # unescapes it, and passes the function declaration to
2424+ # `source`, which loads it into memory in the new shell.
2525+ set -x function_src (string join "\n" (string escape --style=var (functions "$argv[1]")))
2626+ set argv fish -c 'string unescape --style=var (string split "\n" $function_src) | source; '$cmdline
2727+ command sudo -E $argv
2828+ else
2929+ command sudo $argv
3030+ end
3131+ end
3232+end
+3-3
fish/.config/fish/functions/fish_remove_list.fish
···33 set list $$list_name
4455 set target (printf %s\n $list | fzf -1 -q "$argv[2]")
66- test -n $target || return 1
66+ test -n "$target" || return 1
7788- if not set -l index (contains -i "$target" $fish_user_paths)
88+ if not set index (contains -i "$target" $list)
99 echo "'$target' was not found in $list_name"
1010 return 1
1111 end
12121313 if confirm "Remove '$target' from $list_name?"
1414- set -e $list_name[1][$index] && echo -e "\033[2KRemoved '$target' from \$fish_user_paths"
1414+ set -e $list_name[1][$index] && echo -e "\033[2KRemoved '$target' from \$$list_name"
1515 end
1616end
···11+function rga-fzf
22+ set RG_PREFIX 'rga --files-with-matches'
33+ if test (count $argv) -gt 1
44+ set RG_PREFIX "$RG_PREFIX $argv[1..-2]"
55+ end
66+ set -l file $file
77+ set file (
88+ FZF_DEFAULT_COMMAND="$RG_PREFIX '$argv[-1]'" \
99+ fzf --sort \
1010+ --preview='test ! -z {} && \
1111+ rga --pretty --context 5 {q} {}' \
1212+ --phony -q "$argv[-1]" \
1313+ --bind "change:reload:$RG_PREFIX {q}" \
1414+ --preview-window='50%:wrap'
1515+ ) && echo "opening $file" && open "$file"
1616+end
+4
fish/.config/fish/functions/set-font.fish
···11+function set-font
22+ gsettings set org.gnome.desktop.interface font-name $argv
33+ gsettings set org.gnome.desktop.interface document-font-name $argv
44+end
+24-1
fish/.config/fish/functions/yay.fish
···11function yay
22- command yay --config /home/bas/.config/pacman/pacman.conf $argv
22+ # if type -q paru
33+ # paru $argv
44+ # return $status
55+ # end
66+77+ if not command -q yay
88+ fish_command_not_found yay
99+ return 1
1010+ end
1111+1212+ if command -q mise && mise deactivate 2>/dev/null
1313+ function __yay_reactivate_mise --on-event fish_prompt
1414+ functions -e __yay_reactivate_mise
1515+ mise activate | source
1616+ end
1717+ end
1818+1919+ command yay $argv
2020+2121+ # if test -f $HOME/.config/pacman/pacman.conf
2222+ # command yay --config $HOME/.config/pacman/pacman.conf $argv
2323+ # else
2424+ # command yay $argv
2525+ # end
326end
···11+<?xml version="1.0"?>
22+<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
33+<fontconfig>
44+ <description>Tweaks for the Droid Sans fonts with the hieroglyphic typefaces</description>
55+<!--
66+ Stem-darkening does not work well with these typefaces, causing
77+ characters over-emboldening. Most of the software will automatically use
88+ Noto fonts for hieroglyphic characters, but there are some exceptions, like
99+ Chromium and GNOME shell, that will fall back to Droid Sans because of the
1010+ higher fontconfig priority. This is the main reason we reject this fonts.
1111+ -->
1212+ <selectfont>
1313+ <rejectfont>
1414+ <pattern>
1515+ <patelt name="family">
1616+ <string>Droid Sans Fallback</string>
1717+ </patelt>
1818+ </pattern>
1919+ <pattern>
2020+ <patelt name="family">
2121+ <string>Droid Sans Japanese</string>
2222+ </patelt>
2323+ </pattern>
2424+ </rejectfont>
2525+ </selectfont>
2626+</fontconfig>
+17
gh/.config/gh/config.yml
···11+# The current version of the config schema
22+version: 1
33+# What protocol to use when performing git operations. Supported values: ssh, https
44+git_protocol: ssh
55+# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
66+editor:
77+# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
88+prompt: enabled
99+# A pager program to send command output to, e.g. "less". Set the value to "cat" to disable the pager.
1010+pager:
1111+# Aliases allow you to create nicknames for gh commands
1212+aliases:
1313+ co: pr checkout
1414+# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
1515+http_unix_socket:
1616+# What web browser gh should use when opening URLs. If blank, will refer to environment.
1717+browser:
···11+# Display style of current position. available: line, bar
22+timeline_style=line
33+# Line display style config
44+timeline_line_width=2
55+# Timeline size when fully expanded, in pixels, 0 to disable
66+timeline_size=32
77+# Comma separated states when element should always be fully visible.
88+# Available: paused, audio, image, video, idle, windowed, fullscreen
99+timeline_persistency=
1010+# Top border of background color to help visually separate timeline from video
1111+timeline_border=1
1212+# When scrolling above timeline, wheel will seek by this amount of seconds.
1313+# Default uses fast seeking. Add `!` suffix to enable exact seeks. Example: `5!`
1414+timeline_step=5
1515+# Render cache indicators for streaming content
1616+timeline_cache=yes
1717+1818+# When to display an always visible progress bar (minimized timeline). Can be: windowed, fullscreen, always, never
1919+# Can also be toggled on demand with `toggle-progress` command.
2020+progress=never
2121+progress_size=2
2222+progress_line_width=20
2323+2424+# A comma delimited list of controls above the timeline. Set to `never` to disable.
2525+# Parameter spec: enclosed in `{}` means value, enclosed in `[]` means optional
2626+# Full item syntax: `[<[!]{disposition1}[,[!]{dispositionN}]>]{element}[:{paramN}][#{badge}[>{limit}]][?{tooltip}]`
2727+# Common properties:
2828+# `{icon}` - parameter used to specify an icon name (example: `face`)
2929+# - pick here: https://fonts.google.com/icons?icon.platform=web&icon.set=Material+Icons&icon.style=Rounded
3030+# `{element}`s and their parameters:
3131+# `{shorthand}` - preconfigured shorthands:
3232+# `play-pause`, `menu`, `subtitles`, `audio`, `video`, `playlist`,
3333+# `chapters`, `editions`, `stream-quality`, `open-file`, `items`,
3434+# `next`, `prev`, `first`, `last`, `audio-device`, `fullscreen`,
3535+# `loop-playlist`, `loop-file`, `shuffle`, `autoload`
3636+# `speed[:{scale}]` - display speed slider, [{scale}] - factor of controls_size, default: 1.3
3737+# `command:{icon}:{command}` - button that executes a {command} when pressed
3838+# `toggle:{icon}:{prop}[@{owner}]` - button that toggles mpv property. shorthand for yes/no cycle below
3939+# `cycle:{default_icon}:{prop}[@{owner}]:{value1}[={icon1}][!]/{valueN}[={iconN}][!]`
4040+# - button that cycles mpv property between values, each optionally having different icon and active flag
4141+# - presence of `!` at the end will style the button as active
4242+# - `{owner}` is the name of a script that manages this property if any. Set to `uosc` to tap into uosc options.
4343+# `gap[:{scale}]` - display an empty gap
4444+# {scale} - factor of controls_size, default: 0.3
4545+# `space` - fills all available space between previous and next item, useful to align items to the right
4646+# - multiple spaces divide the available space among themselves, which can be used for centering
4747+# `button:{name}` - button whose state, look, and click action are managed by external script
4848+# Item visibility control:
4949+# `<[!]{disposition1}[,[!]{dispositionN}]>` - optional prefix to control element's visibility
5050+# - `{disposition}` can be one of:
5151+# - `idle` - true if mpv is in idle mode (no file loaded)
5252+# - `image` - true if current file is a single image
5353+# - `audio` - true for audio only files
5454+# - `video` - true for files with a video track
5555+# - `has_many_video` - true for files with more than one video track
5656+# - `has_image` - true for files with a cover or other image track
5757+# - `has_audio` - true for files with an audio track
5858+# - `has_many_audio` - true for files with more than one audio track
5959+# - `has_sub` - true for files with an subtitle track
6060+# - `has_many_sub` - true for files with more than one subtitle track
6161+# - `has_many_edition` - true for files with more than one edition
6262+# - `has_chapter` - true for files with chapter list
6363+# - `stream` - true if current file is read from a stream
6464+# - `has_playlist` - true if current playlist has 2 or more items in it
6565+# - prefix with `!` to negate the required disposition
6666+# Examples:
6767+# - `<stream>stream-quality` - show stream quality button only for streams
6868+# - `<has_audio,!audio>audio` - show audio tracks button for all files that have
6969+# an audio track, but are not exclusively audio only files
7070+# Place `#{badge}[>{limit}]` after the element params to give it a badge. Available badges:
7171+# `sub`, `audio`, `video` - track type counters
7272+# `{mpv_prop}` - any mpv prop that makes sense to you: https://mpv.io/manual/master/#property-list
7373+# - if prop value is an array it'll display its size
7474+# `>{limit}` will display the badge only if it's numerical value is above this threshold.
7575+# Example: `#audio>1`
7676+# Place `?{tooltip}` after the element config to give it a tooltip.
7777+# Example implementations:
7878+# menu = command:menu:script-binding uosc/menu-blurred?Menu
7979+# subtitles = command:subtitles:script-binding uosc/subtitles#sub?Subtitles
8080+# fullscreen = cycle:crop_free:fullscreen:no/yes=fullscreen_exit!?Fullscreen
8181+# loop-playlist = cycle:repeat:loop-playlist:no/inf!?Loop playlist
8282+# toggle:{icon}:{prop} = cycle:{icon}:{prop}:no/yes!
8383+controls=menu,gap,subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen
8484+controls_size=32
8585+controls_margin=8
8686+controls_spacing=2
8787+controls_persistency=
8888+8989+# Where to display volume controls: none, left, right
9090+volume=right
9191+volume_size=40
9292+volume_border=1
9393+volume_step=1
9494+volume_persistency=
9595+9696+# Playback speed widget: mouse drag or wheel to change, click to reset
9797+speed_step=0.1
9898+speed_step_is_factor=no
9999+speed_persistency=
100100+101101+# Controls all menus, such as context menu, subtitle loader/selector, etc
102102+menu_item_height=36
103103+menu_min_width=260
104104+menu_padding=4
105105+# Determines if `/` or `ctrl+f` is required to activate the search, or if typing
106106+# any text is sufficient.
107107+# When enabled, you can no longer toggle a menu off with the same key that opened it, if the key is a unicode character.
108108+menu_type_to_search=yes
109109+110110+# Top bar with window controls and media title
111111+# Can be: never, no-border, always
112112+top_bar=no-border
113113+top_bar_size=40
114114+# Can be: `no` (hide), left or right
115115+top_bar_controls=right
116116+# Can be: `no` (hide), `yes` (inherit title from mpv.conf), or a custom template string
117117+top_bar_title=yes
118118+# Template string to enable alternative top bar title. If alt title matches main title,
119119+# it'll be hidden. Tip: use `${media-title}` for main, and `${filename}` for alt title.
120120+top_bar_alt_title=
121121+# Can be:
122122+# `below` => display alt title below the main one
123123+# `toggle` => toggle the top bar title text between main and alt by clicking
124124+# the top bar, or calling `toggle-title` binding
125125+top_bar_alt_title_place=below
126126+# Flash top bar when any of these file types is loaded. Available: audio,video,image,chapter
127127+top_bar_flash_on=video,audio
128128+top_bar_persistency=
129129+130130+# Window border drawn in no-border mode
131131+window_border_size=1
132132+133133+# If there's no playlist and file ends, load next file in directory
134134+# Uses `load_types` config below to determine what type of file to load next.
135135+# When enabled, usoc will set mpv config `keep-open` to `yes`, and `keep-open-pause` to `no`.
136136+autoload=no
137137+# Enable uosc's playlist/directory shuffle mode
138138+# This simply makes the next selected playlist or directory item be random, just
139139+# like any other player in the world. It also has an easily togglable control button.
140140+shuffle=no
141141+142142+# Scale the interface by this factor
143143+scale=1
144144+# Scale in fullscreen
145145+scale_fullscreen=1.3
146146+# Adjust the text scaling to fit your font
147147+font_scale=1
148148+# Border of text and icons when drawn directly on top of video
149149+text_border=1.2
150150+# Border radius of buttons, menus, and all other rectangles
151151+border_radius=4
152152+# A comma delimited list of color overrides in RGB HEX format. Defaults:
153153+# foreground=ffffff,foreground_text=000000,background=000000,background_text=ffffff,curtain=111111,success=a5e075,error=ff616e
154154+color=
155155+# A comma delimited list of opacity overrides for various UI element backgrounds and shapes.
156156+# This does not affect any text, which is always rendered fully opaque. Defaults:
157157+# timeline=0.9,position=1,chapters=0.8,slider=0.9,slider_gauge=1,controls=0,speed=0.6,menu=1,submenu=0.4,border=1,title=1,tooltip=1,thumbnail=1,curtain=0.8,idle_indicator=0.8,audio_indicator=0.5,buffering_indicator=0.3,playlist_position=0.8
158158+opacity=timeline=0.6
159159+# A comma delimited list of features to refine at a cost of some performance impact.
160160+# text_width - Use a more accurate text width measurement that measures each text string individually
161161+# instead of just measuring the width of known letters once and adding them up.
162162+# sorting - Use filename sorting that handles non-english languages better, especially asian ones.
163163+# At the moment, this is only available on windows, and has no effect on other platforms.
164164+refine=
165165+# Duration of animations in milliseconds
166166+animation_duration=100
167167+# Execute command for background clicks shorter than this number of milliseconds, 0 to disable
168168+# Execution always waits for `input-doubleclick-time` to filter out double-clicks
169169+click_threshold=0
170170+click_command=cycle pause; script-binding uosc/flash-pause-indicator
171171+# Flash duration in milliseconds used by `flash-{element}` commands
172172+flash_duration=1000
173173+# Distances in pixels below which elements are fully faded in/out
174174+proximity_in=40
175175+proximity_out=120
176176+# Use only bold font weight throughout the whole UI
177177+font_bold=no
178178+# One of `total`, `playtime-remaining` (scaled by the current speed), `time-remaining` (remaining length of file)
179179+destination_time=playtime-remaining
180180+# Display sub second fraction in timestamps up to this precision
181181+time_precision=0
182182+# Display stream's buffered time in timeline if it's lower than this amount of seconds, 0 to disable
183183+buffered_time_threshold=60
184184+# Hide UI when mpv autohides the cursor. Timing is controlled by `cursor-autohide` in `mpv.conf` (in milliseconds).
185185+autohide=no
186186+# Can be: flash, static, manual (controlled by flash-pause-indicator and decide-pause-indicator commands)
187187+pause_indicator=flash
188188+# Sizes to list in stream quality menu
189189+stream_quality_options=4320,2160,1440,1080,720,480,360,240,144
190190+# Types to identify media files
191191+video_types=3g2,3gp,asf,avi,f4v,flv,h264,h265,m2ts,m4v,mkv,mov,mp4,mp4v,mpeg,mpg,ogm,ogv,rm,rmvb,ts,vob,webm,wmv,y4m
192192+audio_types=aac,ac3,aiff,ape,au,cue,dsf,dts,flac,m4a,mid,midi,mka,mp3,mp4a,oga,ogg,opus,spx,tak,tta,wav,weba,wma,wv
193193+image_types=apng,avif,bmp,gif,j2k,jp2,jfif,jpeg,jpg,jxl,mj2,png,svg,tga,tif,tiff,webp
194194+subtitle_types=aqt,ass,gsub,idx,jss,lrc,mks,pgs,pjs,psb,rt,sbv,slt,smi,sub,sup,srt,ssa,ssf,ttxt,txt,usf,vt,vtt
195195+playlist_types=m3u,m3u8,pls,url,cue
196196+# Type pools used by file navigation and `autoload` to determine what type of file to load next
197197+# Available: video,audio,image,playlist,same. `same` means the same type pool (not just extension) as currently open file.
198198+load_types=video,audio,image
199199+# Default open-file menu directory. Use `{drives}` to open drives menu on windows (defaults to `/` on unix).
200200+default_directory=~/
201201+# List hidden files when reading directories. Due to environment limitations, this currently only hides
202202+# files starting with a dot. Doesn't hide hidden files on windows (we have no way to tell they're hidden).
203203+show_hidden_files=no
204204+# Move files to trash (recycle bin) when deleting files. Dependencies:
205205+# - Linux: `sudo apt install trash-cli`
206206+# - MacOS: `brew install trash`
207207+use_trash=no
208208+# Adjusted osd margins based on the visibility of UI elements
209209+adjust_osd_margins=yes
210210+211211+# Adds chapter range indicators to some common chapter types.
212212+# Additionally to displaying the start of the chapter as a diamond icon on top of the timeline,
213213+# the portion of the timeline of that chapter range is also colored based on the config below.
214214+#
215215+# The syntax is a comma-delimited list of `{type}:{color}` pairs, where:
216216+# `{type}` => range type. Currently supported ones are:
217217+# - `openings`, `endings` => anime openings/endings
218218+# - `intros`, `outros` => video intros/outros
219219+# - `ads` => segments created by sponsor-block software like https://github.com/po5/mpv_sponsorblock
220220+# `{color}` => an RGB(A) HEX color code (`rrggbb`, or `rrggbbaa`)
221221+#
222222+# To exclude marking any of the range types, simply remove them from the list.
223223+chapter_ranges=openings:30abf964,endings:30abf964,ads:c54e4e80
224224+# Add alternative lua patterns to identify beginnings of simple chapter ranges (except for `ads`)
225225+# Syntax: `{type}:{pattern}[,{patternN}][;{type}:{pattern}[,{patternN}]]`
226226+chapter_range_patterns=openings:オープニング;endings:エンディング
227227+228228+# Localization language priority from highest to lowest.
229229+# Also controls what languages are fetched by `download-subtitles` menu.
230230+# Built in languages can be found in `uosc/intl`.
231231+# `slang` is a keyword to inherit values from `--slang` mpv config.
232232+# Supports paths to custom json files: `languages=~~/custom.json,slang,en`
233233+languages=slang,en
234234+235235+# A comma separated list of element IDs to disable. Available IDs:
236236+# window_border, top_bar, timeline, controls, volume,
237237+# idle_indicator, audio_indicator, buffering_indicator, pause_indicator
238238+disable_elements=
···11+local utils = require("mp.utils")
22+33+local function create_chapter()
44+ local time_pos = mp.get_property_number("time-pos")
55+ local time_pos_osd = mp.get_property_osd("time-pos/full")
66+ local curr_chapter = mp.get_property_number("chapter")
77+ local chapter_count = mp.get_property_number("chapter-list/count")
88+ local all_chapters = mp.get_property_native("chapter-list")
99+ mp.osd_message(time_pos_osd, 1)
1010+1111+ if chapter_count == 0 then
1212+ all_chapters[1] = {
1313+ title = "chapter_1",
1414+ time = time_pos
1515+ }
1616+ -- We just set it to zero here so when we add 1 later it ends up as 1
1717+ -- otherwise it's probably "nil"
1818+ curr_chapter = 0
1919+ -- note that mpv will treat the beginning of the file as all_chapters[0] when using pageup/pagedown
2020+ -- so we don't actually have to worry if the file doesn't start with a chapter
2121+ else
2222+ -- to insert a chapter we have to increase the index on all subsequent chapters
2323+ -- otherwise we'll end up with duplicate chapter IDs which will confuse mpv
2424+ -- +2 looks weird, but remember mpv indexes at 0 and lua indexes at 1
2525+ -- adding two will turn "current chapter" from mpv notation into "next chapter" from lua's notation
2626+ -- count down because these areas of memory overlap
2727+ for i = chapter_count, curr_chapter + 2, -1 do
2828+ all_chapters[i + 1] = all_chapters[i]
2929+ end
3030+ all_chapters[curr_chapter+2] = {
3131+ title = "chapter_"..curr_chapter,
3232+ time = time_pos
3333+ }
3434+ end
3535+ mp.set_property_native("chapter-list", all_chapters)
3636+ mp.set_property_number("chapter", curr_chapter+1)
3737+end
3838+3939+local function format_time(seconds)
4040+ local result = ""
4141+ if seconds <= 0 then
4242+ return "00:00:00.000";
4343+ else
4444+ hours = string.format("%02.f", math.floor(seconds/3600))
4545+ mins = string.format("%02.f", math.floor(seconds/60 - (hours*60)))
4646+ secs = string.format("%02.f", math.floor(seconds - hours*60*60 - mins*60))
4747+ msecs = string.format("%03.f", seconds*1000 - hours*60*60*1000 - mins*60*1000 - secs*1000)
4848+ result = hours..":"..mins..":"..secs.."."..msecs
4949+ end
5050+ return result
5151+end
5252+5353+local function write_chapter()
5454+ local euid = mp.get_property_number("estimated-frame-count")
5555+ local chapter_count = mp.get_property_number("chapter-list/count")
5656+ local all_chapters = mp.get_property_native("chapter-list")
5757+ local insert_chapters = ""
5858+ local curr = nil
5959+6060+ for i = 1, chapter_count, 1 do
6161+ curr = all_chapters[i]
6262+ local time_pos = format_time(curr.time)
6363+6464+ if i == 1 and curr.time ~= 0 then
6565+ local first_chapter=" <ChapterAtom>\n <ChapterUID>"..math.random(1000, 9000).."</ChapterUID>\n <ChapterFlagHidden>0</ChapterFlagHidden>\n <ChapterFlagEnabled>1</ChapterFlagEnabled>\n <ChapterDisplay>\n <ChapterString>Prologue</ChapterString>\n <ChapterLanguage>eng</ChapterLanguage>\n </ChapterDisplay>\n <ChapterTimeStart>00:00:00.000</ChapterTimeStart>\n </ChapterAtom>\n"
6666+ insert_chapters = insert_chapters..first_chapter
6767+ end
6868+6969+ local next_chapter=" <ChapterAtom>\n <ChapterDisplay>\n <ChapterString>"..curr.title.."</ChapterString>\n <ChapterLanguage>eng</ChapterLanguage>\n </ChapterDisplay>\n <ChapterUID>"..math.random(1000, 9000).."</ChapterUID>\n <ChapterTimeStart>"..time_pos.."</ChapterTimeStart>\n <ChapterFlagHidden>0</ChapterFlagHidden>\n <ChapterFlagEnabled>1</ChapterFlagEnabled>\n </ChapterAtom>\n"
7070+ insert_chapters = insert_chapters..next_chapter
7171+ end
7272+7373+ local chapters="<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<Chapters>\n <EditionEntry>\n <EditionFlagHidden>0</EditionFlagHidden>\n <EditionFlagDefault>0</EditionFlagDefault>\n <EditionUID>"..euid.."</EditionUID>\n"..insert_chapters.." </EditionEntry>\n</Chapters>"
7474+7575+ local path = mp.get_property("path")
7676+ dir, name_ext = utils.split_path(path)
7777+ local name = string.sub(name_ext, 1, (string.len(name_ext)-4))
7878+ local out_path = utils.join_path(dir, name.."_chapter.xml")
7979+ local file = io.open(out_path, "w")
8080+ if file == nil then
8181+ dir = utils.getcwd()
8282+ out_path = utils.join_path(dir, "create_chapter.xml")
8383+ file = io.open(out_path, "w")
8484+ end
8585+ if file == nil then
8686+ mp.error("Could not open chapter file for writing.")
8787+ return
8888+ end
8989+ file:write(chapters)
9090+ file:close()
9191+ mp.osd_message("Export file to: "..out_path, 3)
9292+end
9393+9494+mp.add_key_binding("C", "create_chapter", create_chapter, {repeatable=true})
9595+mp.add_key_binding("B", "write_chapter", write_chapter, {repeatable=false})
···5050# All voltage values are expressed in mV and *MUST* be negative (i.e. undervolt)!
5151[UNDERVOLT.BATTERY]
5252# CPU core voltage offset (mV)
5353-CORE: -100
5353+CORE: -125
5454# Integrated GPU voltage offset (mV)
5555GPU: 0
5656# CPU cache voltage offset (mV)
5757-CACHE: -100
5757+CACHE: -125
5858# System Agent voltage offset (mV)
5959UNCORE: 0
6060# Analog I/O voltage offset (mV)
···6363# All voltage values are expressed in mV and *MUST* be negative (i.e. undervolt)!
6464[UNDERVOLT.AC]
6565# CPU core voltage offset (mV)
6666-CORE: -100
6666+CORE: -125
6767# Integrated GPU voltage offset (mV)
6868-GPU: 0
6868+GPU: -10
6969# CPU cache voltage offset (mV)
7070-CACHE: -100
7070+CACHE: -125
7171# System Agent voltage offset (mV)
7272-UNCORE: 0
7272+UNCORE: -10
7373# Analog I/O voltage offset (mV)
7474ANALOGIO: 0
7575
+162
tmux/.config/tmux/tmux.conf
···11+# change the default shell to be non-login
22+# set -g default-command "${SHELL}"
33+# set -g default-command "fish"
44+55+# color support
66+set -g default-terminal 'tmux-256color'
77+# additionally hold shift to disable mouse mode and allow clicking on hyperlinks
88+set -ga terminal-features ",*:RGB,*:usstyle,*:hyperlinks"
99+# set -ga terminal-overrides ',alacritty:RGB,xterm-256color:RGB'
1010+# set -ga terminal-overrides ',alacritty:Tc,xterm-256color:Tc'
1111+1212+# get rid of esc delay
1313+set -s escape-time 0
1414+1515+# start window index at 1
1616+set -g base-index 1
1717+1818+# teehee
1919+set -g mouse on
2020+bind-key -n MouseDrag1Status swap-window -d -t=
2121+2222+# show tmux messages for 3 seconds
2323+set -g display-time 3000
2424+2525+# place status bar at the top
2626+set -g status-position top
2727+2828+# increase scrollback buffer size
2929+set -g history-limit 20000
3030+3131+# change terminal title
3232+set -g set-titles on
3333+3434+# forward focus events from terminal to applications
3535+set -g focus-events on
3636+3737+# automatically renumber windows on close
3838+set -g renumber-windows on
3939+4040+# use emacs keybinds in command prompt
4141+set -g status-keys emacs
4242+4343+# allow programs to always bypass tmux using escape sequence
4444+set -g allow-passthrough all
4545+4646+# allow programs to set clipboard through OSC 52
4747+set -g set-clipboard on
4848+4949+# enable CSI u extended keys (kitty keyboard protocol support when)
5050+set -g extended-keys off # breaks bracketed paste in 3.5a, turn back on after next update
5151+5252+# navigation
5353+bind C-n next-window
5454+bind C-p previous-window
5555+5656+# use vim keybinds in copy mode
5757+setw -g mode-keys vi
5858+5959+# below is handled by tmux-yank
6060+# bind -T copy-mode-vi v send-keys -X begin-selection
6161+# bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
6262+# bind -T copy-mode-vi y send-keys -X copy-pipe "wl-copy"
6363+# bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X other-end \; send-keys -X copy-pipe "wl-copy"
6464+# # bind -T copy-mode-vi MouseDown1Pane send -X copy-mode
6565+# bind -T copy-mode-vi i send-keys -X cancel
6666+# bind -T copy-mode-vi Escape send-keys -X cancel
6767+6868+set -g @yank_selection_mouse 'clipboard'
6969+set -g @yank_action 'copy-pipe'
7070+7171+# fix tmux within upterm session
7272+set -ga update-environment "UPTERM_ADMIN_SOCKET"
7373+7474+# toggle synchronize-panes
7575+bind C-x setw synchronize-panes
7676+7777+# additional zoom keybind
7878+bind -n M-z resize-pane -Z
7979+8080+# open new panes in the same directory as the current pane
8181+# (braces to appease the tmux tree-sitter parser)
8282+bind % { split-window -h -c "#{pane_current_path}" }
8383+bind '"' { split-window -v -c "#{pane_current_path}" }
8484+bind v { new-window -c "#{pane_current_path}" }
8585+8686+# I have tmux-matryoshka for nested sessions, but usually I only have one nesting
8787+# level, so it's nice to have a simple shortcut to toggle it
8888+bind -n M-q {
8989+ # set environment "NESTED_LAYER" 1
9090+ set prefix None
9191+ set key-table off
9292+ set status-style fg=colour245,bg=colour238
9393+ # send-keys S-F12
9494+}
9595+9696+bind -T off -n M-q {
9797+ set -u prefix
9898+ set -u key-table
9999+ set -u status-style
100100+ # send-keys S-F11
101101+}
102102+103103+# disable nord status bar
104104+set -g @nord_tmux_show_status_content '0'
105105+106106+set -g @tmux-nvim-navigation true
107107+set -g @tmux-nvim-navigation-cycle true
108108+set -g @tmux-nvim-navigation-keybinding-left 'M-h'
109109+set -g @tmux-nvim-navigation-keybinding-down 'M-j'
110110+set -g @tmux-nvim-navigation-keybinding-up 'M-k'
111111+set -g @tmux-nvim-navigation-keybinding-right 'M-l'
112112+113113+set -g @tmux-nvim-resize true
114114+set -g @tmux-nvim-resize-step-x 5
115115+set -g @tmux-nvim-resize-step-y 5
116116+set -g @tmux-nvim-resize-keybinding-left 'M-H'
117117+set -g @tmux-nvim-resize-keybinding-down 'M-J'
118118+set -g @tmux-nvim-resize-keybinding-up 'M-K'
119119+set -g @tmux-nvim-resize-keybinding-right 'M-L'
120120+121121+set -g @resurrect-capture-pane-contents 'on'
122122+set -g @resurrect-processes '
123123+ "ssh"
124124+'
125125+ # ":->fish -c \"printf \e\[7A \"""DC"
126126+ # "~fish->printf \e\[DC6A"
127127+128128+set -g @resurrect-hook-pre-restore-all '/usr/bin/fish -c "set -U did_tmux_restore true && echo pre: (date +%s%3N) $did_tmux_restore | systemd-cat"'
129129+set -g @resurrect-hook-post-restore-all 'fish -c "set -e did_tmux_restore && echo post: (date +%s%3N) $did_tmux_restore | systemd-cat"'
130130+131131+# keybind to disable outer-most active tmux
132132+set -g @matryoshka_down_keybind 'S-F12'
133133+# keybind to enable inner-most inactive tmux
134134+set -g @matryoshka_up_keybind 'S-F11'
135135+# keybind to recursively enable all tmux instances
136136+set -g @matryoshka_up_recursive_keybind 'S-F10'
137137+138138+set -g @plugin 'nordtheme/tmux'
139139+set -g @plugin 'aserowy/tmux.nvim'
140140+set -g @plugin 'b0o/tmux-autoreload'
141141+set -g @plugin 'tmux-plugins/tmux-resurrect'
142142+set -g @plugin 'tmux-plugins/tmux-sessionist'
143143+set -g @plugin 'tmux-plugins/tmux-logging'
144144+set -g @plugin 'wfxr/tmux-fzf-url'
145145+# set -g @plugin 'niqodea/tmux-matryoshka'
146146+# set -g @plugin 'IdoKendo/tmux-lazy'
147147+set -g @plugin 'alexwforsythe/tmux-which-key'
148148+set -g @plugin 'tmux-plugins/tmux-cowboy'
149149+set -g @plugin 'tmux-plugins/tmux-yank'
150150+# set -g @plugin 'tmux-plugins/tpm'
151151+set -g @plugin 'RyanMacG/tpm-redux'
152152+153153+if "test ! -d ~/.config/tmux/plugins/tpm-redux" {
154154+ set-hook -g session-created {
155155+ set-hook -gu session-created
156156+ run 'git clone https://github.com/RyanMacG/tpm-redux ~/.config/tmux/plugins/tpm-redux'
157157+ display-popup -E -w 80% -h 75% "~/.config/tmux/plugins/tpm-redux/bindings/install_plugins"
158158+ run "~/.config/tmux/plugins/tpm-redux/tpm"
159159+ }
160160+}
161161+162162+run "~/.config/tmux/plugins/tpm-redux/tpm"
-87
tmux/.tmux.conf
···11-# change the default shell to be non-login
22-set -g default-command "${SHELL}"
33-44-# color support
55-set -g default-terminal 'tmux-256color'
66-set -ga terminal-overrides ',xterm-256color:RGB'
77-set -ga terminal-overrides ',xterm-256color:Tc'
88-99-# get rid of esc delay
1010-set -s escape-time 0
1111-1212-# start window index at 1
1313-set -g base-index 1
1414-1515-# quicker navigation
1616-bind C-n next-window
1717-bind C-p previous-window
1818-1919-# sorry
2020-set -g mouse on
2121-2222-# show tmux messages for 3 seconds
2323-set -g display-time 3000
2424-2525-# self-explanatory
2626-set -g status-position top
2727-set -g history-limit 10000
2828-2929-# change terminal title
3030-set -g set-titles on
3131-3232-# forward focus events from terminal to applications
3333-set -g focus-events on
3434-3535-# use vim keybinds in copy mode
3636-setw -g mode-keys vi
3737-bind -T copy-mode-vi v send-keys -X begin-selection
3838-bind -T copy-mode-vi C-v send-keys -X rectangle-toggle
3939-bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "wl-copy"
4040-bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "wl-copy"
4141-bind -T copy-mode-vi i send-keys -X cancel
4242-bind -T copy-mode-vi Escape send-keys -X cancel
4343-4444-# toggle synchronize-panes
4545-bind C-x setw synchronize-panes
4646-4747-# open new panes in the same directory as the current pane
4848-# (braces to appease the tmux tree-sitter parser)
4949-bind % { split-window -h -c "#{pane_current_path}" }
5050-bind '"' { split-window -v -c "#{pane_current_path}" }
5151-# bind c { new-window -c "#{pane_current_path}" }
5252-5353-# plugins
5454-5555-set -g @plugin 'tmux-plugins/tpm'
5656-5757-set -g @plugin 'nordtheme/tmux'
5858-set -g @nord_tmux_show_status_content '0'
5959-6060-set -g @plugin 'aserowy/tmux.nvim'
6161-# navigation
6262-set -g @tmux-nvim-navigation true
6363-set -g @tmux-nvim-navigation-cycle true
6464-set -g @tmux-nvim-navigation-keybinding-left 'M-h'
6565-set -g @tmux-nvim-navigation-keybinding-down 'M-j'
6666-set -g @tmux-nvim-navigation-keybinding-up 'M-k'
6767-set -g @tmux-nvim-navigation-keybinding-right 'M-l'
6868-# resize
6969-set -g @tmux-nvim-resize true
7070-set -g @tmux-nvim-resize-step-x 5
7171-set -g @tmux-nvim-resize-step-y 5
7272-set -g @tmux-nvim-resize-keybinding-left 'M-H'
7373-set -g @tmux-nvim-resize-keybinding-down 'M-J'
7474-set -g @tmux-nvim-resize-keybinding-up 'M-K'
7575-set -g @tmux-nvim-resize-keybinding-right 'M-L'
7676-7777-set -g @plugin 'b0o/tmux-autoreload'
7878-7979-set -g @plugin 'tmux-plugins/tmux-resurrect'
8080-set -g @resurrect-capture-pane-contents 'on'
8181-set -g @resurrect-processes 'ssh'
8282-8383-set -g @plugin 'wfxr/tmux-fzf-url'
8484-8585-if "test ! -d ~/.tmux/plugins/tpm" \
8686- "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
8787-run "~/.tmux/plugins/tpm/tpm"