update conf

This commit is contained in:
Johannes Knopp
2026-06-16 17:45:49 +02:00
parent a7aa1b2237
commit 48b73c40e9
10 changed files with 155 additions and 105 deletions

View File

@ -30,8 +30,8 @@ exec-once = quickshell
exec-once = dunst
exec-once = firefox
exec-once = hyprpaper
exec-once = [workspace 9 silent] deezer-desktop
exec-once = ./scripts/close-monokai-popup.sh
exec-once = [workspace 9 silent] gtk-launch deezer-pwa
# exec-once = ./scripts/close-monokai-popup.sh
# gnome keyring secret service
exec-once = dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY XDG_CURRENT_DESKTOP HYPRLAND_INSTANCE_SIGNATURE
@ -301,11 +301,11 @@ bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
# Requires playerctl
# Deezer controls
bind = CTRL ALT, K, exec, playerctl --player=deezer play-pause
bind = CTRL ALT, Left, exec, playerctl --player=deezer previous
bind = CTRL ALT, Right, exec, playerctl --player=deezer next
bind = CTRL ALT, Up, exec, ~/.config/hypr/scripts/deezer-volume.sh +5%
bind = CTRL ALT, Down, exec, ~/.config/hypr/scripts/deezer-volume.sh -5%
bind = CTRL ALT, K, exec, ~/.config/hypr/scripts/deezer-controls.sh play-pause
bind = CTRL ALT, Left, exec, ~/.config/hypr/scripts/deezer-controls.sh previous
bind = CTRL ALT, Right, exec, ~/.config/hypr/scripts/deezer-controls.sh next
bind = CTRL ALT, Up, exec, ~/.config/hypr/scripts/deezer-controls.sh +5%
bind = CTRL ALT, Down, exec, ~/.config/hypr/scripts/deezer-controls.sh -5%
bind = ,F7,pass,class:^(discord)$
bind = ,F8,pass,class:^(discord)$

View File

@ -0,0 +1,95 @@
#!/usr/bin/env bash
action="$1"
if [ -z "$action" ]; then
echo "Usage: $0 [play-pause|next|previous|+5%|-5%|50%]"
exit 1
fi
# Deezer PWA PID
root_pid=$(hyprctl clients -j | jq -r '.[] | select(.initialTitle == "Deezer") | .pid' | head -n1)
if [ -z "$root_pid" ] || [ "$root_pid" = "null" ]; then
echo "[ERROR] Deezer window not found."
exit 1
fi
case "$action" in
play-pause|next|previous)
playerctl --player="chromium.instance${root_pid}" "$action"
exit 0
;;
*)
# Volume: find sink-input whose PID is in the process tree
pids=$(pstree -p "$root_pid" | grep -oP '\(\K[0-9]+')
sink=$(pactl -f json list sink-inputs | jq -r --argjson pids "$(echo "$pids" | jq -R . | jq -s 'map(tonumber)')" \
'.[] | select(.properties["application.process.id"] | tonumber | IN($pids[])) | .index' | head -n1)
if [ -z "$sink" ]; then
echo "[ERROR] No audio stream found for Deezer."
exit 1
fi
pactl set-sink-input-volume "$sink" "$action"
;;
esac
#
# # 2) Gather ALL descendant PIDs
# declare -a pid_array
# pid_array+=("$root_pid")
#
# # Direct children
# children=($(pgrep -P "$root_pid"))
# echo "[INFO] Children: ${children[*]}"
#
# for c in "${children[@]}"; do
# pid_array+=("$c")
# gc=($(pgrep -P "$c"))
# echo "[INFO] Grandchildren of $c: ${gc[*]}"
# for g in "${gc[@]}"; do
# pid_array+=("$g")
# done
# done
#
# echo "[INFO] All collected PIDs: ${pid_array[*]}"
#
# echo "----------------------------------"
# echo "[INFO] Checking sink inputs..."
# echo "----------------------------------"
#
# sink=""
#
# while IFS= read -r block; do
# pid=$(echo "$block" | jq -r '.properties["application.process.id"] // empty')
# index=$(echo "$block" | jq -r '.index')
#
# echo "[SINK] index=$index pid=$pid"
#
# [ -z "$pid" ] && { echo " -> Skipping"; continue; }
#
# for candidate in "${pid_array[@]}"; do
# if [ "$pid" = "$candidate" ]; then
# echo " -> MATCH with PID $candidate"
# sink="$index"
# break 2
# fi
# done
#
# echo " -> No match"
#
# done < <(pactl -f json list sink-inputs | jq -c '.[]')
#
# echo "----------------------------------"
#
# if [ -z "$sink" ]; then
# echo "[ERROR] No audio stream found for Deezer."
# exit 1
# fi
#
# echo "[INFO] Deezer sink index: $sink"
# echo "[INFO] Applying: $change"
#
# pactl set-sink-input-volume "$sink" "$change"
#

View File

@ -1,77 +0,0 @@
#!/usr/bin/env bash
change="$1"
if [ -z "$change" ]; then
echo "Usage: $0 [+5%|-5%|50%]"
exit 1
fi
echo "=== Deezer Volume Debug (FIXED) ==="
# 1) Deezer window PID
root_pid=$(hyprctl clients -j | jq -r '.[] | select(.class == "deezer-desktop") | .pid' | head -n1)
echo "[INFO] Deezer window PID: $root_pid"
if [ -z "$root_pid" ] || [ "$root_pid" = "null" ]; then
echo "[ERROR] Deezer window not found."
exit 1
fi
# 2) Gather ALL descendant PIDs
declare -a pid_array
pid_array+=("$root_pid")
# Direct children
children=($(pgrep -P "$root_pid"))
echo "[INFO] Children: ${children[*]}"
for c in "${children[@]}"; do
pid_array+=("$c")
gc=($(pgrep -P "$c"))
echo "[INFO] Grandchildren of $c: ${gc[*]}"
for g in "${gc[@]}"; do
pid_array+=("$g")
done
done
echo "[INFO] All collected PIDs: ${pid_array[*]}"
echo "----------------------------------"
echo "[INFO] Checking sink inputs..."
echo "----------------------------------"
sink=""
while IFS= read -r block; do
pid=$(echo "$block" | jq -r '.properties["application.process.id"] // empty')
index=$(echo "$block" | jq -r '.index')
echo "[SINK] index=$index pid=$pid"
[ -z "$pid" ] && { echo " -> Skipping"; continue; }
for candidate in "${pid_array[@]}"; do
if [ "$pid" = "$candidate" ]; then
echo " -> MATCH with PID $candidate"
sink="$index"
break 2
fi
done
echo " -> No match"
done < <(pactl -f json list sink-inputs | jq -c '.[]')
echo "----------------------------------"
if [ -z "$sink" ]; then
echo "[ERROR] No audio stream found for Deezer."
exit 1
fi
echo "[INFO] Deezer sink index: $sink"
echo "[INFO] Applying: $change"
pactl set-sink-input-volume "$sink" "$change"

View File

@ -0,0 +1 @@
vim.opt_local.shiftwidth = 2

View File

@ -1,7 +1,7 @@
{
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
"alpha-nvim": { "branch": "main", "commit": "a9d8fb72213c8b461e791409e7feabb74eb6ce73" },
"auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" },
"alpha-nvim": { "branch": "main", "commit": "6c6a89d5b068b5251c8bdf0dd57bb921bcfeeb09" },
"auto-session": { "branch": "main", "commit": "6cde3874a9283c2db55627acca5f28e4fa402320" },
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
@ -10,31 +10,33 @@
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flutter-tools.nvim": { "branch": "main", "commit": "677cc07c16e8b89999108d2ebeefcfc5f539b73c" },
"flutter-tools.nvim": { "branch": "main", "commit": "7d1acfd139215e02d2784733af69a61aaebe06e8" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
"lualine.nvim": { "branch": "master", "commit": "8811f3f3f4dc09d740c67e9ce399e7a541e2e5b2" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "63a3c6a80538de1003373a619e29aeda27809ad3" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "21c5b3ebeaa0412e28096bb0701434c51c1fbf76" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
"mason.nvim": { "branch": "main", "commit": "b03fb0f20bc1d43daf558cda981a2be22e73ac42" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"mini.nvim": { "branch": "main", "commit": "a59a9b7fb0a42cbcf022938ee5f0724320b66f63" },
"monokai-nightasty.nvim": { "branch": "main", "commit": "1e9b92006782a1217d0a7a871b871768f1cbf5ed" },
"none-ls-extras.nvim": { "branch": "main", "commit": "14fa31ce8c0268a3b2c9cc14979ecf771982d433" },
"none-ls.nvim": { "branch": "main", "commit": "7f9301e416533b5d74e2fb3b1ce5059eeaed748b" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"none-ls-extras.nvim": { "branch": "main", "commit": "27681d797a26f1b4d6119296df42f5204c88a2dc" },
"none-ls.nvim": { "branch": "main", "commit": "01f8e62ea11603e59ad9ff7afcfa94fd183f76d6" },
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
"nvim-lsp-file-operations": { "branch": "master", "commit": "b9c795d3973e8eec22706af14959bc60c579e771" },
"nvim-lspconfig": { "branch": "master", "commit": "fb5fa30626ae10f7f79f740059d3769993936ecb" },
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
"nvim-tree.lua": { "branch": "master", "commit": "509962f21ab7289d8dcd28568af539be39a8c01e" },
"nvim-lspconfig": { "branch": "master", "commit": "a683e0ddf0cf64c6cd689e18ffb480ade3c162b7" },
"nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" },
"nvim-tree.lua": { "branch": "master", "commit": "fb343438d49fba8c35ecc4829d66fca7a1f0ed3d" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
"nvim-web-devicons": { "branch": "master", "commit": "95b7a002d5dba1a42eb58f5fac5c565a485eefd0" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope.nvim": { "branch": "master", "commit": "7ef4d6dccb78ee71e552bbd866176762ad328afa" },
"vim-floaterm": { "branch": "master", "commit": "0ab5eb8135dc884bc543a819ac7033c15e72a76b" },
"nvim-ts-autotag": { "branch": "main", "commit": "88c1453db4ba7dd24131086fe51fdf74e587d275" },
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"render-markdown.nvim": { "branch": "main", "commit": "5adf0895310c1904e5abfaad40a2baad7fe44a07" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
"telescope.nvim": { "branch": "master", "commit": "7d324792b7943e4aa16ad007212e6acc6f9fe335" },
"vim-floaterm": { "branch": "master", "commit": "bb4ba7952e906408e1f83b215f55ffe57efcade6" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View File

@ -1,3 +1,18 @@
return {
'sindrets/diffview.nvim'
'sindrets/diffview.nvim',
config = function ()
local wk = require('which-key')
wk.add({
{ '<leader>d', group = 'diffview' },
{ '<leader>do', '<cmd>DiffviewOpen<cr>', desc = 'Open diff view' },
{ '<leader>dh', '<cmd>DiffviewFileHistory<cr>', desc = 'File history (repo)' },
{ '<leader>df', '<cmd>DiffviewFileHistory %<cr>', desc = 'File history (current)' },
{ '<leader>dc', '<cmd>DiffviewClose<cr>', desc = 'Close diff view' },
-- Toggle panels
{ '<leader>dt', '<cmd>DiffviewToggleFiles<cr>', desc = 'Toggle file panel' },
{ '<leader>dr', '<cmd>DiffviewRefresh<cr>', desc = 'Refresh' },
})
end
}

View File

@ -85,7 +85,7 @@ return {
-- Explicitly enable all mason-managed servers.
-- This is belt-and-suspenders alongside mason-lspconfig's automatic_enable,
-- ensuring servers start regardless of mason-lspconfig version.
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint', 'tailwindcss', 'mdx_analyzer' })
vim.lsp.enable({ 'lua_ls', 'html', 'cssls', 'bashls', 'ts_ls', 'eslint', 'tailwindcss', 'mdx_analyzer', 'rust_analyzer' })
-- mdx_analyzer: needs typescript SDK path to find tsserverlibrary.js
vim.lsp.config('mdx_analyzer', {
@ -111,5 +111,10 @@ return {
})
vim.lsp.enable('qmlls')
-- vim.lsp.config('postgres_lsp', {
-- cmd = { 'postgres-language-server', 'lsp-proxy' },
-- })
vim.lsp.enable('postgres_lsp')
end,
}

View File

@ -34,6 +34,7 @@ return {
'ts_ls',
'eslint',
'tailwindcss',
'rust_analyzer',
},
})

View File

@ -0,0 +1,8 @@
return {
'MeanderingProgrammer/render-markdown.nvim',
dependencies = {
'nvim-treesitter/nvim-treesitter',
'nvim-mini/mini.nvim',
},
}

View File

@ -1,4 +1,4 @@
export PATH="/home/johannes/.local/bin:$PATH"
export PATH="/home/johannes/.local/bin:/home/johannes/.cargo/bin:$PATH"
# pnpm
export PNPM_HOME="$HOME/.local/share/pnpm"
case ":$PATH:" in