diff --git a/dot_bash_profile b/dot_bash_profile index 7e26d4c..bdc9999 100644 --- a/dot_bash_profile +++ b/dot_bash_profile @@ -2,8 +2,18 @@ # ~/.bash_profile # +[[ "$TTY" == /dev/tty* ]] || return 0 + +export $(systemctl --user show-environment) + +export GPG_TTY="$TTY" +export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh" +systemctl --user import-environment GPG_TTY SSH_AUTH_SOCK + if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then - exec sway + systemd-cat -t sway sway + systemctl --user stop graphical-session.target + systemctl --user unset-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK fi [[ -f ~/.bashrc ]] && . ~/.bashrc diff --git a/dot_config/environment.d/10-locale.conf b/dot_config/environment.d/10-locale.conf new file mode 100644 index 0000000..d45921e --- /dev/null +++ b/dot_config/environment.d/10-locale.conf @@ -0,0 +1,4 @@ +LANG=en_US.UTF-8 +LANGUAGE=en_US +LC_MONETARY=de_DE.UTF-8 +LC_TIME=de_DE.UTF-8 diff --git a/dot_config/environment.d/20-xdg.conf b/dot_config/environment.d/20-xdg.conf new file mode 100644 index 0000000..143bc02 --- /dev/null +++ b/dot_config/environment.d/20-xdg.conf @@ -0,0 +1,4 @@ +XDG_CACHE_HOME=$HOME/.cache +XDG_CONFIG_HOME=$HOME/.config +XDG_DATA_HOME=$HOME/.local/share +XDG_STATE_HOME=$HOME/.local/state diff --git a/dot_config/environment.d/30-path.conf b/dot_config/environment.d/30-path.conf new file mode 100644 index 0000000..2677bd6 --- /dev/null +++ b/dot_config/environment.d/30-path.conf @@ -0,0 +1 @@ +PATH=$HOME/.local/bin:$HOME/.local/bin-private:$PATH diff --git a/dot_config/environment.d/40-clean-home.conf b/dot_config/environment.d/40-clean-home.conf new file mode 100644 index 0000000..1625ace --- /dev/null +++ b/dot_config/environment.d/40-clean-home.conf @@ -0,0 +1,12 @@ +DOCKER_CONFIG=$XDG_CONFIG_HOME/docker +MBSYNC_CONFIG=$XDG_CONFIG_HOME/mbsync/config +NOTMUCH_CONFIG=$XDG_CONFIG_HOME/notmuch/config +PYLINTRC=$XDG_CONFIG_HOME/pylint/config + +CARGO_HOME=$XDG_STATE_HOME/cargo +GOPATH=$XDG_STATE_HOME/go + +npm_config_cache=$XDG_CACHE_HOME/npm +PYLINTHOME=$XDG_CACHE_HOME/pylint + +LESSHISTFILE=- diff --git a/dot_config/environment.d/50-progs.conf b/dot_config/environment.d/50-progs.conf new file mode 100644 index 0000000..9b7fb6c --- /dev/null +++ b/dot_config/environment.d/50-progs.conf @@ -0,0 +1,4 @@ +EDITOR=nvim +VISUAL=nvim +MANPAGER=less +AUR_PAGER=aurutils-review diff --git a/dot_config/environment.d/60-wayland.conf b/dot_config/environment.d/60-wayland.conf new file mode 100644 index 0000000..c002e62 --- /dev/null +++ b/dot_config/environment.d/60-wayland.conf @@ -0,0 +1,6 @@ +LIBVA_DRIVER_NAME=iHD +MOZ_ENABLE_WAYLAND=1 +QT_QPA_PLATFORM=wayland-egl +WLR_DRM_NO_MODIFIERS=1 +XDG_CURRENT_DESKTOP=sway +XDG_SESSION_TYPE=wayland diff --git a/dot_config/environment.d/90-pass.conf b/dot_config/environment.d/90-pass.conf new file mode 100644 index 0000000..609e9af --- /dev/null +++ b/dot_config/environment.d/90-pass.conf @@ -0,0 +1,2 @@ +PASSWORD_STORE_CHARACTER_SET=a-zA-Z0-9~!@#$%^&*()-_=+[]{};:,.<>? +PASSWORD_STORE_GENERATED_LENGTH=32 diff --git a/dot_config/sway/config b/dot_config/sway/config index c9fb957..624538f 100644 --- a/dot_config/sway/config +++ b/dot_config/sway/config @@ -15,10 +15,6 @@ set $up k set $right l # Your preferred terminal emulator set $term foot -# 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 dmenu_path | wofi | xargs swaymsg exec -- ### Output configuration # @@ -78,7 +74,7 @@ input type:touchpad { bindsym $mod+Shift+q kill # Start your launcher - bindsym $mod+d exec $menu + bindsym $mod+d exec cglaunch wldash # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -205,6 +201,15 @@ mode "resize" { } bindsym $mod+r mode "resize" +# Keybindings +bindsym --to-code { + XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% + XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% + XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle + XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle + XF86MonBrightnessDown exec brightnessctl set 5%- + XF86MonBrightnessUp exec brightnessctl set +5% +} # # Status Bar: # @@ -214,3 +219,4 @@ bar { } include /etc/sway/config.d/* +exec systemctl --user start sway-session.target diff --git a/dot_config/systemd/user/sway-session.target b/dot_config/systemd/user/sway-session.target new file mode 100644 index 0000000..30151b3 --- /dev/null +++ b/dot_config/systemd/user/sway-session.target @@ -0,0 +1,6 @@ +[Unit] +Description=sway compositor session +Documentation=man:systemd.special(7) +BindsTo=graphical-session.target +Wants=graphical-session-pre.target +After=graphical-session-pre.target diff --git a/dot_config/wldash/config.yaml b/dot_config/wldash/config.yaml new file mode 100644 index 0000000..06defc4 --- /dev/null +++ b/dot_config/wldash/config.yaml @@ -0,0 +1,48 @@ +--- +outputMode: active +scale: 2 +background: + red: 0.14 + green: 0.14 + blue: 0.14 + opacity: 1 +widget: + margin: + margins: [40, 40, 40, 40] + widget: + verticalLayout: + - horizontalLayout: + - margin: + margins: [0, 176, 0, 64] + widget: + verticalLayout: + - date: + font: ~ + font_size: 128.0 + - clock: + font: ~ + font_size: 512.0 + - verticalLayout: + - margin: + margins: [0, 0, 0, 16] + widget: + battery: + font: ~ + font_size: 48.0 + length: 0 + - calendar: + font_primary: ~ + font_secondary: ~ + font_size: 32.0 + sections: 3 + - launcher: + font: ~ + font_size: 64.0 + length: 0 + app_opener: "cglaunch" + term_opener: "cglaunch --term" + url_opener: "" + +fonts: + sans: sans + mono: mono diff --git a/private_dot_local/bin/executable_cglaunch b/private_dot_local/bin/executable_cglaunch new file mode 100644 index 0000000..e24fc61 --- /dev/null +++ b/private_dot_local/bin/executable_cglaunch @@ -0,0 +1,24 @@ +#!/bin/bash +# https://github.com/maximbaz/dotfiles/blob/61a40e111012dd589dad89ff0d31dcd1be8f8529/.local/bin/cglaunch + +if [ "$1" = "--term" ]; then + shift + + kitty_args=() + if [[ "$1" == "-"* ]]; then + while [[ "$#" -gt 1 ]] && [[ "$1" != "--" ]]; do + kitty_args+=("$1") + shift + done + [[ "$1" != "--" ]] || shift + fi + + title="${1##*/}" + title="${title:-kitty}" + app="kitty ${kitty_args[@]} --class $title" +else + title="${1##*/}" + args="--scope" +fi + +exec systemd-run --quiet --no-block --user --slice app.slice --unit "launch-$title-$(date '+%s%N')" $args -- $app "$@"