Compare commits
12 Commits
switch-to-
...
4bc368dfd9
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bc368dfd9 | |||
| ef0efe4ba8 | |||
| 7ac7ced990 | |||
| f16af76867 | |||
| 9fbffb7558 | |||
| 545f8ab328 | |||
| 4093701fca | |||
| 7c918c3c17 | |||
| 4ae85ca347 | |||
| 653a75cc18 | |||
| 42bae035ee | |||
| e0fcb2988f |
@ -14,6 +14,12 @@ set incsearch
|
||||
set hlsearch
|
||||
set scrolloff=10
|
||||
|
||||
let mapleader = " "
|
||||
let maplocalleader = " "
|
||||
|
||||
" Binds
|
||||
nnoremap gr :action ShowUsages<CR>
|
||||
inoremap <C-e> <Esc>i
|
||||
|
||||
nnoremap <C-w>m :action MoveEditorToOppositeTabGroup<CR>
|
||||
nnoremap <leader>m :action MoveEditorToOppositeTabGroup<CR>
|
||||
|
||||
@ -67,4 +67,4 @@ aur_packages:
|
||||
- pgformatter-git
|
||||
# - jetbrains-toolbox
|
||||
|
||||
config_dir: "{{ ansible_facts.env.HOME }}/.config"
|
||||
config_dir: "/home/johannes/.config"
|
||||
|
||||
@ -1,2 +1,2 @@
|
||||
[local]
|
||||
localhost ansible_connection=local ansible_user=johannes
|
||||
localhost ansible_connection=local ansible_user=johannes ansible_python_interpreter=/usr/sbin/python
|
||||
|
||||
14
playbook.yml
14
playbook.yml
@ -8,13 +8,13 @@
|
||||
# roles:
|
||||
# - zsh
|
||||
|
||||
pre_tasks:
|
||||
- name: Create btrfs snapshot before changes
|
||||
shell: |
|
||||
sudo btrfs subvolume snapsho / /.snapshots/before-dotfiles-$(date +%Y%m%d-%H%M%S)
|
||||
tags: [snapshot]
|
||||
become: true
|
||||
become_method: sudo
|
||||
# pre_tasks:
|
||||
# - name: Create btrfs snapshot before changes
|
||||
# shell: |
|
||||
# btrfs subvolume snapshot / /.snapshots/before-dotfiles-$(date +%Y%m%d-%H%M%S)
|
||||
# tags: [snapshot]
|
||||
# become: true
|
||||
# become_method: sudo
|
||||
|
||||
tasks:
|
||||
- name: Install enabled roles
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
# Ctrl+Backspace -> backward-kill-word (send ESC + DEL)
|
||||
# keybind = ctrl+delete=text:\x1b\x7f
|
||||
|
||||
shell-integration = zsh
|
||||
shell-integration-features = cursor,sudo,title
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ source = ./workspaces.conf
|
||||
|
||||
$terminal = ghostty
|
||||
$fileManager = thunar
|
||||
$menu = wofi --show drun
|
||||
$menu = env XDG_CURRENT_DESKTOP=Hyprland wofi --show drun
|
||||
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
@ -23,11 +23,20 @@ $menu = wofi --show drun
|
||||
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# Or execute your favorite apps at launch like this:
|
||||
exec-once = waybar
|
||||
# exec-once = waybar
|
||||
exec-once = /usr/lib/hyprpolkitagent/hyprpolkitagent
|
||||
exec-once = hyprpanel
|
||||
exec-once = dunst
|
||||
exec-once = firefox
|
||||
exec-once = hyprpaper
|
||||
exec-once = spotify
|
||||
exec-once = [workspace 9 silent] deezer-desktop
|
||||
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
|
||||
# exec-once = systemctl --user stop xdg-desktop-portal-hyprland xdg-desktop-portal-gtk xdg-desktop-portal
|
||||
# exec-once = systemctl --user start xdg-desktop-portal-hyprland
|
||||
debug:disable_logs = false
|
||||
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
@ -38,6 +47,9 @@ env = XCURSOR_SIZE,24
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
env = QT_QPA_PLATFORM,waylandl;xcb
|
||||
env = QT_QPA_PLATFORMTHEME,qt5ct
|
||||
env = QT_WAYLAND_DISABLE_WINDOWDECORATION,1
|
||||
env = QT_AUTO_SCREEN_SCALE_FACTOR,1
|
||||
# env = QT_STYLE_OVERRIDE,kvantum
|
||||
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
env = XDG_SESSION_TYPE,wayland
|
||||
@ -50,6 +62,10 @@ env = GDK_BACKEND,wayland,x11
|
||||
env = _JAVA_AWT_WM_NONREPARENTING, 1
|
||||
# env = AWT_TOOLKIT, MToolkit
|
||||
|
||||
# Force Hyprland to use the RX 9070 XT
|
||||
# env = AQ_DRM_DEVICES,$HOME/.config/hypr/dgpu
|
||||
# env = WLR_DRM_DEVICES,$HOME/.config/hypr/dgpu
|
||||
|
||||
###################
|
||||
### PERMISSIONS ###
|
||||
###################
|
||||
@ -128,15 +144,19 @@ decoration {
|
||||
}
|
||||
}
|
||||
|
||||
# wofi
|
||||
layerrule = blur, wofi # apply compositor blur
|
||||
layerrule = ignorezero, wofi # keep blur even on near-opaque colors
|
||||
layerrule = dimaround, wofi # optional: dim background behind wofi
|
||||
layerrule = ignorealpha 0.90, wofi # target overall opacity for the layer
|
||||
cursor {
|
||||
no_hardware_cursors = true
|
||||
}
|
||||
|
||||
# waybar
|
||||
layerrule = blur, waybar
|
||||
layerrule = ignorealpha 0.15, waybar
|
||||
# wofi
|
||||
# layerrule = blur, wofi # apply compositor blur
|
||||
# layerrule = ignorezero, wofi # keep blur even on near-opaque colors
|
||||
# layerrule = dimaround, wofi # optional: dim background behind wofi
|
||||
# layerrule = ignorealpha 0.90, wofi # target overall opacity for the layer
|
||||
#
|
||||
# # waybar
|
||||
# layerrule = blur, waybar
|
||||
# layerrule = ignorealpha 0.15, waybar
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#animations
|
||||
animations {
|
||||
@ -203,18 +223,18 @@ misc {
|
||||
|
||||
# https://wiki.hypr.land/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_layout = us,de
|
||||
kb_variant = altgr-intl
|
||||
kb_model =
|
||||
kb_options =
|
||||
# kb_options = grp:caps_toggle
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 2
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
scroll_method = on_button_down
|
||||
scroll_button = 274
|
||||
# scroll_method = on_button_down
|
||||
# scroll_button = 274
|
||||
}
|
||||
|
||||
# Example per-device config
|
||||
@ -236,11 +256,13 @@ bind = $mainMod, Q, killactive,
|
||||
bind = $mainMod, N, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, Space, exec, $menu
|
||||
bind = $mainMod, G, togglesplit, # dwindle
|
||||
bind = $mainMod, F, fullscreen
|
||||
bind = $mainMod, G, layoutmsg, togglesplit # dwindle
|
||||
bind = $mainMod, F, fullscreen, 1
|
||||
bind = $mainMod SHIFT, F, fullscreen, 0
|
||||
bind = $mainMod, B, exec, firefox
|
||||
bind = $mainMod, M, exec, thunderbird
|
||||
bind = $mainMod, L, exec, hyprlock
|
||||
bind = $mainMod, P, pseudo
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, left, movefocus, l
|
||||
@ -252,6 +274,14 @@ bind = $mainMod SHIFT, left, movewindow, l
|
||||
bind = $mainMod SHIFT, right, movewindow, r
|
||||
bind = $mainMod SHIFT, up, movewindow, u
|
||||
bind = $mainMod SHIFT, down, movewindow, d
|
||||
bind = $mainMod SHIFT, comma, movewindow, mon:+1
|
||||
bind = $mainMod SHIFT, period, movewindow, mon:-1
|
||||
|
||||
# Resize
|
||||
binde = $mainMod ALT, left, resizeactive, -20 0
|
||||
binde = $mainMod ALT, right, resizeactive, 20 0
|
||||
binde = $mainMod ALT, up, resizeactive, 0 -20
|
||||
binde = $mainMod ALT, down, resizeactive, 0 20
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
@ -274,12 +304,12 @@ bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
|
||||
|
||||
# Requires playerctl
|
||||
# Spotify controls
|
||||
bind = CTRL ALT, K, exec, playerctl --player=spotify play-pause
|
||||
bind = CTRL ALT, Left, exec, playerctl --player=spotify previous
|
||||
bind = CTRL ALT, Right, exec, playerctl --player=spotify next
|
||||
bind = CTRL ALT, Up, exec, playerctl --player=spotify volume 0.05+
|
||||
bind = CTRL ALT, Down, exec, playerctl --player=spotify volume 0.05-
|
||||
# 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 = ,F7,pass,class:^(discord)$
|
||||
bind = ,F8,pass,class:^(discord)$
|
||||
@ -297,11 +327,54 @@ bind = , Print, exec, hyprshot -zm region
|
||||
# See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
windowrule = suppressevent maximize, class:.*
|
||||
windowrule {
|
||||
name = suppress-maximize-events
|
||||
match:class = .*
|
||||
|
||||
suppress_event = maximize
|
||||
}
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||
windowrule {
|
||||
name = fix-xwayland-drags
|
||||
match:class = ^$
|
||||
match:title = ^$
|
||||
match:xwayland = true
|
||||
match:float = true
|
||||
match:fullscreen = false
|
||||
match:pin = false
|
||||
|
||||
windowrulev2 = tag +jb, class:^jetbrains-.+$,floating:1
|
||||
windowrulev2 = stayfocused, tag:jb
|
||||
windowrulev2 = noinitialfocus, tag:jb
|
||||
no_focus = true
|
||||
}
|
||||
|
||||
windowrule {
|
||||
name = jetbrains-shortcuts
|
||||
match:class = ^(jetbrains-.*|android-studio)$
|
||||
|
||||
no_shortcuts_inhibit = 1
|
||||
}
|
||||
|
||||
windowrule {
|
||||
name = jetbrains-tile
|
||||
match:class = ^(jetbrains-.*|android-studio)$
|
||||
float = 0
|
||||
}
|
||||
|
||||
windowrule {
|
||||
name = jetbrains-tab-drag
|
||||
match:class = ^(jetbrains-.*|android-studio)$
|
||||
match:title = ^(\s*|Delete|Replace All)$
|
||||
|
||||
no_initial_focus = 1
|
||||
stay_focused = 1
|
||||
float = 1
|
||||
center = 1
|
||||
}
|
||||
|
||||
windowrule {
|
||||
name = jetbrains-commit-preview
|
||||
match:class = ^(jetbrains-.*|android-studio)$
|
||||
match:title = ^Commit.*$
|
||||
|
||||
float = 0
|
||||
}
|
||||
|
||||
@ -1,7 +1,24 @@
|
||||
preload = /home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
|
||||
wallpaper = DP-1,/home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
wallpaper = DP-2,/home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
wallpaper = HDMI-A-2,/home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
wallpaper {
|
||||
monitor = DP-1
|
||||
path =/home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
# fitmode = cover
|
||||
}
|
||||
wallpaper {
|
||||
monitor = DP-2
|
||||
path =/home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
# fitmode = cover
|
||||
}
|
||||
wallpaper {
|
||||
monitor = HDMI-A-1
|
||||
path =/home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
# fitmode = cover
|
||||
}
|
||||
wallpaper {
|
||||
monitor = HDMI-A-2
|
||||
path =/home/johannes/Pictures/Wallpapers/wallhaven-5g22q5.png
|
||||
# fitmode = cover
|
||||
}
|
||||
|
||||
splash = false
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
# Generated by nwg-displays on 2025-09-09 at 19:00:43. Do not edit manually.
|
||||
# Generated by nwg-displays on 2026-02-28 at 11:47:04. Do not edit manually.
|
||||
|
||||
monitor=DP-1,2560x1440@165.0,6626x876,1.0
|
||||
monitor=DP-2,2560x1440@165.0,4066x876,1.0
|
||||
monitor=HDMI-A-1,0x0@60.0,-1x-1,1.0
|
||||
monitor=HDMI-A-1,disable
|
||||
monitor=HDMI-A-2,1920x1080@60.0,9186x396,1.0
|
||||
monitor=HDMI-A-2,transform,3
|
||||
34
roles/hyprland/files/hypr/scripts/close-monokai-popup.sh
Executable file
34
roles/hyprland/files/hypr/scripts/close-monokai-popup.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
SOCKET="$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock"
|
||||
|
||||
handle_line() {
|
||||
local line="$1"
|
||||
|
||||
# Split into EVENT and DATA (EVENT>>DATA)
|
||||
local event="${line%%>>*}"
|
||||
local data="${line#*>>}"
|
||||
|
||||
echo "$data" > "$HOME/close_popup.tmp.txt"
|
||||
|
||||
case "$event" in
|
||||
openwindow)
|
||||
# Data format:
|
||||
# WINDOWADDRESS,WORKSPACENAME,WINDOWCLASS,WINDOWTITLE
|
||||
local addr ws class title
|
||||
|
||||
IFS=, read -r addr ws class title <<< "$data"
|
||||
# echo "$data" > $HOME/close_popup.tmp.txt
|
||||
|
||||
if [[ "$class" == "jetbrains-webstorm" && "$title" == "Monokai Pro Trial" ]]; then
|
||||
# closewindow expects address with 0x prefix
|
||||
hyprctl dispatch closewindow "address:0x$addr"
|
||||
# echo "$data" > "$HOME/close_popup.tmp.txt"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
socat -U - UNIX-CONNECT:$SOCKET | while read -r line; do
|
||||
handle_line "$line";
|
||||
done
|
||||
77
roles/hyprland/files/hypr/scripts/deezer-volume.sh
Executable file
77
roles/hyprland/files/hypr/scripts/deezer-volume.sh
Executable file
@ -0,0 +1,77 @@
|
||||
#!/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"
|
||||
|
||||
34
roles/hyprland/files/hypr/workspaces_jk-nb.conf
Normal file
34
roles/hyprland/files/hypr/workspaces_jk-nb.conf
Normal file
@ -0,0 +1,34 @@
|
||||
$mainMod = SUPER # Sets "Super" key as main modifier
|
||||
|
||||
workspace = 1, persistent:true, default:true
|
||||
workspace = 2, persistent:true
|
||||
workspace = 3, persistent:true
|
||||
workspace = 4, persistent:true
|
||||
workspace = 5, persistent:true
|
||||
workspace = 6, persistent:true
|
||||
workspace = 7, persistent:true
|
||||
workspace = 8, persistent:true
|
||||
workspace = 9, persistent:true
|
||||
workspace = 10, persistent:true
|
||||
|
||||
bind = $mainMod, 1, exec, hyprctl --batch "dispatch workspace 1;"
|
||||
bind = $mainMod, 2, exec, hyprctl --batch "dispatch workspace 2;"
|
||||
bind = $mainMod, 3, exec, hyprctl --batch "dispatch workspace 3;"
|
||||
bind = $mainMod, 4, exec, hyprctl --batch "dispatch workspace 4;"
|
||||
bind = $mainMod, 5, exec, hyprctl --batch "dispatch workspace 5;"
|
||||
bind = $mainMod, 6, exec, hyprctl --batch "dispatch workspace 6;"
|
||||
bind = $mainMod, 7, exec, hyprctl --batch "dispatch workspace 7;"
|
||||
bind = $mainMod, 8, exec, hyprctl --batch "dispatch workspace 8;"
|
||||
bind = $mainMod, 9, exec, hyprctl --batch "dispatch workspace 9;"
|
||||
bind = $mainMod, 0, exec, hyprctl --batch "dispatch workspace 10;"
|
||||
|
||||
bind = $mainMod SHIFT, 1, movetoworkspacesilent, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspacesilent, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspacesilent, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspacesilent, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspacesilent, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspacesilent, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspacesilent, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspacesilent, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspacesilent, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspacesilent, 10
|
||||
@ -6,9 +6,9 @@ workspace = 3, monitor:DP-1, persistent:true
|
||||
workspace = 4, monitor:DP-2, persistent:true, default:true
|
||||
workspace = 5, monitor:DP-2, persistent:true
|
||||
workspace = 6, monitor:DP-2, persistent:true
|
||||
workspace = 7, monitor:HDMI-A-2, persistent:true, default:true
|
||||
workspace = 7, monitor:HDMI-A-2, persistent:true
|
||||
workspace = 8, monitor:HDMI-A-2, persistent:true
|
||||
workspace = 9, monitor:HDMI-A-2, persistent:true
|
||||
workspace = 9, monitor:HDMI-A-2, persistent:true, default:true
|
||||
workspace = 10, monitor:HDMI-A-1, persistent:true, default:true
|
||||
|
||||
bind = $mainMod, 1, exec, hyprctl --batch "dispatch focusmonitor DP-1; dispatch workspace 1;"
|
||||
45
roles/hyprland/files/hyprpanel/config.json
Normal file
45
roles/hyprland/files/hyprpanel/config.json
Normal file
@ -0,0 +1,45 @@
|
||||
{
|
||||
"bar.customModules.storage.paths": [
|
||||
"/"
|
||||
],
|
||||
"menus.power.showLabel": false,
|
||||
"theme.font.size": "1rem",
|
||||
"theme.font.weight": 500,
|
||||
"scalingPriority": "gdk",
|
||||
"menus.power.lowBatteryNotification": false,
|
||||
"bar.customModules.worldclock.tz": [
|
||||
"Europe/Vienna"
|
||||
],
|
||||
"theme.bar.buttons.modules.power.enableBorder": false,
|
||||
"menus.dashboard.powermenu.avatar.image": "/home/johannes/Pictures/Wallpapers/wallhaven-852q62.png",
|
||||
"menus.dashboard.shortcuts.left.shortcut1.tooltip": "Firefox",
|
||||
"menus.dashboard.shortcuts.left.shortcut1.command": "firefox",
|
||||
"menus.dashboard.shortcuts.left.shortcut1.icon": "",
|
||||
"menus.clock.time.military": true,
|
||||
"menus.clock.weather.location": "Vienna",
|
||||
"menus.clock.weather.unit": "metric",
|
||||
"menus.volume.raiseMaximumVolume": true,
|
||||
"theme.bar.floating": true,
|
||||
"bar.autoHide": "never",
|
||||
"theme.bar.buttons.enableBorders": true,
|
||||
"theme.bar.border.width": "0.1em",
|
||||
"bar.workspaces.show_icons": false,
|
||||
"bar.workspaces.show_numbered": false,
|
||||
"bar.workspaces.workspaceMask": false,
|
||||
"bar.workspaces.showWsIcons": true,
|
||||
"bar.workspaces.showApplicationIcons": true,
|
||||
"bar.workspaces.showAllActive": true,
|
||||
"bar.workspaces.numbered_active_indicator": "highlight",
|
||||
"theme.bar.buttons.workspaces.smartHighlight": true,
|
||||
"theme.bar.buttons.windowtitle.enableBorder": false,
|
||||
"bar.windowtitle.custom_title": true,
|
||||
"bar.windowtitle.class_name": true,
|
||||
"theme.bar.buttons.clock.enableBorder": false,
|
||||
"bar.clock.format": "%a %b %d %H:%M:%S",
|
||||
"theme.bar.menus.menu.battery.scaling": 100,
|
||||
"theme.bar.buttons.battery.visible": false,
|
||||
"bar.battery.label": false,
|
||||
"bar.battery.hideLabelWhenFull": true,
|
||||
"theme.bar.buttons.battery.enableBorder": false,
|
||||
"theme.osd.enable": true
|
||||
}
|
||||
1
roles/hyprland/files/hyprpanel/modules.json
Normal file
1
roles/hyprland/files/hyprpanel/modules.json
Normal file
@ -0,0 +1 @@
|
||||
{}
|
||||
0
roles/hyprland/files/hyprpanel/modules.scss
Normal file
0
roles/hyprland/files/hyprpanel/modules.scss
Normal file
@ -8,10 +8,8 @@
|
||||
"margin-right": 10, // gap from the right edge
|
||||
"margin-bottom": 0,
|
||||
|
||||
/* order: 1-2-3 | window-title | tray + clock */
|
||||
// "modules-left": [ "custom/group1", "custom/group2", "custom/group3", "custom/group4","custom/group5","custom/group6","custom/group7","custom/group8","custom/group9","custom/group10"],
|
||||
"modules-left": ["hyprland/workspaces"],
|
||||
"modules-center": [ "hyprland/window" ],
|
||||
"modules-center": ["wlr/taskbar"],
|
||||
"modules-right": [ "tray", "custom/separator", "network", "bluetooth", "custom/separator", "disk", "cpu", "memory", "pulseaudio", "custom/separator", "clock"],
|
||||
|
||||
|
||||
@ -19,7 +17,7 @@
|
||||
"disable-scroll": true,
|
||||
"all-outputs": true,
|
||||
"warp-on-scroll": false,
|
||||
"format": "{icon}",
|
||||
"format": "{icon}{windows}",
|
||||
"format-icons": {
|
||||
"1": "1",
|
||||
"2": "2",
|
||||
@ -32,6 +30,29 @@
|
||||
"9": "9",
|
||||
"10": "0"
|
||||
},
|
||||
"window-rewrite-default": " ",
|
||||
"format-window-separator": "",
|
||||
"window-rewrite": {
|
||||
"class<firefox>": " ",
|
||||
"class<com.mitchellh.ghostty>": " ",
|
||||
"class<com.mitchellh.ghostty> title<vim.*>": " ",
|
||||
"class<Spotify>": " ",
|
||||
"class<QOwnNotes>": " ",
|
||||
"class<thunderbird>": " ",
|
||||
"class<thunar>": " ",
|
||||
"class<jetbrains-webstorm>": " ",
|
||||
"class<jetbrains-pycharm>": " ",
|
||||
"class<steam>": " ",
|
||||
"class<discord>": " "
|
||||
// "": "",
|
||||
// "": "",
|
||||
// "": "",
|
||||
// "": "",
|
||||
// "": "",
|
||||
// "": "",
|
||||
// "": "",
|
||||
// "": ""
|
||||
},
|
||||
"persistent-workspaces": {
|
||||
"1": [],
|
||||
"2": [],
|
||||
@ -47,7 +68,14 @@
|
||||
},
|
||||
|
||||
|
||||
"hyprland/window": { "format": "{title}", "max-length": 60 },
|
||||
// "hyprland/window": { "format": "{title}", "max-length": 60 },
|
||||
"wlr/taskbar": {
|
||||
"format": "{icon}",
|
||||
"icon-theme": "Ars-Dark-Icons",
|
||||
"tooltip-format": "{title}",
|
||||
"on-click": "activate",
|
||||
"on-click-middle": "close"
|
||||
},
|
||||
"tray": { "icon-size": 16, "spacing": 10 },
|
||||
|
||||
"pulseaudio": {
|
||||
|
||||
@ -60,7 +60,7 @@ window#waybar {
|
||||
#tray menu menuitem:hover { background: alpha(@accent1, 0.16); }
|
||||
|
||||
#workspaces button {
|
||||
padding: 0 8px;
|
||||
padding: 0 2px;
|
||||
background-color: transparent;
|
||||
color: #6c7086;
|
||||
border-radius: 3px;
|
||||
|
||||
@ -1,8 +1,47 @@
|
||||
---
|
||||
- name: Symlink hyprland
|
||||
- name: Check if hypr path is a symlink
|
||||
stat:
|
||||
path: "{{ config_dir }}/hypr"
|
||||
register: hypr_stat
|
||||
|
||||
- name: Remove existing hypr symlink if present
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr"
|
||||
dest: "{{ config_dir }}/hypr"
|
||||
path: "{{ config_dir }}/hypr"
|
||||
state: absent
|
||||
when: hypr_stat.stat.exists and hypr_stat.stat.islnk
|
||||
|
||||
- name: Create hypr config directory
|
||||
file:
|
||||
path: "{{ config_dir }}/hypr"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
owner: johannes
|
||||
group: johannes
|
||||
|
||||
- name: Symlink hyprland config files
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr/{{ item }}"
|
||||
dest: "{{ config_dir }}/hypr/{{ item }}"
|
||||
state: link
|
||||
force: true
|
||||
loop:
|
||||
- hyprland.conf
|
||||
- hyprlock.conf
|
||||
- hyprpaper.conf
|
||||
# - workspaces.conf
|
||||
- scripts
|
||||
|
||||
- name: Symlink host-specific monitors.conf
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr/monitors_{{ ansible_hostname }}.conf"
|
||||
dest: "{{ config_dir }}/hypr/monitors.conf"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Symlink host-specific workspaces.conf
|
||||
file:
|
||||
src: "{{ role_path }}/files/hypr/workspaces_{{ ansible_hostname }}.conf"
|
||||
dest: "{{ config_dir }}/hypr/workspaces.conf"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
@ -27,3 +66,9 @@
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: Symlink hyprpanel
|
||||
file:
|
||||
src: "{{ role_path }}/files/hyprpanel"
|
||||
dest: "{{ config_dir }}/hyprpanel"
|
||||
state: link
|
||||
force: true
|
||||
|
||||
@ -1,41 +1,39 @@
|
||||
{
|
||||
"LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "2b3cbcdd980cae1e022409289245053f62fb50f6" },
|
||||
"auto-session": { "branch": "main", "commit": "ee320d7a59c1dfe83df7c9d58150d9f194690d53" },
|
||||
"LuaSnip": { "branch": "master", "commit": "5a1e39223db9a0498024a77b8441169d260c8c25" },
|
||||
"alpha-nvim": { "branch": "main", "commit": "a9d8fb72213c8b461e791409e7feabb74eb6ce73" },
|
||||
"auto-session": { "branch": "main", "commit": "62437532b38495551410b3f377bcf4aaac574ebe" },
|
||||
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
|
||||
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
|
||||
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
|
||||
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
|
||||
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
|
||||
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
|
||||
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
|
||||
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||
"dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "65b7399804315a1160933b64292d3c5330aa4e9f" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "cdd3527e251f96eb0527162b156ad839286fcd97" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "d79a1c3299ad0ef94e255d045bed9fa26025dab6" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" },
|
||||
"mason.nvim": { "branch": "main", "commit": "4da89f3ab04783da990f9bd40aaa36c22e59375b" },
|
||||
"monokai-nightasty.nvim": { "branch": "main", "commit": "8182c45dcaf82e7316cfda6d439ee8ad783ae594" },
|
||||
"neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "924fe88a9983c7d90dbb31fc4e3129a583ea0a90" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "3ce66bc62eb363f19cceeb1fae2e71ea2bede56d" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "9744b738183a5adca0f916527922078a965515ed" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "4d3b3bb8815fbe37bcaf3dbdb12a22382bc11ebe" },
|
||||
"nvim-surround": { "branch": "main", "commit": "7a7a78a52219a3312c1fcabf880cea07a7956a5f" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "a9156c013916d3c8a2905ab2e26e9dd74beb642e" },
|
||||
"flutter-tools.nvim": { "branch": "main", "commit": "677cc07c16e8b89999108d2ebeefcfc5f539b73c" },
|
||||
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
|
||||
"lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" },
|
||||
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
|
||||
"lspkind.nvim": { "branch": "master", "commit": "c7274c48137396526b59d86232eabcdc7fed8a32" },
|
||||
"lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
|
||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "a676ab7282da8d651e175118bcf54483ca11e46d" },
|
||||
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
|
||||
"mason.nvim": { "branch": "main", "commit": "44d1e90e1f66e077268191e3ee9d2ac97cc18e65" },
|
||||
"monokai-nightasty.nvim": { "branch": "main", "commit": "8be5e1c6e1d59873505e81b161e923264dfa5c1a" },
|
||||
"none-ls-extras.nvim": { "branch": "main", "commit": "c6fa39ac52814182c05552cb5d3750cae23ff0f0" },
|
||||
"none-ls.nvim": { "branch": "main", "commit": "c9317c2a8629d4e39e7cf47be74cb67f3ab37cda" },
|
||||
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
|
||||
"nvim-cmp": { "branch": "main", "commit": "da88697d7f45d16852c6b2769dc52387d1ddc45f" },
|
||||
"nvim-lsp-file-operations": { "branch": "master", "commit": "b9c795d3973e8eec22706af14959bc60c579e771" },
|
||||
"nvim-lspconfig": { "branch": "master", "commit": "1d13d2b0df9a0a02904c76d7ad6810f71d404406" },
|
||||
"nvim-surround": { "branch": "main", "commit": "61319d4bd1c5e336e197defa15bd104c51f0fb29" },
|
||||
"nvim-tree.lua": { "branch": "master", "commit": "b3772adec8db61ba9098c5624a0823a77be3a23d" },
|
||||
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "4a8369f4c78ef6f6f895f0cec349e48f74330574" },
|
||||
"nvim-ts-autotag": { "branch": "main", "commit": "8e1c0a389f20bf7f5b0dd0e00306c1247bda2595" },
|
||||
"nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
|
||||
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
|
||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
|
||||
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
|
||||
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
|
||||
"venv-selector.nvim": { "branch": "regexp", "commit": "c677caa1030808a9f90092e522de7cc20c1390dd" },
|
||||
"vim-floaterm": { "branch": "master", "commit": "fd4bdd66eca56c6cc59f2119e4447496d8cde2ea" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
|
||||
"vim-floaterm": { "branch": "master", "commit": "0ab5eb8135dc884bc543a819ac7033c15e72a76b" },
|
||||
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||
}
|
||||
|
||||
@ -29,12 +29,36 @@ return {
|
||||
|
||||
local opts = { silent = true, noremap = true }
|
||||
|
||||
local function git_branch()
|
||||
local branch = vim.trim(vim.fn.system('git branch --show-current 2>/dev/null'))
|
||||
if vim.v.shell_error ~= 0 or branch == '' then return nil end
|
||||
return branch
|
||||
end
|
||||
|
||||
local function session_save()
|
||||
local branch = git_branch()
|
||||
if branch then
|
||||
vim.cmd('AutoSession save ' .. branch)
|
||||
else
|
||||
vim.cmd('AutoSession save')
|
||||
end
|
||||
end
|
||||
|
||||
local function session_restore()
|
||||
local branch = git_branch()
|
||||
if branch then
|
||||
vim.cmd('AutoSession restore ' .. branch)
|
||||
else
|
||||
vim.cmd('AutoSession restore')
|
||||
end
|
||||
end
|
||||
|
||||
local keymap = vim.keymap
|
||||
keymap.set('n', '<leader>ss', '<cmd>SessionSave<cr>', opts)
|
||||
keymap.set('n', '<leader>sq', '<cmd>SessionSave<cr><cmd>wa<cr><cmd>qa<cr>', opts)
|
||||
keymap.set('n', '<leader>sl', '<cmd>SessionSearch<cr>', opts)
|
||||
keymap.set('n', '<leader>sr', '<cmd>SessionRestore<cr>', opts)
|
||||
keymap.set('n', '<leader>sd', '<cmd>Autosession delete<cr>', opts)
|
||||
keymap.set('n', '<leader>ss', session_save, opts)
|
||||
keymap.set('n', '<leader>sq', function() session_save(); vim.cmd('wa | qa') end, opts)
|
||||
keymap.set('n', '<leader>sl', '<cmd>AutoSession search<cr>', opts)
|
||||
keymap.set('n', '<leader>sr', session_restore, opts)
|
||||
keymap.set('n', '<leader>sd', '<cmd>AutoSession delete<cr>', opts)
|
||||
|
||||
local function named_save()
|
||||
vim.ui.input({ prompt = 'Enter Session name: ' }, function(input)
|
||||
|
||||
@ -39,6 +39,7 @@ return {
|
||||
['<Enter>'] = cmp.mapping.confirm({ select = true }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = 'lazydev', group_index = 0 },
|
||||
{ name = 'nvim_lsp' },
|
||||
{ name = 'luasnip' },
|
||||
{ name = 'buffer' },
|
||||
|
||||
@ -8,7 +8,7 @@ return {
|
||||
'LazyGitFilter',
|
||||
'LazyGitFilterCurrentFile',
|
||||
},
|
||||
depedencies = {
|
||||
dependencies = {
|
||||
'nvim-lua/plenary.nvim',
|
||||
},
|
||||
}
|
||||
|
||||
@ -2,14 +2,21 @@ return {
|
||||
'neovim/nvim-lspconfig',
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
dependencies = {
|
||||
'williamboman/mason.nvim',
|
||||
'mason-org/mason.nvim',
|
||||
'mason-org/mason-lspconfig.nvim',
|
||||
'hrsh7th/cmp-nvim-lsp',
|
||||
{ 'antosha417/nvim-lsp-file-operations', config = true },
|
||||
{ 'folke/neodev.nvim', opts = {} },
|
||||
{
|
||||
'folke/lazydev.nvim',
|
||||
ft = 'lua',
|
||||
opts = {
|
||||
library = {
|
||||
{ path = '${3rd}/luv/library', words = { 'vim%.uv' } },
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
local lspconfig = require('lspconfig')
|
||||
local mason_lspconfig = require('mason-lspconfig')
|
||||
local cmp_nvim_lsp = require('cmp_nvim_lsp')
|
||||
local keymap = vim.keymap
|
||||
local wk = require('which-key')
|
||||
@ -21,13 +28,12 @@ return {
|
||||
return { desc = desc, buffer = ev.buf, silent = true }
|
||||
end
|
||||
|
||||
keymap.set('n', 'gr', vim.lsp.buf.rename, opts('Rename'))
|
||||
keymap.set('n', 'K', vim.lsp.buf.hover, opts('Show documentation'))
|
||||
keymap.set('n', 'gR', '<cmd>Telescope lsp_references<cr>', opts('Show LSP references'))
|
||||
keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<cr>', opts('Go to definition'))
|
||||
keymap.set('n', 'gr', '<cmd>Telescope lsp_references<cr>', opts('Show LSP references'))
|
||||
keymap.set('n', 'gD', vim.lsp.buf.declaration, opts('Go to declaration'))
|
||||
keymap.set('n', 'gd', '<cmd>Telescope lsp_definitions<cr>', opts('Show LSP definitions'))
|
||||
keymap.set('n', 'gi', '<cmd>Telescope lsp_implementations<cr>', opts('Show LSP implementations'))
|
||||
keymap.set('n', 'gt', '<cmd>Telescope lsp_type_definitions<cr>', opts('Show LSP type definitions'))
|
||||
keymap.set('n', 'K', vim.lsp.buf.hover, opts('Show documentation'))
|
||||
keymap.set('n', 'gE', vim.diagnostic.open_float, opts('Show diagnostics'))
|
||||
keymap.set({ 'n', 'v' }, 'ga', vim.lsp.buf.code_action, opts('Show available code actions'))
|
||||
wk.add({
|
||||
@ -37,89 +43,58 @@ return {
|
||||
end,
|
||||
})
|
||||
|
||||
-- Apply default capabilities to all servers
|
||||
local capabilities = cmp_nvim_lsp.default_capabilities()
|
||||
mason_lspconfig.setup_handlers({
|
||||
-- default handler for installed servers
|
||||
function(server_name)
|
||||
lspconfig[server_name].setup({
|
||||
capabilities = capabilities,
|
||||
})
|
||||
end,
|
||||
-- TODO add lsp configs
|
||||
['lua_ls'] = function()
|
||||
lspconfig['lua_ls'].setup({
|
||||
capabilities = capabilities,
|
||||
vim.lsp.config('*', { capabilities = capabilities })
|
||||
|
||||
-- lua_ls: suppress vim global warnings, improve completion
|
||||
vim.lsp.config('lua_ls', {
|
||||
settings = {
|
||||
Lua = {
|
||||
diagnostics = {
|
||||
globals = { 'vim' },
|
||||
},
|
||||
completion = {
|
||||
callSnippet = 'Replace'
|
||||
callSnippet = 'Replace',
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
})
|
||||
end,
|
||||
['emmet_ls'] = function()
|
||||
-- capabilities.textDocument.completion.completionItem.snippetSupport = true
|
||||
lspconfig['emmet_ls'].setup({
|
||||
capabilities = capabilities,
|
||||
|
||||
-- ts_ls: TypeScript/JavaScript/JSX/TSX
|
||||
vim.lsp.config('ts_ls', {
|
||||
cmd = { 'typescript-language-server', '--stdio' },
|
||||
filetypes = {
|
||||
'html',
|
||||
'css',
|
||||
'sass',
|
||||
'scss',
|
||||
'less',
|
||||
'javascript',
|
||||
'javascriptreact',
|
||||
'typescript',
|
||||
'typescriptreact',
|
||||
'svelte',
|
||||
'vue',
|
||||
}
|
||||
})
|
||||
end,
|
||||
['ts_ls'] = function()
|
||||
lspconfig['ts_ls'].setup({
|
||||
capabilities = capabilities,
|
||||
cmd = { "typescript-language-server", "--stdio" },
|
||||
},
|
||||
init_options = {
|
||||
hostInfo = "neovim",
|
||||
-- preferences = {
|
||||
-- includePackagesJsonAutoImports = "on",
|
||||
-- }
|
||||
}
|
||||
hostInfo = 'neovim',
|
||||
},
|
||||
})
|
||||
|
||||
-- eslint: linting for JS/TS/React projects
|
||||
vim.lsp.config('eslint', {
|
||||
settings = {
|
||||
workingDirectories = { mode = 'auto' },
|
||||
},
|
||||
})
|
||||
|
||||
-- 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' })
|
||||
|
||||
-- hyprls: not managed by mason, enable manually
|
||||
vim.lsp.config('hyprls', {
|
||||
cmd = { 'hyprls' },
|
||||
filetypes = { 'hyprlang' },
|
||||
root_dir = function(fname)
|
||||
return vim.fn.getcwd()
|
||||
end,
|
||||
-- ['pyright'] = function()
|
||||
-- lspconfig['pyright'].setup({
|
||||
-- -- cmd = { "pyright-langserver", "--stdio" },
|
||||
-- -- filetypes = { "python" },
|
||||
-- -- root_dir = function(filename)
|
||||
-- -- return util.root_pattern(unpack(root_files))(filename) or util.path.dirname(filename)
|
||||
-- -- end,
|
||||
-- -- settings = {
|
||||
-- -- python = {
|
||||
-- -- analysis = {
|
||||
-- -- autoSearchPaths = true,
|
||||
-- -- diagnosticMode = "workspace",
|
||||
-- -- useLibraryCodeForTypes = true
|
||||
-- -- }
|
||||
-- -- }
|
||||
-- -- }
|
||||
-- capabilities = capabilities,
|
||||
-- settings = {
|
||||
-- python = {
|
||||
-- analysis = {
|
||||
-- useLibraryCodeForTypes = true,
|
||||
-- typeCheckingMode = "basic",
|
||||
-- -- configPath = vim.fn.expand('./pyrightconfig.json')
|
||||
-- }
|
||||
-- }
|
||||
-- },
|
||||
-- })
|
||||
-- end,
|
||||
})
|
||||
end
|
||||
vim.lsp.enable('hyprls')
|
||||
end,
|
||||
}
|
||||
|
||||
@ -1,7 +1,10 @@
|
||||
return {
|
||||
{ 'williamboman/mason.nvim', commit = '4da89f3' },
|
||||
{ 'williamboman/mason-lspconfig.nvim', commit = '1a31f82' },
|
||||
{ 'WhoIsSethDaniel/mason-tool-installer.nvim' },
|
||||
{
|
||||
'mason-org/mason.nvim',
|
||||
dependencies = {
|
||||
'mason-org/mason-lspconfig.nvim',
|
||||
'WhoIsSethDaniel/mason-tool-installer.nvim',
|
||||
},
|
||||
config = function()
|
||||
local mason = require('mason')
|
||||
local mason_lspconfig = require('mason-lspconfig')
|
||||
@ -10,14 +13,14 @@ return {
|
||||
mason.setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
package_installed = '✓',
|
||||
package_pending = '➜',
|
||||
package_uninstalled = '✗',
|
||||
},
|
||||
},
|
||||
pip = {
|
||||
upgrade_pip = true,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
mason_lspconfig.setup({
|
||||
@ -29,6 +32,8 @@ return {
|
||||
-- 'emmet_ls',
|
||||
'bashls',
|
||||
'ts_ls',
|
||||
'eslint',
|
||||
'tailwindcss',
|
||||
},
|
||||
})
|
||||
|
||||
@ -39,7 +44,8 @@ return {
|
||||
-- 'black',
|
||||
-- 'pylint',
|
||||
-- 'eslint_d',
|
||||
}
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
}
|
||||
|
||||
@ -8,7 +8,17 @@ return {
|
||||
|
||||
local sources = {
|
||||
null_ls.builtins.formatting.prettier.with({
|
||||
filetypes = { 'javascript', 'typescript', 'typescriptreact', 'css', 'html', 'json', 'markdown', 'yaml' }
|
||||
filetypes = {
|
||||
'javascript',
|
||||
'javascriptreact',
|
||||
'typescript',
|
||||
'typescriptreact',
|
||||
'css',
|
||||
'html',
|
||||
'json',
|
||||
'markdown',
|
||||
'yaml',
|
||||
},
|
||||
}),
|
||||
-- null_ls.builtins.formatting.black,
|
||||
-- null_ls.builtins.formatting.djlint,
|
||||
@ -19,16 +29,26 @@ return {
|
||||
|
||||
null_ls.setup({
|
||||
sources = sources,
|
||||
-- on_attach = function(client, bufnr)
|
||||
-- if client.server_capabilities.documentFormattingProvider then
|
||||
-- vim.
|
||||
-- end
|
||||
-- end,
|
||||
})
|
||||
|
||||
local keymap = vim.keymap
|
||||
local fmt_func = function()
|
||||
vim.lsp.buf.format({ async = true })
|
||||
local null_ls_active = false
|
||||
for _, client in ipairs(vim.lsp.get_clients({ bufnr = 0 })) do
|
||||
if client.name == "null-ls" then
|
||||
null_ls_active = true
|
||||
break
|
||||
end
|
||||
end
|
||||
vim.lsp.buf.format({
|
||||
async = true,
|
||||
filter = function(client)
|
||||
if null_ls_active then
|
||||
return client.name == "null-ls"
|
||||
end
|
||||
return true
|
||||
end,
|
||||
})
|
||||
end
|
||||
keymap.set('n', '<leader>ii', fmt_func, { noremap = true, silent = true })
|
||||
|
||||
|
||||
@ -13,9 +13,12 @@ return {
|
||||
-- local trouble = require('trouble')
|
||||
-- local trouble_telescope = require('trouble.sources.telescope')
|
||||
|
||||
local ignore_patterns = { "node_modules/" }
|
||||
|
||||
telescope.setup({
|
||||
defaults = {
|
||||
path_display = { 'smart' },
|
||||
file_ignore_patterns = ignore_patterns,
|
||||
},
|
||||
})
|
||||
|
||||
@ -26,9 +29,13 @@ return {
|
||||
local keymap = vim.keymap
|
||||
local builtin = require('telescope.builtin')
|
||||
|
||||
keymap.set('n', '<leader>ff', builtin.find_files, opts)
|
||||
keymap.set('n', '<leader>ff', function() builtin.find_files({ hidden = true }) end, opts)
|
||||
keymap.set('n', '<leader>fh', builtin.oldfiles, opts)
|
||||
keymap.set('n', '<leader>fs', builtin.live_grep, opts)
|
||||
keymap.set('n', '<leader>fs', function ()
|
||||
builtin.live_grep({
|
||||
file_ignore_patterns = vim.list_extend(vim.deepcopy(ignore_patterns), { "supabase/migrations/" })
|
||||
})
|
||||
end, opts)
|
||||
keymap.set('n', '<leader>fc', builtin.grep_string, opts)
|
||||
|
||||
local wk = require('which-key')
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
return {
|
||||
"linux-cultist/venv-selector.nvim",
|
||||
dependencies = {
|
||||
"neovim/nvim-lspconfig",
|
||||
-- "mfussenegger/nvim-dap", "mfussenegger/nvim-dap-python", --optional
|
||||
{ "nvim-telescope/telescope.nvim", branch = "0.1.x", dependencies = { "nvim-lua/plenary.nvim" } },
|
||||
},
|
||||
lazy = false,
|
||||
branch = "regexp", -- This is the regexp branch, use this for the new version
|
||||
config = function()
|
||||
require("venv-selector").setup({
|
||||
-- settings = {
|
||||
-- search = {
|
||||
-- my_envs = {
|
||||
-- command = "fd python$ ~/git/cerenim/backend/"
|
||||
-- }
|
||||
-- }
|
||||
-- }
|
||||
})
|
||||
end,
|
||||
keys = {
|
||||
{ ",v", "<cmd>VenvSelect<cr>" },
|
||||
},
|
||||
}
|
||||
@ -2,7 +2,7 @@
|
||||
- name: Update package cache (Arch-based systems)
|
||||
pacman:
|
||||
update_cache: yes
|
||||
when: ansible_os_family == "Archlinux"
|
||||
when: ansible_facts.os_family == "Archlinux"
|
||||
become: yes
|
||||
|
||||
- name: Install system packages
|
||||
|
||||
@ -49,3 +49,6 @@ fi
|
||||
|
||||
alias drun='docker run -it --network=host --device=/dev/kfd --device=/dev/dri --group-add=video --ipc=host --cap-add=SYS_PTRACE --security-opt seccomp=unconfined'
|
||||
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gcr/ssh"
|
||||
|
||||
bindkey '^H' backward-kill-word
|
||||
|
||||
@ -1,8 +0,0 @@
|
||||
# export DJANGO_SETTINGS_MODULE=config.settings.dev
|
||||
export DATABASE_HOST=127.0.0.1
|
||||
export DATABASE_NAME=cerenim
|
||||
export DATABASE_USER=brainhero
|
||||
export DATABASE_PORT=5432
|
||||
export DATABASE_DJANGO_SCHEMA=django
|
||||
export SECRET_KEY=abasdjkasd
|
||||
export DATABASE_PASSWORD=abcdefghijk
|
||||
@ -8,7 +8,7 @@
|
||||
shell: |
|
||||
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" --unattended
|
||||
args:
|
||||
creates: "{{ ansible_env.HOME }}/.oh-my-zsh"
|
||||
creates: "{{ ansible_facts.env.HOME }}/.oh-my-zsh"
|
||||
|
||||
- name: Check for custom zshrc
|
||||
stat:
|
||||
@ -18,7 +18,7 @@
|
||||
- name: Symlink custom zshrc
|
||||
file:
|
||||
src: "{{ role_path }}/files/.zshrc"
|
||||
dest: "{{ ansible_env.HOME }}/.zshrc"
|
||||
dest: "{{ ansible_facts.env.HOME }}/.zshrc"
|
||||
state: link
|
||||
force: yes
|
||||
when: custom_zshrc.stat.exists
|
||||
|
||||
Reference in New Issue
Block a user