sway notifications + refactor

This commit is contained in:
thek4n 2025-11-11 22:04:32 +03:00
parent 72ccbc8110
commit 3574ec7f6e
10 changed files with 16 additions and 27 deletions

3
.gitignore vendored
View File

@ -42,3 +42,6 @@ home/user/.config/git/local
home/user/.config/i3/config.d/*
!home/user/.config/i3/config.d/.gitkeep
home/user/.config/sway/config.d/*
!home/user/.config/sway/config.d/.gitkeep

View File

@ -13,7 +13,7 @@ git:.config/git .local/bin/ga
ranger:.config/ranger
gpg:
i3:.xinitrc .xprofile .Xresources .config/i3 .config/i3blocks .config/rofi .config/picom .local/bin/slm .local/bin/slm_rofi.sh .local/bin/power_rofi.sh .local/bin/i3_switch_workspace.sh .config/mimeapps.list .local/bin/screenshot .local/bin/i3_swap_workspaces .local/bin/i3blocks_helper .local/bin/switch-layout %pomodoro
sway:.config/sway .config/waybar
sway:.config/sway .config/i3blocks .config/mako .config/mimeapps.list .local/bin/screenshot .local/bin/i3blocks_helper %pomodoro
pomodoro:
bat:.config/bat
font:

View File

@ -0,0 +1 @@
output=DP-1

View File

@ -8,4 +8,4 @@ exec swayidle -w \
# Notifications
#systemctl --user enable --now dbus.service
exec --no-startup-id dunst
exec --no-startup-id mako

View File

@ -192,13 +192,7 @@ bindsym --to-code $mod+slash focus mode_toggle
input type:keyboard {
xkb_layout us,ru
xkb_options grp:win_space_toggle
}
input * {
xkb_layout "us,ru"
xkb_options "grp:win_space_toggle"
xkb_options caps:ctrl_modifier
xkb_options grp:win_space_toggle,caps:ctrl_modifier
xkb_model "pc101"
repeat_delay 250
repeat_rate 100

View File

@ -36,4 +36,4 @@ set -g terminal-overrides[101] "xterm-256color:Tc"
set-hook -g after-new-session[101] 'rename-window -t 1 1'
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM LANG LC_ALL COLORTERM EDITOR VISUAL"
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY TERM LANG LC_ALL COLORTERM EDITOR VISUAL SWAYSOCK WAYLAND_DISPLAY"

View File

@ -14,7 +14,7 @@ fzf_get_selected_untracked() {
}
gitadd() {
xargs git add
xargs git add
}
git_ls_files() {

View File

@ -77,10 +77,10 @@ cmd_bluetooth_battery() {
}
cmd_language() {
layout="$(xkblayout-state print %n)"
layout="$(swaymsg -t get_inputs | jq -r '.[] | select(.type == "keyboard") | .xkb_active_layout_name' | head -1)"
case "${layout}" in
English)
"English (US)")
echo "🇬🇧 En"
;;
Russian)

View File

@ -45,18 +45,9 @@ _notify_error() {
_notify critical "${NOTIFY_TIME_CRITICAL_MS}" "Error: ${1}"
}
_maim() {
local maim_args=(--quality 10)
if [ -n "${NOOPENGL}" ]; then
maim_args+=--noopengl
fi
maim ${maim_args} "${@}"
}
_capture_select() {
local -r pipe="$(mktemp)"
_maim --select 2>"${pipe}"
grim -g "$(slurp)" - 2>"${pipe}"
local -r code="$?"
if grep -F "Selection was cancelled by keystroke or right-click." <"${pipe}"; then
rm "${pipe}"
@ -68,15 +59,15 @@ _capture_select() {
}
_capture_entire() {
_maim
grim -
}
_capture_window() {
_maim --window "$(xdotool getactivewindow)"
grim -g "$(swaymsg -t get_tree | jq -r '.. | select(.type? == "con" and .focused == true) | .rect | "\(.x),\(.y) \(.width)x\(.height)"')" -
}
_copy_to_clipboard() {
xclip -selection clipboard -t image/png
wl-copy -t image/png
}
_save_to_file() {

View File

@ -1,3 +1,3 @@
#!/bin/sh
echo "pacman -S sway waybar swayidle"
echo "pacman -S sway waybar swayidle wl-clipboard ydotool grim slurp mako"