diff --git a/config-root.toml b/config-root.toml index f41aa8c9..04a8fd24 100644 --- a/config-root.toml +++ b/config-root.toml @@ -1,6 +1,3 @@ -[actions] -mkinitcpio = "mkinitcpio -P" - [config] backup = true banner = true @@ -121,7 +118,6 @@ dst = "/.ignore" [dotfiles."f_mkinitcpio.conf"] src = "etc/mkinitcpio.conf" dst = "/etc/mkinitcpio.conf" -actions = ["mkinitcpio"] [dotfiles."f_vconsole.conf"] src = "etc/vconsole.conf" @@ -150,7 +146,6 @@ dst = "/etc/mkinitcpio.d/linux.preset" [dotfiles.f_cmdline] src = "etc/kernel/cmdline" dst = "/etc/kernel/cmdline" -actions = ["mkinitcpio"] [dotfiles."f_timesyncd.conf"] src = "etc/systemd/timesyncd.conf" @@ -206,23 +201,6 @@ dotfiles = [ ] include = ["Locale", "Pacman"] -[profiles.VentoyArch] -dotfiles = [ - "d_bin", - "f_cmdline", - "f_doas.conf", - "f_fonts.conf", - "f_freetype2.sh", - "f_ignore", - "f_logind.conf", - "f_mkinitcpio.conf", - "f_mkinitcpio_linux.preset", - "f_plymouthd.conf", - "f_system.conf", - "f_timesyncd.conf", -] -include = ["Locale", "Pacman"] - [profiles.Shire] dotfiles = [ "d_bin", @@ -244,7 +222,7 @@ dotfiles = [ "f_sshd_config", "f_system.conf", ] -include = ["Locale", "Pacman"] +include = ["Locale"] [profiles.Moria] include = ["Locale", "Pacman"] diff --git a/config.toml b/config.toml index 2972b4c6..00ecb92a 100644 --- a/config.toml +++ b/config.toml @@ -214,16 +214,6 @@ dotfiles = [ [profiles.Mirkwood.variables] wayland = true -[profiles.VentoyArch] -include = ["pacman", "terminal", "media", "gpg"] -dotfiles = [ - "f_dconf.ini", - "f_fonts.conf", -] - -[profiles.VentoyArch.variables] -wayland = true - [profiles.Shire] include = ["pacman", "terminal", "media", "gpg"] dotfiles = [ diff --git a/docker/authentik/docker-compose.yaml b/docker/authentik/docker-compose.yaml index a8831667..7b620946 100644 --- a/docker/authentik/docker-compose.yaml +++ b/docker/authentik/docker-compose.yaml @@ -66,6 +66,16 @@ services: environment: GEOIPUPDATE_EDITION_IDS: GeoLite2-City GEOIPUPDATE_FREQUENCY: '8' + whoami-test: + image: traefik/whoami + container_name: whoami-test + restart: unless-stopped + security_opt: + - no-new-privileges:true + networks: + - proxy + environment: + - TZ networks: authentik: external: true diff --git a/docker/caddy/Caddyfile b/docker/caddy/Caddyfile index b45a08ad..d94a84fa 100644 --- a/docker/caddy/Caddyfile +++ b/docker/caddy/Caddyfile @@ -1,67 +1,218 @@ { - auto_https off + order umami first } -http://index.korhonen.lan { - root * /var/www/index.korhonen.cc - file_server browse -} +(common_site_settings) { + encode zstd gzip -http://home.korhonen.lan { - reverse_proxy home-assistant:8123 -} - -http://sso.korhonen.lan, http://sso.korhonen.cc { - reverse_proxy authentik:9000 -} - -http://git.korhonen.lan { - rewrite /user/login /user/oauth2/authentik - reverse_proxy forgejo:3000 -} - -http://search.korhonen.lan { - reverse_proxy searx:8080 -} - -http://jellyfin.korhonen.lan { - reverse_proxy jellyfin:8096 -} - -http://cloud.korhonen.lan { - # Redirect login page to Authentik - redir /login /apps/sociallogin/custom_oidc/korhonen-sso 301 - - # .htaccess / data / config / ... shouldn't be accessible from outside - @forbidden { - path /.htaccess - path /data/* - path /config/* - path /db_structure - path /.xml - path /README - path /3rdparty/* - path /lib/* - path /templates/* - path /occ - path /console.php - } - handle @forbidden { - respond 404 + tls { + dns cloudflare {$CLOUDFLARE_API_TOKEN} + resolvers 1.1.1.1 } - redir /.well-known/carddav /remote.php/dav 301 - redir /.well-known/caldav /remote.php/dav 301 - - root * /var/www/nextcloud - php_fastcgi nextcloud:9000 { - root /var/www/html - # Tells nextcloud to remove /index.php from URLs in links - env front_controller_active true + header { + Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" } - file_server } -http://collabora.korhonen.lan { - reverse_proxy collabora:9980 +korhonen.cc, *.korhonen.cc { + import common_site_settings + + @static { + file + path *.ico *.css *.js *.gif *.webp *.avif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.pdf *.webmanifest + } + + @homepage-www-redir host www.korhonen.cc + handle @homepage-www-redir { + redir https://korhonen.cc + } + + @homepage host korhonen.cc + handle @homepage { + # Redirect finnish WIP + # @redirFinnish { + # header Accept-Language *fi-FI* + # not path *.js *.css *.png *.jpg *.jpeg *.svg + # not path /en* /fi* + # } + # redir @redirFinnish /fi{uri} + # + # uri strip_prefix /en + + header @static Cache-Control max-age=5184000 + root * /var/www/korhonen.cc + file_server + } + + @wkd host openpgpkey.korhonen.cc + handle @wkd { + root * /var/www/wkd + file_server browse + header Access-Control-Allow-Origin "*" + } + + @index host index.korhonen.cc + handle @index { + umami { + event_endpoint "https://umami.korhonen.cc/api/send" + website_uuid "9fe4f5c0-8e63-4479-a58d-d399cdbc0a3a" + client_ip_header X-Real-IP + device_detection + allowed_extensions "" .tar.zst .json .html + } + root * /var/www/index.korhonen.cc + file_server browse + } + + @home-assistant host home.korhonen.cc + handle @home-assistant { + reverse_proxy home-assistant:8123 + } + + @authentik host sso.korhonen.cc + handle @authentik { + reverse_proxy authentik:9000 + } + + @forgejo host git.korhonen.cc + handle @forgejo { + rewrite /user/login /user/oauth2/authentik + reverse_proxy forgejo:3000 + } + + @woodpecker host ci.korhonen.cc + handle @woodpecker { + reverse_proxy woodpecker:8000 + } + + @searx host search.korhonen.cc + handle @searx { + reverse_proxy searx:8080 + } + + @freshrss host rss.korhonen.cc + handle @freshrss { + reverse_proxy freshrss + } + + @jellyfin host jellyfin.korhonen.cc + handle @jellyfin { + reverse_proxy jellyfin:8096 + } + + @pihole host pihole.korhonen.cc + handle @pihole { + reverse_proxy pihole + } + + @umami host umami.korhonen.cc + handle @umami { + reverse_proxy umami:3000 + } + + @nextcloud host cloud.korhonen.cc + handle @nextcloud { + # Redirect login page to Authentik + redir /login /apps/sociallogin/custom_oidc/korhonen-sso 301 + + # .htaccess / data / config / ... shouldn't be accessible from outside + @forbidden { + path /.htaccess + path /data/* + path /config/* + path /db_structure + path /.xml + path /README + path /3rdparty/* + path /lib/* + path /templates/* + path /occ + path /console.php + } + handle @forbidden { + respond 404 + } + + redir /.well-known/carddav /remote.php/dav 301 + redir /.well-known/caldav /remote.php/dav 301 + + root * /var/www/nextcloud + php_fastcgi nextcloud:9000 { + root /var/www/html + # Tells nextcloud to remove /index.php from URLs in links + env front_controller_active true + } + file_server + } + + @tvheadend host tvheadend.korhonen.cc + handle @tvheadend { + reverse_proxy tvheadend:9981 + } + + @collabora host collabora.korhonen.cc + handle @collabora { + reverse_proxy collabora:9980 + } + + @grafana host grafana.korhonen.cc + handle @grafana { + reverse_proxy grafana:3000 + } + + @drop host drop.korhonen.cc + handle @drop { + reverse_proxy drop:3000 + } + + @ipvX host ipv6.korhonen.cc ipv4.korhonen.cc + handle @ipvX { + respond {remote_host} + } + + @ott host ott.korhonen.cc + handle @ott { + reverse_proxy opentogethertube:8080 + } + + handle { + respond "404 Not Found" 404 + } + + handle_errors { + @homepage_404 { + expression {http.error.status_code} == 404 + host korhonen.cc + } + handle @homepage_404 { + root * /var/www/korhonen.cc + rewrite * /404.html + file_server + } + + respond "{err.status_code} {err.status_text}" + } +} + +korhonen.social, *.korhonen.social { + import common_site_settings + + @firefish-www-redir host www.korhonen.social + handle @firefish-www-redir { + redir https://korhonen.social + } + + @firefish host korhonen.social + handle @firefish { + reverse_proxy firefish:3000 + } + + handle { + respond "404 Not Found" 404 + } + + handle_errors { + respond "{err.status_code} {err.status_text}" + } } diff --git a/docker/caddy/Caddyfile.old b/docker/caddy/Caddyfile.old deleted file mode 100644 index e33bef26..00000000 --- a/docker/caddy/Caddyfile.old +++ /dev/null @@ -1,195 +0,0 @@ -# My old public configuration. -# Currently don't have a public IP so running everything in LAN -# in the current configuration - -{ - order umami first -} - -(common_site_settings) { - encode zstd gzip - - tls { - dns cloudflare {$CLOUDFLARE_API_TOKEN} - resolvers 1.1.1.1 - } - - header { - Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" - } -} - -korhonen.cc, *.korhonen.cc { - import common_site_settings - - @static { - file - path *.ico *.css *.js *.gif *.webp *.avif *.jpg *.jpeg *.png *.svg *.woff *.woff2 *.pdf *.webmanifest - } - - @homepage-www-redir host www.korhonen.cc - handle @homepage-www-redir { - redir https://korhonen.cc - } - - @homepage host korhonen.cc - handle @homepage { - # Redirect finnish WIP - # @redirFinnish { - # header Accept-Language *fi-FI* - # not path *.js *.css *.png *.jpg *.jpeg *.svg - # not path /en* /fi* - # } - # redir @redirFinnish /fi{uri} - # - # uri strip_prefix /en - - header @static Cache-Control max-age=5184000 - root * /var/www/korhonen.cc - file_server - } - - @wkd host openpgpkey.korhonen.cc - handle @wkd { - root * /var/www/wkd - file_server browse - header Access-Control-Allow-Origin "*" - } - - @index host index.korhonen.cc - handle @index { - umami { - event_endpoint "https://umami.korhonen.cc/api/send" - website_uuid "9fe4f5c0-8e63-4479-a58d-d399cdbc0a3a" - client_ip_header X-Real-IP - device_detection - allowed_extensions "" .tar.zst .json .html - } - root * /var/www/index.korhonen.cc - file_server browse - } - - @home-assistant host home.korhonen.cc - handle @home-assistant { - reverse_proxy home-assistant:8123 - } - - @authentik host sso.korhonen.cc - handle @authentik { - reverse_proxy authentik:9000 - } - - @forgejo host git.korhonen.cc - handle @forgejo { - rewrite /user/login /user/oauth2/authentik - reverse_proxy forgejo:3000 - } - - @woodpecker host ci.korhonen.cc - handle @woodpecker { - reverse_proxy woodpecker:8000 - } - - @searx host search.korhonen.cc - handle @searx { - reverse_proxy searx:8080 - } - - @freshrss host rss.korhonen.cc - handle @freshrss { - reverse_proxy freshrss - } - - @jellyfin host jellyfin.korhonen.cc - handle @jellyfin { - reverse_proxy jellyfin:8096 - } - - @pihole host pihole.korhonen.cc - handle @pihole { - reverse_proxy pihole - } - - @umami host umami.korhonen.cc - handle @umami { - reverse_proxy umami:3000 - } - - @nextcloud host cloud.korhonen.cc - handle @nextcloud { - # Redirect login page to Authentik - redir /login /apps/sociallogin/custom_oidc/korhonen-sso 301 - - # .htaccess / data / config / ... shouldn't be accessible from outside - @forbidden { - path /.htaccess - path /data/* - path /config/* - path /db_structure - path /.xml - path /README - path /3rdparty/* - path /lib/* - path /templates/* - path /occ - path /console.php - } - handle @forbidden { - respond 404 - } - - redir /.well-known/carddav /remote.php/dav 301 - redir /.well-known/caldav /remote.php/dav 301 - - root * /var/www/nextcloud - php_fastcgi nextcloud:9000 { - root /var/www/html - # Tells nextcloud to remove /index.php from URLs in links - env front_controller_active true - } - file_server - } - - @tvheadend host tvheadend.korhonen.cc - handle @tvheadend { - reverse_proxy tvheadend:9981 - } - - @collabora host collabora.korhonen.cc - handle @collabora { - reverse_proxy collabora:9980 - } - - @drop host drop.korhonen.cc - handle @drop { - reverse_proxy drop:3000 - } - - @ipvX host ipv6.korhonen.cc ipv4.korhonen.cc - handle @ipvX { - respond {remote_host} - } - - @ott host ott.korhonen.cc - handle @ott { - reverse_proxy opentogethertube:8080 - } - - handle { - respond "404 Not Found" 404 - } - - handle_errors { - @homepage_404 { - expression {http.error.status_code} == 404 - host korhonen.cc - } - handle @homepage_404 { - root * /var/www/korhonen.cc - rewrite * /404.html - file_server - } - - respond "{err.status_code} {err.status_text}" - } -} diff --git a/docker/homeautomation/docker-compose.yaml b/docker/homeautomation/docker-compose.yaml index ca42998a..346e9660 100644 --- a/docker/homeautomation/docker-compose.yaml +++ b/docker/homeautomation/docker-compose.yaml @@ -11,6 +11,8 @@ services: restart: unless-stopped environment: - TZ=Europe/Helsinki + devices: + - /dev/ttyACM0 volumes: - hass:/config - /etc/localtime:/etc/localtime:ro @@ -23,20 +25,20 @@ services: - 8300:8300 extra_hosts: - host.docker.internal:host-gateway - # mosquitto: - # container_name: mosquitto - # image: eclipse-mosquitto - # restart: unless-stopped - # environment: - # - TZ=Europe/Helsinki - # networks: - # - homeautomation - # ports: - # - 1883:1883 - # - 8866:8866 - # volumes: - # - mosquitto:/mosquitto - # - /etc/localtime:/etc/localtime:ro + mosquitto: + container_name: mosquitto + image: eclipse-mosquitto + restart: unless-stopped + environment: + - TZ=Europe/Helsinki + networks: + - homeautomation + ports: + - 1883:1883 + - 8866:8866 + volumes: + - mosquitto:/mosquitto + - /etc/localtime:/etc/localtime:ro piper_english: container_name: piper_english image: rhasspy/wyoming-piper @@ -73,6 +75,85 @@ services: volumes: - whisper_english:/data - /etc/localtime:/etc/localtime:ro + openwakeword_english: + container_name: openwakeword_english + image: rhasspy/wyoming-openwakeword + restart: unless-stopped + environment: + - TZ=Europe/Helsinki + networks: + - homeautomation + command: + - --preload-model + - ok_nabu + depends_on: + - home-assistant + volumes: + - openwakeword_english:/data + - /etc/localtime:/etc/localtime:ro + microphone: + build: https://github.com/rhasspy/wyoming-mic-external.git + image: rhasspy/wyoming-mic-external + container_name: microphone + restart: unless-stopped + devices: + - /dev/snd:/dev/snd + ports: + - 10600:10600 + group_add: + - audio + networks: + - homeautomation + command: + - --device + - plughw:CARD=USB,DEV=0 + - --debug + volumes: + - /etc/localtime:/etc/localtime:ro + speaker: + build: https://github.com/rhasspy/wyoming-snd-external.git + image: rhasspy/wyoming-snd-external + container_name: speaker + restart: unless-stopped + devices: + - /dev/snd:/dev/snd + ports: + - 10601:10601 + group_add: + - audio + networks: + - homeautomation + command: + - --device + - iec958:CARD=USB,DEV=0 + - --debug + volumes: + - /etc/localtime:/etc/localtime:ro + satellite: + build: https://github.com/rhasspy/wyoming-satellite.git + image: rhasspy/wyoming-satellite + container_name: satellite + restart: unless-stopped + ports: + - 10700:10700 + networks: + - homeautomation + depends_on: + - speaker + - microphone + - whisper_english + command: + - --name + - ha-server-satellite + - --mic-uri + - tcp://microphone:10600 + - --snd-uri + - tcp://speaker:10601 + - --wake-uri + - tcp://openwakeword_english:10400 + - --debug + volumes: + - /etc/localtime:/etc/localtime:ro networks: homeautomation: external: false diff --git a/home/.config/dconf.ini b/home/.config/dconf.ini index 19ccc814..15d59d20 100644 --- a/home/.config/dconf.ini +++ b/home/.config/dconf.ini @@ -17,10 +17,10 @@ locations=[<(uint32 2, <('Lappeenranta', 'EFLP', false, [(1.0654507804726074, 0. locations=[<(uint32 2, <('Lappeenranta', 'EFLP', false, [(1.0654507804726074, 0.49128594181309354)], @a(dd) [])>)>] [org/gnome/shell/world-clocks] -locations=[<(uint32 2, <('Bangkok', 'VTBD', true, [(0.24289166005364171, 1.7558012275062955)], [(0.23998277214922031, 1.754346792280731)])>)>, <(uint32 2, <('Lappeenranta', 'EFLP', true, [(1.0654507804726074, 0.49128594181309354)], [(1.065814402368968, 0.49189195503597105)])>)>] +locations=[<(uint32 2, <('Bangkok', 'VTBD', true, [(0.24289166005364171, 1.7558012275062955)], [(0.23998277214922031, 1.754346792280731)])>)>] [org/gnome/clocks] -world-clocks=[{'location': <(uint32 2, <('Bangkok', 'VTBD', true, [(0.24289166005364171, 1.7558012275062955)], [(0.23998277214922031, 1.754346792280731)])>)>}, {'location': <(uint32 2, <('Lappeenranta', 'EFLP', true, [(1.0654507804726074, 0.49128594181309354)], [(1.065814402368968, 0.49189195503597105)])>)>}] +world-clocks=[{'location': <(uint32 2, <('Bangkok', 'VTBD', true, [(0.24289166005364171, 1.7558012275062955)], [(0.23998277214922031, 1.754346792280731)])>)>}] [org/gnome/desktop/a11y/mouse] dwell-click-enabled=false diff --git a/home/.config/fontconfig/fonts.conf b/home/.config/fontconfig/fonts.conf index a12fa719..f00c9381 100644 --- a/home/.config/fontconfig/fonts.conf +++ b/home/.config/fontconfig/fonts.conf @@ -4,19 +4,19 @@ sans-serif - Adwaita Sans + Overpass serif - Adwaita Sans + Overpass monospace - Adwaita mono + Hack Nerd Font Mono diff --git a/home/.config/git/config b/home/.config/git/config index 545f3313..788a7261 100644 --- a/home/.config/git/config +++ b/home/.config/git/config @@ -42,7 +42,6 @@ pull-merge = pull --no-rebase --no-ff --no-edit log-merge = log -i --grep=merge --pretty=oneline log-fp = log --first-parent --pretty=oneline ll = log --pretty=oneline -dno = !git --no-pager diff --name-only [color] pager = no diff --git a/home/.config/nvim/lazy-lock.json b/home/.config/nvim/lazy-lock.json index 1ebcf4b2..434819ce 100644 --- a/home/.config/nvim/lazy-lock.json +++ b/home/.config/nvim/lazy-lock.json @@ -1,70 +1,69 @@ { - "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, - "alpha-nvim": { "branch": "main", "commit": "de72250e054e5e691b9736ee30db72c65d560771" }, - "auto-dark-mode.nvim": { "branch": "master", "commit": "c31de126963ffe9403901b4b0990dde0e6999cc6" }, - "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "LuaSnip": { "branch": "master", "commit": "787dee55ca364cc9119787165418fe93b74c1842" }, + "alpha-nvim": { "branch": "main", "commit": "bf3c8bb8c02ed3d9644cc5bbc48e2bdc39349cd7" }, + "auto-dark-mode.nvim": { "branch": "master", "commit": "d365beccca05ffcb01e50109f2adca2459c3995a" }, + "bufferline.nvim": { "branch": "main", "commit": "5cc447cb2b463cb499c82eaeabbed4f5fa6a0a44" }, "cder.nvim": { "branch": "main", "commit": "0a071389bb52544ac9cf9557378aa1212dff6982" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" }, - "cmp-git": { "branch": "main", "commit": "d9efd00e0b9527ee05031ce7e7e55d6b118f543e" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, + "cmp-git": { "branch": "main", "commit": "741b6a759dbbcc55e9e5d72e2a84099cf6f4af9c" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-spell": { "branch": "master", "commit": "694a4e50809d6d645c1ea29015dad0c293f019d6" }, - "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "confirm-quit.nvim": { "branch": "main", "commit": "f15f6d728d385a3d2efa22098e9a45b8a2b20144" }, - "copilot-cmp": { "branch": "master", "commit": "15fc12af3d0109fa76b60b5cffa1373697e261d1" }, - "copilot.lua": { "branch": "master", "commit": "535ebb53880ae67e33d9e50b503d25f9ef3ca06c" }, + "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, + "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, - "dropbar.nvim": { "branch": "master", "commit": "873ba43f83398fd0e28880cf98fd89e6ce667c51" }, - "firenvim": { "branch": "master", "commit": "c4ab7d2aeb145cd93db8660cb134f771722f2b5e" }, - "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "dropbar.nvim": { "branch": "master", "commit": "998441a88476af2ec77d8cb1b21bae62c9f548c1" }, + "firenvim": { "branch": "master", "commit": "64f9389b88c8b0c7667d45c171a5f25c42d852fb" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "fugitive-gitea": { "branch": "master", "commit": "d93176028d13820f941c165c14039a6019744a5a" }, - "gitsigns.nvim": { "branch": "main", "commit": "7010000889bfb6c26065e0b0f7f1e6aa9163edd9" }, - "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, - "kanagawa.nvim": { "branch": "master", "commit": "709018d5af92d2e5780bfb8a6d36e9cad01a6402" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" }, + "gitsigns.nvim": { "branch": "main", "commit": "ee7634ab4f0a6606438fe13e16cbf2065589a5ed" }, + "indent-blankline.nvim": { "branch": "master", "commit": "e7a4442e055ec953311e77791546238d1eaae507" }, + "kanagawa.nvim": { "branch": "master", "commit": "f491b0fe68fffbece7030181073dfe51f45cda81" }, + "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" }, + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" }, + "lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-extra-cmds": { "branch": "main", "commit": "cc7163cb5089236042b5e351cb1a078d0905e40d" }, + "mason-extra-cmds": { "branch": "main", "commit": "606ecf0cebed0f91926558158e61725d2678d90c" }, "mason-lock.nvim": { "branch": "main", "commit": "86614f76c3442fba1c5c8d79aa1efcb3ad69de1c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.nvim": { "branch": "main", "commit": "189010888bc37fc1c382f2dcc81b7a6441160686" }, - "neoformat": { "branch": "master", "commit": "874dcd0995db340278c41860e0209bef29d6ef87" }, - "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, - "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, - "nvim-asciidoc-preview": { "branch": "main", "commit": "b12e113b5f7e7522b4e412213d5498cc529f2628" }, - "nvim-autopairs": { "branch": "master", "commit": "6522027785b305269fa17088395dfc0f456cedd2" }, - "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7446f47b3dfb7df801f31a6f6783c2ad119a6935" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.nvim": { "branch": "main", "commit": "77533e69cc4fadb7f4c25f23255ae0890a058818" }, + "neoformat": { "branch": "master", "commit": "d9d3311097eacdba9bd7a425b267d304b509e7ea" }, + "noice.nvim": { "branch": "main", "commit": "df448c649ef6bc5a6a633a44f2ad0ed8d4442499" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nvim-asciidoc-preview": { "branch": "main", "commit": "7b8dacdcea38dad0b53b8c3ae01e7045ed6a04db" }, + "nvim-autopairs": { "branch": "master", "commit": "ee297f215e95a60b01fde33275cc3c820eddeebe" }, + "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" }, "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, - "nvim-dap": { "branch": "master", "commit": "6a5bba0ddea5d419a783e170c20988046376090d" }, - "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-jdtls": { "branch": "master", "commit": "2f7bff9b8d2ee1918b36ca55f19547d9d335a268" }, + "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" }, + "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, + "nvim-jdtls": { "branch": "master", "commit": "efe813854432a314b472226dca813f0f2598d44a" }, "nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" }, - "nvim-lspconfig": { "branch": "master", "commit": "85e0dd26b710e834a105d679200d01e326a3d2b0" }, - "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" }, - "nvim-tree.lua": { "branch": "master", "commit": "44d9b58f11d5a426c297aafd0be1c9d45617a849" }, - "nvim-treesitter": { "branch": "master", "commit": "da5825bf70cc2ea7eacd1e60c32c07baf19adeba" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "9937e5e356e5b227ec56d83d0a9d0a0f6bc9cad4" }, - "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, - "nvim-ufo": { "branch": "main", "commit": "a52c92c3bbaa10f0c9b547a50adaa8c7d8b29f94" }, - "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, + "nvim-lspconfig": { "branch": "master", "commit": "85afd4b936acd62b578c2e2d8e86541fb972c32e" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, + "nvim-notify": { "branch": "master", "commit": "fbef5d32be8466dd76544a257d3f3dce20082a07" }, + "nvim-tree.lua": { "branch": "master", "commit": "8760d76c1d316aa46f141f3f2b80b853a2acc41e" }, + "nvim-treesitter": { "branch": "master", "commit": "377039daa260b71f304c881d1b21d643c501a261" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "0d79d169fcd45a8da464727ac893044728f121d4" }, + "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" }, + "nvim-ufo": { "branch": "main", "commit": "c96bb3bb853ff6253fe74f057df03e61fafd2403" }, + "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" }, "password-store": { "branch": "master", "commit": "b5e965a838bb68c1227caa2cdd874ba496f10149" }, - "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" }, - "schemastore.nvim": { "branch": "main", "commit": "d307d291f38678d064cb987112926df6d9134de3" }, - "statuscol.nvim": { "branch": "main", "commit": "c399884e8f64019ec9bb581251f9710915b7f996" }, - "suda.vim": { "branch": "master", "commit": "9adda7d195222d4e2854efb2a88005a120296c47" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, - "telescope-project.nvim": { "branch": "master", "commit": "ce2c9fe209a68c7a924acde42d94ed8a2b2a52c5" }, + "statuscol.nvim": { "branch": "main", "commit": "5998d16044159ad3779f62c45e756c555e3051f0" }, + "suda.vim": { "branch": "master", "commit": "b97fab52f9cdeabe2bbb5eb98d82356899f30829" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope-project.nvim": { "branch": "master", "commit": "796200876bb0fe8157b8eb1ce03d927d3827a052" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "a4ed82509cecc56df1c7138920a1aeaf246c0ac5" }, + "telescope.nvim": { "branch": "master", "commit": "df534c3042572fb958586facd02841e10186707c" }, "vim-asciidoctor": { "branch": "master", "commit": "f553311b5db03440eb8d7035434d0405e4a2c559" }, "vim-caddyfile": { "branch": "master", "commit": "24fe0720551883e407cb70ae1d7c03f162d1d5a0" }, - "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, + "vim-fugitive": { "branch": "master", "commit": "d4877e54cef67f5af4f950935b1ade19ed6b7370" }, "vim-gnupg": { "branch": "main", "commit": "f9b608f29003dfde6450931dc0f495a912973a88" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } + "which-key.nvim": { "branch": "main", "commit": "8badb359f7ab8711e2575ef75dfe6fbbd87e4821" } } diff --git a/home/.config/nvim/lua/plugins/mason.lua b/home/.config/nvim/lua/plugins/mason.lua index 7c727ce0..c1231f88 100644 --- a/home/.config/nvim/lua/plugins/mason.lua +++ b/home/.config/nvim/lua/plugins/mason.lua @@ -19,15 +19,12 @@ return { "mfussenegger/nvim-jdtls", -- Add support for LSP file operations { "antosha417/nvim-lsp-file-operations", opts = {} }, - -- Automatically fetch schemas from JSON schema store - "b0o/schemastore.nvim", }, config = function() require("mason").setup() local mlspc = require("mason-lspconfig") local lsp_utils = require("lsp_utils") - local lspconfig = require("lspconfig") local commonLspConfigArgs = { on_attach = lsp_utils.map_keys, @@ -38,13 +35,13 @@ return { mlspc.setup_handlers({ -- Default handler function(server_name) - lspconfig[server_name].setup(commonLspConfigArgs) + require("lspconfig")[server_name].setup(commonLspConfigArgs) end, -- Disable tsserver diagnostics diagnostics -- that come from ESLint ["ts_ls"] = function() - lspconfig.ts_ls.setup(vim.tbl_extend("force", commonLspConfigArgs, { + require("lspconfig").ts_ls.setup(vim.tbl_extend("force", commonLspConfigArgs, { settings = { diagnostics = { ignoredCodes = { @@ -58,17 +55,6 @@ return { -- Don't set up jdtls, it is set up by nvim-jdtls ["jdtls"] = function() end, - - ["jsonls"] = function() - lspconfig.jsonls.setup(vim.tbl_extend("force", commonLspConfigArgs, { - settings = { - json = { - schemas = require("schemastore").json.schemas(), - validate = { enable = true }, - }, - }, - })) - end, }) end, } diff --git a/home/.config/nvim/mason-lock.json b/home/.config/nvim/mason-lock.json index 25d803af..8626bee9 100644 --- a/home/.config/nvim/mason-lock.json +++ b/home/.config/nvim/mason-lock.json @@ -1,15 +1,23 @@ { - "bash-language-server": "5.4.3", - "bibtex-tidy": "1.14.0", + "bash-language-server": "5.4.2", "css-lsp": "4.10.0", - "docker-compose-language-service": "0.3.0", + "docker-compose-language-service": "0.2.0", "dockerfile-language-server": "0.13.0", "eslint-lsp": "4.10.0", + "google-java-format": "v1.24.0", "html-lsp": "4.10.0", + "java-debug-adapter": "0.58.0", + "jdtls": "v1.40.0", "json-lsp": "4.10.0", - "lemminx": "0.28.0", - "lua-language-server": "3.13.9", - "texlab": "v5.22.1", - "typescript-language-server": "4.3.4", - "yaml-language-server": "1.17.0" -} \ No newline at end of file + "lemminx": "0.27.1", + "lua-language-server": "3.11.1", + "nil": "2024-08-06", + "nixpkgs-fmt": "1.3.0", + "prettier": "3.3.3", + "prettierd": "0.25.3", + "stylua": "v0.20.0", + "taplo": "0.9.3", + "tree-sitter-cli": "v0.24.3", + "typescript-language-server": "4.3.3", + "yaml-language-server": "1.15.0" +} diff --git a/home/.config/paru/paru.conf b/home/.config/paru/paru.conf index 063d7694..98eeaf95 100644 --- a/home/.config/paru/paru.conf +++ b/home/.config/paru/paru.conf @@ -1,6 +1,5 @@ [options] NewsOnUpgrade -PgpFetch [bin] Sudo = doas diff --git a/root/etc/kernel/cmdline b/root/etc/kernel/cmdline index b38c85c5..8521db9c 100644 --- a/root/etc/kernel/cmdline +++ b/root/etc/kernel/cmdline @@ -1,9 +1,7 @@ {%@@ if profile == "Mirkwood" @@%} -cryptdevice=UUID=ddc8cabe-f726-4287-8407-3a0323ec6037:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=root resume=/dev/mapper/cryptroot resume_offset=18529853 rw quiet splash vt.global_cursor_default=0 fbcon=nodefer log_level=3 udev.log_level=3 +cryptdevice=UUID=19fa8fab-c5fe-454a-9a17-b7185ce975ea:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=root resume=/dev/mapper/cryptroot resume_offset=10530935 rw quiet splash vt.global_cursor_default=0 fbcon=nodefer log_level=3 udev.log_level=3 {%@@ elif profile == "Moria" @@%} -cryptdevice=UUID=51115cf2-6a44-4f8c-8aa2-ff9d834953d8:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=root ip=:::::eth0:dhcp netconf_timeout=60 rw quiet splash vt.global_cursor_default=0 fbcon=nodefer log_level=3 udev.log_level=3 +cryptdevice=UUID=51115cf2-6a44-4f8c-8aa2-ff9d834953d8:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=root ip=:::::eth0:dhcp netconf_timeout=60 rw quiet splash vt.global_cursor_default=0 fbcon=nodefer log_level=3 udev.log_level=3 {%@@ elif profile == "Shire" @@%} -cryptdevice=UUID=8898d32c-d150-4258-ad0f-96b5afca4718:cryptroot root=/dev/mapper/cryptroot rootflags=subvol=root resume_offset=2106624 intel_idle.max_cstate=1 rw quiet splash vt.global_cursor_default=0 fbcon=nodefer log_level=3 udev.log_level=3 -{%@@ elif profile == "VentoyArch" @@%} -cryptdevice=UUID=d43414f3-37e9-4f35-9d3c-2f85c36c0034:cryptroot:allow-discards root=/dev/mapper/cryptroot rootflags=subvol=root rw quiet splash vt.global_cursor_default=0 fbcon=nodefer log_level=3 udev.log_level=3 +cryptdevice=UUID=370d6c2a-86ab-4e7d-9442-d15ad173f3e3:cryptroot root=/dev/mapper/cryptroot resume_offset=1908736 intel_idle.max_cstate=1 rw quiet splash vt.global_cursor_default=0 fbcon=nodefer log_level=3 udev.log_level=3 {%@@ endif @@%} diff --git a/root/etc/mkinitcpio.conf b/root/etc/mkinitcpio.conf index 9fec8d14..cce0fe98 100644 --- a/root/etc/mkinitcpio.conf +++ b/root/etc/mkinitcpio.conf @@ -12,11 +12,9 @@ BINARIES=() FILES=() {%@@ if profile == "Mirkwood" @@%} -HOOKS=(base udev kms plymouth keyboard autodetect microcode modconf block filesystems btrfs encrypt resume fsck) +HOOKS=(base udev kms plymouth keyboard autodetect microcode modconf block filesystems btrfs encrypt fsck) {%@@ elif profile == 'Moria' @@%} HOOKS=(base udev kms keyboard autodetect microcode modconf block netconf dropbear encryptssh filesystems btrfs fsck) {%@@ elif profile == 'Shire' @@%} -HOOKS=(base udev kms keyboard keymap autodetect microcode modconf block bluetooth unl0kr encrypt plymouth filesystems resume fsck) -{%@@ elif profile == "VentoyArch" @@%} -HOOKS=(base udev kms plymouth keyboard autodetect microcode modconf block ventoy filesystems btrfs encrypt resume fsck) +HOOKS=(base udev kms keyboard keymap autodetect microcode modconf block unl0kr encrypt plymouth filesystems fsck) {%@@ endif @@%} diff --git a/root/etc/pacman.conf b/root/etc/pacman.conf index 437f09b9..249cd2a9 100755 --- a/root/etc/pacman.conf +++ b/root/etc/pacman.conf @@ -30,5 +30,6 @@ Include = /etc/pacman.d/mirrorlist Server = file:///var/www/index.korhonen.cc/repo/arch_linux/$repo/$arch {%@@ else @@%} Include = /etc/pacman.d/pacserve -Server = http://index.korhonen.lan/repo/arch_linux/$repo/$arch +Server = https://index.korhonen.cc/repo/arch_linux/$repo/$arch {%@@ endif @@%} + diff --git a/root/etc/systemd/system/getty@tty6.service.d/override.conf b/root/etc/systemd/system/getty@tty6.service.d/override.conf new file mode 100644 index 00000000..b3c5c28f --- /dev/null +++ b/root/etc/systemd/system/getty@tty6.service.d/override.conf @@ -0,0 +1,3 @@ +[Service] +ExecStart= +ExecStart=-/usr/bin/agetty --skip-login --nonewline --noissue --autologin {{@@ env['USRNAME'] @@}} --noclear %I $TERM diff --git a/root/etc/systemd/system/qbittorrent.service b/root/etc/systemd/system/qbittorrent.service new file mode 100644 index 00000000..ed7a42c0 --- /dev/null +++ b/root/etc/systemd/system/qbittorrent.service @@ -0,0 +1,10 @@ +[Unit] +Description=qBittorrent Daemon Service +After=network.target + +[Service] +User=qbtuser +ExecStart=/usr/bin/qbittorrent-nox --webui-port=8080 + +[Install] +WantedBy=multi-user.target diff --git a/root/etc/systemd/timesyncd.conf b/root/etc/systemd/timesyncd.conf index 243bc7a3..3b117f76 100644 --- a/root/etc/systemd/timesyncd.conf +++ b/root/etc/systemd/timesyncd.conf @@ -1,3 +1,3 @@ [Time] -NTP=esgaroth.korhonen.lan -FallbackNTP=0.pool.ntp.org +NTP=ntp.korhonen.cc +FallbackNTP=0.fi.pool.ntp.org diff --git a/scripts/autorotate.sh b/scripts/autorotate.sh new file mode 100755 index 00000000..c4f6f674 --- /dev/null +++ b/scripts/autorotate.sh @@ -0,0 +1,22 @@ +#!/bin/bash +function rotate_ms { + case $1 in + "normal") + swaymsg output eDP-1 transform 0 + ;; + "right-up") + swaymsg output eDP-1 transform 90 + ;; + "bottom-up") + swaymsg output eDP-1 transform 180 + ;; + "left-up") + swaymsg output eDP-1 transform 270 + ;; + esac +} + +while IFS='$\n' read -r line; do + rotation="$(echo $line | sed -En "s/^.*orientation changed: (.*)/\1/p")" + [[ ! -z $rotation ]] && rotate_ms $rotation +done < <(stdbuf -oL monitor-sensor) diff --git a/scripts/checkupdates.sh b/scripts/checkupdates.sh new file mode 100755 index 00000000..27bd1464 --- /dev/null +++ b/scripts/checkupdates.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +checkupdates -d + +CODE=$? + +if [ $CODE -eq 2 ]; then + echo "No updates available" + exit 0 +fi + +exit $CODE diff --git a/scripts/fhackeditor b/scripts/fhackeditor deleted file mode 100755 index 7a1d4934..00000000 --- a/scripts/fhackeditor +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Script to launch a graphical editor if in graphical mode, -# terminal editor otherwise - -if [ -n "$DISPLAY" ] || [ -n "$WAYLAND_DISPLAY" ]; then - echo "Running in graphical mode" -else - echo "Running in TTY mode" -fi diff --git a/scripts/mail/notify-new-mail.sh b/scripts/mail/notify-new-mail.sh new file mode 100755 index 00000000..a4d2f302 --- /dev/null +++ b/scripts/mail/notify-new-mail.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +NEWMAILDIR=~/.mail/$1/INBOX/new +COUNT=$(ls $NEWMAILDIR | wc -l) +ICON=/usr/share/icons/Papirus-Dark/64x64/apps/email.svg +SOUND=/usr/share/sounds/Oxygen-Im-Message-In.ogg + +if [ $COUNT -ne 0 ]; then + mpv $SOUND & +fi + +if [ $COUNT -gt 1 ]; then + fromaddress=$(cat $NEWMAILDIR/$(ls $NEWMAILDIR | sort -R | tail -1) | formail -x From | tail -1) + notify-send.sh -i $ICON "$COUNT new messages in $1" "From $fromaddress and others" + +elif [ $COUNT -eq 1 ]; then + mailsubject=$(cat $NEWMAILDIR/* | formail -x Subject) + fromaddress=$(cat $NEWMAILDIR/* | formail -x From | tail -1) + + notify-send.sh -i $ICON "New message in $1" "$fromaddress $mailsubject" +else + echo "No new mail" +fi diff --git a/scripts/media/imageviewer b/scripts/media/imageviewer new file mode 100755 index 00000000..bd14f550 --- /dev/null +++ b/scripts/media/imageviewer @@ -0,0 +1,29 @@ +#!/bin/bash + +if [ $# -eq 1 ]; then + DIR=/tmp/images + IMGNAME=$(basename $1) + + if [ ! -d $DIR ]; then + mkdir $DIR + fi + + if [ ! -f $DIR/$IMGNAME ]; then + wget $1 -O $DIR/$IMGNAME + fi + + mimeo $DIR/$IMGNAME + +else + DIR=/tmp/images/$(basename $1) + + if [ ! -d $]; then + mkdir -p $DIR + fi + + if [ ! -f $DIR/$IMGNAME ]; then + wget -P $DIR $@ + fi + + mimeo $DIR/* +fi diff --git a/scripts/media/imgurviewer b/scripts/media/imgurviewer new file mode 100755 index 00000000..a5a02053 --- /dev/null +++ b/scripts/media/imgurviewer @@ -0,0 +1,11 @@ +#!/bin/bash + +ALBUMNAME=$(basename $1) +ALBUMDIR=/tmp/imgur/$ALBUMNAME + +if [ ! -d $ALBUMDIR ]; then + mkdir -p $ALBUMDIR + imgur-album-downloader $1 $ALBUMDIR +fi + +mimeo $ALBUMDIR diff --git a/scripts/media/mpvqueue b/scripts/media/mpvqueue new file mode 100755 index 00000000..5a84bc64 --- /dev/null +++ b/scripts/media/mpvqueue @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +notify="notify-send -i mpv -a mpv" +url="$1" + +# NOTE: You need to configure mpv to +# enable ipc server on this path (see my mpv config for an example) +MPVSOCKET="/tmp/mpvsocket" + +# See if MPV is already running +if [ -z "$(pidof mpv)" ]; then + # mpv is not running + + # pause other players + playerctl pause + + # start mpv + /usr/bin/mpv --no-terminal "$url" & disown + + # Wait for mpv to be up before adding anything else to playlist + while [ -z "$(pidof mpv)" ]; do + sleep 1 + done + $notify "Playing $url" + +else + # mpv is running, so add stuff to playlist + $notify "Adding $url" + echo "{\"command\": [\"loadfile\", \"$url\", \"append\"]}" | socat - /tmp/mpvsocket +fi