sway notifications + refactor
This commit is contained in:
parent
72ccbc8110
commit
3574ec7f6e
3
.gitignore
vendored
3
.gitignore
vendored
@ -42,3 +42,6 @@ home/user/.config/git/local
|
|||||||
|
|
||||||
home/user/.config/i3/config.d/*
|
home/user/.config/i3/config.d/*
|
||||||
!home/user/.config/i3/config.d/.gitkeep
|
!home/user/.config/i3/config.d/.gitkeep
|
||||||
|
|
||||||
|
home/user/.config/sway/config.d/*
|
||||||
|
!home/user/.config/sway/config.d/.gitkeep
|
||||||
|
|||||||
@ -13,7 +13,7 @@ git:.config/git .local/bin/ga
|
|||||||
ranger:.config/ranger
|
ranger:.config/ranger
|
||||||
gpg:
|
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
|
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:
|
pomodoro:
|
||||||
bat:.config/bat
|
bat:.config/bat
|
||||||
font:
|
font:
|
||||||
|
|||||||
1
home/user/.config/mako/config
Normal file
1
home/user/.config/mako/config
Normal file
@ -0,0 +1 @@
|
|||||||
|
output=DP-1
|
||||||
@ -8,4 +8,4 @@ exec swayidle -w \
|
|||||||
|
|
||||||
# Notifications
|
# Notifications
|
||||||
#systemctl --user enable --now dbus.service
|
#systemctl --user enable --now dbus.service
|
||||||
exec --no-startup-id dunst
|
exec --no-startup-id mako
|
||||||
|
|||||||
@ -192,13 +192,7 @@ bindsym --to-code $mod+slash focus mode_toggle
|
|||||||
|
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
xkb_layout us,ru
|
xkb_layout us,ru
|
||||||
xkb_options grp:win_space_toggle
|
xkb_options grp:win_space_toggle,caps:ctrl_modifier
|
||||||
}
|
|
||||||
|
|
||||||
input * {
|
|
||||||
xkb_layout "us,ru"
|
|
||||||
xkb_options "grp:win_space_toggle"
|
|
||||||
xkb_options caps:ctrl_modifier
|
|
||||||
xkb_model "pc101"
|
xkb_model "pc101"
|
||||||
repeat_delay 250
|
repeat_delay 250
|
||||||
repeat_rate 100
|
repeat_rate 100
|
||||||
|
|||||||
@ -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-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"
|
||||||
|
|||||||
@ -77,10 +77,10 @@ cmd_bluetooth_battery() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cmd_language() {
|
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
|
case "${layout}" in
|
||||||
English)
|
"English (US)")
|
||||||
echo "🇬🇧 En"
|
echo "🇬🇧 En"
|
||||||
;;
|
;;
|
||||||
Russian)
|
Russian)
|
||||||
|
|||||||
@ -45,18 +45,9 @@ _notify_error() {
|
|||||||
_notify critical "${NOTIFY_TIME_CRITICAL_MS}" "Error: ${1}"
|
_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() {
|
_capture_select() {
|
||||||
local -r pipe="$(mktemp)"
|
local -r pipe="$(mktemp)"
|
||||||
_maim --select 2>"${pipe}"
|
grim -g "$(slurp)" - 2>"${pipe}"
|
||||||
local -r code="$?"
|
local -r code="$?"
|
||||||
if grep -F "Selection was cancelled by keystroke or right-click." <"${pipe}"; then
|
if grep -F "Selection was cancelled by keystroke or right-click." <"${pipe}"; then
|
||||||
rm "${pipe}"
|
rm "${pipe}"
|
||||||
@ -68,15 +59,15 @@ _capture_select() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_capture_entire() {
|
_capture_entire() {
|
||||||
_maim
|
grim -
|
||||||
}
|
}
|
||||||
|
|
||||||
_capture_window() {
|
_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() {
|
_copy_to_clipboard() {
|
||||||
xclip -selection clipboard -t image/png
|
wl-copy -t image/png
|
||||||
}
|
}
|
||||||
|
|
||||||
_save_to_file() {
|
_save_to_file() {
|
||||||
|
|||||||
@ -1,3 +1,3 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
echo "pacman -S sway waybar swayidle"
|
echo "pacman -S sway waybar swayidle wl-clipboard ydotool grim slurp mako"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user