switch to sway
This commit is contained in:
parent
8b89e664ea
commit
b8b6922e53
7 changed files with 39 additions and 31 deletions
|
@ -119,7 +119,6 @@
|
||||||
usbutils
|
usbutils
|
||||||
llvmPackages_19.clang-tools
|
llvmPackages_19.clang-tools
|
||||||
ghc
|
ghc
|
||||||
hyprpaper
|
|
||||||
zola
|
zola
|
||||||
calibre
|
calibre
|
||||||
tor-browser
|
tor-browser
|
||||||
|
@ -184,7 +183,7 @@
|
||||||
services.gnome.gnome-keyring.enable = true;
|
services.gnome.gnome-keyring.enable = true;
|
||||||
programs.gnupg.agent.enable = true;
|
programs.gnupg.agent.enable = true;
|
||||||
|
|
||||||
services.displayManager.defaultSession = "hyprland";
|
services.displayManager.defaultSession = "sway";
|
||||||
services.displayManager.sddm = {
|
services.displayManager.sddm = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
wayland.enable = true;
|
||||||
|
@ -213,10 +212,7 @@
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
programs.hyprland = {
|
programs.sway.enable = true;
|
||||||
enable = true;
|
|
||||||
# withUWSM = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.borgbackup.jobs.ytnixRsync = {
|
services.borgbackup.jobs.ytnixRsync = {
|
||||||
paths = [ "/root" "/home" "/var/lib" "/var/log" "/opt" "/etc" ];
|
paths = [ "/root" "/home" "/var/lib" "/var/log" "/opt" "/etc" ];
|
||||||
|
|
10
sway/config
10
sway/config
|
@ -10,7 +10,7 @@ set $menu rofi -show drun | xargs swaymsg exec --
|
||||||
set $screenshot grim -g "$(slurp)" - | wl-copy
|
set $screenshot grim -g "$(slurp)" - | wl-copy
|
||||||
set $browser librewolf
|
set $browser librewolf
|
||||||
set $clipboard rofi -show clipboard -show-icons
|
set $clipboard rofi -show clipboard -show-icons
|
||||||
set $emoji rofimoji
|
set $emoji rofi -show emoji
|
||||||
|
|
||||||
set $font_family DejaVu Sans Mono
|
set $font_family DejaVu Sans Mono
|
||||||
set $font_size 11
|
set $font_size 11
|
||||||
|
@ -18,7 +18,7 @@ set $bg #000000
|
||||||
set $fg #ffffff
|
set $fg #ffffff
|
||||||
set $fgi #888888
|
set $fgi #888888
|
||||||
|
|
||||||
set $wallpaper $HOME/wallpapers/animegirl.jpg
|
set $wallpaper $HOME/wallpapers/purple.jpeg
|
||||||
set $lock swaylock -f -i $wallpaper
|
set $lock swaylock -f -i $wallpaper
|
||||||
output * bg $wallpaper fill
|
output * bg $wallpaper fill
|
||||||
|
|
||||||
|
@ -76,9 +76,9 @@ bindsym $mod+Shift+8 move container to workspace number 8
|
||||||
bindsym $mod+Shift+9 move container to workspace number 9
|
bindsym $mod+Shift+9 move container to workspace number 9
|
||||||
bindsym $mod+Shift+0 move container to workspace number 10
|
bindsym $mod+Shift+0 move container to workspace number 10
|
||||||
|
|
||||||
# my mouse is an anki remote
|
# mouse side buttons
|
||||||
bindsym --whole-window BTN_EXTRA exec wtype " "
|
bindsym --whole-window BTN_EXTRA exec ~/.config/sway/scripts/remote.sh btn1
|
||||||
bindsym --whole-window BTN_SIDE exec wtype 1
|
bindsym --whole-window BTN_SIDE exec ~/.config/sway/scripts/remote.sh
|
||||||
|
|
||||||
bindsym $mod+b splith
|
bindsym $mod+b splith
|
||||||
bindsym $mod+v splitv
|
bindsym $mod+v splitv
|
||||||
|
|
21
sway/scripts/remote.sh
Executable file
21
sway/scripts/remote.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
active_window=$(swaymsg -t get_tree |jq -r '..|try select(.focused == true) |.app_id')
|
||||||
|
|
||||||
|
if [ "$1" = "btn1" ]; then
|
||||||
|
if [ "$active_window" = "anki" ]; then
|
||||||
|
wtype " "
|
||||||
|
elif [ "$active_window" = "foot" ]; then
|
||||||
|
wtype -M ctrl -M shift -k c
|
||||||
|
else
|
||||||
|
wtype -M ctrl -k c
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "$active_window" = "anki" ]; then
|
||||||
|
wtype "1"
|
||||||
|
elif [ "$active_window" = "foot" ]; then
|
||||||
|
wtype -M ctrl -M shift -k v
|
||||||
|
else
|
||||||
|
wtype -M ctrl -k v
|
||||||
|
fi
|
||||||
|
fi
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
focused_workspace=$(swaymsg -t get_workspaces | jq '.[] | select(.focused == true) | .num')
|
focused_workspace=$(swaymsg -t get_workspaces | jq '.[] | select(.focused == true) | .num')
|
||||||
|
|
||||||
kitty_window_count=$(swaymsg -t get_tree | jq --argjson workspace $focused_workspace '[recurse(.nodes[]?) | select(.type == "workspace" and .num == $workspace) | recurse(.nodes[]?) | select(.app_id == "kitty")] | length')
|
foot_window_count=$(swaymsg -t get_tree | jq --argjson workspace $focused_workspace '[recurse(.nodes[]?) | select(.type == "workspace" and .num == $workspace) | recurse(.nodes[]?) | select(.app_id == "foot")] | length')
|
||||||
|
|
||||||
next_session=$((focused_workspace * 10))
|
next_session=$((focused_workspace * 10))
|
||||||
|
|
||||||
if [ $kitty_window_count -gt 0 ]
|
if [ $foot_window_count -gt 0 ]
|
||||||
then
|
then
|
||||||
next_session=$((next_session + kitty_window_count))
|
next_session=$((next_session + foot_window_count))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kitty tmux new-session -A -s ${next_session}
|
foot tmux new-session -A -s ${next_session}
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
url=$(wl-paste)
|
|
||||||
notify-send "fetching video: ${url}"
|
|
||||||
mpv --really-quiet $url > /dev/null 2>&1 &
|
|
|
@ -3,11 +3,11 @@
|
||||||
"output": "eDP-1", // Set output to primary monitor
|
"output": "eDP-1", // Set output to primary monitor
|
||||||
"height": 40, // Set height to avoid jumping due to active workspace indicator
|
"height": 40, // Set height to avoid jumping due to active workspace indicator
|
||||||
|
|
||||||
"margin-left": 4,
|
"margin-left": 0,
|
||||||
"margin-right": 4,
|
"margin-right": 0,
|
||||||
"margin-top": 0,
|
"margin-top": 0,
|
||||||
"modules-left": ["hyprland/workspaces", "clock#time", "clock#date", "battery"], // Sets modules for the left of the bar
|
"modules-left": ["sway/workspaces", "clock#time", "clock#date", "battery"], // Sets modules for the left of the bar
|
||||||
"modules-center": ["hyprland/window"], // Set modules for the center of the bar
|
"modules-center": ["sway/window"], // Set modules for the center of the bar
|
||||||
"modules-right": ["tray", "temperature", "cpu", "memory", "wireplumber"], // Set modules for the right of the bar
|
"modules-right": ["tray", "temperature", "cpu", "memory", "wireplumber"], // Set modules for the right of the bar
|
||||||
"clock#time": {
|
"clock#time": {
|
||||||
"format": "<span color=\"#7aa2f7\"> </span>{:%H:%M:%S}",
|
"format": "<span color=\"#7aa2f7\"> </span>{:%H:%M:%S}",
|
||||||
|
@ -71,15 +71,11 @@
|
||||||
"on-click": "pavucontrol",
|
"on-click": "pavucontrol",
|
||||||
"interval": 4,
|
"interval": 4,
|
||||||
},
|
},
|
||||||
"hyprland/window": {
|
"sway/window": {
|
||||||
"max-length": 64,
|
"max-length": 64,
|
||||||
},
|
},
|
||||||
"tray": {
|
"tray": {
|
||||||
"icon-size": 22,
|
"icon-size": 22,
|
||||||
"spacing": 6,
|
"spacing": 6,
|
||||||
},
|
|
||||||
"hyprland/workspaces": {
|
|
||||||
"disable-scroll": true,
|
|
||||||
"on-click": "activate",
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
/* main waybar */
|
/* main waybar */
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background: rgba(26, 27, 38, 0.75);
|
background: rgba(26, 27, 38, 1);
|
||||||
border: 2px solid #414868;
|
border: 2px solid #414868;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ tooltip {
|
||||||
|
|
||||||
|
|
||||||
/* Sets active workspace to have a solid line on the bottom */
|
/* Sets active workspace to have a solid line on the bottom */
|
||||||
#workspaces button.active {
|
#workspaces button.focused {
|
||||||
border-bottom: 2px solid #7aa2f7;
|
border-bottom: 2px solid #7aa2f7;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
|
|
Loading…
Add table
Reference in a new issue