Compare commits
2 Commits
6371c75c06
...
a3bf171078
| Author | SHA1 | Date |
|---|---|---|
|
|
a3bf171078 | |
|
|
6e91bf953f |
|
|
@ -28,10 +28,6 @@
|
||||||
|
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
|
|
||||||
desktopManager.plasma6 = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
blueman.enable = true;
|
blueman.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -169,7 +169,7 @@ in {
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
|
||||||
services.sanoid = {
|
services.sanoid = lib.mkIf config.boot.zfs.enabled {
|
||||||
enable = true;
|
enable = true;
|
||||||
datasets."system/home" = {
|
datasets."system/home" = {
|
||||||
autosnap = true;
|
autosnap = true;
|
||||||
|
|
@ -207,7 +207,7 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.syncoid = {
|
services.syncoid = lib.mkIf config.boot.zfs.enabled {
|
||||||
enable = true;
|
enable = true;
|
||||||
# offset 30min from sanoid to reduce I/O spikes and give sanoid a chance to snapshot before we
|
# offset 30min from sanoid to reduce I/O spikes and give sanoid a chance to snapshot before we
|
||||||
# back up
|
# back up
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,60 @@
|
||||||
|
##
|
||||||
|
##
|
||||||
|
# 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 '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'
|
||||||
|
|
||||||
# Read `man 5 sway` for a complete reference.
|
#
|
||||||
|
## Variables
|
||||||
|
#
|
||||||
|
|
||||||
### Variables
|
# Super
|
||||||
|
|
||||||
# Logo key. Use Mod1 for Alt.
|
|
||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
# Home row direction keys, like vim
|
|
||||||
set $left h
|
set $left h
|
||||||
set $down j
|
set $down j
|
||||||
set $up k
|
set $up k
|
||||||
set $right l
|
set $right l
|
||||||
# Your preferred terminal emulator
|
|
||||||
set $term footclient
|
set $term footclient
|
||||||
# Your preferred application launcher
|
|
||||||
set $prelaunch uwsm app --
|
set $prelaunch uwsm app --
|
||||||
set $menu fuzzel "--launch-prefix=$prelaunch"
|
set $menu fuzzel "--launch-prefix=$prelaunch"
|
||||||
set $swaylock swaylock -c 1a1b26
|
set $swaylock swaylock -c 1a1b26
|
||||||
|
|
||||||
|
#
|
||||||
|
# General settings
|
||||||
|
#
|
||||||
|
|
||||||
|
# Support legacy X11 apps
|
||||||
xwayland enable
|
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
|
||||||
|
|
||||||
### Output configuration
|
#
|
||||||
|
## Output configuration
|
||||||
|
#
|
||||||
|
|
||||||
output * bg @background_image@ fill
|
output * bg /etc/sway/bg fill
|
||||||
# tolerable default; will be overridden by kanshi
|
# tolerable default; will be overridden by kanshi
|
||||||
output * scale 2
|
output * scale 2
|
||||||
|
|
||||||
### Input configuration
|
#
|
||||||
|
## Input configuration
|
||||||
|
#
|
||||||
|
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
xkb_options "caps:escape"
|
xkb_options "caps:escape"
|
||||||
}
|
}
|
||||||
|
|
@ -38,173 +66,32 @@ input type:touchpad {
|
||||||
natural_scroll enabled
|
natural_scroll enabled
|
||||||
}
|
}
|
||||||
seat * keyboard_grouping smart
|
seat * keyboard_grouping smart
|
||||||
|
seat * xcursor_theme Adwaita 24
|
||||||
|
|
||||||
### Key bindings
|
|
||||||
#
|
#
|
||||||
# Basics:
|
## Launching apps
|
||||||
#
|
#
|
||||||
|
|
||||||
|
### Lock Screen
|
||||||
bindsym $mod+Backspace exec $swaylock
|
bindsym $mod+Backspace exec $swaylock
|
||||||
# Start a launcher
|
### Application Launcher
|
||||||
bindsym $mod+Return exec $menu
|
bindsym $mod+Return exec $menu
|
||||||
|
### Command Palette
|
||||||
# Kill focused window
|
bindsym $mod+Ctrl+Return exec /etc/sway/palette
|
||||||
bindsym $mod+Shift+q kill
|
### Terminal
|
||||||
bindsym Alt+F4 kill
|
|
||||||
|
|
||||||
# Start a terminal
|
|
||||||
bindsym $mod+t exec $prelaunch $term
|
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:
|
## Special keys
|
||||||
#
|
#
|
||||||
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
|
# pulseaudio
|
||||||
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
|
|
||||||
|
|
||||||
#
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Switch the current container between different layout styles
|
|
||||||
bindsym $mod+s layout stacking
|
|
||||||
bindsym $mod+w layout tabbed
|
|
||||||
bindsym $mod+e layout toggle split
|
|
||||||
|
|
||||||
# Make the current focus fullscreen
|
|
||||||
bindsym $mod+f fullscreen
|
|
||||||
|
|
||||||
# Toggle the current focus between tiling and floating mode
|
|
||||||
bindsym $mod+Shift+space floating toggle
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
# Move focus to the parent container
|
|
||||||
bindsym $mod+a focus parent
|
|
||||||
|
|
||||||
#
|
|
||||||
# Scratchpad:
|
|
||||||
#
|
|
||||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
|
||||||
# You can send windows there and get them back later.
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
||||||
#
|
|
||||||
# Resizing containers:
|
|
||||||
#
|
|
||||||
mode "resize" {
|
|
||||||
# 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
|
|
||||||
bindsym $down resize grow height 10px
|
|
||||||
bindsym $up resize shrink height 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 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 XF86AudioMute exec pactl set-sink-mute \@DEFAULT_SINK@ toggle
|
||||||
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
|
bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume \@DEFAULT_SINK@ -5%
|
||||||
bindsym --locked XF86AudioRaiseVolume 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
|
bindsym --locked XF86AudioMicMute exec pactl set-source-mute \@DEFAULT_SOURCE@ toggle
|
||||||
|
|
||||||
# Special keys to control media via playerctl
|
# Media playback
|
||||||
bindsym --locked XF86AudioPlay exec playerctl play-pause
|
bindsym --locked XF86AudioPlay exec playerctl play-pause
|
||||||
bindsym --locked XF86AudioPause exec playerctl play-pause
|
bindsym --locked XF86AudioPause exec playerctl play-pause
|
||||||
bindsym --locked XF86AudioPrev exec playerctl previous
|
bindsym --locked XF86AudioPrev exec playerctl previous
|
||||||
|
|
@ -218,20 +105,206 @@ bindsym $mod+r mode "resize"
|
||||||
# Screenshot
|
# 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 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+tab exec /etc/sway/sws next
|
||||||
bindsym Alt+Shift+tab exec @sws@ prev
|
bindsym Alt+Shift+tab exec /etc/sway/sws prev
|
||||||
bindsym $mod+tab exec "swayr next-window all-workspaces"
|
bindsym $mod+tab exec "swayr next-window all-workspaces"
|
||||||
bindsym $mod+Shift+tab exec "swayr prev-window all-workspaces"
|
bindsym $mod+Shift+tab exec "swayr prev-window all-workspaces"
|
||||||
|
|
||||||
# swaync
|
### Open notification tray
|
||||||
bindsym $mod+n exec swaync-client -t -sw
|
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
|
||||||
|
|
||||||
|
#
|
||||||
|
## General control
|
||||||
|
#
|
||||||
|
|
||||||
|
### 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'
|
||||||
|
|
||||||
|
#
|
||||||
|
## Normal motion
|
||||||
|
#
|
||||||
|
|
||||||
|
### 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
|
||||||
|
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 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"
|
||||||
|
bindsym Escape mode "default"
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
## Theme and Style
|
||||||
|
#
|
||||||
|
|
||||||
# TokyoNight theme
|
# TokyoNight theme
|
||||||
# Property Name Border BG Text Indicator Child-border
|
# Property Name Border BG Text Indicator Child-border
|
||||||
client.focused #0a0b16 #2f343f #4477ff #4477ff #4477ff
|
client.focused #0a0b16 #2f343f #4477ff #4477ff #4477ff
|
||||||
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
||||||
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
||||||
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
client.urgent #ff80c0 #2f343f #d8dee8 #2f343f #2f343f
|
||||||
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
|
||||||
|
|
||||||
default_border pixel 1
|
default_border pixel 1
|
||||||
|
|
@ -247,7 +320,6 @@ shadow_blur_radius 8
|
||||||
# Automation
|
# Automation
|
||||||
#
|
#
|
||||||
|
|
||||||
for_window [class="xwaylandvideobridge"] move container to scratchpad
|
|
||||||
for_window [title="^fzf.kak.picker$"] {
|
for_window [title="^fzf.kak.picker$"] {
|
||||||
floating enable
|
floating enable
|
||||||
resize set width 90ppt height 90ppt
|
resize set width 90ppt height 90ppt
|
||||||
|
|
@ -256,4 +328,3 @@ for_window [title="^fzf.kak.picker$"] {
|
||||||
for_window [app_id="^com.hex-rays.$" title=""] {
|
for_window [app_id="^com.hex-rays.$" title=""] {
|
||||||
floating enable
|
floating enable
|
||||||
}
|
}
|
||||||
#no_focus [app_id="^com.hex-rays.$" title=""]
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,150 @@
|
||||||
|
#!/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 ']'
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/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"
|
||||||
|
|
@ -1,7 +1,17 @@
|
||||||
{
|
{
|
||||||
"modules-left": ["sway/workspaces", "sway/mode"],
|
"modules-left": ["sway/workspaces", "sway/scratchpad", "sway/mode"],
|
||||||
"modules-center": ["clock"],
|
"modules-center": ["custom/palette", "custom/launcher", "clock"],
|
||||||
"modules-right": ["tray", "systemd-failed-units", "battery", "sway/scratchpad", "inhibitor", "custom/notification", "power-profiles-daemon", "custom/power"],
|
"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",
|
||||||
|
},
|
||||||
"systemd-failed-units": {
|
"systemd-failed-units": {
|
||||||
"format": "",
|
"format": "",
|
||||||
},
|
},
|
||||||
|
|
@ -65,10 +75,12 @@
|
||||||
},
|
},
|
||||||
"custom/power": {
|
"custom/power": {
|
||||||
"format": "",
|
"format": "",
|
||||||
|
"tooltip-format": "",
|
||||||
"on-click": "wlogout"
|
"on-click": "wlogout"
|
||||||
},
|
},
|
||||||
"sway/scratchpad": {
|
"sway/scratchpad": {
|
||||||
"format": "",
|
"format": "",
|
||||||
|
"on-click": "sway scratchpad show",
|
||||||
},
|
},
|
||||||
"power-profiles-daemon": {
|
"power-profiles-daemon": {
|
||||||
"format": "{icon}",
|
"format": "{icon}",
|
||||||
|
|
|
||||||
|
|
@ -30,13 +30,13 @@ window#waybar {
|
||||||
min-width: 24px;
|
min-width: 24px;
|
||||||
}
|
}
|
||||||
/*-----modules indv----*/
|
/*-----modules indv----*/
|
||||||
#workspaces button {
|
#workspaces button, #scratchpad {
|
||||||
padding: 0px 10px;
|
padding: 0px 10px;
|
||||||
background-color: rgba(0,42,51,0.85);
|
background-color: rgba(0,42,51,0.85);
|
||||||
margin: 2px;
|
margin: 2px;
|
||||||
border: 1px solid rgba(0,0,0,0);
|
border: 1px solid rgba(0,0,0,0);
|
||||||
}
|
}
|
||||||
#workspaces button:hover {
|
#workspaces button:hover, #scratchpad:hover {
|
||||||
box-shadow: inherit;
|
box-shadow: inherit;
|
||||||
background-color: rgba(153,153,50,1);
|
background-color: rgba(153,153,50,1);
|
||||||
}
|
}
|
||||||
|
|
@ -114,6 +114,17 @@ window#waybar {
|
||||||
#custom-notification {
|
#custom-notification {
|
||||||
font-size: 12pt;
|
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----*/
|
/*-----Colors----*/
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
[screencast]
|
||||||
|
exec_before=swaync-client --inhibitor-add "xdg-desktop-portal-wlr"
|
||||||
|
exec_after=swaync-client --inhibitor-remove "xdg-desktop-portal-wlr"
|
||||||
|
|
@ -28,6 +28,7 @@ alias ls="ls ${lsflags[@]} --color=auto";
|
||||||
alias ll="ls -lh";
|
alias ll="ls -lh";
|
||||||
alias lh="ll -ab";
|
alias lh="ll -ab";
|
||||||
alias l="ls -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
|
# https://stackoverflow.com/questions/6250698/how-to-decode-url-encoded-string-in-shell
|
||||||
function urldecode() {
|
function urldecode() {
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@
|
||||||
#nixos-defcon.nixosModules.noscope
|
#nixos-defcon.nixosModules.noscope
|
||||||
];
|
];
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
|
inherit nixpkgs;
|
||||||
#pkgs-unstable = nixpkgs-unstable.legacyPackages.${platform};
|
#pkgs-unstable = nixpkgs-unstable.legacyPackages.${platform};
|
||||||
};
|
};
|
||||||
}; in {
|
}; in {
|
||||||
|
|
|
||||||
2
keys/ssh
2
keys/ssh
|
|
@ -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 AAAAB3NzaC1yc2EAAAADAQABAAABgQDeeSDW2s8awLKVsdqalGrSWJ0zHdLXP8PE6MyFglGITyrjm5SKnyCEYL1wS6W/egJT2trNPwWl22D3UKYgWyzi6HLZAvJwT+eoyo1Ya3V+k2Do3AU0/LeJ0xjx9kO6E0IL++ozqpFPoT+OAmw6cZ3Eyir3VjTOdbsUz7QTPFHhuwJ37GAshpc6C5I/cralFs5NwRFpI2j9j6pu0RJFm2QBqG1zY6qIjFt5l9LuY5aOQBYSaFfmMa8BVJo6ZFQxySv+Xo51zEch2Nv/efXmiuJoCyUcrb9fTYRmtFchl/XAd+8SyvuxTIOYAhWpBgK8pK7i7wTxDcz4Lbi7iJKHYTX4hqw0qKPjF+K+XGVYqw2Cz38W861dx5bUqBwQP+4OsE/+/ThTZDe1dfwJumJgaUWU6Mnr1EYwEefGQZlU4lxvy6DyCYd6Y5s9KmPNSlxXQsArrhWymmfKELN+aRGMys/KnWwFAHnhGC6J1uBQjT/jsTXFXtsqHuICBTsCo5JhiIk= audrey@dandelion
|
||||||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDhSwzhg87H3auhS0ODXNHW5pqw7Re0FABfsN7wxDgz0P8F93emEW1eAY7WJT3N7wxqNui0vkpxVFcgqzFTalao+EMvru/8HI18SCX1xzmn1HgSb7gKzKerKMO8E9JO+VJkp9n7eKyWtxsj1uX3YYPsaGw/16FUFlRk4kiBkv01h/mA5R4+J4U67df1/Cwx3ryIDSjqm5Zkbp39rYmwBkkodCs4cqiyyZV5ZGA+RHll0b77POkbElaAORgdL41YmWyBOJo3oxK5D2Mei0WfYiGZtJ3XbrmhBO9bz/eep7wzWXkwx1Oy77jFtKO3tNSB972yd2uJqEGuMa3AEFXGIskB audrey@violet
|
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDA0UbgxW37GCUcU9mkV9tGbFk+4v5+F4Raa0ZIMKmJuCg4I05v6YdKu+gkRyl25TgNto1se4kxUalma46/olw6IRglP0iNb4kiXMqFw3WhpMwZJiZ6+1FiebD3HNEEZisaA+Gef3Ae2n9jtOr/x17Vp2P5iUtFhyZHJUzbTOuRcNWHH2OME45d2AvlUAO13uDXhTXEbW4J9ubpXr87YHc4w0ealbW8Itkzl0prWcFHlkzTrGFX3b7UW5dhlvGxYgwbpSifu4LUkiSxgADbtP2LkRiUQYq3VMaZTc1arg6kygznqNS6SoybUHyVADS2z5GKY3l8fJhFUhQk2IVoKBCD audrey@violet
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,6 @@
|
||||||
let
|
let
|
||||||
cfg = config.audrey-sway;
|
cfg = config.audrey-sway;
|
||||||
swaylockCmd = "swaylock -c 1a1b26";
|
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
|
in
|
||||||
{
|
{
|
||||||
options.audrey-sway = {
|
options.audrey-sway = {
|
||||||
|
|
@ -23,6 +16,29 @@ in
|
||||||
default = ../dotfiles/smotsgamed.jpg;
|
default = ../dotfiles/smotsgamed.jpg;
|
||||||
description = "Background image file";
|
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 {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
@ -34,10 +50,11 @@ in
|
||||||
background.fit = "Fill";
|
background.fit = "Fill";
|
||||||
GTK.application_prefer_dark_theme = true;
|
GTK.application_prefer_dark_theme = true;
|
||||||
};
|
};
|
||||||
environment.etc."sway/config".source = lib.mkForce (replaceVarsNotStupid ../dotfiles/sway/config {
|
environment.etc."sway/config".source = lib.mkForce ../dotfiles/sway/config;
|
||||||
sws = "${../dotfiles/sway/sws.sh}";
|
environment.etc."sway/sws".source = ../dotfiles/sway/sws.sh;
|
||||||
background_image = "${cfg.background}";
|
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/greeter-config".source = lib.mkForce (pkgs.writeText "sway-greeter-config" ''
|
environment.etc."sway/greeter-config".source = lib.mkForce (pkgs.writeText "sway-greeter-config" ''
|
||||||
exec "${lib.getExe config.programs.regreet.package}; swaymsg exit"
|
exec "${lib.getExe config.programs.regreet.package}; swaymsg exit"
|
||||||
output * scale 2
|
output * scale 2
|
||||||
|
|
@ -65,6 +82,7 @@ in
|
||||||
environment.etc."xdg/swayr".source = ../dotfiles/swayr;
|
environment.etc."xdg/swayr".source = ../dotfiles/swayr;
|
||||||
environment.etc."xdg/fuzzel".source = ../dotfiles/fuzzel;
|
environment.etc."xdg/fuzzel".source = ../dotfiles/fuzzel;
|
||||||
environment.etc."xdg/foot".source = ../dotfiles/foot;
|
environment.etc."xdg/foot".source = ../dotfiles/foot;
|
||||||
|
environment.etc."xdg/xdg-desktop-portal-wlr/config".source = ../dotfiles/xdg-desktop-portal-wlr;
|
||||||
|
|
||||||
programs.uwsm = {
|
programs.uwsm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -89,17 +107,20 @@ in
|
||||||
playerctl
|
playerctl
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
|
swayidle
|
||||||
waybar
|
waybar
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
wl-mirror
|
wl-mirror
|
||||||
wlogout
|
wlogout
|
||||||
fuzzel
|
fuzzel
|
||||||
gsettings-desktop-schemas
|
gsettings-desktop-schemas
|
||||||
whitesur-icon-theme
|
|
||||||
glib
|
glib
|
||||||
kdePackages.kwallet
|
kdePackages.kwallet
|
||||||
networkmanagerapplet
|
networkmanagerapplet
|
||||||
|
adwaita-icon-theme
|
||||||
reversal-icon-theme
|
reversal-icon-theme
|
||||||
|
whitesur-icon-theme
|
||||||
|
xdg-user-dirs
|
||||||
];
|
];
|
||||||
extraSessionCommands = ''
|
extraSessionCommands = ''
|
||||||
export ELECTRON_OZONE_PLATFORM_HINT=wayland
|
export ELECTRON_OZONE_PLATFORM_HINT=wayland
|
||||||
|
|
@ -108,7 +129,8 @@ in
|
||||||
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION=1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
environment.sessionVariables.XDG_DATA_DIRS = [ "/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}" ];
|
environment.pathsToLink = [ "/share/gsettings-schemas" ];
|
||||||
|
#environment.sessionVariables.XDG_DATA_DIRS = [ "/run/current-system/sw/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}" ];
|
||||||
programs.light.enable = true;
|
programs.light.enable = true;
|
||||||
security.pam.services.swaylock = {};
|
security.pam.services.swaylock = {};
|
||||||
security.pam.loginLimits = [
|
security.pam.loginLimits = [
|
||||||
|
|
@ -124,6 +146,7 @@ in
|
||||||
};
|
};
|
||||||
security.polkit.enable = true;
|
security.polkit.enable = true;
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
systemd.user.targets.graphical-environment = { };
|
systemd.user.targets.graphical-environment = { };
|
||||||
systemd.user.services.kanshi = {
|
systemd.user.services.kanshi = {
|
||||||
description = "Monitor hotswap daemon";
|
description = "Monitor hotswap daemon";
|
||||||
|
|
@ -138,12 +161,16 @@ in
|
||||||
description = "Idle lock + sleep manager";
|
description = "Idle lock + sleep manager";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
ExecStart = ''${lib.getExe pkgs.swayidle} -w \
|
ExecStart = ''
|
||||||
timeout 300 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
|
${lib.getExe pkgs.swayidle} -w \
|
||||||
|
timeout 300 'swaymsg "output * power off"' \
|
||||||
|
resume 'swaymsg "output * power on"' \
|
||||||
timeout 360 '${swaylockCmd} -f' \
|
timeout 360 '${swaylockCmd} -f' \
|
||||||
timeout 600 'systemctl suspend' before-sleep '${swaylockCmd} -f'
|
timeout 600 'systemctl suspend' \
|
||||||
|
before-sleep '${swaylockCmd} -f'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
path = [ "/run/current-system/sw" ];
|
||||||
partOf = [ "graphical-environment.target" ];
|
partOf = [ "graphical-environment.target" ];
|
||||||
wantedBy = [ "graphical-environment.target" ];
|
wantedBy = [ "graphical-environment.target" ];
|
||||||
};
|
};
|
||||||
|
|
@ -211,5 +238,9 @@ in
|
||||||
};
|
};
|
||||||
systemd.packages = [ pkgs.foot ];
|
systemd.packages = [ pkgs.foot ];
|
||||||
systemd.user.sockets.foot-server.wantedBy = [ "graphical-environment.target" ];
|
systemd.user.sockets.foot-server.wantedBy = [ "graphical-environment.target" ];
|
||||||
|
|
||||||
|
audrey-sway.extraPaletteEntries = [
|
||||||
|
{ name = "Command Palette"; }
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [[ -z "$WIRELESS_INTERFACE" ]]; then
|
if [[ -n "$WIRELESS_INTERFACE" ]]; then
|
||||||
echo "Please set \$WIRELESS_INTERFACE" >&2
|
CURL_FLAGS="--interface $WIRELESS_INTERFACE"
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CURRENT_TZ="$(timedatectl | grep 'Time zone:' | cut -d: -f2 | cut -d' ' -f2)"
|
CURRENT_TZ="$(timedatectl | grep 'Time zone:' | cut -d: -f2 | cut -d' ' -f2)"
|
||||||
|
|
||||||
NEW_TZ="$(curl -Ss --interface "$WIRELESS_INTERFACE" https://ipaddresslocation.net/ip-to-timezone | grep -o 'Time Zone:.*' | cut -d' ' -f3)"
|
NEW_TZ="$(curl -Ss $CURL_FLAGS 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')"
|
# 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")"
|
# NEW_TZ="$( (echo 1; echo 1) | tzselect -c "$COORDS")"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{ 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;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
nixos
|
||||||
Loading…
Reference in New Issue