sway: update anthy, keybinds, locking

This commit is contained in:
2024-07-31 22:52:37 +02:00
parent 3689d53e4b
commit c6ab0cad8f
5 changed files with 71 additions and 53 deletions

View File

@@ -9,4 +9,9 @@ Use ./stow.sh --stow <folder_name> to deploy configuration
Use ./stow.sh --unstow <folder_name> to remove configuration Use ./stow.sh --unstow <folder_name> to remove configuration
``` ```
`helix(1)` should be built from [source](https://docs.helix-editor.com/install.html), remember to link the `runtime/` to `$HOME/config/helix/runtime`. Remove CSD for browser, etc.:
```bash
$ gsettings get org.gnome.desktop.wm.preferences button-layout
'icon:close'
$ gsettings set org.gnome.desktop.wm.preferences button-layout ''
```

View File

@@ -1,18 +1,23 @@
PATH=$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.local/bin:$HOME/.cabal/bin:$PATH PATH=$HOME/.dots/scripts:$HOME/.cargo/bin:$HOME/.ghcup/bin:$HOME/.local/bin:$HOME/.cabal/bin:$PATH
EDITOR=hx EDITOR=hx
VISUAL=hx VISUAL=hx
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
_JAVA_AWT_WM_NONREPARENTING=1
# XXX: render shadow on wayland # XXX: render shadow on wayland
# KITTY_DISABLE_WAYLAND=1 # KITTY_DISABLE_WAYLAND=1
# KITTY_ENABLE_WAYLAND=1 # KITTY_ENABLE_WAYLAND=1
_JAVA_AWT_WM_NONREPARENTING=1
# support jp input in gnome # support jp input in gnome
GTK_IM_MODULE=ibus # GTK_IM_MODULE=ibus
QT_IM_MODULE=ibus # QT_IM_MODULE=ibus
XMODIFIERS=@im=ibus # XMODIFIERS=@im=ibus
SDL_IM_MODULE=ibus # SDL_IM_MODULE=ibus
GLFW_IM_MODULE=ibus # GLFW_IM_MODULE=ibus
# sway - fcitx5 fcitx5-configtool-gtk fcitx5-anthy
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx
SDL_IM_MODULE=fcitx
GLFW_IM_MODULE=fcitx

View File

@@ -13,24 +13,32 @@
workspace_layout tabbed workspace_layout tabbed
smart_borders on smart_borders on
# default_border none
set $lock swaylock -i ~/cloud/images/wallpaper/lock.png -s center -u
exec swayidle -w \ exec swayidle -w \
timeout 300 'swaylock -i ~/cloud/images/wallpaper/lock.png -s center -u' \ timeout 600 '$lock' \
timeout 600 'systemctl suspend' \ timeout 900 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -i ~/cloud/images/wallpaper/lock.png -s center -u' timeout 1200 'systemctl suspend' \
before-sleep '$lock'
### Input configuration ### Input configuration
input "type:keyboard" { input "type:keyboard" {
xkb_layout eu xkb_layout eu
xkb_options caps:swapescape xkb_options caps:swapescape
repeat_delay 200 repeat_delay 250
repeat_rate 100 repeat_rate 100
} }
bindgesture swipe:right workspace prev input "type:pointer" {
bindgesture swipe:left workspace next accel_profile flat
}
bindgesture swipe:3:right workspace next
bindgesture swipe:3:left workspace prev
bindgesture swipe:4:right focus right
bindgesture swipe:4:left focus left
### Key bindings ### Key bindings
@@ -42,9 +50,10 @@ bindgesture swipe:left workspace next
bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2 bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2
bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2 bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2
bindsym $mod+Control+BackSpace exec swaylock -i ~/cloud/images/wallpaper/lock.png -s center -u bindsym $mod+Control+BackSpace exec $lock
bindsym $mod+Control+Shift+BackSpace exec systemctl suspend bindsym $mod+Control+Shift+BackSpace exec systemctl suspend
# https://github.com/moverest/sway-interactive-screenshot
bindsym $mod+Shift+s exec ~/.config/sway/screenshot -s region bindsym $mod+Shift+s exec ~/.config/sway/screenshot -s region
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
@@ -68,6 +77,9 @@ bindgesture swipe:left workspace next
bindsym $mod+$up focus up bindsym $mod+$up focus up
bindsym $mod+$right focus right bindsym $mod+$right focus right
bindsym $mod+Tab focus right
bindsym $mod+Shift+Tab focus left
# Move the focused window with the same, but add Shift # Move the focused window with the same, but add Shift
bindsym $mod+Shift+$left move left bindsym $mod+Shift+$left move left
bindsym $mod+Shift+$down move down bindsym $mod+Shift+$down move down
@@ -102,28 +114,16 @@ bindgesture swipe:left workspace next
bindsym $mod+f fullscreen bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
# Scratchpad # Scratchpad
bindsym $mod+Shift+minus move scratchpad bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show bindsym $mod+minus scratchpad show
# Theming ### Theming
font pango: JetBrainsMono Nerd Font Mono 10 font pango: JetBrainsMono Nerd Font Mono 10
bar { bar {
position top
mode dock
output *
# status_command while ~/.config/sway/status.sh; do sleep 1; done
swaybar_command waybar swaybar_command waybar
colors {
statusline #5c6a72
background #fdf6e3
inactive_workspace #fdf6e3 #fdf6e3 #5c6a72
focused_workspace #8da101 #8da101 #fdf6e3
}
} }
client.focused #A7C080 #A7C080 #2D353B #A7C080 #A7C080 client.focused #A7C080 #A7C080 #2D353B #A7C080 #A7C080
@@ -133,14 +133,20 @@ client.urgent #E67E80 #E67E80 #2D353B #E67E80 #E67E80
client.placeholder #2D353B #2D353B #859289 #2D353B #2D353B client.placeholder #2D353B #2D353B #859289 #2D353B #2D353B
client.background #2D353B client.background #2D353B
include /etc/sway/config.d/* ### Autostart
# Autostart
exec --no-startup-id netbird-ui
exec --no-startup-id nm-applet
exec --no-startup-id keepassxc
exec --no-startup-id nextcloud
# SSH # SSH
exec eval $(gnome-keyring-daemon --start) exec eval $(gnome-keyring-daemon --start)
# SSH_AUTH_SOCK must also be exported as env separately later
exec export SSH_AUTH_SOCK exec export SSH_AUTH_SOCK
# Programs
exec --no-startup-id netbird-ui
exec --no-startup-id nm-applet
exec --no-startup-id swaync
exec --no-startup-id nextcloud --background
exec --no-startup-id pasystray
exec --no-startup-id fcitx5
### Sway defaults
include /etc/sway/config.d/*

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# https://github.com/moverest/sway-interactive-screenshot
import abc import abc
import argparse import argparse
import os import os

View File

@@ -26,8 +26,9 @@
"modules-center": [ "modules-center": [
], ],
"modules-right": [ "modules-right": [
"tray",
// "network", // "network",
"pulseaudio", // "pulseaudio",
// "memory", // "memory",
// "cpu", // "cpu",
// "temperature", // "temperature",
@@ -35,8 +36,7 @@
// "custom/keyboard-layout", // "custom/keyboard-layout",
"battery", "battery",
"clock#date", "clock#date",
"clock#time", "clock#time"
"tray"
], ],
@@ -51,7 +51,7 @@
"critical": 15 "critical": 15
}, },
// Connected to AC // Connected to AC
"format": " {icon} {capacity}%", // Icon: bolt "format": " {capacity}%", // Icon: bolt
// Not connected to AC // Not connected to AC
// "format-discharging": "{icon} {capacity}%", // "format-discharging": "{icon} {capacity}%",
"format-discharging": "{capacity}%", "format-discharging": "{capacity}%",
@@ -178,7 +178,7 @@
"tray": { "tray": {
"icon-size": 15, "icon-size": 15,
"spacing": 10 "spacing": 20
} }
} }