From a1fe70a905d5b9605991bbab5685ca913e474f0f Mon Sep 17 00:00:00 2001 From: osmarks Date: Wed, 24 Dec 2025 08:35:00 +0000 Subject: [PATCH] dotfiles script --- dotfiles/config.fish | 2 +- dotfiles/dunstrc | 2 +- dotfiles/link_dots.py | 55 +++++++++++++++++++++++++++++++++++++++++++ dotfiles/sway_config | 50 ++++----------------------------------- dotfiles/wezterm.lua | 10 ++++++-- dotfiles/zed.json | 13 +++++++--- 6 files changed, 80 insertions(+), 52 deletions(-) create mode 100644 dotfiles/link_dots.py diff --git a/dotfiles/config.fish b/dotfiles/config.fish index 1d510a4..31492c4 100644 --- a/dotfiles/config.fish +++ b/dotfiles/config.fish @@ -6,7 +6,7 @@ if status is-login and status is-interactive # To add a key, set -Ua SSH_KEYS_TO_AUTOLOAD keypath # To remove a key, set -U --erase SSH_KEYS_TO_AUTOLOAD[index_of_key] - keychain --eval $SSH_KEYS_TO_AUTOLOAD 2> /dev/null | source +# keychain --eval $SSH_KEYS_TO_AUTOLOAD 2> /dev/null | source end #if status is-interactive # diff --git a/dotfiles/dunstrc b/dotfiles/dunstrc index 6ac3aae..62f557b 100644 --- a/dotfiles/dunstrc +++ b/dotfiles/dunstrc @@ -27,7 +27,7 @@ width = 300 # The maximum height of a single notification, excluding the frame. - height = 300 + height = (0, 300) # Position the notification in the top right corner origin = top-right diff --git a/dotfiles/link_dots.py b/dotfiles/link_dots.py new file mode 100644 index 0000000..d3bc74e --- /dev/null +++ b/dotfiles/link_dots.py @@ -0,0 +1,55 @@ +from pathlib import Path +import subprocess +import sys +import os + +files = { + "config.fish": "~/.config/fish/config.fish", + "dunstrc": "~/.config/dunst/dunstrc", + "fix_gnome.sh": "~/.local/bin/fix_gnome.sh", + "lock": "~/.local/bin/lock", + "run_sway_env": "~/.local/bin/run_sway_env", + "settings.ini": "~/.config/gtk-3.0/settings.ini", + "sway_config": "~/.config/sway/config", + "zed.json": "~/.config/zed/settings.json", + "xkb_custom": "~/.config/xkb/symbols/custom", + "sway_custom.desktop": "/usr/share/wayland-sessions/sway_custom.desktop", + "take_screenshot": "~/.local/bin/take-screenshot", + "take_screenshot_window": "~/.local/bin/take-screenshot-window", + "waybar_config": "~/.config/waybar/config", + "waybar_style.css": "~/.config/waybar/style.css", + "wezterm.lua": "~/.wezterm.lua" +} + +packages = [ + "sway", + "waybar", + "firefox", + "zed", + "ttc-iosevka", + "otf-font-awesome", + "dunst", + "slurp", + "grim", + "wezterm", + "ttf-fira-code", + "network-manager-applet", + "kanshi", + "bemenu", + "pavucontrol", + "swaylock", + "jq" +] + +subprocess.run(["sudo", "pacman", "-S", *packages]) + +this = Path(sys.argv[0]).parent +print(this) + +for src, trg in files.items(): + real_src = this / src + real_trg = Path(trg).expanduser() + os.makedirs(real_trg.parent, exist_ok=True) + if not real_trg.exists(): + subprocess.run(["sudo", "ln", "-s", real_src, real_trg]) + print(real_trg) diff --git a/dotfiles/sway_config b/dotfiles/sway_config index 707cfe7..c30b2ae 100644 --- a/dotfiles/sway_config +++ b/dotfiles/sway_config @@ -1,70 +1,30 @@ -# Default config for sway -# -# Copy this to ~/.config/sway/config and edit it to your liking. -# -# Read `man 5 sway` for a complete reference. - default_border normal 2 default_floating_border normal 2 font "pango:Iosevka,monospace 10" -### Variables -# -# Logo key. Use Mod1 for Alt. set $mod Mod4 -# Home row direction keys, like vim set $left h set $down j set $up k set $right l -# Your preferred terminal emulator set $term wezterm -# Your preferred application launcher -# Note: pass the final command to swaymsg so that the resulting window can be opened -# on the original workspace that the command was run on. set $menu bemenu-run --no-exec | xargs swaymsg exec -- output * adaptive_sync on -### Output configuration -# -# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/) output * bg #000000 solid_color -# -# Example configuration: -# -# output HDMI-A-1 resolution 1920x1080 position 1920,0 -# -# You can get the names of your outputs by running: swaymsg -t get_outputs -### Idle configuration -# -# Example configuration: -# -# exec swayidle -w \ -# timeout 300 'swaylock -f -c 000000' \ -# timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ -# before-sleep 'swaylock -f -c 000000' -# -# This will lock your screen after 300 seconds of inactivity, then turn off -# your displays after another 300 seconds, and turn your screens back on when -# resumed. It will also lock your screen before your computer goes to sleep. - -exec swayidle -w \ - timeout 300 'lock' \ - timeout 600 'wlopm --off \*' \ - resume 'wlopm --on \*' \ - before-sleep 'lock' +exec swayidle -w timeout 300 'lock' timeout 600 'wlopm --off \*' resume 'wlopm --on \*' before-sleep 'lock' exec dunst exec arbtt_wayland_toplevel.py -#exec sway_workspace_ctl.py +exec sway_workspace_ctl.py exec fix_gnome.sh -#exec kanshi +exec kanshi exec waybar -#exec nm-applet +exec nm-applet exec local_sway_init.sh #exec wl-paste -t text --watch clipman store -#exec_always kanshictl reload +exec_always kanshictl reload input "type:keyboard" { xkb_layout custom diff --git a/dotfiles/wezterm.lua b/dotfiles/wezterm.lua index b8aa87b..4d10ff2 100644 --- a/dotfiles/wezterm.lua +++ b/dotfiles/wezterm.lua @@ -4,8 +4,8 @@ local config = {} config.ssh_domains = { { - name = 'protagonism', - remote_address = 'protagonism' + name = 'straylight', + remote_address = 'straylight' }, } config.unix_domains = { @@ -16,5 +16,11 @@ config.unix_domains = { config.font = wezterm.font "Fira Code" config.font_size = 10 +config.font_rules = { + { + intensity = "Half", + font = wezterm.font("Fira Code", { weight = "Regular" }) + } +} return config diff --git a/dotfiles/zed.json b/dotfiles/zed.json index 99e0c28..0740f84 100644 --- a/dotfiles/zed.json +++ b/dotfiles/zed.json @@ -7,12 +7,11 @@ // custom settings, run `zed: open default settings` from the // command palette (cmd-shift-p / ctrl-shift-p) { - "assistant": { + "agent": { "default_model": { "provider": "zed.dev", "model": "claude-3-5-sonnet-latest" }, - "version": "2" }, "ui_font_size": 12, "buffer_font_weight": 300, @@ -33,5 +32,13 @@ "inlay_hints": { "enabled": true }, - "soft_wrap": "editor_width" + "soft_wrap": "editor_width", + "languages": { + "Python": { + "language_servers": [ + "!basedpyright", + "pyright" + ] + } + } }