dev: automated commit - 2025-09-29 14:44:33
This commit is contained in:
parent
188e601c2e
commit
76256d9db3
8 changed files with 127 additions and 122 deletions
55
local-bin/.local/bin/record.sh
Executable file
55
local-bin/.local/bin/record.sh
Executable file
|
|
@ -0,0 +1,55 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
[[ -f ~/.config/user-dirs.dirs ]] && source ~/.config/user-dirs.dirs
|
||||||
|
OUTPUT_DIR="${OMARCHY_SCREENRECORD_DIR:-${XDG_VIDEOS_DIR:-$HOME/Videos}}"
|
||||||
|
|
||||||
|
if [[ ! -d "$OUTPUT_DIR" ]]; then
|
||||||
|
notify-send "Screen recording directory does not exist: $OUTPUT_DIR" -u critical -t 3000
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Selects region or output
|
||||||
|
SCOPE="$1"
|
||||||
|
|
||||||
|
# Selects audio inclusion or not
|
||||||
|
AUDIO=$([[ $2 == "audio" ]] && echo "--audio")
|
||||||
|
|
||||||
|
start_screenrecording() {
|
||||||
|
local filename="$OUTPUT_DIR/screenrecording-$(date +'%Y-%m-%d_%H-%M-%S').mp4"
|
||||||
|
|
||||||
|
if lspci | grep -qi 'nvidia'; then
|
||||||
|
wf-recorder $AUDIO -f "$filename" -c libx264 -p crf=23 -p preset=medium -p movflags=+faststart "$@" &
|
||||||
|
else
|
||||||
|
wl-screenrec $AUDIO -f "$filename" --ffmpeg-encoder-options="-c:v libx264 -crf 23 -preset medium -movflags +faststart" "$@" &
|
||||||
|
fi
|
||||||
|
|
||||||
|
toggle_screenrecording_indicator
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_screenrecording() {
|
||||||
|
pkill -x wl-screenrec
|
||||||
|
pkill -x wf-recorder
|
||||||
|
|
||||||
|
notify-send "Screen recording saved to $OUTPUT_DIR" -t 2000
|
||||||
|
|
||||||
|
sleep 0.2 # ensures the process is actually dead before we check
|
||||||
|
toggle_screenrecording_indicator
|
||||||
|
}
|
||||||
|
|
||||||
|
toggle_screenrecording_indicator() {
|
||||||
|
pkill -RTMIN+8 waybar
|
||||||
|
}
|
||||||
|
|
||||||
|
screenrecording_active() {
|
||||||
|
pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
if screenrecording_active; then
|
||||||
|
stop_screenrecording
|
||||||
|
elif [[ "$SCOPE" == "output" ]]; then
|
||||||
|
output=$(slurp -o) || exit 1
|
||||||
|
start_screenrecording -g "$output"
|
||||||
|
else
|
||||||
|
region=$(slurp) || exit 1
|
||||||
|
start_screenrecording -g "$region"
|
||||||
|
fi
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
CONFIG_FILES="$HOME/.config/waybar/config.jsonc $HOME/.config/waybar/style.css"
|
CONFIG_FILES="$HOME/.config/waybar/config.jsonc $HOME/.config/waybar/common.jsonc $HOME/.config/waybar/style.css"
|
||||||
|
|
||||||
trap "killall waybar" EXIT
|
trap "killall .waybar-wrapped" EXIT
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
waybar &
|
waybar &
|
||||||
inotifywait -e create,modify $CONFIG_FILES
|
inotifywait -e create,modify $CONFIG_FILES
|
||||||
killall waybar
|
killall .waybar-wrapped
|
||||||
done
|
done
|
||||||
|
|
|
||||||
|
|
@ -15,13 +15,13 @@ gaps outer 5
|
||||||
seat seat0 xcursor_theme Bibata-Original-Classic 24
|
seat seat0 xcursor_theme Bibata-Original-Classic 24
|
||||||
|
|
||||||
# SwayFX Settings
|
# SwayFX Settings
|
||||||
# smart_corner_radius on
|
smart_corner_radius on
|
||||||
# corner_radius 10
|
corner_radius 10
|
||||||
#
|
|
||||||
# default_dim_inactive 0.05
|
default_dim_inactive 0.05
|
||||||
# blur enable
|
blur enable
|
||||||
# blur_passes 1
|
blur_passes 1
|
||||||
# blur_radius 1
|
blur_radius 1
|
||||||
# layer_effects "waybar" "blur enable"; shadows enable
|
layer_effects "waybar" "blur enable"; shadows enable
|
||||||
# shadows on
|
shadows on
|
||||||
# shadow_blur_radius 20
|
shadow_blur_radius 20
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ bindsym {
|
||||||
# Special Functions
|
# Special Functions
|
||||||
bindsym {
|
bindsym {
|
||||||
F4 exec switch-windows
|
F4 exec switch-windows
|
||||||
$mod+r exec --no-startup-id ~/.local/bin/wlrecord.sh
|
$mod+r exec --no-startup-id ~/.local/bin/record.sh
|
||||||
$mod+p exec --no-startup-id grim -g "$(slurp -d)" - | swappy -f -
|
$mod+p exec --no-startup-id grim -g "$(slurp -d)" - | swappy -f -
|
||||||
$mod+shift+p exec --no-startup-id ~/.local/bin/screenshot-upload
|
$mod+shift+p exec --no-startup-id ~/.local/bin/screenshot-upload
|
||||||
$mod+F5 exec --no-startup-id ~/.local/bin/pause-notifications
|
$mod+F5 exec --no-startup-id ~/.local/bin/pause-notifications
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,9 @@
|
||||||
"mod": "dock",
|
"mod": "dock",
|
||||||
"exclusive": true,
|
"exclusive": true,
|
||||||
"passthrough": false,
|
"passthrough": false,
|
||||||
|
"border-radius": 10,
|
||||||
"gtk-layer-shell": true,
|
"gtk-layer-shell": true,
|
||||||
"height": 5,
|
"height": 36,
|
||||||
"margin": "5 10 0 10",
|
"margin": "5 10 0 10",
|
||||||
// Workspace and Window Management
|
// Workspace and Window Management
|
||||||
"sway/workspaces": {
|
"sway/workspaces": {
|
||||||
|
|
@ -52,10 +53,9 @@
|
||||||
},
|
},
|
||||||
// Date and Time
|
// Date and Time
|
||||||
"clock": {
|
"clock": {
|
||||||
// DD-MM-YYYY
|
"format": "{:%H:%M %Z}",
|
||||||
"format": " {0:%H:%M:%S %Z} {0:%d/%m/%Y}",
|
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"format-alt": "{:L%A, %B %d, %Y (%R)} ",
|
"format-alt": "{:%d/%m/%Y}",
|
||||||
"tooltip-format": "<small><tt>{calendar}</tt></small>",
|
"tooltip-format": "<small><tt>{calendar}</tt></small>",
|
||||||
"timezones": [
|
"timezones": [
|
||||||
"America/Montevideo",
|
"America/Montevideo",
|
||||||
|
|
@ -214,12 +214,11 @@
|
||||||
"Paused": "<span foreground='#928374'> </span>"
|
"Paused": "<span foreground='#928374'> </span>"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// Notifications and Utilities
|
"custom/screenrecording-indicator": {
|
||||||
"custom/wf-recorder": {
|
"on-click": "~/.local/bin/record.sh",
|
||||||
"format": "",
|
"exec": "~/.config/waybar/indicators/screen-recording.sh",
|
||||||
"tooltip": false,
|
"signal": 8,
|
||||||
"on-click": "wf-recorder -f ~/Videos/$(date +%Y%m%d_%H%M%S).mp4",
|
"return-type": "json"
|
||||||
"on-click-right": "pkill -f wf-recorder"
|
|
||||||
},
|
},
|
||||||
"custom/notification": {
|
"custom/notification": {
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
"custom/playerlabel"
|
"custom/playerlabel"
|
||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
|
"custom/screenrecording-indicator",
|
||||||
"custom/randwall",
|
"custom/randwall",
|
||||||
"clock",
|
"clock",
|
||||||
"group/tray-expander"
|
"group/tray-expander"
|
||||||
|
|
@ -47,6 +48,7 @@
|
||||||
"custom/playerlabel"
|
"custom/playerlabel"
|
||||||
],
|
],
|
||||||
"modules-right": [
|
"modules-right": [
|
||||||
|
"custom/screenrecording-indicator",
|
||||||
"custom/randwall",
|
"custom/randwall",
|
||||||
"pulseaudio",
|
"pulseaudio",
|
||||||
"backlight",
|
"backlight",
|
||||||
|
|
|
||||||
7
waybar/.config/waybar/indicators/screen-recording.sh
Executable file
7
waybar/.config/waybar/indicators/screen-recording.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if pgrep -x wl-screenrec >/dev/null || pgrep -x wf-recorder >/dev/null; then
|
||||||
|
echo '{"text": "", "tooltip": "Stop recording", "class": "active"}'
|
||||||
|
else
|
||||||
|
echo '{"text": "", "tooltip": "Start recording", "class": "inactive"}'
|
||||||
|
fi
|
||||||
|
|
@ -1,3 +1,6 @@
|
||||||
|
@define-color foreground #e0def4;
|
||||||
|
@define-color background #191724;
|
||||||
|
|
||||||
* {
|
* {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
@ -6,89 +9,60 @@
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Window Styles */
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background: rgba(0, 0, 0, 0.8);
|
background: rgba(25, 23, 36, 0.8);
|
||||||
border-bottom: 1px solid #282828;
|
border-bottom: 1px solid #26233a;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
color: #f4d9e1;
|
color: @foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
tooltip {
|
tooltip {
|
||||||
background: #010409;
|
background: @background;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Workspace Styles */
|
|
||||||
|
|
||||||
#workspaces button {
|
#workspaces button {
|
||||||
color: #fff;
|
color: @foreground;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
margin: 4px 4px;
|
margin: 4px 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button.urgent {
|
#workspaces button.urgent {
|
||||||
background: #010409;
|
background: @background;
|
||||||
color: #FF7F7F;
|
color: #eb6f92;
|
||||||
}
|
}
|
||||||
|
|
||||||
#workspaces button:hover,
|
#workspaces button:hover,
|
||||||
#workspaces button.focused {
|
#workspaces button.focused {
|
||||||
background: #f4d9e1;
|
background: #c4a7e7;
|
||||||
color: #282828;
|
color: @background;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Common Module Styles */
|
|
||||||
#cpu,
|
#cpu,
|
||||||
#memory,
|
#memory,
|
||||||
#window,
|
#network,
|
||||||
#clock,
|
#bluetooth,
|
||||||
|
#pulseaudio,
|
||||||
#battery,
|
#battery,
|
||||||
#pulseaudio,
|
|
||||||
#network,
|
|
||||||
#bluetooth,
|
|
||||||
#temperature,
|
|
||||||
#workspaces,
|
|
||||||
#tray,
|
|
||||||
#custom-vpn,
|
|
||||||
#custom-notification,
|
|
||||||
#backlight {
|
|
||||||
padding: 0px 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
padding-right: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Individual Module Styles */
|
|
||||||
#window {
|
|
||||||
margin: 0 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#clock,
|
#clock,
|
||||||
#network,
|
#custom-playerctl,
|
||||||
#bluetooth,
|
#custom-playerlabel,
|
||||||
#pulseaudio,
|
#custom-screenrecording-indicator,
|
||||||
#pulseaudio.microphone,
|
#custom-randwall {
|
||||||
#battery {
|
color: @foreground;
|
||||||
color: #fff;
|
padding: 0px 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#temperature.critical {
|
#temperature.critical {
|
||||||
color: #eba0ac;
|
color: #eb6f92;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Custom Module Styles */
|
|
||||||
#custom-playerctl,
|
#custom-playerctl,
|
||||||
#custom-playerlabel {
|
#custom-playerlabel {
|
||||||
background: #282828;
|
background: #26233a;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
font-style: normal;
|
margin: 5px 8px;
|
||||||
font-weight: normal;
|
|
||||||
margin: 5px 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-playerctl {
|
#custom-playerctl {
|
||||||
|
|
@ -101,68 +75,36 @@ tooltip {
|
||||||
padding: 0 15px 0 10px;
|
padding: 0 15px 0 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-notification {
|
#custom-screenrecording-indicator {
|
||||||
border-radius: 0;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-randwall {
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-vpn.connected {
|
|
||||||
color: #a6e3a1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-vpn.disconnected {
|
|
||||||
color: #f4d9e1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-wf-recorder {
|
|
||||||
padding: 0 10px;
|
|
||||||
margin: 0 4px;
|
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-wf-recorder.idle {
|
#custom-screenrecording-indicator.idle {
|
||||||
background-color: #2c2c2c;
|
background-color: @background;
|
||||||
color: #ccc;
|
color: @foreground;
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-wf-recorder.recording {
|
#custom-screenrecording-indicator.active {
|
||||||
background-color: #cc3436;
|
color: #cc3436;
|
||||||
color: white;
|
|
||||||
animation: blink 1s infinite;
|
animation: blink 1s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes blink {
|
@keyframes blink {
|
||||||
0% {
|
0% { opacity: 1; }
|
||||||
opacity: 1;
|
50% { opacity: 0.7; }
|
||||||
|
100% { opacity: 1; }
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
#custom-notification {
|
||||||
opacity: 0.7;
|
margin-right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
100% {
|
#custom-randwall {
|
||||||
opacity: 1;
|
color: #f6c177;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-microphone {
|
#custom-expand-icon {
|
||||||
padding: 0 10px;
|
color: #9ccfd8;
|
||||||
margin: 0 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-microphone.headset {
|
|
||||||
color: #a6e3a1;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-microphone.internal {
|
|
||||||
color: #f9e2af;
|
|
||||||
}
|
|
||||||
|
|
||||||
#custom-microphone.unknown {
|
|
||||||
color: #f38ba8;
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue