Compare commits

..

3 Commits

7 changed files with 62 additions and 26 deletions

View File

@ -26,7 +26,7 @@ function fixPulse() {
function launchi3() {
if [ -z "$skipi3" ]; then
echo Opening i3wm sound workspaces
sleep .1 && i3-msg 'workspace 5; exec firefox'
sleep .1 && i3-msg 'workspace 5; exec librewolf'
sleep 5.1 && python ~/bin/start-firefox.py
fi
}

View File

@ -26,5 +26,5 @@ def closed():
return False
if (openToday() and not closed()):
print("Open")
os.system("i3-msg 'workspace 10; exec firefox --new-window robinhood.com \
os.system("i3-msg 'workspace 10; exec librewolf --new-window robinhood.com \
&& sleep 1 && firefox -new-tab app.webull.com/watch'")

View File

@ -54,32 +54,32 @@ def isProgramRunning(name, windows, workspace):
return False
def isPagesLoaded(firefoxWindows):
for w in firefoxWindows:
def isPagesLoaded(windows):
for w in windows:
if 'http' not in w.name:
return True
return True
i3 = Connection()
firefoxWindows = filterWindowsByClass('firefox', getWindows(i3))
windows = filterWindowsByClass('librewolf-default', getWindows(i3))
while(not isPagesLoaded(firefoxWindows)):
while(not isPagesLoaded(windows)):
time.sleep(0.1)
switchWorkspace('10')
switchWorkspace('1')
# Music
if not isProgramRunning(['music.youtube.com'], firefoxWindows, '10'):
launchProgram('firefox --new-window music.youtube.com', '10')
if not isProgramRunning(['music.youtube.com'], windows, '10'):
launchProgram('librewolf --new-window music.youtube.com', '10')
# Stocks
if not isProgramRunning(['Robinhood', 'Webull'], firefoxWindows, '10'):
if not isProgramRunning(['Robinhood', 'Webull'], windows, '10'):
os.system('python ~/bin/launch-stocks-tracker.py')
# Videos
if not isProgramRunning(['odysee.com', 'lbry.tv', 'www.youtube.com',
' - YouTube', 'hulu.com', 'netflix.com',
'disneyplus.com', 'tv.youtube.com'],
firefoxWindows, '10'):
launchProgram('firefox --new-window youtube.com/feed/subscriptions', '10')
launchProgram('sleep 1 && firefox -new-tab odysee.com/$/following', '10')
windows, '10'):
launchProgram('librewolf --new-window youtube.com/feed/subscriptions', '10')
launchProgram('sleep 1 && librewolf -new-tab odysee.com/$/following', '10')

View File

@ -1 +0,0 @@
load_script("/home/aqua/.config/wireplumber/scripts/auto-connect-ports.lua")

View File

@ -32,6 +32,41 @@ function link_port(output_port, input_port)
return true
end
function delete_link(link_om, output_port, input_port)
print("Trying to delete")
if not input_port or not output_port then
print("No ports")
return false
end
local link = link_om:lookup {
Constraint {
"link.input.node", "equals", input_port.properties["node.id"]
},
Constraint {
"link.input.port", "equals", input_port.properties["object.id"],
},
Constraint {
"link.output.node", "equals", output_port.properties["node.id"],
},
Constraint {
"link.output.port", "equals", output_port.properties["object.id"],
}
}
if not link then
print("No link!")
return
end
print("Deleting link!")
link:request_destroy()
end
-- Automatically link ports together by their specific audio channels.
--
-- ┌──────────────────┐ ┌───────────────────┐
@ -131,9 +166,6 @@ function auto_connect_ports(args)
end
end
-- pw-cli list-objects | grep object.path
-- Connect to speakers
auto_connect_ports {
output = Constraint { "object.path", "matches", "speakers:*" },
@ -144,12 +176,3 @@ auto_connect_ports {
}
}
-- Connect to mic
auto_connect_ports {
output = Constraint { "object.path", "matches", "alsa:pcm:2:hw:2,0:capture:*" },
input = Constraint { "object.path", "matches", "sm7b-processed:" },
connect = {
["AUX0"] = "FL",
["AUX1"] = "FR"
}
}

View File

@ -0,0 +1,14 @@
wireplumber.components = [
{
name = /home/aqua/.config/wireplumber/scripts/auto-connect-ports.lua,
type = script/lua
provides = custom.my-script
}
]
wireplumber.profiles = {
main = {
custom.my-script = required
}
}

View File

@ -41,5 +41,5 @@ export TERM=xterm
export EDITOR=emacs
# Daisy build toolkit
GCC_PATH=~/dev/gcc-arm-none-eabi-9-2020-q2-update/bin
GCC_PATH=~/dev/gcc-arm-none-eabi-10-2020-q4-major/bin
export PATH=$GCC_PATH:$PATH