Compare commits

...

9 commits

Author SHA1 Message Date
Peter Vacho
9499f164c0
Add movetoworkspacesilent binding for special workspace 2025-09-22 09:44:24 +02:00
Peter Vacho
4b39118bd6
Enable cliphist service 2025-09-22 09:40:04 +02:00
Peter Vacho
fcf31d2b7a
Make lein and m2 follow XDG base dir spec 2025-09-22 09:37:53 +02:00
Peter Vacho
19b62c6d0e
Add XDG env vars for minikube and ansible 2025-09-22 09:32:02 +02:00
Peter Vacho
5be3f5bc22
Add XDG env var for python history 2025-09-22 09:31:25 +02:00
Peter Vacho
8f63e1d542
Add XDG env vars for terminfo 2025-09-22 09:31:15 +02:00
Peter Vacho
119aeb9d9b
Add XDG cmd alias for svn 2025-09-22 09:30:57 +02:00
Peter Vacho
c127f593b4
Update pythonrc 2025-09-22 09:29:17 +02:00
Peter Vacho
4d14ebe072
Add delay before starting eww-window service 2025-09-13 18:44:01 +02:00
8 changed files with 45 additions and 15 deletions

View file

@ -120,8 +120,9 @@ bind = ALT, grave, changegroupactive, b
# ### SPECIAL WORKSPACE (SCRATCHPAD) ### # ### SPECIAL WORKSPACE (SCRATCHPAD) ###
# ###################################### # ######################################
bind = ALT, grave, movetoworkspace, special
bind = SUPER, grave, togglespecialworkspace, bind = SUPER, grave, togglespecialworkspace,
bind = ALT, grave, movetoworkspace, special
bind = SUPER SHIFT, grave, movetoworkspacesilent, special
# ######################### # #########################
# ### MOVE WINDOW FOCUS ### # ### MOVE WINDOW FOCUS ###

View file

@ -1,29 +1,44 @@
#!/usr/bin/env python3
# This entire thing is unnecessary post v3.13.0a3
# https://github.com/python/cpython/issues/73965
import os
import sys
import atexit
import readline
from pathlib import Path
def is_vanilla() -> bool: def is_vanilla() -> bool:
import sys """Check whether this is a vanilla Python interpreter below 3.13."""
return (
return not hasattr(__builtins__, "__IPYTHON__") and "bpython" not in sys.argv[0] not hasattr(__builtins__, "__IPYTHON__")
and "bpython" not in sys.argv[0]
and sys.version_info < (3, 13)
)
def setup_history(): def setup_history() -> None:
import os """Read and write history from state file."""
import atexit # Check PYTHON_HISTORY for future-compatibility with Python 3.13
import readline if history := os.environ.get("PYTHON_HISTORY"):
from pathlib import Path history = Path(history)
if state_home := os.environ.get("XDG_STATE_HOME"): # https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables
elif state_home := os.environ.get("XDG_STATE_HOME"):
state_home = Path(state_home) state_home = Path(state_home)
else: else:
state_home = Path.home() / ".local" / "state" state_home = Path.home() / ".local" / "state"
history: Path = state_home / "python_history" history: Path = history or state_home / "python_history"
# https://github.com/python/cpython/issues/105694 # https://github.com/python/cpython/issues/105694
if not history.is_file(): if not history.is_file():
# breaks on macos + python3 without this. # breaks on macos + python3 without this.
readline.write_history_file(str(history)) readline.write_history_file(str(history))
readline.read_history_file(str(history)) readline.read_history_file(history)
atexit.register(readline.write_history_file, str(history)) atexit.register(readline.write_history_file, history)
if is_vanilla(): if is_vanilla():

View file

@ -257,6 +257,7 @@ fi
# XDG Base Directory fixes # XDG Base Directory fixes
alias nvidia-settings='nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings' alias nvidia-settings='nvidia-settings --config=$XDG_CONFIG_HOME/nvidia/settings'
alias svn='svn --config-dir $XDG_CONFIG_HOME/subversion'
# enable color support # enable color support
if [ -x /usr/bin/dircolors ]; then if [ -x /usr/bin/dircolors ]; then

View file

@ -62,6 +62,8 @@ export ZSH_COMPDUMP="$ZSH_CACHE/zcompdump-${ZSH_VERSION:-}"
# Per-Application XDG settings # Per-Application XDG settings
export LESSHISTFILE="-" export LESSHISTFILE="-"
export TERMINFO="$XDG_DATA_HOME"/terminfo
export TERMINFO_DIRS="$XDG_DATA_HOME"/terminfo:/usr/share/terminfo
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc":"$XDG_CONFIG_HOME/gtk-2.0/gtkrc.mine" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc":"$XDG_CONFIG_HOME/gtk-2.0/gtkrc.mine"
export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc"
export GNUPGHOME="$XDG_DATA_HOME/gnupg" export GNUPGHOME="$XDG_DATA_HOME/gnupg"
@ -79,6 +81,7 @@ export NUGET_PACKAGES="$XDG_CACHE_HOME/NuGetPackages"
export PARALLEL_HOME="$XDG_CONFIG_HOME/parallel" export PARALLEL_HOME="$XDG_CONFIG_HOME/parallel"
export RANDFILE="$XDG_CACHE_HOME/rnd" export RANDFILE="$XDG_CACHE_HOME/rnd"
export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc.py" export PYTHONSTARTUP="$XDG_CONFIG_HOME/python/pythonrc.py"
export PYTHON_HISTORY="$XDG_STATE_HOME/python_history"
export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python" export PYTHONPYCACHEPREFIX="$XDG_CACHE_HOME/python"
export PYTHONUSERBASE="$XDG_DATA_HOME/python" export PYTHONUSERBASE="$XDG_DATA_HOME/python"
export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history" export SQLITE_HISTORY="$XDG_DATA_HOME/sqlite_history"
@ -99,6 +102,9 @@ export JUPYTER_CONFIG_DIR="$XDG_CONFIG_HOME/jupyter"
export RYE_HOME="$XDG_CONFIG_HOME/rye" export RYE_HOME="$XDG_CONFIG_HOME/rye"
export OMNISHARPHOME="$XDG_CONFIG_HOME"/omnisharp export OMNISHARPHOME="$XDG_CONFIG_HOME"/omnisharp
export PSQL_HISTORY="$XDG_STATE_HOME/psql_history" export PSQL_HISTORY="$XDG_STATE_HOME/psql_history"
export ANSIBLE_HOME="$XDG_DATA_HOME"/ansible
export MINIKUBE_HOME="$XDG_DATA_HOME/minikube"
export LEIN_HOME="$XDG_DATA_HOME"/lein
# Theming # Theming
export GTK_THEME="Tokyonight-Dark" export GTK_THEME="Tokyonight-Dark"

View file

@ -1,12 +1,13 @@
[Unit] [Unit]
Description=Open %I eww window Description=Open %I eww window
Documentation=https://elkowar.github.io/eww/
After=graphical-session.target After=graphical-session.target
After=eww.service After=eww.service
PartOf=eww.service PartOf=eww.service
[Service] [Service]
Type=oneshot Type=oneshot
ExecStartPre=/usr/bin/eww ping ExecStartPre=/bin/sh -c "sleep 1 && eww ping"
ExecStart=/usr/bin/eww open %i ExecStart=/usr/bin/eww open %i
ExecStop=/usr/bin/eww close %i ExecStop=/usr/bin/eww close %i
RemainAfterExit=true RemainAfterExit=true

View file

@ -1,5 +1,6 @@
[Unit] [Unit]
Description=Eww daemon Description=Eww daemon
Documentation=https://elkowar.github.io/eww/
After=graphical-session.target After=graphical-session.target
After=pipewire.service After=pipewire.service
Requires=graphical-session.target Requires=graphical-session.target

View file

@ -0,0 +1,4 @@
{:user {:local-repo #=(eval (str (System/getenv "XDG_CACHE_HOME") "/m2"))
:repositories {"local" {:url #=(eval (str "file://" (System/getenv "XDG_DATA_HOME") "/m2"))
:releases {:checksum :ignore}}}
}}

View file

@ -24,6 +24,7 @@ mkdir -p ~/.cache/nv
cp -ra home/.config/wget ~/.config cp -ra home/.config/wget ~/.config
mkdir -p ~/.config/gtk-2.0 mkdir -p ~/.config/gtk-2.0
touch ~/.config/gtk-2.0/gtkrc touch ~/.config/gtk-2.0/gtkrc
cp -ra home/.local/share/lein ~/.local/share
# DE configs (core apps/tools that make up the base graphical experience) # DE configs (core apps/tools that make up the base graphical experience)
cp -ra home/.config/xdg-desktop-portal ~/.config cp -ra home/.config/xdg-desktop-portal ~/.config
@ -147,7 +148,7 @@ gsettings set org.gnome.desktop.interface cursor-size 24
# Services # Services
sudo systemctl enable --now seatd.service sudo systemctl enable --now seatd.service
systemctl --user enable polkit-gnome-agent.service fumon.service hyprpaper.service hypridle.service hyprsunset.service elephant.service walker.service swaync.service systemd-lock-handler.service hyprlock.service swaync-inhibit-lock.service swaync-inhibit-unlock.service pcmanfm-qt.service nm-applet.service systemctl --user enable polkit-gnome-agent.service fumon.service hyprpaper.service hypridle.service hyprsunset.service elephant.service walker.service swaync.service systemd-lock-handler.service hyprlock.service swaync-inhibit-lock.service swaync-inhibit-unlock.service pcmanfm-qt.service nm-applet.service cliphist.service
echo "GUI Installation finished, you should now reboot and run uwsm start hyprland.desktop" echo "GUI Installation finished, you should now reboot and run uwsm start hyprland.desktop"
echo "" echo ""