Compare commits
8 commits
b90b1a6ae8
...
a78fe950fb
Author | SHA1 | Date | |
---|---|---|---|
a78fe950fb | |||
371accb990 | |||
e0d80d2b17 | |||
beec48d77d | |||
96cfebc562 | |||
03217c7ad8 | |||
c3f05990fc | |||
fef494091d |
20 changed files with 293 additions and 362 deletions
5
.config/bluetuith/bluetuith.conf
Normal file
5
.config/bluetuith/bluetuith.conf
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
keybindings: {
|
||||
Quit: q
|
||||
}
|
||||
}
|
3
.config/bottom/bottom.toml
Normal file
3
.config/bottom/bottom.toml
Normal file
|
@ -0,0 +1,3 @@
|
|||
[flags]
|
||||
left_legend = true
|
||||
hide_time = true
|
|
@ -2,6 +2,7 @@ term=xterm-256color
|
|||
initial-window-size-chars=80x24
|
||||
pad=2x2
|
||||
selection-target=clipboard
|
||||
font=monospace:size=10
|
||||
|
||||
[url]
|
||||
launch=linkhandler ${url}
|
||||
|
|
|
@ -3,7 +3,11 @@ audio-file-auto=all
|
|||
hwdec=auto
|
||||
slang=eng
|
||||
sub-ass-override=no
|
||||
sub-auto=all
|
||||
sub-font-size=40
|
||||
sub-border-size=2.4
|
||||
sub-border-color="#FF000000"
|
||||
sub-shadow-color="#A0000000"
|
||||
sub-shadow-offset=0.75
|
||||
vo=gpu
|
||||
ytdl-format="bestvideo[height<=?720]+bestaudio/best"
|
||||
gpu-context=wayland
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
account dmitz@disroot.org
|
||||
host disroot.org
|
||||
port 465
|
||||
from dmitz@disroot.org
|
||||
user dmitz@disroot.org
|
||||
passwordeval "pass mail/disroot.org"
|
||||
auth on
|
||||
tls on
|
||||
tls_trust_file /etc/ssl/certs/ca-certificates.crt
|
||||
logfile /home/dmitz/.config/msmtp/msmtp.log
|
||||
tls_starttls off
|
|
@ -50,6 +50,11 @@ color listnormal_unread blue default
|
|||
color listfocus yellow default
|
||||
color listfocus_unread yellow default
|
||||
|
||||
ignore-mode display
|
||||
ignore-article "https://youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg" "title =~ \"(NAS|Server)\""
|
||||
ignore-article "https://youtube.com/feeds/videos.xml?channel_id=UCIvkS0o7Csl6EuA7gCmdgqg" "title =~ \"Мемэльный\""
|
||||
ignore-article "https://youtube.com/feeds/videos.xml?channel_id=UC-b89a0Fw6pNoP-g-_qLeiw" "title !~ \"Попкульт\""
|
||||
|
||||
highlight all "---.*---" yellow
|
||||
highlight feedlist ".*(0/0))" black
|
||||
highlight article "(^Feed:*)" cyan default
|
||||
|
|
|
@ -2,27 +2,31 @@
|
|||
https://www.phoronix.com/rss.php "(www)"
|
||||
https://linuxgamingcentral.com/posts/index.xml "(www)" "~Linux Gaming Central"
|
||||
https://go.dev/blog/feed.atom "(www)"
|
||||
https://hnrss.org/best "(www)" "~Hacker News"
|
||||
https://lobste.rs/top/rss "(www)" "~Lobsters"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCKTehwyGCKF-b2wo0RKwrcg "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCl2mFZoRqjw_ELax4Yisf6w "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC3kAbMcYr-JEMSb2xX4OdpA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCJetJ7nDNLlEzDLXv7KIo0w "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC1s1OsWNYDFgbROPV-q5arg "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCsnGwSIHyoYN0kiINAGUKxg "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC9-y-6csu5WGm29I7JiwpnA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCkf4VIqu3Acnfzuk3kRIFwA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCgXdyySqz7qH-lDiVG-7KwA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCW-HBBzxn7URXPHzWiZTq_A "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCFzGyNKXPAglNq28qWYTDFA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCdGUr1XKTND-CcGhq_b4eKw "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCjFaPUcJU1vwk193mnW_w1w "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCLx053rWZxCiYWsBETgdKrQ "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCIvkS0o7Csl6EuA7gCmdgqg "(ytb"
|
||||
|
||||
"HL" "(---)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCJ10M7ftQN7ylM6NaPiEB6w "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCpi0JLkVK0RrAHkfpB3B2Aw "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC2WNW0NZVyMeEPvtLmScgvQ "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCiUkcNS6W0n8QdosuZASduQ "(ytb)"
|
||||
|
||||
"DIY" "(---)"
|
||||
https://www.youtube.com/feeds/videos.xml?channel_id=UCQwRlx8hVI-CFv_E-v5s84Q "(ytb)"
|
||||
|
||||
"PPL" "(---)"
|
||||
https://lukesmith.xyz/rss.xml "(www)" "~Luke's Webpage"
|
||||
https://notrelated.xyz/rss "(www)" "~Not Related"
|
||||
|
@ -42,7 +46,10 @@ https://youtube.com/feeds/videos.xml?channel_id=UC4YM-PGOKORUeSCbOjBjR3w "(ytb)"
|
|||
https://youtube.com/feeds/videos.xml?channel_id=UCIwBjM0QCMHIQIAc53eOXZg "(ytb)"
|
||||
|
||||
"SOC" "(---)"
|
||||
https://kamilkazani.substack.com/feed "(www)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCO39Y30rZQC1CiEYeOwlx4g "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCSHZKyawb77ixDdsGog4iWA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCLgKHF1BcJyzIr2zr6fwGGg "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCb4pvsyqNrmBIGJFQxEukUA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCf_kbk7T6-3Cw1o3KA4hxCg "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC-b89a0Fw6pNoP-g-_qLeiw "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC9RM-iSvTu1uPJb8X5yp3EQ "(ytb)"
|
||||
|
@ -61,7 +68,6 @@ https://youtube.com/feeds/videos.xml?channel_id=UCbaKd4mhqd1QvfDp5EaUlHw "(ytb)"
|
|||
https://youtube.com/feeds/videos.xml?channel_id=UCOaqC7XshSJO7PWwvjDJ1nQ "(ytb)"
|
||||
|
||||
"HIS" "(---)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCHUaKsX4N31qhxaboKS3PnA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC5Dw9TFdbPJoTDMSiJdIQTA "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCOuWeOkMrq84u5LY6apWQ8Q "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UC2CmP3hssH0MAqV18UZs0Xw "(ytb)"
|
||||
|
@ -73,7 +79,6 @@ https://youtube.com/feeds/videos.xml?channel_id=UCprXm6I8qIRkllnCX_MnDyQ "(ytb)"
|
|||
https://youtube.com/feeds/videos.xml?channel_id=UC0I4VnqZNLttX3BC0P7c1wQ "(ytb)"
|
||||
|
||||
"LANG" "(---)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCJSqXOkySQgm0dYjccicA1Q "(ytb)"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCKMGLK-Inu1lReNdbeYBgOA "(ytb)" "~Virginia Bēowulf"
|
||||
https://youtube.com/feeds/videos.xml?channel_id=UCMk_WSPy3EE16aK5HLzCJzw "(ytb)"
|
||||
|
||||
|
@ -84,8 +89,8 @@ https://rss.nixnet.services/?action=display&bridge=Bandcamp&context=By+band&band
|
|||
|
||||
"DEV" "(---)"
|
||||
https://repology.org/maintainer/dmitz%40disroot.org/feed-for-repo/alpine_edge/atom "(www)"
|
||||
https://floss.social/@chimera_linux.rss "(mst)"
|
||||
https://github.com/kolunmi/sandbar/commits/main.atom "(ghb)"
|
||||
https://github.com/djpohly/dwl/commits/main.atom "(ghb)"
|
||||
https://github.com/riverwm/river/commits/master.atom "(ghb)"
|
||||
https://github.com/qutebrowser/qutebrowser/releases.atom "(ghb)"
|
||||
https://github.com/newsboat/newsboat/releases.atom "(ghb)"
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
[database]
|
||||
path=/home/dmitz/.local/share/mail
|
||||
[user]
|
||||
name=dmitz
|
||||
primary_email=dmitz@disroot.org
|
||||
[new]
|
||||
tags=unread;inbox;
|
||||
ignore=.mbsyncstate;.uidvalidity
|
||||
[search]
|
||||
exclude_tags=deleted;spam;
|
||||
[maildir]
|
||||
synchronize_flags=true
|
||||
[crypto]
|
||||
gpg_path=gpg
|
|
@ -4,8 +4,8 @@ require('telescope').setup {
|
|||
defaults = {
|
||||
mappings = {
|
||||
n = {
|
||||
["Z"] = actions.select_vertical,
|
||||
["X"] = actions.select_horizontal,
|
||||
["Z"] = actions.select_horizontal,
|
||||
["X"] = actions.select_vertical,
|
||||
["C"] = actions.select_tab
|
||||
},
|
||||
},
|
||||
|
|
247
.config/pipewire/pipewire.conf
Normal file
247
.config/pipewire/pipewire.conf
Normal file
|
@ -0,0 +1,247 @@
|
|||
# Daemon config file for PipeWire version "0.3.40" #
|
||||
#
|
||||
# Copy and edit this file in /etc/pipewire for system-wide changes
|
||||
# or in ~/.config/pipewire for local changes.
|
||||
|
||||
context.properties = {
|
||||
## Configure properties in the system.
|
||||
#library.name.system = support/libspa-support
|
||||
#context.data-loop.library.name.system = support/libspa-support
|
||||
#support.dbus = true
|
||||
#link.max-buffers = 64
|
||||
link.max-buffers = 16 # version < 3 clients can't handle more
|
||||
#mem.warn-mlock = false
|
||||
#mem.allow-mlock = true
|
||||
#mem.mlock-all = false
|
||||
#clock.power-of-two-quantum = true
|
||||
#log.level = 2
|
||||
#cpu.zero.denormals = true
|
||||
|
||||
core.daemon = true # listening for socket connections
|
||||
core.name = pipewire-0 # core name and socket name
|
||||
|
||||
## Properties for the DSP configuration.
|
||||
#default.clock.rate = 48000
|
||||
#default.clock.allowed-rates = [ 48000 ]
|
||||
#default.clock.quantum = 1024
|
||||
#default.clock.min-quantum = 32
|
||||
#default.clock.max-quantum = 8192
|
||||
#default.video.width = 640
|
||||
#default.video.height = 480
|
||||
#default.video.rate.num = 25
|
||||
#default.video.rate.denom = 1
|
||||
#
|
||||
# These overrides are only applied when running in a vm.
|
||||
vm.overrides = {
|
||||
default.clock.min-quantum = 1024
|
||||
}
|
||||
}
|
||||
|
||||
context.spa-libs = {
|
||||
#<factory-name regex> = <library-name>
|
||||
#
|
||||
# Used to find spa factory names. It maps an spa factory name
|
||||
# regular expression to a library name that should contain
|
||||
# that factory.
|
||||
#
|
||||
audio.convert.* = audioconvert/libspa-audioconvert
|
||||
api.alsa.* = alsa/libspa-alsa
|
||||
api.v4l2.* = v4l2/libspa-v4l2
|
||||
api.libcamera.* = libcamera/libspa-libcamera
|
||||
api.bluez5.* = bluez5/libspa-bluez5
|
||||
api.vulkan.* = vulkan/libspa-vulkan
|
||||
api.jack.* = jack/libspa-jack
|
||||
support.* = support/libspa-support
|
||||
#videotestsrc = videotestsrc/libspa-videotestsrc
|
||||
#audiotestsrc = audiotestsrc/libspa-audiotestsrc
|
||||
}
|
||||
|
||||
context.modules = [
|
||||
#{ name = <module-name>
|
||||
# [ args = { <key> = <value> ... } ]
|
||||
# [ flags = [ [ ifexists ] [ nofail ] ]
|
||||
#}
|
||||
#
|
||||
# Loads a module with the given parameters.
|
||||
# If ifexists is given, the module is ignored when it is not found.
|
||||
# If nofail is given, module initialization failures are ignored.
|
||||
#
|
||||
|
||||
# Uses RTKit to boost the data thread priority.
|
||||
{ name = libpipewire-module-rtkit
|
||||
args = {
|
||||
#nice.level = -11
|
||||
#rt.prio = 88
|
||||
#rt.time.soft = 2000000
|
||||
#rt.time.hard = 2000000
|
||||
}
|
||||
flags = [ ifexists nofail ]
|
||||
}
|
||||
|
||||
# Set thread priorities without using RTKit.
|
||||
#{ name = libpipewire-module-rt
|
||||
# args = {
|
||||
# nice.level = -11
|
||||
# rt.prio = 88
|
||||
# rt.time.soft = 2000000
|
||||
# rt.time.hard = 2000000
|
||||
# }
|
||||
# flags = [ ifexists nofail ]
|
||||
#}
|
||||
|
||||
# The native communication protocol.
|
||||
{ name = libpipewire-module-protocol-native }
|
||||
|
||||
# The profile module. Allows application to access profiler
|
||||
# and performance data. It provides an interface that is used
|
||||
# by pw-top and pw-profiler.
|
||||
{ name = libpipewire-module-profiler }
|
||||
|
||||
# Allows applications to create metadata objects. It creates
|
||||
# a factory for Metadata objects.
|
||||
{ name = libpipewire-module-metadata }
|
||||
|
||||
# Creates a factory for making devices that run in the
|
||||
# context of the PipeWire server.
|
||||
{ name = libpipewire-module-spa-device-factory }
|
||||
|
||||
# Creates a factory for making nodes that run in the
|
||||
# context of the PipeWire server.
|
||||
{ name = libpipewire-module-spa-node-factory }
|
||||
|
||||
# Allows creating nodes that run in the context of the
|
||||
# client. Is used by all clients that want to provide
|
||||
# data to PipeWire.
|
||||
{ name = libpipewire-module-client-node }
|
||||
|
||||
# Allows creating devices that run in the context of the
|
||||
# client. Is used by the session manager.
|
||||
{ name = libpipewire-module-client-device }
|
||||
|
||||
# The portal module monitors the PID of the portal process
|
||||
# and tags connections with the same PID as portal
|
||||
# connections.
|
||||
{ name = libpipewire-module-portal
|
||||
flags = [ ifexists nofail ]
|
||||
}
|
||||
|
||||
# The access module can perform access checks and block
|
||||
# new clients.
|
||||
{ name = libpipewire-module-access
|
||||
args = {
|
||||
# access.allowed to list an array of paths of allowed
|
||||
# apps.
|
||||
#access.allowed = [
|
||||
# /usr/bin/pipewire-media-session
|
||||
#]
|
||||
|
||||
# An array of rejected paths.
|
||||
#access.rejected = [ ]
|
||||
|
||||
# An array of paths with restricted access.
|
||||
#access.restricted = [ ]
|
||||
|
||||
# Anything not in the above lists gets assigned the
|
||||
# access.force permission.
|
||||
#access.force = flatpak
|
||||
}
|
||||
}
|
||||
|
||||
# Makes a factory for wrapping nodes in an adapter with a
|
||||
# converter and resampler.
|
||||
{ name = libpipewire-module-adapter }
|
||||
|
||||
# Makes a factory for creating links between ports.
|
||||
{ name = libpipewire-module-link-factory }
|
||||
|
||||
# Provides factories to make session manager objects.
|
||||
{ name = libpipewire-module-session-manager }
|
||||
]
|
||||
|
||||
context.objects = [
|
||||
#{ factory = <factory-name>
|
||||
# [ args = { <key> = <value> ... } ]
|
||||
# [ flags = [ [ nofail ] ]
|
||||
#}
|
||||
#
|
||||
# Creates an object from a PipeWire factory with the given parameters.
|
||||
# If nofail is given, errors are ignored (and no object is created).
|
||||
#
|
||||
#{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc Spa:Pod:Object:Param:Props:patternType = 1 } }
|
||||
#{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
|
||||
#{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
|
||||
#{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
|
||||
#{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test } }
|
||||
#{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
|
||||
|
||||
# A default dummy driver. This handles nodes marked with the "node.always-driver"
|
||||
# property when no other driver is currently active. JACK clients need this.
|
||||
{ factory = spa-node-factory
|
||||
args = {
|
||||
factory.name = support.node.driver
|
||||
node.name = Dummy-Driver
|
||||
node.group = pipewire.dummy
|
||||
priority.driver = 20000
|
||||
}
|
||||
}
|
||||
{ factory = spa-node-factory
|
||||
args = {
|
||||
factory.name = support.node.driver
|
||||
node.name = Freewheel-Driver
|
||||
priority.driver = 19000
|
||||
node.group = pipewire.freewheel
|
||||
node.freewheel = true
|
||||
}
|
||||
}
|
||||
# This creates a new Source node. It will have input ports
|
||||
# that you can link, to provide audio for this source.
|
||||
#{ factory = adapter
|
||||
# args = {
|
||||
# factory.name = support.null-audio-sink
|
||||
# node.name = "my-mic"
|
||||
# node.description = "Microphone"
|
||||
# media.class = "Audio/Source/Virtual"
|
||||
# audio.position = "FL,FR"
|
||||
# }
|
||||
#}
|
||||
|
||||
# This creates a single PCM source device for the given
|
||||
# alsa device path hw:0. You can change source to sink
|
||||
# to make a sink in the same way.
|
||||
#{ factory = adapter
|
||||
# args = {
|
||||
# factory.name = api.alsa.pcm.source
|
||||
# node.name = "alsa-source"
|
||||
# node.description = "PCM Source"
|
||||
# media.class = "Audio/Source"
|
||||
# api.alsa.path = "hw:0"
|
||||
# api.alsa.period-size = 1024
|
||||
# api.alsa.headroom = 0
|
||||
# api.alsa.disable-mmap = false
|
||||
# api.alsa.disable-batch = false
|
||||
# audio.format = "S16LE"
|
||||
# audio.rate = 48000
|
||||
# audio.channels = 2
|
||||
# audio.position = "FL,FR"
|
||||
# }
|
||||
#}
|
||||
]
|
||||
|
||||
context.exec = [
|
||||
#{ path = <program-name> [ args = "<arguments>" ] }
|
||||
#
|
||||
# Execute the given program with arguments.
|
||||
#
|
||||
# You can optionally start the session manager here,
|
||||
# but it is better to start it as a systemd service.
|
||||
# Run the session manager with -h for options.
|
||||
#
|
||||
{ path = "/usr/bin/wireplumber" args = "" }
|
||||
#
|
||||
# You can optionally start the pulseaudio-server here as well
|
||||
# but it is better to start it as a systemd service.
|
||||
# It can be interesting to start another daemon here that listens
|
||||
# on another address with the -a option (eg. -a tcp:4713).
|
||||
#
|
||||
{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }
|
||||
]
|
|
@ -1,5 +1,5 @@
|
|||
c.url.searchengines = {'DEFAULT': 'https://search.zeroish.xyz/search.php?q={}',
|
||||
'y': 'https://invidious.lunar.icu/search?q={}',
|
||||
c.url.searchengines = {'DEFAULT': 'https://duckduckgo.com/?t=h_&q={}',
|
||||
'y': 'https://iv.nboeck.de/search?q={}',
|
||||
'gh': 'https://github.com/search?q={}',
|
||||
'md': 'https://reelgood.com/search?q={}',
|
||||
'rep': 'https://repology.org/projects/?search={}',
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
c app.cinny.in
|
||||
t web.telegram.org
|
||||
s steamcommunity.com
|
||||
m miped.ru/f
|
||||
y invidious.lunar.icu
|
||||
y iv.nboeck.de
|
||||
gh github.com
|
||||
ap gitlab.alpinelinux.org/alpine/aports
|
||||
cs teachyourselfcs.com
|
||||
|
|
|
@ -19,7 +19,7 @@ riverctl map normal Super Q close
|
|||
riverctl map normal Super R spawn "foot vifm"
|
||||
riverctl map normal Super T spawn "torwrap open"
|
||||
riverctl map normal Super W spawn qutebrowser
|
||||
riverctl map normal Super+Shift B spawn bluetooth
|
||||
riverctl map normal Super+Shift B spawn "foot -T float bluetuith --no-warning"
|
||||
riverctl map normal Super+Shift BackSpace spawn "sysact reb"
|
||||
riverctl map normal Super+Shift D spawn tofi-drun
|
||||
riverctl map normal Super+Shift F toggle-float
|
||||
|
|
|
@ -3,8 +3,6 @@
|
|||
alias f="$FILE" \
|
||||
v="$EDITOR" \
|
||||
cp="cp -i" \
|
||||
mv="mv -i" \
|
||||
rm="rm -i" \
|
||||
yt="pipe-viewer" \
|
||||
mkd="mkdir -p" \
|
||||
trans="trans -j -v :en" \
|
||||
|
|
|
@ -53,4 +53,4 @@ fileviewer <image/*> sixel %c %pw %ph %pd %pc
|
|||
filetype *.torrent torwrap add %c
|
||||
fileviewer *.torrent transmission-show
|
||||
|
||||
set vifminfo=tui,registers
|
||||
set vifminfo=dhistory,chistory,tui,shistory,phistory,fhistory,dirstack,registers
|
||||
|
|
|
@ -1,299 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Constants
|
||||
goback="Back"
|
||||
|
||||
# Checks if bluetooth controller is powered on
|
||||
power_on() {
|
||||
if bluetoothctl show | grep -F -q "Powered: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles power state
|
||||
toggle_power() {
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -F -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
fi
|
||||
bluetoothctl power on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is scanning for new devices
|
||||
scan_on() {
|
||||
if bluetoothctl show | grep -F -q "Discovering: yes"; then
|
||||
echo "Scan: on"
|
||||
return 0
|
||||
else
|
||||
echo "Scan: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles scanning state
|
||||
toggle_scan() {
|
||||
if scan_on; then
|
||||
kill "$(pgrep -F -f "bluetoothctl scan on")"
|
||||
bluetoothctl scan off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
sleep 5
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is able to pair to devices
|
||||
pairable_on() {
|
||||
if bluetoothctl show | grep -F -q "Pairable: yes"; then
|
||||
echo "Pairable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Pairable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles pairable state
|
||||
toggle_pairable() {
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is discoverable by other devices
|
||||
discoverable_on() {
|
||||
if bluetoothctl show | grep -F -q "Discoverable: yes"; then
|
||||
echo "Discoverable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Discoverable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles discoverable state
|
||||
toggle_discoverable() {
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is connected
|
||||
device_connected() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -F -q "Connected: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_connection() {
|
||||
if device_connected "$1"; then
|
||||
bluetoothctl disconnect "$1"
|
||||
# device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect "$1"
|
||||
# device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is paired
|
||||
device_paired() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -F -q "Paired: yes"; then
|
||||
echo "Paired: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Paired: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device paired state
|
||||
toggle_paired() {
|
||||
if device_paired "$1"; then
|
||||
bluetoothctl remove "$1"
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl pair "$1"
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is trusted
|
||||
device_trusted() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -F -q "Trusted: yes"; then
|
||||
echo "Trusted: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Trusted: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_trust() {
|
||||
if device_trusted "$1"; then
|
||||
bluetoothctl untrust "$1"
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl trust "$1"
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints a short string with the current bluetooth status
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
printf ''
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl paired-devices | grep -F Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
for device in "${paired_devices[@]}"; do
|
||||
if device_connected "$device"; then
|
||||
device_alias="$(bluetoothctl info "$device" | grep -F "Alias" | cut -d ' ' -f 2-)"
|
||||
|
||||
if [ $counter -gt 0 ]; then
|
||||
printf ", %s" "$device_alias"
|
||||
else
|
||||
printf " %s" "$device_alias"
|
||||
fi
|
||||
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# A submenu for a specific device that allows connecting, pairing, and trusting
|
||||
device_menu() {
|
||||
device=$1
|
||||
|
||||
# Get device name and mac address
|
||||
device_name="$(echo "$device" | cut -d ' ' -f 3-)"
|
||||
mac="$(echo "$device" | cut -d ' ' -f 2)"
|
||||
|
||||
# Build options
|
||||
if device_connected "$mac"; then
|
||||
connected="Connected: yes"
|
||||
else
|
||||
connected="Connected: no"
|
||||
fi
|
||||
paired=$(device_paired "$mac")
|
||||
trusted=$(device_trusted "$mac")
|
||||
options="$connected\n$paired\n$trusted\n$goback\nExit"
|
||||
|
||||
# Open tofi, read chosen option
|
||||
chosen="$(echo -e "$options" | run_tofi "$device_name")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"")
|
||||
echo "No option chosen."
|
||||
;;
|
||||
"$connected")
|
||||
toggle_connection "$mac"
|
||||
;;
|
||||
"$paired")
|
||||
toggle_paired "$mac"
|
||||
;;
|
||||
"$trusted")
|
||||
toggle_trust "$mac"
|
||||
;;
|
||||
"$goback")
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Opens a tofi with current bluetooth status and options to connect
|
||||
show_menu() {
|
||||
# Get menu options
|
||||
if power_on; then
|
||||
power="Power: on"
|
||||
|
||||
# Human-readable names of devices, one per line
|
||||
# If scan is off, will only list paired devices
|
||||
devices=$(bluetoothctl devices | grep -F Device | cut -d ' ' -f 3-)
|
||||
|
||||
# Get controller flags
|
||||
scan=$(scan_on)
|
||||
pairable=$(pairable_on)
|
||||
discoverable=$(discoverable_on)
|
||||
|
||||
# Options passed to tofi
|
||||
options="$devices\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||
else
|
||||
power="Power: off"
|
||||
options="$power\nExit"
|
||||
fi
|
||||
|
||||
# Open tofi, read chosen option
|
||||
chosen="$(echo -e "$options" | run_tofi "Bluetooth")"
|
||||
|
||||
# Match chosen option to command
|
||||
case $chosen in
|
||||
"")
|
||||
echo "No option chosen."
|
||||
;;
|
||||
"$power")
|
||||
toggle_power
|
||||
;;
|
||||
"$scan")
|
||||
toggle_scan
|
||||
;;
|
||||
"$discoverable")
|
||||
toggle_discoverable
|
||||
;;
|
||||
"$pairable")
|
||||
toggle_pairable
|
||||
;;
|
||||
*)
|
||||
device=$(bluetoothctl devices | grep -F "$chosen")
|
||||
# Open a submenu if a device is selected
|
||||
if [[ $device ]]; then device_menu "$device"; fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
original_args=("$@")
|
||||
|
||||
# tofi command to pipe into. Extra arguments to tofi-bluetooth are passed through to tofi. This
|
||||
# allows the user to set fonts, sizes, colours, etc.
|
||||
run_tofi() {
|
||||
tofi "${original_args[@]}" --prompt-text "$1"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
--status)
|
||||
print_status
|
||||
;;
|
||||
*)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
|
@ -5,7 +5,7 @@ feed="${1:-$(printf "%s" | tofi --prompt-text 'Paste URL or file path')}"
|
|||
case "$feed" in
|
||||
*mkv|*webm|*mp4|*watch?v*|*youtu.be*|*music.youtube.com*|*invidious.lunar.icu*|*videos.lukesmith.xyz*|*spacepub.space*|*twitch.tv*)
|
||||
case "$(printf "yt-dlp\\nyt-dlp (audio)\\nyt-dlp (music)\\nmpv\\nmpv (audio)" | tofi --prompt-text "Handle media with?")" in
|
||||
"yt-dlp") qndl "$feed" >/dev/null 2>&1 ;;
|
||||
"yt-dlp") qndl -v "$feed" >/dev/null 2>&1 ;;
|
||||
"yt-dlp (audio)") qndl -a "$feed" >/dev/null 2>&1 ;;
|
||||
"yt-dlp (music)") qndl -m "$feed" >/dev/null 2>&1 ;;
|
||||
"mpv") setsid -f mpv --quiet "$feed" >/dev/null 2>&1 ;;
|
||||
|
|
|
@ -1,22 +1,22 @@
|
|||
#!/bin/sh
|
||||
|
||||
[ -z "$1" ] && exit
|
||||
[ -z "$2" ] && exit
|
||||
|
||||
cmd="yt-dlp"
|
||||
|
||||
while getopts 'am' OPTION; do
|
||||
while getopts 'amv' OPTION; do
|
||||
case "$OPTION" in
|
||||
a)
|
||||
cmd="yt-dlp -f bestaudio/best -x --audio-format mp3 --no-playlist -o $XDG_DOWNLOAD_DIR/pods/%(title)s.%(ext)s" ;;
|
||||
m)
|
||||
cmd="yt-dlp -f bestaudio/best -x --audio-format mp3 --no-playlist -o $XDG_MUSIC_DIR/%(title)s.%(ext)s"
|
||||
cmd="yt-dlp -f bestaudio/best -x --audio-format mp3 --no-playlist -o $XDG_MUSIC_DIR/%(title)s.%(ext)s" ;;
|
||||
v)
|
||||
cmd="yt-dlp"
|
||||
esac
|
||||
done
|
||||
|
||||
base="$(basename "$1")"
|
||||
base="$(basename "$2")"
|
||||
notify-send "Queuing $base..."
|
||||
|
||||
idnum="$(ts $cmd "$1")"
|
||||
idnum="$(ts $cmd "$2")"
|
||||
realname="$(echo "$base" | sed "s/?\(source\|dest\).*//;s/%20/ /g")"
|
||||
|
||||
ts -D "$idnum" mv "$base" "$realname"
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
wp="$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||
vol="$(echo $wp | awk '{print $2 * 100}')"
|
||||
ismuted="$(echo "$wp" | awk '{print $3}')"
|
||||
|
||||
[ -n "$ismuted" ] && echo muted && exit
|
||||
|
||||
printf "vol: %s%%" "$vol"
|
|
@ -1,8 +1,3 @@
|
|||
Include ~/.ssh/config.d/*
|
||||
|
||||
Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"
|
||||
|
||||
Host *
|
||||
User admin
|
||||
RequestTTY yes
|
||||
RemoteCommand screen -d -RR
|
||||
|
|
Loading…
Reference in a new issue