Add hyprland-preview-share-picker

This commit is contained in:
Ryan Hughes
2025-12-13 00:42:13 -05:00
parent 5789c0a1fb
commit abffb0abfe
4 changed files with 79 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
screencopy {
allow_token_by_default = true
custom_picker_binary = hyprland-preview-share-picker
}

View File

@@ -0,0 +1,71 @@
# paths to stylesheets on the filesystem which should be applied to the application
#
# relative paths are resolved relative to the location of the config file
stylesheets: ["../omarchy/current/theme/hyprland-preview-share-picker.css"]
# default page selected when the picker is opened
default_page: windows
window:
# height of the application window
height: 500
# width of the application window
width: 1000
image:
# size to which the images should be internally resized to reduce the memory footprint
resize_size: 500
# target size of the longer side of the image widget
widget_size: 150
classes:
# css classname of the window
window: window
# css classname of the card containing an image and a label
image_card: card
# css classname of the card containing an image and a label when the image is still being loaded
image_card_loading: card-loading
# css classname of the image inside the card
image: image
# css classname of the label inside the card
image_label: image-label
# css classname of the notebook containing all pages
notebook: notebook
# css classname of a label of the notebook
tab_label: tab-label
# css classname of a notebook page (e.g. windows container)
notebook_page: page
# css classname of the region selection button
region_button: region-button
# css classname of the button containing the session restore checkbox and label
restore_button: restore-button
windows:
# minimum amount of image cards per row on the windows page
min_per_row: 3
# maximum amount of image cards per row on the windows page
max_per_row: 999
# number of clicks needed to select a window
clicks: 1
# spacing in pixels between the window cards
spacing: 12
outputs:
# number of clicks needed to select an output
clicks: 1
# spacing in pixels between the outputs in the layout
# note: the spacing is applied from both sides (the gap is `spacing * 2`)
spacing: 6
# show the label with the output name
show_label: false
# size the output cards respectively to their scaling
respect_output_scaling: true
region:
# command to run for region selection
# the output needs to be in the <output>@<x>,<y>,<w>,<h> (e.g. DP-3@2789,436,756,576) format
command: slurp -f '%o@%x,%y,%w,%h'
# hide the token restore checkbox and use the default value instead
hide_token_restore: true
# enable debug logs by default
debug: false

View File

@@ -47,6 +47,7 @@ gvfs-smb
hypridle
hyprland
hyprland-guiutils
hyprland-preview-share-picker-git
hyprlock
hyprpicker
hyprsunset

6
migrations/1765587218.sh Normal file
View File

@@ -0,0 +1,6 @@
echo "Add custom share portal picker"
omarchy-pkg-add hyprland-preview-share-picker-git
if ! grep -q "custom_picker_binary" ~/.config/hypr/xdph.conf; then
sed -i '/screencopy {/a\ custom_picker_binary = hyprland-preview-share-picker' ~/.config/hypr/xdph.conf
fi