Pasarse a sway

This commit is contained in:
Cat /dev/Nulo 2022-02-19 12:19:21 -03:00
parent 0407f2f71e
commit f560318484
2 changed files with 229 additions and 5 deletions

224
.config/sway/config Normal file
View file

@ -0,0 +1,224 @@
### Variables
#
set $mod Mod4
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term footclient
# Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on.
set $menu fuzzel-run
font sans-serif 10
### Output configuration
#
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
output * bg "~/.config/river/wallpapers/Abyss Reflections - Cat ears.png" fill
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
### Idle configuration
#
# Example configuration:
#
exec swayidle -w \
timeout 300 'swaylock -f -c ffffff' \
timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
before-sleep 'swaylock -f -c ffffff'
bindsym $mod+m exec swaylock
bindsym $mod+Shift+m exec "swaylock -f && doas pm-suspend"
### Input configuration
#
input * {
repeat_delay 290
repeat_rate 30
}
### Key bindings
#
# Basics:
#
# Start a terminal
bindsym $mod+Return exec $term
# Kill focused window
bindsym $mod+Shift+q kill
# Start your launcher
bindsym $mod+d exec $menu
# 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:
#
# Move your focus around
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
#
# Workspaces:
#
# Switch to workspace
bindsym $mod+u workspace 1:u
bindsym $mod+i workspace 2:i
bindsym $mod+o workspace 3:o
bindsym $mod+p workspace 4:p
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+u move container to workspace 1:u
bindsym $mod+Shift+i move container to workspace 2:i
bindsym $mod+Shift+o move container to workspace 3:o
bindsym $mod+Shift+p move container to workspace 4:p
bindsym $mod+Shift+5 move container to workspace number 5
bindsym $mod+Shift+6 move container to workspace number 6
bindsym $mod+Shift+7 move container to workspace number 7
bindsym $mod+Shift+8 move container to workspace number 8
bindsym $mod+Shift+9 move container to workspace number 9
bindsym $mod+Shift+0 move container to workspace number 10
#
# Layout stuff:
#
bindsym $mod+w layout toggle split tabbed stacking
bindsym $mod+e layout toggle split
bindsym $mod+s sticky toggle
# Make the current focus fullscreen
bindsym $mod+a 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
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"
#
# Status Bar:
#
bar {
position top
status_command i3status
status_edge_padding 6
status_padding 0
separator_symbol " "
workspace_min_width 30
strip_workspace_numbers yes
colors {
statusline #000000
background #ffffff
focused_workspace #cf1bff #cf1bff #ffffff
active_workspace #cf1bff #cf1bff #ffffff
inactive_workspace #dfdfdf #dfdfdf #000000
}
}
client.focused #cf1bff #cf1bff #ffffff
client.focused_inactive #cccccc #cccccc #000000
client.unfocused #dfdfdf #dfdfdf #000000
bindsym $mod+z exec fnottctl dismiss
bindsym $mod+x exec fnottctl actions
bindsym Print exec 'grimshot copy area'
bindsym --locked XF86AudioRaiseVolume exec 'pamixer -i 5'
bindsym --locked XF86AudioLowerVolume exec 'pamixer -d 5'
bindsym --locked XF86AudioMute exec 'pamixer --toggle-mute'
bindsym --locked XF86AudioMicMute exec 'pamixer --default-source --toggle-mute'
# https://github.com/altdesktop/playerctl
bindsym --locked XF86AudioMedia exec 'playerctl play-pause'
bindsym --locked XF86AudioPlay exec 'playerctl play-pause'
bindsym --locked XF86AudioPrev exec 'playerctl previous'
bindsym --locked XF86AudioNext exec 'playerctl next'
bindsym --locked XF86MonBrightnessUp exec 'brillo -A 5; brillo -O'
bindsym --locked XF86MonBrightnessDown exec 'brillo -U 5; brillo -O'
default_border pixel 4
smart_borders on
for_window [app_id="fzf"] floating enable
exec brillo -I
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
exec pipewire
exec /usr/libexec/xdg-desktop-portal-wlr
exec "foot --server"
exec "wlsunset $(cat ~/.config/river/coordenadas)"
exec "pgrep -x syncthing >/dev/null || syncthing -no-browser"
exec kanshi
exec fnott

View file

@ -1,10 +1,10 @@
source ~/.profile
if ! "$REMOTE" && test "$(tty)" = /dev/tty1; then
mkdir -p "$HOME/.local/share/river"
log="$HOME/.local/share/river/$(date +%Y-%m-%d@%H:%M:%S).log"
mkdir -p "$HOME/.local/share/sway"
log="$HOME/.local/share/sway/$(date +%Y-%m-%d@%H:%M:%S).log"
exec env \
XDG_CURRENT_DESKTOP=river \
XDG_SESSION_DESKTOP=river \
dbus-run-session river -log-level debug >"$log" 2>&1
XDG_CURRENT_DESKTOP=sway \
XDG_SESSION_DESKTOP=sway \
dbus-run-session sway >"$log" 2>&1
fi
source ~/.zshrc