feat: some stuff
This commit is contained in:
parent
f30fcd5da0
commit
1c225e141d
@ -40,6 +40,7 @@ set $password_mngr rofi-rbw --selector wofi --typer wtype --clipboarder wl-copy
|
||||
set $bluetooth_mngr blueman-manager
|
||||
set $calculator flatpak run io.github.Qalculate
|
||||
set $photo_editor gtk-launch ~/.local/share/applications/photopea.desktop
|
||||
set $translator com.github.gi_lom.dialect
|
||||
|
||||
# Scripts
|
||||
set $config_editor ~/.config/sway/config_editor.sh
|
||||
@ -112,6 +113,7 @@ input "1739:24385:Synaptics_TM2438-005" {
|
||||
# Basics:
|
||||
#
|
||||
bindsym $mod+d exec $quickmenu
|
||||
bindsym $mod+t exec $translator
|
||||
bindsym $mod+q kill
|
||||
bindsym $mod+Shift+q exec $wofi_scripts/wofi-power-menu.sh
|
||||
bindsym $mod+Return exec $term
|
||||
@ -175,6 +177,7 @@ input "1739:24385:Synaptics_TM2438-005" {
|
||||
# Workspaces:
|
||||
#
|
||||
for_window [class="zoom"] floating enable
|
||||
for_window [app_id="com.github.gi_lom.dialect"] floating enable, resize set 800 400, sticky enable
|
||||
for_window [app_id="gnome-calculator"] floating enable
|
||||
for_window [app_id="qalculate-gtk"] floating enable
|
||||
for_window [title="Zoom Meeting.*"] floating disable
|
||||
|
@ -3,9 +3,19 @@
|
||||
$@ &
|
||||
pid=$!
|
||||
|
||||
|
||||
# ALL_NODES='recurse(.nodes[]?, .floating_nodes[]?) | select(.pid and .visible)'
|
||||
|
||||
# echo "pid: $pid"
|
||||
# all_nodes="$(swaymsg -t get_tree | jq -r "$ALL_NODES")"
|
||||
# window_id="$(swaymsg -t get_tree | jq -r "$ALL_NODES" | jq -c ". | select(.pid==$pid) | .id")"
|
||||
|
||||
# echo "al: $all_nodes"
|
||||
# echo "window_id: $window_id"
|
||||
|
||||
swaymsg -t subscribe -m '[ "window" ]' \
|
||||
| jq --unbuffered --argjson pid "$pid" '.container | select(.pid == $pid) | .id' \
|
||||
| xargs -I '@' -- swaymsg '[ con_id=@ ] floating enable, resize set 600 450' &
|
||||
| xargs -I '@' -- swaymsg '[ con_id=@ ] floating enable' &
|
||||
|
||||
subscription=$!
|
||||
|
||||
|
@ -6,7 +6,7 @@ ID_PREFIX='"\(.pid):"'
|
||||
WINDOW_PROTOCOL='(if .shell == "xwayland" then "X11" else "wayland" end)'
|
||||
WINDOW_GEOMETRY='(.rect | "\(.x),\(.y) \(.width)x\(.height) ")'
|
||||
WINDOW_PID='(.id | tostring)'
|
||||
CLEAR_OBJ="del(.focus, .border, .current_border_width, .window_rect, .orientation, .layout, .percent, .deco_rect, .geometry, .window, .urgent, .marks, .sticky, .fullscreen_mode, .nodes, .floating_nodes, .shell, .max_render_time, .visible, .idle_inhibitors, .inhibit_idle)"
|
||||
CLEAR_OBJ="del(.focus, .pid, .border, .current_border_width, .window_rect, .orientation, .layout, .percent, .deco_rect, .geometry, .window, .urgent, .marks, .sticky, .fullscreen_mode, .nodes, .floating_nodes, .shell, .max_render_time, .visible, .idle_inhibitors, .inhibit_idle)"
|
||||
|
||||
# Output format, e.g. "1234 - 12:firefox (wayland)" or "5678 - 17:discord (X11)"
|
||||
FILT="$ALL_NODES | $WINDOW_GEOMETRY + $WINDOW_PID"
|
||||
|
@ -158,6 +158,7 @@
|
||||
"on-click": "kitty -e htop"
|
||||
},
|
||||
"custom/waybar-mpris": {
|
||||
"max-length": 30,
|
||||
"return-type": "json",
|
||||
"exec": "waybar-mpris --position --autofocus",
|
||||
"on-click": "waybar-mpris --send toggle",
|
||||
|
@ -11,3 +11,4 @@ source $(dirname "$0")/functions/cht.zsh;
|
||||
source $(dirname "$0")/functions/run.zsh;
|
||||
source $(dirname "$0")/functions/conf.zsh;
|
||||
source $(dirname "$0")/functions/note.zsh;
|
||||
source $(dirname "$0")/functions/mv-safe.zsh;
|
||||
|
11
configs/zsh/functions/mv-safe.zsh
Normal file
11
configs/zsh/functions/mv-safe.zsh
Normal file
@ -0,0 +1,11 @@
|
||||
function mv-safe(){
|
||||
for OLD_NAME in "$@"
|
||||
do
|
||||
NEW_NAME="$(echo $OLD_NAME | sed -e 'y/āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜĀÁǍÀĒÉĚÈĪÍǏÌŌÓǑÒŪÚǓÙǕǗǙǛ/aaaaeeeeiiiioooouuuuüüüüAAAAEEEEIIIIOOOOUUUUÜÜÜÜ/' | sed -e 's/[^A-Za-z0-9._-]/_/g')"
|
||||
if [ $OLD_NAME != $NEW_NAME ]; then
|
||||
mv $OLD_NAME $NEW_NAME;
|
||||
else
|
||||
echo "No need to rename $OLD_NAME";
|
||||
fi
|
||||
done
|
||||
}
|
Loading…
Reference in New Issue
Block a user