feat: archive electricity

This commit is contained in:
2022-04-15 14:52:17 +02:00
parent b5aab4aadb
commit bbdb55ffa4
20 changed files with 376 additions and 302 deletions

View File

@ -26,16 +26,16 @@ set $quickmenu wofi --show drun
# Screenshot section
set $screenshot_dir ~/Pictures/Screenshots/
set $grimshot ~/.config/sway/grimshot.sh
set $screenclip wl-copy < "$($grimshot --notify save area $screenshot_dir/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png)"
set $screenclip wl-copy < "$($grimshot --notify save area $screenshot_dir/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png)"
set $screenshot wl-copy < "$($grimshot --notify save screen $screenshot_dir/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png)"
set $windowshot wl-copy < "$($grimshot --notify save window $screenshot_dir/scrn-$(date +"%Y-%m-%d-%H-%M-%S").png)"
# Default Programs
set $term kitty -e "tmux"
set $explorer nautilus
set $mail geary
set $browser firefox-developer-edition
set $mail org.gnome.Geary
set $browser google-chrome-beta --enable-features=UseOzonePlatform --ozone-platform=wayland
set $browser firefox-developer-edition
set $password_mngr rofi-rbw --selector wofi --typer wtype --clipboarder wl-copy
set $bluetooth_mngr blueman-manager
set $calculator flatpak run io.github.Qalculate

View File

@ -4,25 +4,24 @@ $@ &
pid=$!
# ALL_NODES='recurse(.nodes[]?, .floating_nodes[]?) | select(.pid and .visible)'
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")"
sleep 0.3
# echo "al: $all_nodes"
# echo "window_id: $window_id"
all_nodes="$(swaymsg -t get_tree | jq -r "$ALL_NODES" | jq -c '.pid')"
window_id="$(swaymsg -t get_tree | jq -r "$ALL_NODES" | jq --argjson pid $pid -c 'select(.pid==$pid).id')"
swaymsg "[ con_id=$window_id ] floating enable, resize set 800 400, move position 1115 670, sticky enable"
swaymsg -t subscribe -m '[ "window" ]' \
| jq --unbuffered --argjson pid "$pid" '.container | select(.pid == $pid) | .id' \
| xargs -I '@' -- swaymsg '[ con_id=@ ] floating enable' &
# swaymsg -t subscribe -m '[ "window" ]' \
# | jq --unbuffered --argjson pid "$pid" '.container | select(.pid == $pid) | .id' \
# | xargs -I '@' -- swaymsg '[ con_id=@ ] floating enable' &
subscription=$!
# subscription=$!
echo Going into wait state
# echo Going into wait state
# Wait for our process to close
tail --pid=$pid -f /dev/null
# # Wait for our process to close
# tail --pid=$pid -f /dev/null
echo Killing subscription
kill $subscription
# echo Killing subscription
# kill $subscription

114
configs/sway/test.json Normal file
View File

@ -0,0 +1,114 @@
{
"id": 65,
"type": "con",
"orientation": "none",
"percent": 0.3422431865828092,
"urgent": false,
"marks": [],
"focused": false,
"layout": "none",
"border": "none",
"current_border_width": 2,
"rect": {
"x": 6,
"y": 46,
"width": 653,
"height": 1028
},
"deco_rect": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
},
"window_rect": {
"x": 0,
"y": 0,
"width": 653,
"height": 1028
},
"geometry": {
"x": 0,
"y": 0,
"width": 960,
"height": 810
},
"name": "Notes - Obsidian v0.14.5",
"window": 4194307,
"nodes": [],
"floating_nodes": [],
"focus": [],
"fullscreen_mode": 0,
"sticky": false,
"pid": 602930,
"app_id": null,
"visible": true,
"max_render_time": 0,
"shell": "xwayland",
"inhibit_idle": false,
"idle_inhibitors": {
"user": "none",
"application": "none"
},
"window_properties": {
"class": "obsidian",
"instance": "obsidian",
"title": "Notes - Obsidian v0.14.5",
"transient_for": null,
"window_role": "browser-window",
"window_type": "normal"
}
}
{
"id": 67,
"type": "con",
"orientation": "none",
"percent": 0.6561844863731656,
"urgent": false,
"marks": [],
"focused": true,
"layout": "none",
"border": "none",
"current_border_width": 2,
"rect": {
"x": 662,
"y": 46,
"width": 1252,
"height": 1028
},
"deco_rect": {
"x": 0,
"y": 0,
"width": 0,
"height": 0
},
"window_rect": {
"x": 0,
"y": 0,
"width": 1252,
"height": 1028
},
"geometry": {
"x": 0,
"y": 0,
"width": 612,
"height": 439
},
"name": "tmux",
"window": null,
"nodes": [],
"floating_nodes": [],
"focus": [],
"fullscreen_mode": 0,
"sticky": false,
"pid": 603417,
"app_id": "kitty",
"visible": true,
"max_render_time": 0,
"shell": "xdg_shell",
"inhibit_idle": false,
"idle_inhibitors": {
"user": "none",
"application": "none"
}
}

0
configs/sway/wl-copy Normal file
View File