diff --git a/.config/environment.d/backup.conf b/.config/environment.d/backup.conf new file mode 100644 index 0000000..f4eee83 --- /dev/null +++ b/.config/environment.d/backup.conf @@ -0,0 +1,4 @@ +# keep-sorted start +BORG_PASSCOMMAND="cat ${HOME}/.keys/borg-passphrase.txt" +BORG_REPO="/media/backup/" +# keep-sorted end diff --git a/.config/environment.d/editor.conf b/.config/environment.d/editor.conf new file mode 100644 index 0000000..42eb8e0 --- /dev/null +++ b/.config/environment.d/editor.conf @@ -0,0 +1,5 @@ +# keep-sorted start +EDITOR="emacsclient --create-frame --no-window-system" +SUDO_EDITOR="/usr/local/bin/emacs --no-init-file --no-splash --no-window-system" +VISUAL="emacsclient --create-frame --no-window-system" +# keep-sorted end diff --git a/.config/environment.d/ime.conf b/.config/environment.d/ime.conf new file mode 100644 index 0000000..1d33c97 --- /dev/null +++ b/.config/environment.d/ime.conf @@ -0,0 +1,5 @@ +# keep-sorted start +GTK_IM_MODULE="fcitx" +QT_IM_MODULE="fcitx" +XMODIFIERS="@im=fcitx" +# keep-sorted end diff --git a/.config/environment.d/poetry.conf b/.config/environment.d/poetry.conf new file mode 100644 index 0000000..7787852 --- /dev/null +++ b/.config/environment.d/poetry.conf @@ -0,0 +1,3 @@ +# keep-sorted start +PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring" +# keep-sorted end diff --git a/.config/environment.d/utf-8.conf b/.config/environment.d/utf-8.conf new file mode 100644 index 0000000..f8c7e96 --- /dev/null +++ b/.config/environment.d/utf-8.conf @@ -0,0 +1,3 @@ +# keep-sorted start +LANG="en_IL.utf8" +# keep-sorted end diff --git a/.config/environment.d/wallpaper.conf b/.config/environment.d/wallpaper.conf new file mode 100644 index 0000000..a246445 --- /dev/null +++ b/.config/environment.d/wallpaper.conf @@ -0,0 +1,3 @@ +# keep-sorted start +SWAY_WALLPAPER="${HOME}/Documents/wallpapers/solar-system.jpg" +# keep-sorted end diff --git a/.config/environment.d/zoom.conf b/.config/environment.d/zoom.conf new file mode 100644 index 0000000..0e6ffb2 --- /dev/null +++ b/.config/environment.d/zoom.conf @@ -0,0 +1,3 @@ +# keep-sorted start +XDG_CURRENT_DESKTOP="sway" +# keep-sorted end diff --git a/.config/setup/01-install-packages.sh b/.config/setup/01-install-packages.sh index d308236..0b56d5b 100755 --- a/.config/setup/01-install-packages.sh +++ b/.config/setup/01-install-packages.sh @@ -37,7 +37,9 @@ DEB_PKGS=( imagemagick inkscape jq + jupyter jupyter-notebook + jupyterlab keepassxc libnss-mdns libyajl-doc diff --git a/.config/setup/02-setup-packages.sh b/.config/setup/02-setup-packages.sh index 5414418..859047f 100755 --- a/.config/setup/02-setup-packages.sh +++ b/.config/setup/02-setup-packages.sh @@ -2,7 +2,7 @@ systemctl --user enable --now syncthing.service -mkdir -p ~/Pictures/screenshots +mkdir --parents ~/Pictures/screenshots pre-commit install diff --git a/.config/setup/04-install-sway-session.sh b/.config/setup/04-install-sway-session.sh deleted file mode 100755 index e1f16a8..0000000 --- a/.config/setup/04-install-sway-session.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /usr/bin/sh - -sudo cp "$(systemd-path user-configuration)"/setup/sway.desktop /usr/share/wayland-sessions/ diff --git a/.config/setup/sway.desktop b/.config/setup/sway.desktop deleted file mode 100644 index 175249e..0000000 --- a/.config/setup/sway.desktop +++ /dev/null @@ -1,7 +0,0 @@ -[Desktop Entry] -Version=0.1 -Name=Sway -Comment=An i3-compatible Wayland compositor -Exec=/home/ohad/.local/bin/run-sway -Type=Application -DesktopNames=sway diff --git a/.config/sway/config b/.config/sway/config index 483fc87..b76ca8f 100644 --- a/.config/sway/config +++ b/.config/sway/config @@ -68,6 +68,7 @@ input type:touchpad { # Start a terminal bindsym $launch+Return exec $term bindsym $launch+t exec $term zellij attach --create main + bindsym $launch+j exec $term zellij --layout jupyter attach --create jupyter # Start Emacs bindsym $launch+e exec emacsclient --alternate-editor "" --create-frame @@ -76,9 +77,6 @@ input type:touchpad { bindsym $launch+f exec firefox --private-window bindsym $launch+Shift+f exec firefox - # Switch WiFi network - bindsym $launch+Equal exec .wifi-wizard - # Kill focused window bindsym $wm_mod+q kill @@ -305,4 +303,4 @@ include /etc/sway/config.d/* exec systemctl --user import-environment XDG_CURRENT_DESKTOP exec dbus-update-activation-environment --systemd XDG_CURRENT_DESKTOP=sway -output * bg ~/Documents/wallpapers/solar-system.jpg fill +output * bg ${SWAY_WALLPAPER} fill diff --git a/.config/zellij/layouts/jupyter.kdl b/.config/zellij/layouts/jupyter.kdl new file mode 100644 index 0000000..223f0f0 --- /dev/null +++ b/.config/zellij/layouts/jupyter.kdl @@ -0,0 +1,7 @@ +layout { + pane { + command "jupyter" + args "lab" "--notebook-dir" "~/Projects/notebooks/" + cwd "~" + } +} diff --git a/.local/bin/.wifi-wizard b/.local/bin/.wifi-wizard deleted file mode 100755 index 48e8f8e..0000000 --- a/.local/bin/.wifi-wizard +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/sh - -ssid=$(nmcli --fields SSID,RATE,SIGNAL,BARS device wifi list | fuzzel --dmenu --width 40 | awk '{print $1}') -retval=$? -if [ -z "${ssid}" ]; then - exit $retval -fi - -password=$(fuzzel --dmenu --password) -retval=$? -if [ $retval -ne 0 ]; then - exit $retval -fi - -nmcli device wifi connect "${ssid}" password "${password}" diff --git a/.local/bin/get-nasa-apod b/.local/bin/get-nasa-apod index 5e128b2..f0f2724 100755 --- a/.local/bin/get-nasa-apod +++ b/.local/bin/get-nasa-apod @@ -38,4 +38,4 @@ ln \ --symbolic \ "${outfile}" \ "${WALLPAPERS}/today" -swaymsg reload +swaymsg output "*" bg "${SWAY_WALLPAPER}" fill diff --git a/.local/bin/run-sway b/.local/bin/run-sway deleted file mode 100755 index c7f043d..0000000 --- a/.local/bin/run-sway +++ /dev/null @@ -1,7 +0,0 @@ -#! /usr/bin/bash - -set -euo pipefail -IFS=$'\n\t' - -source "$(systemd-path user)"/.profile -exec /usr/bin/sway diff --git a/.profile b/.profile index 39944ac..0fb6ca3 100644 --- a/.profile +++ b/.profile @@ -36,17 +36,10 @@ if [ -d "$(systemd-path user-state-private)"/git-sync ] ; then fi umask 0007 -export SUDO_EDITOR="/usr/local/bin/emacs --no-init-file --no-splash --no-window-system" -export EDITOR="emacsclient --create-frame --no-window-system" -export VISUAL="emacsclient --create-frame --no-window-system" -export GTK_IM_MODULE="fcitx" -export QT_IM_MODULE="fcitx" -export XMODIFIERS="@im=fcitx" -export LANG="en_IL.utf8" -export BORG_REPO="/media/backup/" -export BORG_PASSCOMMAND="cat ${HOME}/.keys/borg-passphrase.txt" -export PYTHON_KEYRING_BACKEND="keyring.backends.null.Keyring" -export XDG_CURRENT_DESKTOP="sway" + +while read -r l; do + eval export $l +done < <(/usr/lib/systemd/user-environment-generators/30-systemd-environment-d-generator) # Autolaunch sway for tty1 logins [ "$(tty)" = "/dev/tty1" ] &&