This commit is contained in:
opalvault
2022-07-05 15:43:10 -07:00
parent e4c2726f1f
commit 47f02ddba8
4 changed files with 82 additions and 76 deletions

View File

@@ -6,7 +6,7 @@ I prefer to use programs that I can extend the functionality of via configuratio
* Sway
*** Variables
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Directional Keys
set $left h
set $down j
@@ -22,9 +22,8 @@ set $term alacritty
# Application Launcher
set $menu killall wofi || wofi
#+end_src
*** Keybindings
*** General
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Start a terminal
bindsym $mod+Return exec $term
@@ -48,7 +47,7 @@ bindsym $mod+Shift+c reload
bindsym $mod+Shift+x exec swaymsg -r exit
#+end_src
*** Media/Brightness
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
## Volume
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
@@ -69,13 +68,14 @@ bindsym XF86MonBrightnessUp exec light -A 10 && notify-send "󰃞 Light" "Bright
bindsym XF86MonBrightnessDown exec light -U 10 && notify-send "󰃞 Light" "Brightness: $(light)%" --hint="int:value:$(light)"
#+end_src
*** Navigation & Focus
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Moving around:
# Move your focus around
bindsym $mod+$left focus left
bindsym $mod+$down focus down
bindsym $mod+$up focus up
bindsym $mod+$right focus right
# Or use $mod+[up|down|left|right]
bindsym $mod+Left focus left
bindsym $mod+Down focus down
@@ -87,6 +87,7 @@ bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down
bindsym $mod+Shift+$up move up
bindsym $mod+Shift+$right move right
# Ditto, with arrow keys
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
@@ -94,7 +95,7 @@ bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#+end_src
*** Layout
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Layout stuff:
#
# You can "split" the current object of your focus with
@@ -106,7 +107,7 @@ bindsym $mod+v splitv
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# bindsym $mod+e layout toggle split
# Make the current focus fullscreen
bindsym $mod+f fullscreen
@@ -155,87 +156,90 @@ mode "resize" {
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#+end_src
*** Screenshot
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Screenshot (Grimshot)
# Captures the currently active window
bindsym $mod+g exec grimshot save active
# Allows manually selecting a rectangular region
bindsym $mod+Shift+g exec grimshot save area
# Captures currently active output
bindsym $mod+Mod1+g exec grimshot save output
# Allows manually selecting a single window
bindsym $mod+Ctrl+g exec grimshot save window
# Screenshot (Grimshot)
#+end_src
*** Swaynag
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Turn the system off
bindsym $mod+Shift+e exec swaynag -t custom -m 'What action would you like to perform?' -b 'Shutdown' 'poweroff' -b 'Restart' 'poweroff --reboot' -b 'Suspend' 'systemctl suspend'
#+end_src
*** Autostart
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Notifications
exec_always --no-startup-id dunst
# Clamshell Mode Script
exec_always ~/dotfiles/.config/sway/clamshell.sh
# Wlsunset (Night Light)
exec_always wlsunset -l 47.6 -L -122.3 -t 3000 -T 6500
# flash focus
exec --no-startup-id flashfocus
# Clamshell Mode Script
exec_always ~/.config/sway/clamshell.sh
# udiskie - auto usb mounting
exec --no-startup-id /usr/bin/udiskie
# polkit
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
#exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
# Network Manager tray applet
exec /usr/bin/nm-applet --indicator
# Bluetooth manager tray applet
exec /usr/bin/blueman-applet
# Keepassxc
for_window [class="KeepassXC"] {
move scratchpad
}
exec /usr/bin/keepassxc
# Gtk
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
# Wlsunset (Night Light)
exec_always wlsunset -l 47.6 -L -122.3 -t 3000 -T 6500
# flash focus
exec_always flashfocus
#+end_src
*** Opacity
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
set $opacity 0.98
for_window [class=".*"] opacity $opacity
for_window [app_id=".*"] opacity $opacity
#+end_src
*** Borders/Gaps
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Window Borders
default_border none
default_floating_border none
# Gaps
smart_gaps on
gaps inner 10
gaps outer 10
gaps inner 5
gaps outer 2
#+end_src
*** App Window Behavior
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
for_window [app_id="galendae"] floating enable, sticky enable, move position cursor, move down 35
#+end_src
*** Idle Behavior
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Idle configuration
exec swayidle -w \
timeout 90 'swaylock -f' \
# timeout 120 'swaymsg "output * dpms off"'
# timeout 600 'swaymsg "output * dpms off"' \
# resume 'swaymsg "output * dpms on"' \
# before-sleep 'swaylock -f'
timeout 120 'swaylock -f' \
timeout 600 'swaymsg "output * dpms off"' \
timeout 15 'if pgrep -x swaylock; then swaymsg "output * dpms off"; fi' \
resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f'
#+end_src
*** Input
**** Keyboard
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
### Input configuration
#
# Example configuration:
@@ -260,19 +264,19 @@ input type:keyboard {
}
#+end_src
**** Mouse
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Hide mouse cursor after inactivity
seat * hide_cursor 4000
seat * hide_cursor 10000
#+end_src
*** Clamshell Mode
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
set $laptop eDP-1
bindswitch --reload --locked lid:on output $laptop disable
bindswitch --reload --locked lid:off output $laptop enable
#+end_src
When reloading sway while using clamshell mode, the displays may reset (i.e. enable the displays). We use a bash script to mitigate this:
#+begin_src shell :tangle ~/dotfiles/.config/sway/clamshell.sh :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/clamshell.sh :mkdirp yes
#!/usr/bin/bash
if grep -q open /proc/acpi/button/lid/LID/state; then
swaymsg output eDP-1 enable
@@ -281,28 +285,24 @@ else
fi
#+end_src
*** Wallpaper & Monitor(s)
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
#### WORK #####
# Monitors
# You can get the names of your outputs by running: swaymsg -t get_outputs
# output eDP-1 pos 0 0 res 1920x1200
# output DP-6 pos 1920 0 res 3440x1440
output HDMI-A-1 pos 0 0 res 2560x1440
# Wallpaper
output DP-6 bg /home/opal/dotfiles/.config/wallpapers/3.jpg fill #050402
output DP-5 bg /home/opal/dotfiles/.config/wallpapers/3.jpg fill #050402
output eDP-1 bg /home/opal/dotfiles/.config/wallpapers/3.jpg fill #050402
output HDMI-A-1 bg /home/opal/dotfiles/.config/wallpapers/3.jpg fill #050402
output eDP-1 scale 1
output eDP-1 pos 2560 0 res 1920x1080 bg ~/opalfiles/.config/wallpapers/priest.jpg fill
output HDMI-A-1 scale 1
output HDMI-A-1 pos 0 0 res 2560x1440 bg ~/opalfiles/.config/wallpapers/priest.jpg fill
#+end_src
*** Workspaces
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Assign workspaces to numbers
set $ws1 number 1
set $ws2 number 2
set $ws3 number 3
set $ws4 number 4
set $ws5 number 5
set $ws6 number 6
set $ws6 "work"
# Switch to workspace
bindsym $mod+1 workspace $ws1
@@ -321,14 +321,14 @@ bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6
#+end_src
*** Status Bar
#+begin_src shell :tangle ~/dotfiles/.config/sway/config :mkdirp yes
#+begin_src shell :tangle ~/.config/sway/config :mkdirp yes
# Status Bar:
bar {
swaybar_command waybar
}
#+end_src
*** Swaynag
#+begin_src shell :tangle ~/dotfiles/.config/swaynag/config :mkdirp yes
* Swaynag
#+begin_src shell :tangle ~/.config/swaynag/config :mkdirp yes
[custom]
font=Iosevka 13
dismiss-button=Dismiss
@@ -346,10 +346,10 @@ button-dismiss-gap=5
button-margin-right=5
button-padding=5
#+end_src
*** Swaylock
#+begin_src shell :tangle ~/dotfiles/.config/swaylock/config :mkdirp yes
* Swaylock
#+begin_src shell :tangle ~/.config/swaylock/config :mkdirp yes
# Image
image=/home/opal/dotfiles/.config/wallpapers/3.jpg
image=~/.config/wallpapers/wallpaper-town.jpg
scaling=fill
# Indicator
@@ -361,7 +361,7 @@ show-failed-attempts
#+end_src
* Waybar
*** waybar/config
#+begin_src shell :tangle ~/dotfiles/.config/waybar/config :mkdirp yes
#+begin_src shell :tangle ~/.config/waybar/config :mkdirp yes
{
"layer": "top",
"position": "top",
@@ -465,7 +465,7 @@ show-failed-attempts
}
#+end_src
*** waybar/style.css
#+begin_src shell :tangle ~/dotfiles/.config/waybar/style.css :mkdirp yes
#+begin_src shell :tangle ~/.config/waybar/style.css :mkdirp yes
\* {
border: none;
border-radius: 0;
@@ -610,8 +610,8 @@ window#waybar {
#+end_src
* Wofi
*** wofi/config
#+begin_src shell :tangle ~/dotfiles/.config/wofi/config :mkdirp yes
style=/home/opal/dotfiles/.config/wofi/style.css
#+begin_src shell :tangle ~/.config/wofi/config :mkdirp yes
style=/home/opal/.config/wofi/style.css
show=drun
width=1000
height=300
@@ -624,7 +624,7 @@ prompt=Search...
term=alacritty
#+end_src
*** wofi/style.css
#+begin_src shell :tangle ~/dotfiles/.config/wofi/style.css :mkdirp yes
#+begin_src shell :tangle ~/.config/wofi/style.css :mkdirp yes
*{
font-family: monospace;
}
@@ -671,9 +671,11 @@ color: white;
#text:selected {
}
#+end_src
* Dunst
#+begin_src shell :tangle ~/dotfiles/.config/dunst/dunstrc :mkdirp yes
#+begin_src shell :tangle ~/.config/dunst/dunstrc :mkdirp yes
[global]
monitor = 0
follow = keyboard
@@ -729,7 +731,7 @@ timeout = 0
#+end_src
* Galendae (Calendar Popup)
#+begin_src shell :tangle ~/dotfiles/.config/galendae-cal/galendae.conf
#+begin_src shell :tangle ~/.config/galendae-cal/galendae.conf
### WINDOW SETTINGS
# Stick window to all workspaces: 0=No, 1=Yes
@@ -782,7 +784,7 @@ week_start=1
#+end_src
* Qutebrowser
#+begin_src shell :tangle ~/dotfiles/.config/qutebrowser/config.py
#+begin_src shell :tangle ~/.config/qutebrowser/config.py
#!/usr/bin/env python3
config.load_autoconfig()
@@ -980,6 +982,7 @@ dog-dig () { dog "$1" A AAAA MX NS TXT SOA }
#+end_src
** zprofile
#+begin_src shell :tangle ~/opalfiles/.config/zsh/.zprofile :mkdirp yes
# Each new shell auto-imports all environment variables.
# Hence exporting needs to be done only once.
# Also, all non-login shells are descendants of a login shell.
@@ -989,16 +992,17 @@ dog-dig () { dog "$1" A AAAA MX NS TXT SOA }
# Only vars needed by external commands should be exported.
# Note that you can export vars w/out assigning a value to them.
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/keyring/ssh"
eval $(keychain --eval --quiet ry_ecdsa)
export XDG_CURRENT_DESKTOP=Unity
export BROWSER=/usr/bin/qutebrowser
export BW_SESSION="yWLHouCQOUDNWXOgK7eX/7lN4hvkqwyyjhfvhKlDwGjJOEpNX6G9dA/FLUqJ+QCpHxnGrVFDhmYjpGPmZZ+cnA=="
export XDG_CONFIG_HOME=~/.config
export XDG_CACHE_HOME=~/.cache
export XDG_DATA_HOME=~/.local/share
export XDG_STATE_HOME=~/.config/zsh
export EDITOR=vim
export VISUAL=vim
export XDG_CURRENT_DESKTOP=Unity
eval $(gnome-keyring-daemon --start --components=ssh)
export SSH_AUTH_SOCK
#+end_src
** zshenv
#+begin_src shell :tangle ~/opalfiles/.zshenv :mkdirp yes
@@ -1050,7 +1054,7 @@ Programs that I've retired for one reason or another, and their configurations.
#+begin_src shell
# Autostart
# Background
exec_always --no-startup-id feh --bg-scale ~/dotfiles/.config/wallpapers/fog-wallpaper.jpg
exec_always --no-startup-id feh --bg-scale ~/.config/wallpapers/fog-wallpaper.jpg
# Redshift
exec_always --no-startup-id redshift
@@ -1059,7 +1063,7 @@ exec_always --no-startup-id redshift
exec_always --no-startup-id picom &
# Turn Caps Lock into Escape because Caps Lock is useless unless you're a DB admin.
exec_always --no-startup-id xmodmap ~/dotfiles/.config/xmodmap/xmodmap
exec_always --no-startup-id xmodmap ~/.config/xmodmap/xmodmap
# Set key repeat rate so text cursors move faster.
exec_always --no-startup-id xset r rate 200 35
@@ -1118,7 +1122,7 @@ bindsym $mod+Return exec alacritty
bindsym $mod+Shift+q kill
# start dmenu (a program launcher)
bindsym $mod+d exec rofi -show drun -columns 3 -theme ~/dotfiles/.config/rofi/config.rasi
bindsym $mod+d exec rofi -show drun -columns 3 -theme ~/.config/rofi/config.rasi
# There also is the (new) i3-dmenu-desktop which only displays applications
# shipping a .desktop file. It is a wrapper around dmenu, so you need that
# installed.