dkwpa
This commit is contained in:
parent
1f264b5207
commit
b4cb965ac9
6 changed files with 40 additions and 19 deletions
|
|
@ -28,6 +28,22 @@ function open_location
|
|||
end
|
||||
end
|
||||
|
||||
function open_course
|
||||
set options "Algorithmen und Datenstrukturen" "Modellbildung und Simulation" "Amateurfunkkurs" "Datenbanken"
|
||||
set input (menu $options)
|
||||
|
||||
switch $input
|
||||
case $options[1]
|
||||
xdg-open "https://wuecampus.uni-wuerzburg.de/moodle/course/view.php?id=75979"
|
||||
case $options[2]
|
||||
xdg-open "https://wuecampus.uni-wuerzburg.de/moodle/course/view.php?id=76309"
|
||||
case $options[3]
|
||||
xdg-open "https://wuecampus.uni-wuerzburg.de/moodle/course/view.php?id=76586"
|
||||
case $options[4]
|
||||
xdg-open "https://wuecampus.uni-wuerzburg.de/moodle/course/view.php?id=76199"
|
||||
end
|
||||
end
|
||||
|
||||
function audio_source
|
||||
set dump (string trim -c '"' (pw-dump | jq '.[] | select(.info.props."media.class" == "Audio/Source")' | jq '.id, .info.props."node.description"'))
|
||||
|
||||
|
|
@ -68,7 +84,6 @@ end
|
|||
|
||||
function network_connection
|
||||
set options (nmcli --terse --mode multiline connection show | grep "NAME:" | string replace "NAME:" "" | string split "\n")
|
||||
|
||||
set input (menu $options)
|
||||
|
||||
notify-send "Connect to network $input" (nmcli connection up $input)
|
||||
|
|
@ -93,7 +108,7 @@ function bluetooth_connection
|
|||
notify-send "Connect to bluetooth device $names[$input]" (bluetoothctl connect $ids[$input] | string collect)
|
||||
end
|
||||
|
||||
set options " Open Location" " Select Audio Source" " Select Audio Sink" " Select Bluetooth" " Select Network"
|
||||
set options " Open Location" " Open WueCampus Course" " Select Audio Source" " Select Audio Sink" " Select Bluetooth" " Select Network"
|
||||
set input (menu $options)
|
||||
|
||||
switch $input
|
||||
|
|
@ -101,14 +116,17 @@ switch $input
|
|||
open_location
|
||||
|
||||
case $options[2]
|
||||
audio_source
|
||||
open_course
|
||||
|
||||
case $options[3]
|
||||
audio_source
|
||||
|
||||
case $options[4]
|
||||
audio_sink
|
||||
|
||||
case $options[4]
|
||||
case $options[5]
|
||||
bluetooth_connection
|
||||
|
||||
case $options[5]
|
||||
case $options[6]
|
||||
network_connection
|
||||
end
|
||||
|
|
|
|||
14
.local/scripts/browserprompt.fish
Executable file
14
.local/scripts/browserprompt.fish
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env fish
|
||||
|
||||
set default "https://duckduckgo.com/?q="
|
||||
set wiki "https://en.wikipedia.org/?search="
|
||||
|
||||
set input (prompt)
|
||||
set split_input (string split -m 1 ":" $input)
|
||||
|
||||
switch $split_input[1]
|
||||
case "w"
|
||||
xdg-open "$wiki$split_input[2]"
|
||||
case "*"
|
||||
xdg-open "$default$input"
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue