Compare commits

..

No commits in common. "a3bf171078892e047e62c51802daa695aac43741" and "6371c75c0606ebe53e148d88b44e8b1af0d87854" have entirely different histories.

15 changed files with 212 additions and 513 deletions

View File

@ -28,6 +28,10 @@
libinput.enable = true;
desktopManager.plasma6 = {
enable = true;
};
blueman.enable = true;
};

View File

@ -169,7 +169,7 @@ in {
services.openssh.enable = true;
services.sanoid = lib.mkIf config.boot.zfs.enabled {
services.sanoid = {
enable = true;
datasets."system/home" = {
autosnap = true;
@ -207,7 +207,7 @@ in {
};
};
services.syncoid = lib.mkIf config.boot.zfs.enabled {
services.syncoid = {
enable = true;
# offset 30min from sanoid to reduce I/O spikes and give sanoid a chance to snapshot before we
# back up

View File

@ -1,60 +1,32 @@
##
##
# This is the configuration file for sway. Docs are in `man 5 sway`
##
##
#
## Environment sync with uwsm and restart daemons
#
exec_always 'UWSM_FINALIZE_VARNAMES="${UWSM_FINALIZE_VARNAMES}${UWSM_FINALIZE_VARNAMES:+ }PAM_KWALLET5_LOGIN" uwsm finalize && systemctl --user restart graphical-environment.target'
exec_always '/etc/sway/generate_palette >~/.cache/sway_palette.json'
#
## Variables
#
# Read `man 5 sway` for a complete reference.
# Super
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
set $term footclient
set $prelaunch uwsm app --
set $menu fuzzel "--launch-prefix=$prelaunch"
set $swaylock swaylock -c 1a1b26
### Variables
#
# General settings
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term footclient
# Your preferred application launcher
set $prelaunch uwsm app --
set $menu fuzzel "--launch-prefix=$prelaunch"
set $swaylock swaylock -c 1a1b26
# Support legacy X11 apps
xwayland enable
# Move containers to scratchpad when they try to minimize
scratchpad_minimize enable
# Move the mouse to a container when it focuses
mouse_warping container
# Focus windows by moving the mouse over them
focus_follows_mouse always
# When a window requests focus, give it to it
focus_on_window_activation focus
# Hold Super to drag windows around
floating_modifier $mod normal
xwayland enable
#
## Output configuration
#
### Output configuration
output * bg /etc/sway/bg fill
output * bg @background_image@ fill
# tolerable default; will be overridden by kanshi
output * scale 2
#
## Input configuration
#
### Input configuration
input type:keyboard {
xkb_options "caps:escape"
}
@ -66,245 +38,200 @@ input type:touchpad {
natural_scroll enabled
}
seat * keyboard_grouping smart
seat * xcursor_theme Adwaita 24
### Key bindings
#
## Launching apps
# Basics:
#
### Lock Screen
bindsym $mod+Backspace exec $swaylock
### Application Launcher
bindsym $mod+Return exec $menu
### Command Palette
bindsym $mod+Ctrl+Return exec /etc/sway/palette
### Terminal
bindsym $mod+t exec $prelaunch $term
bindsym $mod+Backspace exec $swaylock
# Start a launcher
bindsym $mod+Return exec $menu
# Kill focused window
bindsym $mod+Shift+q kill
bindsym Alt+F4 kill
# Start a terminal
bindsym $mod+t exec $prelaunch $term
# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging.
floating_modifier $mod normal
# Reload the configuration file
bindsym $mod+Shift+c reload
# Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
#
# Moving around:
#
mouse_warping container
focus_follows_mouse always
focus_on_window_activation focus
# 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
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
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
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
#
## Special keys
# Workspaces:
#
# Switch to workspace
bindsym $mod+1 workspace number 1
bindsym $mod+2 workspace number 2
bindsym $mod+3 workspace number 3
bindsym $mod+4 workspace number 4
bindsym $mod+5 workspace number 5
bindsym $mod+6 workspace number 6
bindsym $mod+7 workspace number 7
bindsym $mod+8 workspace number 8
bindsym $mod+9 workspace number 9
bindsym $mod+0 workspace number 10
# Move focused container to workspace
bindsym $mod+Shift+1 move container to workspace number 1; workspace number 1
bindsym $mod+Shift+2 move container to workspace number 2; workspace number 2
bindsym $mod+Shift+3 move container to workspace number 3; workspace number 3
bindsym $mod+Shift+4 move container to workspace number 4; workspace number 4
bindsym $mod+Shift+5 move container to workspace number 5; workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10; workspace number 10
# Note: workspaces can have any name you want, not just numbers.
# We just use 1-10 as the default.
bindsym $mod+Shift+Ctrl+$left move workspace to output left
bindsym $mod+Shift+Ctrl+$right move workspace to output right
bindsym $mod+Shift+Ctrl+$up move workspace to output up
bindsym $mod+Shift+Ctrl+$down move workspace to output down
# Rename
bindsym $mod+Shift+r exec "sway rename workspace to $(swaymsg -t get_workspaces | jq '.[] | select(.focused) | .num'):$(fuzzel --dmenu --prompt-only 'Rename: ')"
# Get blank workspace
bindsym $mod+grave exec "NUM=$(swaymsg -t get_workspaces | jq 'map(.num) | max + 1'); sway workspace number $NUM"
bindsym $mod+Shift+grave exec "NUM=$(swaymsg -t get_workspaces | jq 'map(.num) | max + 1'); sway move container to workspace number $NUM; sway workspace number $NUM"
#
# Layout stuff:
#
# You can "split" the current object of your focus with
# $mod+b or $mod+v, for horizontal and vertical splits
# respectively.
bindsym $mod+b splith
bindsym $mod+v splitv
# pulseaudio
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
# Switch the current container between different layout styles
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
# Media playback
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioPause exec playerctl play-pause
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioStop exec playerctl stop
# Make the current focus fullscreen
bindsym $mod+f fullscreen
# Brightness
bindsym --locked XF86MonBrightnessDown exec light -U 10
bindsym --locked XF86MonBrightnessUp exec light -A 10
# Toggle the current focus between tiling and floating mode
bindsym $mod+Shift+space floating toggle
# Screenshot
bindsym Print exec "FILEPATH=$(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y-%m-%h-%H:%M:%S').png; slurp | grim -g - \"$FILEPATH\" && wl-copy <\"$FILEPATH\""
# Swap focus between the tiling area and the floating area
# TODO if the last floating window in the workspace disappears, toggle back to tiling
bindsym $mod+space focus mode_toggle
bindsym Alt+tab exec /etc/sway/sws next
bindsym Alt+Shift+tab exec /etc/sway/sws prev
bindsym $mod+tab exec "swayr next-window all-workspaces"
bindsym $mod+Shift+tab exec "swayr prev-window all-workspaces"
### Open notification tray
bindsym $mod+n exec swaync-client -t -sw
### Discard all notifications
bindsym $mod+Ctrl+n exec swaync-client -C
### Toggle do-not-disturb mode
bindsym $mod+Shift+n exec swaync-client -d
# Move focus to the parent container
bindsym $mod+a focus parent
#
## General control
# Scratchpad:
#
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
### Kill current application
bindsym $mod+Shift+q kill
bindsym Alt+F4 kill
### Reload Sway configuration
bindsym $mod+Shift+c reload
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
# Move the currently focused window to the scratchpad
bindsym $mod+Shift+minus move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $mod+minus scratchpad show
#
## Normal motion
# Resizing containers:
#
### Focus window left
bindsym $mod+$left focus left
### Focus window down
bindsym $mod+$down focus down
### Focus window up
bindsym $mod+$up focus up
### Focus window right
bindsym $mod+$right focus right
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
# Move the focused window with the same, but add Shift
### Move focused window left
bindsym $mod+Shift+$left move left
### Move focused window down
bindsym $mod+Shift+$down move down
### Move focused window up
bindsym $mod+Shift+$up move up
### Move focused window right
bindsym $mod+Shift+$right move right
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Move the focused window across entire workspaces
### Move focused window to workspace left
bindsym $mod+Ctrl+$left move to workspace left
### Move focused window to workspace down
bindsym $mod+Ctrl+$down move to workspace down
### Move focused window to workspace up
bindsym $mod+Ctrl+$up move to workspace up
### Move focused window to workspace right
bindsym $mod+Ctrl+$right move to workspace right
bindsym $mod+Ctrl+Left move to workspace left
bindsym $mod+Ctrl+Down move to workspace down
bindsym $mod+Ctrl+Up move to workspace up
bindsym $mod+Ctrl+Right move to workspace right
# Move entire workspace to different output
### Move focused workspace to monitor left
bindsym $mod+Shift+Ctrl+$left move workspace to output left
### Move focused workspace to monitor right
bindsym $mod+Shift+Ctrl+$right move workspace to output right
### Move focused workspace to monitor up
bindsym $mod+Shift+Ctrl+$up move workspace to output up
### Move focused workspace to monitor down
bindsym $mod+Shift+Ctrl+$down move workspace to output down
bindsym $mod+Shift+Ctrl+Left move workspace to output left
bindsym $mod+Shift+Ctrl+Right move workspace to output right
bindsym $mod+Shift+Ctrl+Up move workspace to output up
bindsym $mod+Shift+Ctrl+Down move workspace to output down
### Focus workspace 1
bindsym $mod+1 workspace number 1
### Focus workspace 2
bindsym $mod+2 workspace number 2
### Focus workspace 3
bindsym $mod+3 workspace number 3
### Focus workspace 4
bindsym $mod+4 workspace number 4
### Focus workspace 5
bindsym $mod+5 workspace number 5
### Focus workspace 6
bindsym $mod+6 workspace number 6
### Focus workspace 7
bindsym $mod+7 workspace number 7
### Focus workspace 8
bindsym $mod+8 workspace number 8
### Focus workspace 9
bindsym $mod+9 workspace number 9
### Focus workspace 10
bindsym $mod+0 workspace number 10
### Move focused window to workspace 1
bindsym $mod+Shift+1 move container to workspace number 1; workspace number 1
### Move focused window to workspace 2
bindsym $mod+Shift+2 move container to workspace number 2; workspace number 2
### Move focused window to workspace 3
bindsym $mod+Shift+3 move container to workspace number 3; workspace number 3
### Move focused window to workspace 4
bindsym $mod+Shift+4 move container to workspace number 4; workspace number 4
### Move focused window to workspace 5
bindsym $mod+Shift+5 move container to workspace number 5; workspace number 5
### Move focused window to workspace 6
bindsym $mod+Shift+6 move container to workspace number 6; workspace number 6
### Move focused window to workspace 7
bindsym $mod+Shift+7 move container to workspace number 7; workspace number 7
### Move focused window to workspace 8
bindsym $mod+Shift+8 move container to workspace number 8; workspace number 8
### Move focused window to workspace 9
bindsym $mod+Shift+9 move container to workspace number 9; workspace number 9
### Move focused window to workspace 10
bindsym $mod+Shift+0 move container to workspace number 10; workspace number 10
### Rename current workspace
bindsym $mod+Shift+r exec "sway rename workspace to $(swaymsg -t get_workspaces | jq '.[] | select(.focused) | .num'):$(fuzzel --dmenu --prompt-only 'Rename: ')"
### Focus new workspace
bindsym $mod+grave exec "NUM=$(swaymsg -t get_workspaces | jq 'map(.num) | max + 1'); sway workspace number $NUM"
### Move focused window to new workspace
bindsym $mod+Shift+grave exec "NUM=$(swaymsg -t get_workspaces | jq 'map(.num) | max + 1'); sway move container to workspace number $NUM; sway workspace number $NUM"
#
## Tiling & Layout
#
### Change current container next split to horizontal
bindsym $mod+b splith
### Change current container next split to vertical
bindsym $mod+v splitv
### Change current container to stacking layout
bindsym $mod+s layout stacking
### Change current container to tabbed layout
bindsym $mod+w layout tabbed
### Change current container to split layout
bindsym $mod+e layout toggle split
### Toggle fullscreen for current window
bindsym $mod+f fullscreen
### Toggle focus between tiled and floating areas
bindsym $mod+space focus mode_toggle
### Toggle window between tiled and floating areas
bindsym $mod+Shift+space floating toggle
### Move focus to parent container
bindsym $mod+a focus parent
# TODO if the last floating window in the workspace disappears, toggle back to tiling
#
# Scratchpad
#
### Minimize focused window
bindsym $mod+Shift+minus move scratchpad
### Show next minimized window
bindsym $mod+minus scratchpad show
#
# Resizing containers
#
### Enter resize mode
bindsym $mod+r mode "resize"
mode "resize" {
### Shrink the current container's width
# left will shrink the containers width
# right will grow the containers width
# up will shrink the containers height
# down will grow the containers height
bindsym $left resize shrink width 10px
### Grow the current container's width
bindsym $down resize grow height 10px
### Shrink the current container's height
bindsym $up resize shrink height 10px
### Grow the current container's height
bindsym $right resize grow width 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to normal mode
bindsym Return mode "default"
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+r mode "resize"
#
# Utilities:
#
# Special keys to adjust volume via PulseAudio
bindsym --locked XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume \@DEFAULT_SINK@ +5%
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
#
## Theme and Style
#
# Special keys to control media via playerctl
bindsym --locked XF86AudioPlay exec playerctl play-pause
bindsym --locked XF86AudioPause exec playerctl play-pause
bindsym --locked XF86AudioPrev exec playerctl previous
bindsym --locked XF86AudioNext exec playerctl next
bindsym --locked XF86AudioStop exec playerctl stop
# Brightness
bindsym --locked XF86MonBrightnessDown exec light -U 10
bindsym --locked XF86MonBrightnessUp exec light -A 10
# Screenshot
bindsym Print exec "FILEPATH=$(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y-%m-%h-%H:%M:%S').png; slurp | grim -g - \"$FILEPATH\" && wl-copy <\"$FILEPATH\""
bindsym Alt+tab exec @sws@ next
bindsym Alt+Shift+tab exec @sws@ prev
bindsym $mod+tab exec "swayr next-window all-workspaces"
bindsym $mod+Shift+tab exec "swayr prev-window all-workspaces"
# swaync
bindsym $mod+n exec swaync-client -t -sw
# TokyoNight theme
# Property Name Border BG Text Indicator Child-border
client.focused #0a0b16 #2f343f #4477ff #4477ff #4477ff
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.urgent #ff80c0 #2f343f #d8dee8 #2f343f #2f343f
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
default_border pixel 1
@ -320,6 +247,7 @@ shadow_blur_radius 8
# Automation
#
for_window [class="xwaylandvideobridge"] move container to scratchpad
for_window [title="^fzf.kak.picker$"] {
floating enable
resize set width 90ppt height 90ppt
@ -328,3 +256,4 @@ for_window [title="^fzf.kak.picker$"] {
for_window [app_id="^com.hex-rays.$" title=""] {
floating enable
}
#no_focus [app_id="^com.hex-rays.$" title=""]

View File

@ -1,150 +0,0 @@
#!/usr/bin/env bash
set -e
declare -A vars
SED="$(type -p sed)"
NOT_FIRST=
subst() {
if [[ "${#vars[*]}" == 0 ]]; then
echo "$*"
else
cmd=("$SED" "-E")
for key in "${!vars[@]}"; do
cmd+=("-e" "s#\\\$${key}\>#${vars[$key]}#g")
done
"${cmd[@]}" <<<"$*"
fi
}
escape() {
sed -E -e 's/\\/\\\\/g' -e 's/"/\\"/g'
}
parse_inner() {
continued=""
comment=""
mode_stack=("default")
stack_top=0
while read -r line; do
# save special comment
if [[ "$line" = "###"* ]]; then
comment="${line#####}"
comment="${comment## }"
comment="${comment%% }"
continue
fi
line="${line%%#*}"
# handle continuations
line="${continued}${line}"
continued=""
if [[ "$line" == *"\\" ]]; then
continued="$line"
continue
fi
# parsing time...
parse_mode=start
bindsym_key=""
bindsym_cmd=""
set_key=""
set_value=""
tmp_mode="${mode_stack[$stack_top]}"
for word in $line; do
case "$parse_mode" in
start)
case "$word" in
bindsym)
if [[ -z "$comment" ]]; then
break
fi
parse_mode=bindsym_0 ;;
set)
parse_mode=set_0 ;;
include)
parse_mode=include_0 ;;
mode)
parse_mode=mode_0 ;;
"{")
stack_top=$(( stack_top + 1 ))
mode_stack[$stack_top]="$tmp_mode" ;;
"}")
stack_top=$(( stack_top - 1 )) ;;
*)
parse_mode=skip ;;
esac ;;
skip)
case "$word" in
"{")
stack_top=$(( stack_top + 1 ))
mode_stack[$stack_top]="$tmp_mode" ;;
"}")
stack_top=$(( stack_top - 1 )) ;;
esac ;;
mode_0)
tmp_mode="${word#\"}"
tmp_mode="${tmp_mode%\"}"
parse_mode=start ;;
bindsym_0)
case "$word" in
--whole-window|--border|--exclude-titlebar|--locked|--no-warn|--no-repeat|--inhibited)
# these options do nothing
continue ;;
--*)
# can't handle other options
break ;;
*)
bindsym_key="$(subst "$word" | sed -E -e 's/Mod4/Win/g' -e 's/Mod1/Alt/g')" || break
parse_mode=bindsym_1 ;;
esac ;;
bindsym_1)
case "$word" in
exec)
parse_mode=bindsym_2 ;;
*)
parse_mode=bindsym_2
bindsym_cmd="swaymsg '$word" ;;
esac ;;
bindsym_2)
if [[ -n "$bindsym_cmd" ]]; then
bindsym_cmd+=" "
fi
bindsym_cmd+="$word" ;;
set_0)
set_key="${word#\$}"
parse_mode=set_1 ;;
set_1)
if [[ -n "$set_value" ]]; then
set_value+=" "
fi
set_value+="$word" ;;
include_0)
parse_inner <"$word" ;;
esac
done
case "$parse_mode" in
bindsym_2)
if [[ -n "$NOT_FIRST" ]]; then
echo ","
else
NOT_FIRST=1
fi
if [[ "$bindsym_cmd" == "swaymsg "* ]]; then
bindsym_cmd+="'"
fi
echo "{\"key\": \"$(escape <<<"$bindsym_key")\", \"cmd\": \"$(subst "$bindsym_cmd" | escape)\", \"name\": \"$(escape <<<"$comment")\", \"mode\": \"$tmp_mode\"}"
comment=""
;;
set_1)
vars[$set_key]="$(subst "$set_value")"
;;
esac
done
}
echo '['
swaymsg -t get_config | jq -r .config | parse_inner
echo ']'

View File

@ -1,6 +0,0 @@
#!/usr/bin/env bash
set -e
cmd="$(jq --arg mode "$(swaymsg -t get_binding_state | jq -r .name)" -r '.[] | select(.mode == $mode) | "\( .name ) (\( .key ))\t\( .cmd )"' ~/.cache/sway_palette.json | fuzzel -w60 -d --with-nth=1 --accept-nth=2 "$@")"
[[ -n "$cmd" ]] && eval "$cmd"

View File

@ -1,17 +1,7 @@
{
"modules-left": ["sway/workspaces", "sway/scratchpad", "sway/mode"],
"modules-center": ["custom/palette", "custom/launcher", "clock"],
"modules-right": ["tray", "systemd-failed-units", "battery", "inhibitor", "custom/notification", "power-profiles-daemon", "custom/power"],
"custom/palette": {
"format": "󰋖",
"tooltip-format": "",
"on-click": "/etc/sway/palette --no-exit-on-keyboard-focus-loss",
},
"custom/launcher": {
"format": "",
"tooltip-format": "",
"on-click": "fuzzel --launch-prefix=\"uwsm app --\" --no-exit-on-keyboard-focus-loss",
},
"modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["clock"],
"modules-right": ["tray", "systemd-failed-units", "battery", "sway/scratchpad", "inhibitor", "custom/notification", "power-profiles-daemon", "custom/power"],
"systemd-failed-units": {
"format": "󱗗",
},
@ -75,12 +65,10 @@
},
"custom/power": {
"format": "",
"tooltip-format": "",
"on-click": "wlogout"
},
"sway/scratchpad": {
"format": "",
"on-click": "sway scratchpad show",
"format": "",
},
"power-profiles-daemon": {
"format": "{icon}",

View File

@ -30,13 +30,13 @@ window#waybar {
min-width: 24px;
}
/*-----modules indv----*/
#workspaces button, #scratchpad {
#workspaces button {
padding: 0px 10px;
background-color: rgba(0,42,51,0.85);
margin: 2px;
border: 1px solid rgba(0,0,0,0);
}
#workspaces button:hover, #scratchpad:hover {
#workspaces button:hover {
box-shadow: inherit;
background-color: rgba(153,153,50,1);
}
@ -114,17 +114,6 @@ window#waybar {
#custom-notification {
font-size: 12pt;
}
#custom-palette, #custom-launcher {
background-color: rgba(0,43,51,0.85);
border-radius: 100px;
padding: 1px 3px 1px 0px;
min-width: 24px;
font-size: 14pt;
}
#custom-palette:hover, #custom-launcher:hover {
box-shadow: inherit;
background-color: rgba(153,153,50,1);
}
/*-----Colors----*/
/*

View File

@ -1,3 +0,0 @@
[screencast]
exec_before=swaync-client --inhibitor-add "xdg-desktop-portal-wlr"
exec_after=swaync-client --inhibitor-remove "xdg-desktop-portal-wlr"

View File

@ -28,7 +28,6 @@ alias ls="ls ${lsflags[@]} --color=auto";
alias ll="ls -lh";
alias lh="ll -ab";
alias l="ls -ab";
alias rot13="tr A-Za-z N-ZA-Mn-za-m"
# https://stackoverflow.com/questions/6250698/how-to-decode-url-encoded-string-in-shell
function urldecode() {

View File

@ -36,7 +36,6 @@
#nixos-defcon.nixosModules.noscope
];
specialArgs = {
inherit nixpkgs;
#pkgs-unstable = nixpkgs-unstable.legacyPackages.${platform};
};
}; in {

View File

@ -1,2 +1,2 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDeeSDW2s8awLKVsdqalGrSWJ0zHdLXP8PE6MyFglGITyrjm5SKnyCEYL1wS6W/egJT2trNPwWl22D3UKYgWyzi6HLZAvJwT+eoyo1Ya3V+k2Do3AU0/LeJ0xjx9kO6E0IL++ozqpFPoT+OAmw6cZ3Eyir3VjTOdbsUz7QTPFHhuwJ37GAshpc6C5I/cralFs5NwRFpI2j9j6pu0RJFm2QBqG1zY6qIjFt5l9LuY5aOQBYSaFfmMa8BVJo6ZFQxySv+Xo51zEch2Nv/efXmiuJoCyUcrb9fTYRmtFchl/XAd+8SyvuxTIOYAhWpBgK8pK7i7wTxDcz4Lbi7iJKHYTX4hqw0qKPjF+K+XGVYqw2Cz38W861dx5bUqBwQP+4OsE/+/ThTZDe1dfwJumJgaUWU6Mnr1EYwEefGQZlU4lxvy6DyCYd6Y5s9KmPNSlxXQsArrhWymmfKELN+aRGMys/KnWwFAHnhGC6J1uBQjT/jsTXFXtsqHuICBTsCo5JhiIk= audrey@dandelion
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA0UbgxW37GCUcU9mkV9tGbFk+4v5+F4Raa0ZIMKmJuCg4I05v6YdKu+gkRyl25TgNto1se4kxUalma46/olw6IRglP0iNb4kiXMqFw3WhpMwZJiZ6+1FiebD3HNEEZisaA+Gef3Ae2n9jtOr/x17Vp2P5iUtFhyZHJUzbTOuRcNWHH2OME45d2AvlUAO13uDXhTXEbW4J9ubpXr87YHc4w0ealbW8Itkzl0prWcFHlkzTrGFX3b7UW5dhlvGxYgwbpSifu4LUkiSxgADbtP2LkRiUQYq3VMaZTc1arg6kygznqNS6SoybUHyVADS2z5GKY3l8fJhFUhQk2IVoKBCD audrey@violet
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDhSwzhg87H3auhS0ODXNHW5pqw7Re0FABfsN7wxDgz0P8F93emEW1eAY7WJT3N7wxqNui0vkpxVFcgqzFTalao+EMvru/8HI18SCX1xzmn1HgSb7gKzKerKMO8E9JO+VJkp9n7eKyWtxsj1uX3YYPsaGw/16FUFlRk4kiBkv01h/mA5R4+J4U67df1/Cwx3ryIDSjqm5Zkbp39rYmwBkkodCs4cqiyyZV5ZGA+RHll0b77POkbElaAORgdL41YmWyBOJo3oxK5D2Mei0WfYiGZtJ3XbrmhBO9bz/eep7wzWXkwx1Oy77jFtKO3tNSB972yd2uJqEGuMa3AEFXGIskB audrey@violet

View File

@ -7,6 +7,13 @@
let
cfg = config.audrey-sway;
swaylockCmd = "swaylock -c 1a1b26";
replaceVarsNotStupid = srcfile: replacements: let
subst = needleVar: needleVal: haystack: lib.strings.replaceString "@${needleVar}@" needleVal haystack;
start = builtins.readFile srcfile;
items = lib.attrsets.attrsToList replacements;
text = lib.foldr (item: acc: subst item.name item.value acc) start items;
in
builtins.toFile (builtins.baseNameOf srcfile) text;
in
{
options.audrey-sway = {
@ -16,29 +23,6 @@ in
default = ../dotfiles/smotsgamed.jpg;
description = "Background image file";
};
extraPaletteEntries = lib.mkOption {
type = lib.types.listOf (lib.types.module {
name = lib.mkOption {
type = lib.types.str;
description = "The name or description to show";
};
icon = lib.mkOption {
type = lib.types.nullOr lib.types.str;
description = "The icon to show";
default = null;
};
command = lib.mkOption {
type = lib.types.nullOr lib.types.str;
default = null;
description = ''
The shell command to run on invocation. If null, will inherit the command from your sway configuration based on the name.
The name must be present in the config on the same line as the bindsym command after "###".
'';
};
});
default = [];
description = "Extra entries to add to the command palette";
};
};
config = lib.mkIf cfg.enable {
@ -50,11 +34,10 @@ in
background.fit = "Fill";
GTK.application_prefer_dark_theme = true;
};
environment.etc."sway/config".source = lib.mkForce ../dotfiles/sway/config;
environment.etc."sway/sws".source = ../dotfiles/sway/sws.sh;
environment.etc."sway/generate_palette".source = ../dotfiles/sway/generate_palette.sh;
environment.etc."sway/palette".source = ../dotfiles/sway/palette.sh;
environment.etc."sway/bg".source = cfg.background;
environment.etc."sway/config".source = lib.mkForce (replaceVarsNotStupid ../dotfiles/sway/config {
sws = "${../dotfiles/sway/sws.sh}";
background_image = "${cfg.background}";
});
environment.etc."sway/greeter-config".source = lib.mkForce (pkgs.writeText "sway-greeter-config" ''
exec "${lib.getExe config.programs.regreet.package}; swaymsg exit"
output * scale 2
@ -82,7 +65,6 @@ in
environment.etc."xdg/swayr".source = ../dotfiles/swayr;
environment.etc."xdg/fuzzel".source = ../dotfiles/fuzzel;
environment.etc."xdg/foot".source = ../dotfiles/foot;
environment.etc."xdg/xdg-desktop-portal-wlr/config".source = ../dotfiles/xdg-desktop-portal-wlr;
programs.uwsm = {
enable = true;
@ -107,20 +89,17 @@ in
playerctl
grim
slurp
swayidle
waybar
wl-clipboard
wl-mirror
wlogout
fuzzel
gsettings-desktop-schemas
whitesur-icon-theme
glib
kdePackages.kwallet
networkmanagerapplet
adwaita-icon-theme
reversal-icon-theme
whitesur-icon-theme
xdg-user-dirs
];
extraSessionCommands = ''
export ELECTRON_OZONE_PLATFORM_HINT=wayland
@ -129,8 +108,7 @@ in
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
'';
};
environment.pathsToLink = [ "/share/gsettings-schemas" ];
#environment.sessionVariables.XDG_DATA_DIRS = [ "/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}" ];
environment.sessionVariables.XDG_DATA_DIRS = [ "/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}" ];
programs.light.enable = true;
security.pam.services.swaylock = {};
security.pam.loginLimits = [
@ -146,7 +124,6 @@ in
};
security.polkit.enable = true;
programs.dconf.enable = true;
services.power-profiles-daemon.enable = true;
systemd.user.targets.graphical-environment = { };
systemd.user.services.kanshi = {
description = "Monitor hotswap daemon";
@ -161,16 +138,12 @@ in
description = "Idle lock + sleep manager";
serviceConfig = {
Type = "simple";
ExecStart = ''
${lib.getExe pkgs.swayidle} -w \
timeout 300 'swaymsg "output * power off"' \
resume 'swaymsg "output * power on"' \
timeout 360 '${swaylockCmd} -f' \
timeout 600 'systemctl suspend' \
before-sleep '${swaylockCmd} -f'
ExecStart = ''${lib.getExe pkgs.swayidle} -w \
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
timeout 360 '${swaylockCmd} -f' \
timeout 600 'systemctl suspend' before-sleep '${swaylockCmd} -f'
'';
};
path = [ "/run/current-system/sw" ];
partOf = [ "graphical-environment.target" ];
wantedBy = [ "graphical-environment.target" ];
};
@ -238,9 +211,5 @@ in
};
systemd.packages = [ pkgs.foot ];
systemd.user.sockets.foot-server.wantedBy = [ "graphical-environment.target" ];
audrey-sway.extraPaletteEntries = [
{ name = "Command Palette"; }
];
};
}

View File

@ -1,13 +1,14 @@
#!/usr/bin/env bash
set -e
if [[ -n "$WIRELESS_INTERFACE" ]]; then
CURL_FLAGS="--interface $WIRELESS_INTERFACE"
if [[ -z "$WIRELESS_INTERFACE" ]]; then
echo "Please set \$WIRELESS_INTERFACE" >&2
exit 1
fi
CURRENT_TZ="$(timedatectl | grep 'Time zone:' | cut -d: -f2 | cut -d' ' -f2)"
NEW_TZ="$(curl -Ss $CURL_FLAGS https://ipaddresslocation.net/ip-to-timezone | grep -o 'Time Zone:.*' | cut -d' ' -f3)"
NEW_TZ="$(curl -Ss --interface "$WIRELESS_INTERFACE" https://ipaddresslocation.net/ip-to-timezone | grep -o 'Time Zone:.*' | cut -d' ' -f3)"
# COORDS="$(geoiplookup "$(curl -Ss --interface "$WIRELESS_INTERFACE" https://ipconfig.io)" | grep 'GeoIP City Edition, Rev 1' | grep -oE -- '-?[[:digit:]]+\.[[:digit:]]+, -?[[:digit:]]+\.[[:digit:]]+' | sed -E -e 's@, @+@g' -e 's@^@+@g' -e 's@\+-@-@g')"
# NEW_TZ="$( (echo 1; echo 1) | tzselect -c "$COORDS")"

View File

@ -1,19 +0,0 @@
{ config, lib, pkgs, nixpkgs, ... }:
{
imports = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-gnome.nix"
];
networking.hostName = "redshank";
networking.hostId = "e8d78622";
networking.useNetworkd = true;
systemd.network.enable = true;
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
system.stateVersion = "25.11";
security.sudo.wheelNeedsPassword = false;
}

View File

@ -1 +0,0 @@
nixos