Compare commits
22 commits
Author | SHA1 | Date | |
---|---|---|---|
f87305b06d | |||
d8e0fa71c2 | |||
ee226de17d | |||
e72799525c | |||
66bdd5592c | |||
f59dabef60 | |||
![]() |
8dc7da2815 | ||
![]() |
54dc20e1da | ||
ddb15dba49 | |||
8f24ae2946 | |||
3e8279f479 | |||
![]() |
bca213279f | ||
![]() |
d59a58120b | ||
![]() |
1810959292 | ||
![]() |
ac0926cf32 | ||
307f026e9d | |||
![]() |
d36e203e98 | ||
![]() |
2be7224e32 | ||
f09dfbb6c6 | |||
![]() |
778dc6528b | ||
![]() |
271069c881 | ||
![]() |
cc095e898e |
25 changed files with 313 additions and 111 deletions
12
debian/changelog
vendored
12
debian/changelog
vendored
|
@ -1,3 +1,15 @@
|
||||||
|
tileos-settings-sway (1.2.0~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Change module order
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Sun, 20 Oct 2024 00:38:40 +0400
|
||||||
|
|
||||||
|
tileos-settings-sway (1.1.5~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
|
* Update color theme
|
||||||
|
|
||||||
|
-- Aleksey Samoilov <samoilov.lex@gmail.com> Wed, 04 Sep 2024 21:38:06 +0400
|
||||||
|
|
||||||
tileos-settings-sway (1.1.4~tileos) unstable; urgency=medium
|
tileos-settings-sway (1.1.4~tileos) unstable; urgency=medium
|
||||||
|
|
||||||
* Add swayidle inhibit service
|
* Add swayidle inhibit service
|
||||||
|
|
|
@ -1,97 +1,97 @@
|
||||||
color_set:
|
color_set:
|
||||||
text: &TEXT "#CAD3F5"
|
text: &TEXT "#cad3f5"
|
||||||
subtext0: &SUBTEXT0 "#E3E3F3"
|
subtext0: &SUBTEXT0 "#e3e3f3"
|
||||||
subtext1: &SUBTEXT1 "#CED4E0"
|
subtext1: &SUBTEXT1 "#ced4e0"
|
||||||
surface2: &SURFACE2 "#5B6078"
|
surface2: &SURFACE2 "#5b6078"
|
||||||
surface1: &SURFACE1 "#494D64"
|
surface1: &SURFACE1 "#494d64"
|
||||||
index16: &INDEX16 "#F5A97F"
|
index16: &INDEX16 "#ed6c13"
|
||||||
index17: &INDEX17 "#F4DBD6"
|
index17: &INDEX17 "#f4dbd6"
|
||||||
base: &BASE "#24273A"
|
base: &BASE "#24273a"
|
||||||
red: &RED "#ED6070"
|
red: &RED "#ed6070"
|
||||||
green: &GREEN "#A6DA95"
|
green: &GREEN "#a6da95"
|
||||||
blue: &BLUE "#8AADF4"
|
blue: &BLUE "#8aadf4"
|
||||||
yellow: &YELLOW "#EED49F"
|
yellow: &YELLOW "#eed49f"
|
||||||
pink: &PINK "#F5BDE6"
|
pink: &PINK "#f5bde6"
|
||||||
teal: &TEAL "#8BD5CA"
|
teal: &TEAL "#8bd5ca"
|
||||||
rosewater: &ROSEWATER "#F4DBD6"
|
rosewater: &ROSEWATER "#f4dbd6"
|
||||||
lavender: &LAVENDER "#B7BDF8"
|
lavender: &LAVENDER "#b7bdf8"
|
||||||
|
|
||||||
colors:
|
colors:
|
||||||
# Default colors
|
# Default colors
|
||||||
primary:
|
primary:
|
||||||
background: *BASE # base
|
background: *BASE
|
||||||
foreground: *TEXT # text
|
foreground: *TEXT
|
||||||
# Bright and dim foreground colors
|
# Bright and dim foreground colors
|
||||||
dim_foreground: *TEXT # text
|
dim_foreground: *TEXT
|
||||||
bright_foreground: *TEXT # text
|
bright_foreground: *TEXT
|
||||||
|
|
||||||
# Cursor colors
|
# Cursor colors
|
||||||
cursor:
|
cursor:
|
||||||
text: *BASE # base
|
text: *BASE
|
||||||
cursor: *ROSEWATER # rosewater
|
cursor: *ROSEWATER
|
||||||
vi_mode_cursor:
|
vi_mode_cursor:
|
||||||
text: *BASE # base
|
text: *BASE
|
||||||
cursor: *LAVENDER # lavender
|
cursor: *LAVENDER
|
||||||
|
|
||||||
# Search colors
|
# Search colors
|
||||||
search:
|
search:
|
||||||
matches:
|
matches:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *SUBTEXT0 # subtext0
|
background: *SUBTEXT0
|
||||||
focused_match:
|
focused_match:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *GREEN # green
|
background: *GREEN
|
||||||
footer_bar:
|
footer_bar:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *SUBTEXT0 # subtext0
|
background: *SUBTEXT0
|
||||||
|
|
||||||
# Keyboard regex hints
|
# Keyboard regex hints
|
||||||
hints:
|
hints:
|
||||||
start:
|
start:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *YELLOW # yellow
|
background: *YELLOW
|
||||||
end:
|
end:
|
||||||
foreground: *BASE # base
|
foreground: *BASE
|
||||||
background: *SUBTEXT0 # subtext0
|
background: *SUBTEXT0
|
||||||
|
|
||||||
# Selection colors
|
# Selection colors
|
||||||
selection:
|
selection:
|
||||||
text: *BASE # base
|
text: *BASE
|
||||||
background: *ROSEWATER # rosewater
|
background: *ROSEWATER
|
||||||
|
|
||||||
# Normal colors
|
# Normal colors
|
||||||
normal:
|
normal:
|
||||||
black: *SURFACE1 # surface1
|
black: *SURFACE1
|
||||||
red: *RED # red
|
red: *RED
|
||||||
green: *GREEN # green
|
green: *GREEN
|
||||||
yellow: *YELLOW # yellow
|
yellow: *YELLOW
|
||||||
blue: *BLUE # blue
|
blue: *BLUE
|
||||||
magenta: *PINK # pink
|
magenta: *PINK
|
||||||
cyan: *TEAL # teal
|
cyan: *TEAL
|
||||||
white: *SUBTEXT1 # subtext1
|
white: *SUBTEXT1
|
||||||
|
|
||||||
# Bright colors
|
# Bright colors
|
||||||
bright:
|
bright:
|
||||||
black: *SURFACE2 # surface2
|
black: *SURFACE2
|
||||||
red: *RED # red
|
red: *RED
|
||||||
green: *GREEN # green
|
green: *GREEN
|
||||||
yellow: *YELLOW # yellow
|
yellow: *YELLOW
|
||||||
blue: *BLUE # blue
|
blue: *BLUE
|
||||||
magenta: *PINK # pink
|
magenta: *PINK
|
||||||
cyan: *TEAL # teal
|
cyan: *TEAL
|
||||||
white: *SUBTEXT0 # subtext0
|
white: *SUBTEXT0
|
||||||
|
|
||||||
# Dim colors
|
# Dim colors
|
||||||
dim:
|
dim:
|
||||||
black: *SURFACE1 # surface1
|
black: *SURFACE1
|
||||||
red: *RED # red
|
red: *RED
|
||||||
green: *GREEN # green
|
green: *GREEN
|
||||||
yellow: *YELLOW # yellow
|
yellow: *YELLOW
|
||||||
blue: *BLUE # blue
|
blue: *BLUE
|
||||||
magenta: *PINK # pink
|
magenta: *PINK
|
||||||
cyan: *TEAL # teal
|
cyan: *TEAL
|
||||||
white: *SUBTEXT1 # subtext1
|
white: *SUBTEXT1
|
||||||
|
|
||||||
indexed_colors:
|
indexed_colors:
|
||||||
- { index: 16, color: "#F5A97F" }
|
- { index: 16, color: *INDEX16 }
|
||||||
- { index: 17, color: "#F4DBD6" }
|
- { index: 17, color: *INDEX17 }
|
||||||
|
|
15
etc/skel/.config/bluetuith/bluetuith.conf
Normal file
15
etc/skel/.config/bluetuith/bluetuith.conf
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
adapter: ""
|
||||||
|
gsm-apn: ""
|
||||||
|
gsm-number: ""
|
||||||
|
keybindings: {}
|
||||||
|
receive-dir: ""
|
||||||
|
theme: {
|
||||||
|
AdapterPowered: "powderblue",
|
||||||
|
AdapterNotPowered: "lightcoral",
|
||||||
|
AdapterPairable: "thistle",
|
||||||
|
AdapterScanning: "mistyrose",
|
||||||
|
DevicePropertyDiscovered: "mistyrose",
|
||||||
|
DevicePropertyConnected: "powderblue"
|
||||||
|
}
|
||||||
|
}
|
|
@ -58,7 +58,7 @@ theme[cached_mid]="#8aadf4"
|
||||||
theme[cached_end]="#b7bdf8"
|
theme[cached_end]="#b7bdf8"
|
||||||
|
|
||||||
# Mem/Disk available meter (Peach -> Red)
|
# Mem/Disk available meter (Peach -> Red)
|
||||||
theme[available_start]="#f5a97f"
|
theme[available_start]="#ed6c13"
|
||||||
theme[available_mid]="#ee99a0"
|
theme[available_mid]="#ee99a0"
|
||||||
theme[available_end]="#ed8796"
|
theme[available_end]="#ed8796"
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ theme[used_mid]="#8bd5ca"
|
||||||
theme[used_end]="#91d7e3"
|
theme[used_end]="#91d7e3"
|
||||||
|
|
||||||
# Download graph colors (Peach -> Red)
|
# Download graph colors (Peach -> Red)
|
||||||
theme[download_start]="#f5a97f"
|
theme[download_start]="#ed6c13"
|
||||||
theme[download_mid]="#ee99a0"
|
theme[download_mid]="#ee99a0"
|
||||||
theme[download_end]="#ed8796"
|
theme[download_end]="#ed8796"
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
#
|
#
|
||||||
# If this option is set to mouse or keyboard, the monitor option
|
# If this option is set to mouse or keyboard, the monitor option
|
||||||
# will be ignored.
|
# will be ignored.
|
||||||
follow = none
|
follow = mouse
|
||||||
|
|
||||||
### Geometry ###
|
### Geometry ###
|
||||||
|
|
||||||
|
@ -329,7 +329,7 @@
|
||||||
[urgency_critical]
|
[urgency_critical]
|
||||||
background = "#24273A"
|
background = "#24273A"
|
||||||
foreground = "#CAD3F5"
|
foreground = "#CAD3F5"
|
||||||
frame_color = "#F5A97F"
|
frame_color = "#ED6C13"
|
||||||
timeout = 0
|
timeout = 0
|
||||||
# Icon for notifications with critical urgency, uncomment to enable
|
# Icon for notifications with critical urgency, uncomment to enable
|
||||||
#default_icon = /path/to/icon
|
#default_icon = /path/to/icon
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"label": "Lock",
|
"label": "Lock",
|
||||||
"exec": "swaymsg exec ~/.config/swaylock/lock.sh",
|
"exec": "swaymsg exec /usr/share/sway/scripts/lock.sh",
|
||||||
"icon": "system-lock-screen"
|
"icon": "system-lock-screen"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -15,7 +15,7 @@ Catppuccin Gedit theme based on Oblivion theme and Cappuccin for Visual Studio C
|
||||||
<color name="macchiato_mauve" value="#c6a0f6"/>
|
<color name="macchiato_mauve" value="#c6a0f6"/>
|
||||||
<color name="macchiato_red" value="#ed6070"/>
|
<color name="macchiato_red" value="#ed6070"/>
|
||||||
<color name="macchiato_maroon" value="#ee99a0"/>
|
<color name="macchiato_maroon" value="#ee99a0"/>
|
||||||
<color name="macchiato_peach" value="#f5a97f"/>
|
<color name="macchiato_peach" value="#ed6c13"/>
|
||||||
<color name="macchiato_yellow" value="#eed49f"/>
|
<color name="macchiato_yellow" value="#eed49f"/>
|
||||||
<color name="macchiato_green" value="#a6da95"/>
|
<color name="macchiato_green" value="#a6da95"/>
|
||||||
<color name="macchiato_teal" value="#8bd5ca"/>
|
<color name="macchiato_teal" value="#8bd5ca"/>
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
timeout 240 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)'
|
timeout 240 'light -G > /tmp/brightness && light -S 10' resume 'light -S $([ -f /tmp/brightness ] && cat /tmp/brightness || echo 100%)'
|
||||||
timeout 300 ~/.config/swaylock/lock.sh
|
timeout 300 '/usr/share/sway/scripts/lock.sh'
|
||||||
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
|
timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"'
|
||||||
timeout 900 'systemctl suspend'
|
timeout 900 'systemctl suspend'
|
||||||
before-sleep 'playerctl pause'
|
before-sleep 'playerctl pause'
|
||||||
before-sleep ~/.config/swaylock/lock.sh
|
before-sleep '/usr/share/sway/scripts/lock.sh'
|
||||||
lock ~/.config/swaylock/lock.sh
|
lock '/usr/share/sway/scripts/lock.sh'
|
||||||
|
|
|
@ -15,4 +15,4 @@ ring-color=c6a0f6
|
||||||
ring-ver-color=7dc4e4
|
ring-ver-color=7dc4e4
|
||||||
ring-wrong-color=ee99a0
|
ring-wrong-color=ee99a0
|
||||||
ring-clear-color=8aadf4
|
ring-clear-color=8aadf4
|
||||||
ring-caps-lock-color=f5a97f
|
ring-caps-lock-color=ed6c13
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
@define-color teal #8bd5ca;
|
@define-color teal #8bd5ca;
|
||||||
@define-color green #a6da95;
|
@define-color green #a6da95;
|
||||||
@define-color yellow #eed49f;
|
@define-color yellow #eed49f;
|
||||||
@define-color peach #f5a97f;
|
@define-color peach #ed6c13;
|
||||||
@define-color maroon #ee99a0;
|
@define-color maroon #ee99a0;
|
||||||
@define-color red #ed6070;
|
@define-color red #ed6070;
|
||||||
@define-color mauve #c6a0f6;
|
@define-color mauve #c6a0f6;
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
"custom/help",
|
"custom/help",
|
||||||
"custom/wlsunset",
|
"custom/wlsunset",
|
||||||
"idle_inhibitor",
|
"idle_inhibitor",
|
||||||
"custom/dunst",
|
|
||||||
"sway/language",
|
"sway/language",
|
||||||
|
"custom/dunst",
|
||||||
"custom/clipboard",
|
"custom/clipboard",
|
||||||
"cpu",
|
"cpu",
|
||||||
"memory",
|
"memory",
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
"tooltip-format": "{tooltip}",
|
"tooltip-format": "{tooltip}",
|
||||||
"exec": "echo '{\"class\": \"recording\",\"text\":\"\",\"tooltip\":\"press $mod+Esc to stop recording\"}'",
|
"exec": "echo '{\"class\": \"recording\",\"text\":\"\",\"tooltip\":\"press $mod+Esc to stop recording\"}'",
|
||||||
"exec-if": "pgrep wf-recorder",
|
"exec-if": "pgrep wf-recorder",
|
||||||
"on-click": "killall -s SIGINT wf-recorder",
|
"on-click": "/usr/share/sway/scripts/recorder.sh",
|
||||||
"signal": 8
|
"signal": 8
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ $bindsym $mod+Shift+e exec nwg-bar -x
|
||||||
$bindsym --locked XF86AudioRaiseVolume exec $volume_up
|
$bindsym --locked XF86AudioRaiseVolume exec $volume_up
|
||||||
$bindsym --locked XF86AudioLowerVolume exec $volume_down
|
$bindsym --locked XF86AudioLowerVolume exec $volume_down
|
||||||
$bindsym --locked XF86AudioMute exec $volume_mute
|
$bindsym --locked XF86AudioMute exec $volume_mute
|
||||||
|
$bindsym --locked XF86AudioMicMute exec $mic_mute
|
||||||
$bindsym --locked XF86AudioPlay exec playerctl play-pause
|
$bindsym --locked XF86AudioPlay exec playerctl play-pause
|
||||||
$bindsym --locked XF86AudioNext exec playerctl next
|
$bindsym --locked XF86AudioNext exec playerctl next
|
||||||
$bindsym --locked XF86AudioPrev exec playerctl previous
|
$bindsym --locked XF86AudioPrev exec playerctl previous
|
||||||
|
@ -96,7 +97,6 @@ $bindsym $mod+6 workspace $ws6
|
||||||
$bindsym $mod+7 workspace $ws7
|
$bindsym $mod+7 workspace $ws7
|
||||||
$bindsym $mod+8 workspace $ws8
|
$bindsym $mod+8 workspace $ws8
|
||||||
$bindsym $mod+9 workspace $ws9
|
$bindsym $mod+9 workspace $ws9
|
||||||
$bindsym $mod+0 workspace $ws10
|
|
||||||
|
|
||||||
set $focus_ws [ "$focus_after_move" == 'true' ] && swaymsg workspace
|
set $focus_ws [ "$focus_after_move" == 'true' ] && swaymsg workspace
|
||||||
|
|
||||||
|
|
|
@ -16,4 +16,4 @@ mode --pango_markup $mode_recording {
|
||||||
$bindsym $mod+Shift+r mode $mode_recording
|
$bindsym $mod+Shift+r mode $mode_recording
|
||||||
|
|
||||||
## Launch // Stop Recording Mode ##
|
## Launch // Stop Recording Mode ##
|
||||||
$bindsym $mod+Escape exec killall -s SIGINT wf-recorder
|
$bindsym $mod+Escape exec $recorder
|
||||||
|
|
18
etc/sway/modes/screenmirror.conf
Normal file
18
etc/sway/modes/screenmirror.conf
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#
|
||||||
|
# Screenmirror:
|
||||||
|
#
|
||||||
|
# The mode allows the user to mirror the headless output.
|
||||||
|
# This is primarily used when screencasting to cast only the windows that
|
||||||
|
# belong to the headless output instead of casting the entire screen.
|
||||||
|
#
|
||||||
|
# See the following link for more details:
|
||||||
|
# https://github.com/emersion/xdg-desktop-portal-wlr/issues/107#issuecomment-1596107337
|
||||||
|
|
||||||
|
# set $screenmirror /usr/share/sway/scripts/screenmirror.sh
|
||||||
|
# set $start_mirror systemd-cat $screenmirror $headless
|
||||||
|
# set $stop_mirror systemd-cat $screenmirror -k
|
||||||
|
|
||||||
|
# ## Launch // Switch to the workspace for mirroring ##
|
||||||
|
# $bindsym $mod+0 exec $start_mirror, workspace $ws10
|
||||||
|
# ## Launch // Switch back from the workspace for mirroring ##
|
||||||
|
# $bindsym $mod+Mod1+0 exec $stop_mirror, workspace back_and_forth
|
9
etc/sway/outputs/headless-output.conf
Normal file
9
etc/sway/outputs/headless-output.conf
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
# This output configuration is required for the screenmirror mode to work.
|
||||||
|
|
||||||
|
#set $headless HEADLESS-1
|
||||||
|
|
||||||
|
#output $headless {
|
||||||
|
# position 16000 16000
|
||||||
|
#}
|
||||||
|
#workspace $ws10 output $headless
|
||||||
|
#exec swaymsg create_output
|
|
@ -44,6 +44,7 @@ set $brightness_down light -r -U $($brightness_step) && $brightness_bar
|
||||||
set $volume_down pulsemixer --change-volume -5 && $volume_bar
|
set $volume_down pulsemixer --change-volume -5 && $volume_bar
|
||||||
set $volume_up pulsemixer --change-volume +5 && $volume_bar
|
set $volume_up pulsemixer --change-volume +5 && $volume_bar
|
||||||
set $volume_mute pulsemixer --toggle-mute && $volume_bar
|
set $volume_mute pulsemixer --toggle-mute && $volume_bar
|
||||||
|
set $mic_mute /usr/share/sway/scripts/mic-mute.sh
|
||||||
|
|
||||||
# Clipboard history
|
# Clipboard history
|
||||||
set $clipboard cliphist list | rofi -dmenu -font "$gui-font" -p "Select item to copy:" -lines 10 -width 35 | cliphist decode | wl-copy
|
set $clipboard cliphist list | rofi -dmenu -font "$gui-font" -p "Select item to copy:" -lines 10 -width 35 | cliphist decode | wl-copy
|
||||||
|
@ -71,7 +72,7 @@ set $ws6 number 6
|
||||||
set $ws7 number 7
|
set $ws7 number 7
|
||||||
set $ws8 number 8
|
set $ws8 number 8
|
||||||
set $ws9 number 9
|
set $ws9 number 9
|
||||||
set $ws10 number 10
|
set $ws10 "<span baseline_shift='-20pt' weight='bold'>🖵</span>"
|
||||||
|
|
||||||
# Screenshot
|
# Screenshot
|
||||||
set $grimshot /usr/bin/grimshot
|
set $grimshot /usr/bin/grimshot
|
||||||
|
@ -125,5 +126,8 @@ set $calendar_daemon 'calcurse --daemon'
|
||||||
# Notifications from Swappy
|
# Notifications from Swappy
|
||||||
set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh'
|
set $swappy_notify '[ -x "$(command -v swappy)" ] && /usr/share/sway/scripts/screenshot-notify.sh'
|
||||||
|
|
||||||
|
# Start a screensaver
|
||||||
|
set $lock '/usr/share/sway/scripts/lock.sh'
|
||||||
|
|
||||||
# Toggle shortcuts inhibition mode for the current focused window
|
# Toggle shortcuts inhibition mode for the current focused window
|
||||||
set $toggle_shorcuts_inhibitor 'swaymsg "seat - shortcuts_inhibitor toggle"'
|
set $toggle_shorcuts_inhibitor 'swaymsg "seat - shortcuts_inhibitor toggle"'
|
||||||
|
|
3
etc/xdg/xdg-desktop-portal-wlr/config
Normal file
3
etc/xdg/xdg-desktop-portal-wlr/config
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[screencast]
|
||||||
|
chooser_type=dmenu
|
||||||
|
chooser_cmd=/usr/share/sway/scripts/select-output.sh
|
|
@ -6,9 +6,9 @@ VISIBILITY_SIGNAL=30
|
||||||
QUIT_SIGNAL=31
|
QUIT_SIGNAL=31
|
||||||
|
|
||||||
if [ "$1" = "--toggle" ]; then
|
if [ "$1" = "--toggle" ]; then
|
||||||
pkill -f -${VISIBILITY_SIGNAL} nwg-wrapper
|
pkill -f -${VISIBILITY_SIGNAL} 'nwg-wrapper.*-s help.sh'
|
||||||
else
|
else
|
||||||
pkill -f -${QUIT_SIGNAL} nwg-wrapper
|
pkill -f -${QUIT_SIGNAL} 'nwg-wrapper.*-s help.sh'
|
||||||
for output in $(swaymsg -t get_outputs --raw | jq -r '.[].name'); do
|
for output in $(swaymsg -t get_outputs --raw | jq -r '.[].name'); do
|
||||||
nwg-wrapper -o "$output" -i -sv ${VISIBILITY_SIGNAL} -sq ${QUIT_SIGNAL} -s help.sh -p left -a end &
|
nwg-wrapper -o "$output" -i -sv ${VISIBILITY_SIGNAL} -sq ${QUIT_SIGNAL} -s help.sh -p left -a end &
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,11 +1,32 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
set -e
|
check_status() {
|
||||||
|
grep -s -l -v "closed" \
|
||||||
|
/proc/asound/card*/pcm*/sub*/status \
|
||||||
|
&>/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
if grep -s -l -v "closed" /proc/asound/card*/pcm*/sub*/status; then
|
out() {
|
||||||
swaymsg inhibit_idle open
|
printf "Idle inhibition is OFF.\n"
|
||||||
printf "Idle inhibition is ON."
|
exit 0
|
||||||
else
|
}
|
||||||
swaymsg inhibit_idle none
|
|
||||||
printf "Idle inhibition is OFF."
|
watch_status() {
|
||||||
fi
|
printf "Idle inhibition is ON.\n"
|
||||||
|
while check_status; do
|
||||||
|
sleep 10
|
||||||
|
done
|
||||||
|
out
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
check_status || out
|
||||||
|
test "$1" = "-w" && watch_status
|
||||||
|
systemd-inhibit \
|
||||||
|
--what=idle \
|
||||||
|
--who="${0##*/}" \
|
||||||
|
--why="Inhibit idle due to audio is now playing" \
|
||||||
|
--mode=block \
|
||||||
|
"$0" -w
|
||||||
|
}
|
||||||
|
main "$@"
|
||||||
|
|
10
usr/share/sway/scripts/lock.sh
Executable file
10
usr/share/sway/scripts/lock.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
USER_SCRIPT="$HOME/.config/swaylock/lock.sh"
|
||||||
|
GLOB_SCRIPT="/usr/share/sway/scripts/swaylock.sh"
|
||||||
|
|
||||||
|
if [[ -x "$USER_SCRIPT" ]]; then
|
||||||
|
"$USER_SCRIPT"
|
||||||
|
else
|
||||||
|
"$GLOB_SCRIPT"
|
||||||
|
fi
|
14
usr/share/sway/scripts/mic-mute.sh
Executable file
14
usr/share/sway/scripts/mic-mute.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
MIC="${1:-'Capture'}"
|
||||||
|
|
||||||
|
amixer sset "$MIC" toggle
|
||||||
|
|
||||||
|
STATE="$(amixer sget "$MIC",0 | sed -E -e '0,/^.*\[(on|off)\].*$/d' -e 's/^.*\[(\w+)\].*$/\1/')"
|
||||||
|
|
||||||
|
test -n "$STATE" && notify-send \
|
||||||
|
--app-name sway \
|
||||||
|
--expire-time 800 \
|
||||||
|
"Microphone is $STATE"
|
|
@ -1,44 +1,69 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -x
|
|
||||||
|
|
||||||
pgrep wf-recorder
|
|
||||||
status=$?
|
|
||||||
|
|
||||||
countdown() {
|
countdown() {
|
||||||
notify "Recording in 3 seconds" -t 1000
|
for count in {3..1}; do
|
||||||
sleep 1
|
notify "Recording in $count seconds" -t 1000
|
||||||
notify "Recording in 2 seconds" -t 1000
|
sleep 1
|
||||||
sleep 1
|
done
|
||||||
notify "Recording in 1 seconds" -t 1000
|
|
||||||
sleep 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
notify() {
|
notify() {
|
||||||
line=$1
|
notify-send \
|
||||||
shift
|
"$1" \
|
||||||
notify-send "Recording" "${line}" -i /usr/share/icons/Yaru/scalable/devices/camera-video-symbolic.svg "$*"
|
-i "/usr/share/icons/Yaru/scalable/devices/camera-video-symbolic.svg" \
|
||||||
|
"${@:2}"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $status != 0 ]; then
|
kill_waybar() {
|
||||||
|
pkill -RTMIN+8 waybar
|
||||||
|
}
|
||||||
|
|
||||||
|
kill_recursive() {
|
||||||
|
ps -o sid= -p "$1" | xargs pkill --signal SIGINT -g
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup() {
|
||||||
|
pid=$(cat "$1")
|
||||||
|
rm "$1"
|
||||||
|
kill_waybar
|
||||||
|
kill_recursive "$pid"
|
||||||
|
exit
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
pid_file="/tmp/screenrecorder-$UID.pid"
|
||||||
|
|
||||||
|
test -e "$pid_file" && cleanup "$pid_file"
|
||||||
|
echo "$$" > "$pid_file"
|
||||||
|
|
||||||
target_path=$(xdg-user-dir VIDEOS)
|
target_path=$(xdg-user-dir VIDEOS)
|
||||||
timestamp=$(date +'recording_%Y%m%d-%H%M%S')
|
timestamp=$(date +'recording_%Y%m%d-%H%M%S')
|
||||||
|
|
||||||
notify "Select a region to record" -t 1000
|
notify "Select a region to record" -t 1000
|
||||||
area=$(swaymsg -t get_tree | jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | slurp)
|
area=$(swaymsg -t get_tree | \
|
||||||
|
jq -r '.. | select(.pid? and .visible?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | \
|
||||||
|
slurp)
|
||||||
|
|
||||||
countdown
|
countdown
|
||||||
(sleep 0.5 && pkill -RTMIN+8 waybar) &
|
(sleep 0.5 && kill_waybar) &
|
||||||
|
|
||||||
if [ "$1" == "-a" ]; then
|
if [[ "$1" == "-a" ]]; then
|
||||||
file="$target_path/$timestamp.mp4"
|
file="$target_path/$timestamp.mp4"
|
||||||
wf-recorder --audio -g "$area" --file="$file"
|
wf-recorder --audio -g "$area" --file="$file"
|
||||||
else
|
else
|
||||||
file="$target_path/$timestamp.webm"
|
file="$target_path/$timestamp.webm"
|
||||||
wf-recorder -g "$area" -c libvpx --codec-param="qmin=0" --codec-param="qmax=25" --codec-param="crf=4" --codec-param="b:v=1M" --file="$file"
|
output="$(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name')"
|
||||||
|
wf-recorder \
|
||||||
|
-g "$area" -c libvpx \
|
||||||
|
--codec-param="qmin=0" \
|
||||||
|
--codec-param="qmax=25" \
|
||||||
|
--codec-param="crf=4" \
|
||||||
|
--codec-param="b:v=1M" \
|
||||||
|
-o "$output" \
|
||||||
|
--file="$file"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pkill -RTMIN+8 waybar && notify "Finished recording ${file}"
|
kill_waybar && notify "Finished recording ${file}"
|
||||||
else
|
rm $pid_file
|
||||||
pkill --signal SIGINT wf-recorder
|
}
|
||||||
pkill -RTMIN+8 waybar
|
main "$@"
|
||||||
fi
|
|
||||||
|
|
38
usr/share/sway/scripts/screenmirror.sh
Executable file
38
usr/share/sway/scripts/screenmirror.sh
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# This script implements the function of mirroring outputs.
|
||||||
|
# It uses wl-mirror and Sway's ability to create headless outputs.
|
||||||
|
#
|
||||||
|
# The script is written as a singleton. It allows the user to run only one
|
||||||
|
# instance of itself and kills all others. This is necessary so that wl-mirror
|
||||||
|
# instances do not interfere with each other.
|
||||||
|
|
||||||
|
SELF_NAME="$(basename "$0")"
|
||||||
|
SELF_PID="$$"
|
||||||
|
|
||||||
|
get_pgid() {
|
||||||
|
ps -h -o "%r" -p "$1" | awk '{print $1}'
|
||||||
|
}
|
||||||
|
SELF_PGID="$(get_pgid "$SELF_PID")"
|
||||||
|
|
||||||
|
kill_by_pgid() {
|
||||||
|
pkill -"$2" -g "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
kill_copies() {
|
||||||
|
mapfile -t pids < <(pgrep -u "$USER" -x "$SELF_NAME")
|
||||||
|
for pid in "${pids[@]}" ; do
|
||||||
|
pgid="$(get_pgid "$pid")"
|
||||||
|
[[ $pgid -ne $SELF_PGID ]] && kill_by_pgid "$pgid" "INT"
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
main() {
|
||||||
|
# Don't single quote the trap's command!
|
||||||
|
# It must be expanded when the trap is defined.
|
||||||
|
# shellcheck disable=SC2064
|
||||||
|
trap "kill_by_pgid $SELF_PGID TERM" INT
|
||||||
|
kill_copies
|
||||||
|
[[ "$1" != "-k" ]] && wl-mirror -F "${1:-HEADLESS-1}"
|
||||||
|
}
|
||||||
|
main "$@"
|
33
usr/share/sway/scripts/select-output.sh
Executable file
33
usr/share/sway/scripts/select-output.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
export LC_ALL=C
|
||||||
|
|
||||||
|
TITLE="Select the output for the screencast"
|
||||||
|
OUT_NAME="HEADLESS-1"
|
||||||
|
FONT_SIZE="12"
|
||||||
|
ROSEWATER="#f4dbd6"
|
||||||
|
|
||||||
|
FONT="Noto Sans ${FONT_SIZE}"
|
||||||
|
FONT_COLOR="${ROSEWATER}"
|
||||||
|
|
||||||
|
I_SIZE="$(awk "BEGIN {print (${FONT_SIZE}*1.08)}")"
|
||||||
|
OUT_SIZE="$(awk "BEGIN {print (${FONT_SIZE}*0.94)}")"
|
||||||
|
TIP_SHIFT="$(awk "BEGIN {print (1+(${I_SIZE}-${FONT_SIZE})/2)}")"
|
||||||
|
TIP="\
|
||||||
|
<span color='${FONT_COLOR}'>\
|
||||||
|
<span size='${I_SIZE}pt'></span> \
|
||||||
|
<span baseline_shift='${TIP_SHIFT}pt'>use \
|
||||||
|
<span size='${OUT_SIZE}pt'>${OUT_NAME}</span> \
|
||||||
|
to cast only chosen windows\
|
||||||
|
</span>\
|
||||||
|
</span>\
|
||||||
|
"
|
||||||
|
|
||||||
|
swaymsg -t get_outputs \
|
||||||
|
| jq -r '.[] | .name' \
|
||||||
|
| rofi \
|
||||||
|
-dmenu -i -l 4 \
|
||||||
|
-p "${TITLE}" \
|
||||||
|
-window-title "${TITLE}" \
|
||||||
|
-mesg "${TIP}" \
|
||||||
|
-font "${FONT}"
|
Loading…
Add table
Reference in a new issue