Merge branch 'main' of gitea:ezri/dotfiles

This commit is contained in:
Ezri Brimhall 2024-10-20 16:08:09 -06:00
commit 7bc36d299b
Signed by: ezri
GPG Key ID: 3DA1675C4E9B9216
18 changed files with 2179 additions and 14 deletions

View File

@ -27,6 +27,10 @@
background-color: $bg0;
padding: 10px;
}
&.outline {
border: 1px solid $bg1;
}
}
.nebula {

View File

@ -54,17 +54,17 @@
(defwindow network-status
:monitor 2
:monitor 0
:geometry (geometry :width "200px"
:height "0px"
:x "407px"
:x "300px"
:y "0px"
:anchor "top right")
:exclusive false
:focusable false
:stacking "overlay"
(box :orientation "v"
:class "bar root bg"
:class "bar root bg outline"
:visible {network--show-details}
(network-detail)))

View File

@ -167,8 +167,8 @@
:spacing 20
:class "rightbox"
(vpn-network)
(network)
(mpris2)
(network)
(system-memory)
(system-cpu-avg)
(clock)))

View File

@ -39,14 +39,14 @@ column_meter_modes_0=2 2 2 2 2 2
column_meters_1=AllCPUs2 Blank MemorySwap
column_meter_modes_1=1 2 1
tree_view=0
sort_key=46
sort_key=47
tree_sort_key=46
sort_direction=-1
tree_sort_direction=-1
tree_view_always_by_pid=0
all_branches_collapsed=0
screen:Main=PID USER PRIORITY NICE M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=PERCENT_CPU
.sort_key=PERCENT_MEM
.tree_sort_key=PERCENT_CPU
.tree_view_always_by_pid=0
.tree_view=0

157
.config/hypr/hyprland.conf Normal file
View File

@ -0,0 +1,157 @@
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki (basic and advanced configuring)
#
monitor=,preferred,auto,1
input {
kb_file=/home/ezri/.config/hypr/keymap.xkb
kb_layout=
kb_options=compose:caps
follow_mouse=1
touchpad {
natural_scroll=no
}
sensitivity=0 # -1.0 - 1.0, 0 means no modification.
}
general {
main_mod=SUPER
gaps_in=5
gaps_out=20
border_size=2
col.active_border=0xff815986
col.inactive_border=0xff2d272f
apply_sens_to_raw=0 # whether to apply the sensitivity to raw input (e.g. used by games where you aim using your mouse)
damage_tracking=full # leave it on full unless you hate your GPU and want to make it suffer
layout=dwindle
}
decoration {
rounding=5
blur=0
blur_size=4 # minimum 1
blur_passes=1 # minimum 1
blur_new_optimizations=1
}
animations {
bezier=overshoot,0.05,0.2,0,1.1
bezier=overshoot2,0.05,0.3,0,1.3
enabled=1
animation=windows,1,3,overshoot2
animation=windowsIn,1,3,overshoot2
animation=border,1,3,overshoot
animation=fade,1,3,overshoot
animation=workspaces,1,3,overshoot
}
gestures {
workspace_swipe=yes
}
# example window rules
# for windows named/classed as abc and xyz
#windowrule=move 69 420,abc
#windowrule=size 420 69,abc
#windowrule=tile,xyz
#windowrule=float,abc
#windowrule=pseudo,abc
#windowrule=monitor 0,xyz
# some nice mouse binds
bindm=SUPER,mouse:272,movewindow
bindm=SUPER,mouse:273,resizewindow
# My binds
bind=SUPER,RETURN,exec,hypr-sensible-launcher
bind=SUPERSHIFT,RETURN,exec,alacritty
bind=SUPERSHIFT,Q,killactive,
bind=SUPERSHIFT,E,exit,
bind=SUPERALT,F,togglefloating,
bind=SUPER,D,exec,wofi --show drun
bind=SUPER,B,movefocus,l
bind=SUPER,F,movefocus,r
bind=SUPER,P,movefocus,u
bind=SUPER,N,movefocus,d
bind=SUPERSHIFT,B,movewindow,l
bind=SUPERSHIFT,F,movewindow,r
bind=SUPERSHIFT,P,movewindow,u
bind=SUPERSHIFT,N,movewindow,d
bind=SUPER,Tab,changegroupactive,f
bind=SUPERSHIFT,Tab,changegroupactive,b
bind=SUPER,T,togglegroup,
bind=SUPER,1,workspace,1
bind=SUPER,2,workspace,2
bind=SUPER,3,workspace,3
bind=SUPER,4,workspace,4
bind=SUPER,5,workspace,5
bind=SUPER,6,workspace,6
bind=SUPER,7,workspace,7
bind=SUPER,8,workspace,8
bind=SUPER,9,workspace,9
bind=SUPER,0,workspace,10
bind=SUPERSHIFT,1,movetoworkspace,1
bind=SUPERSHIFT,2,movetoworkspace,2
bind=SUPERSHIFT,3,movetoworkspace,3
bind=SUPERSHIFT,4,movetoworkspace,4
bind=SUPERSHIFT,5,movetoworkspace,5
bind=SUPERSHIFT,6,movetoworkspace,6
bind=SUPERSHIFT,7,movetoworkspace,7
bind=SUPERSHIFT,8,movetoworkspace,8
bind=SUPERSHIFT,9,movetoworkspace,9
bind=SUPERSHIFT,0,movetoworkspace,10
# Audio key bindings
bind=,XF86AudioPlay,exec,playerctl play-pause
bind=,XF86AudioNext,exec,playerctl next
bind=,XF86AudioPrev,exec,playerctl previous
# Volume key bindings
bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +1%
bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -1%
bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle
# Brightness key bindings
bind=,XF86MonBrightnessUp,exec,light -A 5
bind=,XF86MonBrightnessDown,exec,light -U 5
# Lock screen
bind=SUPER,L,exec,loginctl lock-session
# Notification dismissal
bind=SUPERCTRL,SPACE,exec,dunstctl close
# Start daemons
exec-once=systemctl --user import-environment DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP
exec-once=dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE XDG_CURRENT_DESKTOP
exec=systemctl --user start hypr-session.target
# Start status bar
exec=eww open hypr-mainbar
wsbind=1,eDP-1
wsbind=2,eDP-1
wsbind=3,eDP-1
wsbind=4,eDP-1
wsbind=5,eDP-1
wsbind=6,eDP-1
wsbind=7,eDP-1
wsbind=8,eDP-1
wsbind=9,eDP-1
wsbind=10,eDP-1

1564
.config/hypr/keymap.xkb Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,131 @@
{
"default_context": "personal",
"contexts": {
"personal": {
"left": [
{
"index": 10,
"name": "config",
"exec": "pavucontrol",
"program_name": "pavucontrol"
},
{
"index": 9,
"name": "email",
"exec": "alacritty",
"program_name": "console"
},
{
"index": 8,
"name": "discord",
"exec": "discord",
"program_name": "discord"
},
{
"index": 7,
"name": "music",
"exec": "feishin",
"program_name": "feishin"
},
{
"index": 6,
"name": "documents",
"exec": "alacritty",
"program_name": "console"
},
{
"index": 5,
"name": "VM management",
"exec": "virt-manager",
"program_name": "virt-manager"
},
{
"index": 4,
"name": "project",
"exec": "env MOZ_ENABLE_WAYLAND=0 firefox --new-window",
"program_name": "firefox"
},
{
"index": 3,
"name": "internet",
"exec": "env MOZ_ENABLE_WAYLAND=0 firefox --new-window",
"program_name": "firefox"
},
{
"index": 2,
"name": "code",
"exec": "alacritty",
"program_name": "console"
},
{
"index": 1,
"name": "terminal",
"exec": "alacritty",
"program_name": "console"
}
],
"right": [
{
"index": 11,
"name": "terminal",
"exec": "alacritty",
"program_name": "console"
},
{
"index": 12,
"name": "code",
"exec": "alacritty",
"program_name": "console"
},
{
"index": 13,
"name": "internet",
"exec": "env MOZ_ENABLE_WAYLAND=0 firefox --new-window",
"program_name": "firefox"
},
{
"index": 14,
"name": "steam",
"exec": "steam",
"program_name": "steam"
},
{
"index": 15,
"name": "minecraft",
"exec": "prismlauncher",
"program_name": "prismlauncher"
},
{
"index": 16,
"name": "images",
"exec": "gimp",
"program_name": "gimp"
},
{
"index": 17,
"name": "video",
"exec": "jellyfinmediaplayer",
"program_name": "jellyfinmediaplayer"
},
{
"index": 18,
"name": "slack",
"exec": "slack",
"program_name": "slack"
},
{
"index": 19,
"name": "zoom",
"exec": "zoom",
"program_name": "zoom"
},
{
"index": 20,
"name": "config",
"exec": "pavucontrol",
"program_name": "pavucontrol"
}
]
}
}
}

View File

@ -0,0 +1,76 @@
{
"default_context": "personal",
"display_ordering": ["builtin"],
"display_layout": {
"builtin": "eDP-1"
},
"contexts": {
"personal": {
"builtin": [
{
"index": 1,
"name": "terminal",
"exec": "console",
"program_name": "console"
},
{
"index": 2,
"name": "code",
"exec": "emacsclient",
"args": ["-nc"],
"program_name": "emacsclient"
},
{
"index": 3,
"name": "internet",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
{
"index": 4,
"name": "project",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
{
"index": 5,
"name": "servers",
"exec": "virt-manager",
"program_name": "virt-manager"
},
{
"index": 6,
"name": "steam",
"exec": "steam",
"program_name": "steam"
},
{
"index": 7,
"name": "media",
"exec": "jellyfinmediaplayer",
"program_name": "jellyfinmediaplayer"
},
{
"index": 8,
"name": "real-time comms",
"exec": "discord",
"program_name": "discord"
},
{
"index": 9,
"name": "messages",
"exec": "thunderbird",
"program_name": "thunderbird"
},
{
"index": 10,
"name": "config",
"exec": "pavucontrol",
"program_name": "pavucontrol"
}
]
}
}
}

View File

@ -0,0 +1,161 @@
{
"default_context": "work",
"display_ordering": ["left", "center", "right"],
"display_layout": {
"left": "DP-5",
"right": "DP-7",
"center": "DP-4"
},
"contexts": {
"work": {
"left": [
{
"index": 5,
"name": "discord",
"exec": "discord",
"program_name": "discord"
},
{
"index": 4,
"name": "project",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
{
"index": 3,
"name": "documentation",
"exec": "firefox",
"args": ["--new-window"],
"environ": {},
"program_name": "firefox"
},
{
"index": 2,
"name": "code",
"exec": "emacsclient",
"args": ["-nc"],
"program_name": "emacsclient"
},
{
"index": 1,
"name": "console",
"exec": "console",
"program_name": "console"
}
],
"center": [
{
"index": 6,
"name": "console",
"exec": "console",
"program_name": "console"
},
{
"index": 7,
"name": "code",
"exec": "emacsclient",
"args": ["-nc"],
"program_name": "emacsclient"
},
{
"index": 8,
"name": "internet",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
{
"index": 9,
"name": "project",
"exec": "firefox-developer-edition",
"args": ["-start-debugger-server", "--new-window"],
"program_name": "firefox-developer-edition"
},
{
"index": 10,
"name": "server management",
"exec": "virt-manager",
"program_name": "virt-manager",
"systemd": false
},
{
"index": 11,
"name": "password management",
"exec": "bitwarden-desktop",
"program_name": "bitwarden"
},
{
"index": 12,
"name": "video",
"exec": "jellyfinmediaplayer",
"program_name": "jellyfinmediaplayer"
},
{
"index": 13,
"name": "edex-ui",
"exec": "edex-ui",
"program_name": "edex-ui"
},
{
"index": 14,
"name": "mail",
"exec": "thunderbird",
"program_name": "thunderbird",
"environ": {
"MOZ_ENABLE_WAYLAND": "1"
}
},
{
"index": 15,
"name": "config",
"exec": "console",
"program_name": "console"
}
],
"right": [
{
"index": 16,
"name": "console",
"exec": "console",
"program_name": "console"
},
{
"index": 17,
"name": "code",
"exec": "emacsclient",
"args": ["-nc"],
"program_name": "emacsclient"
},
{
"index": 18,
"name": "music",
"exec": "feishin",
"program_name": "feishin"
},
{
"index": 19,
"name": "project",
"exec": "firefox",
"args": ["--new-window"],
"program_name": "firefox"
},
{
"index": 20,
"name": "slack",
"exec": "slack",
"program_name": "slack",
"args": [
"--enable-features=UseOzonePlatform",
"--ozone-platform=wayland",
"--enable-gpu-rasterization"
],
"memory_profile": {
"high": "800M",
"max": "1.2G"
}
}
]
}
}
}

View File

@ -165,6 +165,12 @@ for_window [app_id="Alacritty"] {
client.unfocused $colorbackground $colorwallpaper $colorprimary $colorbackground $colorbackground
}
## Floating windows should have titles
for_window [floating] border normal 1
## Thunderbird New.* windows should float
for_window [app_id="thunderbird" title="(New|Write)"] floating enable
### ###
# Application Keybinds #
### ###

View File

@ -2,7 +2,7 @@
timeout 10 'pgrep swaylock &> /dev/null && swaymsg "output * power off"' resume 'pgrep swaylock &> /dev/null && swaymsg "output * power on" && gpg-connect-agent UPDATESTARTUPTTY /bye'
timeout 15 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGSTOP electron' resume 'pgrep swaylock &> /dev/null && pkill -u 1000 -SIGCONT electron'
timeout 150 'loginctl lock-session && swaymsg "output * power off"'
timeout 300 'loginctl lock-session && swaymsg "output * power off"'
lock ~/.local/bin/screenlock
before-sleep 'loginctl lock-session'
unlock 'pkill -SIGUSR1 swaylock'

View File

@ -101,7 +101,10 @@
"index": 14,
"name": "mail",
"exec": "thunderbird",
"program_name": "thunderbird"
"program_name": "thunderbird",
"environ": {
"MOZ_ENABLE_WAYLAND": "1"
}
},
{
"index": 15,
@ -127,8 +130,8 @@
{
"index": 18,
"name": "music",
"exec": "spotify",
"program_name": "spotify"
"exec": "feishin",
"program_name": "feishin"
},
{
"index": 19,

View File

@ -4,7 +4,7 @@ BindTo=sway-session.target
[Service]
Type=simple
ExecStart=/usr/bin/lxpolkit
ExecStart=/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
[Install]
WantedBy=sway-session.target

View File

@ -27,6 +27,8 @@ alias sudo='sudo '
alias sign='gpg --sign-with ezri@ezri.dev --detach-sign'
alias verify='gpg --verify'
alias bw-personal='BITWARDENCLI_APPDATA_DIR=~/.config/bw-cli-personal bw'
function didifuckingstutter {
echo $fg[blue]Apologies, right away.$fg[default]
# Run the last command as root

View File

@ -6,4 +6,3 @@ setopt auto_pushd
# Ignore duplicate commands and commands starting with space
setopt hist_ignore_dups
setopt hist_ignore_space

View File

@ -75,3 +75,62 @@ function lsssh() {
echo "$user@$host"
done
}
function bwunlock() {
# Unlock Bitwarden vault and export session key
local bwfd
local bwpasswd
local secretstore
local bwcmd
local skipkeyring
# Use default Bitwarden account
secretstore="bw"
bwcmd="bw"
skipkeyring=0
while [[ $# -gt 0 ]]; do
case $1 in
--personal)
# Use personal Bitwarden account
secretstore="bw-personal"
bwcmd="env BITWARDENCLI_APPDATA_DIR=$HOME/.config/bw-cli-personal bw"
;;
--debug)
# Enable debug output
set -x
;;
--ask)
# Prompt for Bitwarden password
skipkeyring=1
;;
*)
echo "Unknown option: $1" >&2
;;
esac
shift
done
# Attempt to read Bitwarden password from keyring
if ! (( skipkeyring )); then
bwpasswd=$(secret-tool lookup service $secretstore 2>/dev/null)
fi
if [[ -z "${bwpasswd}" ]]; then
# If password is not found in keyring, prompt for it
read -s -p "Enter Bitwarden password: " bwpasswd
echo
# Store Bitwarden password in keyring
if ! (( skipkeyring )); then
secret-tool store --label="Bitwarden" service $secretstore
fi
fi
# Unlock Bitwarden vault and export session key
export BW_SESSION=$(eval $bwcmd unlock --raw "'$bwpasswd'" 2>/dev/tty)
if [[ -z "${BW_SESSION}" ]]; then
echo "Failed to unlock Bitwarden vault" >&2
return 1
else
echo "Bitwarden vault unlocked"
fi
}

View File

@ -1,15 +1,18 @@
#!/usr/bin/env zsh
exec </dev/null
exec > >(systemd-cat -t gpclient -p info) 2>&1
# Toggles the GlobalProtect VPN connection on and off
# Get the current state of the VPN connection
if pgrep gpclient &>/dev/null; then
# VPN is connected, so disconnect
echo "Disconnecting from VPN..."
pkexec gpclient disconnect
pkexec env TZ=Etc/UTC gpclient disconnect
else
# VPN is disconnected, so connect
echo "Connecting to VPN..."
# pkexec doesn't pass the DISPLAY and XAUTHORITY environment variables, so we need to pass them manually
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY gpclient connect gp.usu.edu
pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY TZ=Etc/UTC gpclient connect gp.usu.edu
fi

Binary file not shown.