From 28441df095078a869936123b900337acff20f762 Mon Sep 17 00:00:00 2001 From: Paul Aumann Date: Sun, 3 Aug 2025 13:16:51 +0200 Subject: [PATCH] various --- .config/Code/User/keybindings.json | 36 +++++++++++++++++++ .config/Code/User/settings.json | 2 ++ .config/alacritty/alacritty.toml | 3 +- .config/fontconfig/conf.d/20-no-embedded.conf | 12 +++++++ .config/hypr/hyprland.conf | 24 ++++++++----- .config/waybar/config.jsonc | 8 +++++ .config/waybar/scripts/coffee.py | 25 +++++++++++++ .config/waybar/style.css | 7 ++++ .zshrc | 8 +++++ 9 files changed, 116 insertions(+), 9 deletions(-) create mode 100644 .config/fontconfig/conf.d/20-no-embedded.conf create mode 100644 .config/waybar/scripts/coffee.py diff --git a/.config/Code/User/keybindings.json b/.config/Code/User/keybindings.json index a14e980..1a12b65 100644 --- a/.config/Code/User/keybindings.json +++ b/.config/Code/User/keybindings.json @@ -361,4 +361,40 @@ "command": "-keybindings.editor.toggleSortByPrecedence", "when": "inKeybindings" }, + { + "key": "ctrl+shift+g", + "command": "-workbench.action.terminal.openDetectedLink", + "when": "accessibleViewIsShown && terminalHasBeenCreated && accessibleViewCurrentProviderId == 'terminal'" + }, + { + "key": "ctrl+shift+g", + "command": "-workbench.view.scm", + "when": "workbench.scm.active" + }, + { + "key": "ctrl+alt+g", + "command": "-workbench.action.terminal.sendSequence", + "when": "terminalFocus" + }, + { + "key": "ctrl+g", + "command": "-workbench.action.terminal.goToRecentDirectory", + "when": "terminalFocus && terminalHasBeenCreated || terminalFocus && terminalProcessSupported" + }, + { + "key": "ctrl+shift+g", + "command": "workbench.action.gotoLine" + }, + { + "key": "ctrl+g", + "command": "-workbench.action.gotoLine" + }, + { + "key": "ctrl+g", + "command": "relative-goto.goto" + }, + { + "key": "alt+g", + "command": "-relative-goto.goto" + }, ] \ No newline at end of file diff --git a/.config/Code/User/settings.json b/.config/Code/User/settings.json index 9d528f9..4e5235c 100644 --- a/.config/Code/User/settings.json +++ b/.config/Code/User/settings.json @@ -121,4 +121,6 @@ "python.analysis.typeCheckingMode": "basic", "workbench.editor.empty.hint": "hidden", "python.defaultInterpreterPath": "/home/paul/.pyenv/versions/3.12.5/envs/wasteside-tools", + "editor.lineNumbers": "relative", + "github.copilot.nextEditSuggestions.enabled": true, } \ No newline at end of file diff --git a/.config/alacritty/alacritty.toml b/.config/alacritty/alacritty.toml index 2c716c2..cef9bcb 100644 --- a/.config/alacritty/alacritty.toml +++ b/.config/alacritty/alacritty.toml @@ -47,7 +47,8 @@ bindings = [ [keyboard] bindings = [ - { key = "Back", mods = "Control", chars = "\u001b\u007f"} + { key = "Back", mods = "Control", chars = "\u001b\u007f"}, + { key = "N", mods = "Control", action = "SpawnNewInstance" } ] [scrolling] diff --git a/.config/fontconfig/conf.d/20-no-embedded.conf b/.config/fontconfig/conf.d/20-no-embedded.conf new file mode 100644 index 0000000..2fce5af --- /dev/null +++ b/.config/fontconfig/conf.d/20-no-embedded.conf @@ -0,0 +1,12 @@ + + + + + + Calibri + + + false + + + \ No newline at end of file diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 4492737..21a4886 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -46,18 +46,24 @@ exec-once = systemctl --user start hyprpolkitagent exec-once = dunst exec-once = wl-paste --type text --watch cliphist store # Stores only text data exec-once = waybar -exec-once = ratbagctl list +# Open programs on special workspaces exec-once = [ workspace special:term silent] $terminal -exec-once = [ workspace special:browser silent] $browser -url "https://web.whatsapp.com" -exec-once = [ workspace special:music silent] spotify +exec-once = [ workspace special:browser silent] $browser "https://web.whatsapp.com" "https://mail.google.com/mail/u/0/\##inbox/\##wasteside\##container-wasteside" +exec-once = [ workspace special:music silent] $terminal -e spotify_player exec-once = [ workspace special:todo silent] clickup +exec-once = [ workspace special:files silent] $fileManager +exec-once = [ workspace special:files silent] localsend # Script to make bitwarden firefox extension windows launch in floating mode exec-once = ~/.config/hypr/scripts/float-bitwarden.sh +# Makes sure ratbag is running +exec-once = ratbagctl list + # Plugins exec-once = hyprpm enable Hyprspace +exec-once = hyprpm reload ############################# ### ENVIRONMENT VARIABLES ### @@ -112,6 +118,8 @@ decoration { active_opacity = 1.0 inactive_opacity = 1.0 + dim_special = 0.9 + # Deprecated v0.45 ? # drop_shadow = true # shadow_range = 4 @@ -158,8 +166,8 @@ master { # https://wiki.hyprland.org/Configuring/Variables/#misc misc { - force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers - disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :( + force_default_wallpaper = 0 # Set to 0 or 1 to disable the anime mascot wallpapers + disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :( } @@ -226,7 +234,7 @@ bind = $mainMod SHIFT, S, exec, hyprshot -m region bind = $mainMod, PRINT, exec, hyprshot -m window bind = $mainMod SHIFT, B, exec, pkill waybar & hyprctl dispatch exec waybar bind = $mainMod SHIFT, C, exec, hyprpicker | wl-copy -bind = $mainMod, TAB, overview:toggle +# bind = $mainMod, TAB, overview:toggle bind = $mainMod, END, exec, wlogout -b 6 -L 1100 -R 1100 -T 650 -B 650 # Move focus with mainMod + arrow keys @@ -269,7 +277,6 @@ bind = $mainMod SHIFT, 4, movetoworkspace, 4 bind = $mainMod SHIFT, 5, movetoworkspace, 5 bind = $mainMod SHIFT, 6, movetoworkspace, 6 bind = $mainMod SHIFT, 7, movetoworkspace, 7 -bind = $mainMod SHIFT, 8, movetoworkspace, 8 # Move active window to a workspace with mainMod + SHIFT + [F1-F9] (secondary monitor) bind = $mainMod SHIFT, F1, movetoworkspace, 11 @@ -279,7 +286,6 @@ bind = $mainMod SHIFT, F4, movetoworkspace, 14 bind = $mainMod SHIFT, F5, movetoworkspace, 15 bind = $mainMod SHIFT, F6, movetoworkspace, 16 bind = $mainMod SHIFT, F7, movetoworkspace, 17 -bind = $mainMod SHIFT, F8, movetoworkspace, 18 # Special workspaces (scratchpad) bind = $mainMod, F12, togglespecialworkspace, term @@ -290,6 +296,8 @@ bind = $mainMod, F10, togglespecialworkspace, music bind = $mainMod SHIFT, F10, movetoworkspace, special:music bind = $mainMod, F9, togglespecialworkspace, todo bind = $mainMod SHIFT, F9, movetoworkspace, special:todo +bind = $mainMod, F8, togglespecialworkspace, files +bind = $mainMod SHIFT, F8, movetoworkspace, special:files # Move/resize windows with mainMod + LMB/RMB and dragging bindm = $mainMod, mouse:272, movewindow diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index 5af3dff..97cf25f 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -11,6 +11,7 @@ ], "modules-right": [ "privacy", + "custom/coffee", "pulseaudio", "cpu", "memory", @@ -23,6 +24,13 @@ "tooltip": false, "on-click": "hyprctl dispatch exec 'wlogout -b 6 -L 1100 -R 1100 -T 650 -B 650'" }, + "custom/coffee": { + "exec": "/usr/bin/python3 /home/paul/.config/waybar/scripts/coffee.py", + "format": "{}", + "return-type": "json", + "interval": 1, + "on-click": "pidof hypridle >/dev/null && killall hypridle || hyprctl dispatch exec hypridle" + }, "hyprland/workspaces": { "format": "{name}", "tooltip": false, diff --git a/.config/waybar/scripts/coffee.py b/.config/waybar/scripts/coffee.py new file mode 100644 index 0000000..0789376 --- /dev/null +++ b/.config/waybar/scripts/coffee.py @@ -0,0 +1,25 @@ +from argparse import ArgumentParser +from json import dumps +from subprocess import run + +COFFEE_ICON = "\ue751" + +if __name__ == "__main__": + result = run(["pidof", "hypridle"], capture_output=True, text=True) + + if result.returncode == 0: + # Hypridle is running + print(dumps({ + "text": COFFEE_ICON, + "tooltip": "Hypridle is running", + "class": "inactive" + })) + + else: + # Hypridle is not running + print(dumps({ + "text": COFFEE_ICON, + "tooltip": "Hypridle is not running", + "class": "active" + })) + \ No newline at end of file diff --git a/.config/waybar/style.css b/.config/waybar/style.css index 7f1ec4a..645890c 100644 --- a/.config/waybar/style.css +++ b/.config/waybar/style.css @@ -102,5 +102,12 @@ window#waybar { padding-left: 5px; } +#custom-coffee { + padding-right: 5px; +} + +.inactive { + opacity: 0.5; +} diff --git a/.zshrc b/.zshrc index 9246a8b..9cbee7e 100644 --- a/.zshrc +++ b/.zshrc @@ -139,6 +139,8 @@ alias open="xdg-open" alias lg="lazygit" alias ccat="pygmentize -g -O style=monokai,linenos=1" alias rm="echo Use the full path i.e. '/bin/rm', consider using: trash" +alias explain="gh copilot explain" +alias csv="csvlens" alias wstmux="cd ~/code/wasteside/app && tmux new -A -s wasteside" @@ -182,3 +184,9 @@ export PATH="$HOME/.yarn/bin:$PATH" export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" + +## [Completion] +## Completion scripts setup. Remove the following line to uninstall +[[ -f /home/paul/.dart-cli-completion/zsh-config.zsh ]] && . /home/paul/.dart-cli-completion/zsh-config.zsh || true +## [/Completion] +