diff --git a/config/hypr/xdph.conf b/config/hypr/xdph.conf index 176b0c9e..63b66be1 100644 --- a/config/hypr/xdph.conf +++ b/config/hypr/xdph.conf @@ -1,3 +1,4 @@ screencopy { allow_token_by_default = true + custom_picker_binary = hyprland-preview-share-picker } diff --git a/config/hyprland-preview-share-picker/config.yaml b/config/hyprland-preview-share-picker/config.yaml new file mode 100644 index 00000000..6b939570 --- /dev/null +++ b/config/hyprland-preview-share-picker/config.yaml @@ -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 @,,, (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 diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index ae0b4ae3..59e1cc95 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -47,6 +47,7 @@ gvfs-smb hypridle hyprland hyprland-guiutils +hyprland-preview-share-picker-git hyprlock hyprpicker hyprsunset diff --git a/migrations/1765587218.sh b/migrations/1765587218.sh new file mode 100644 index 00000000..fa5204e7 --- /dev/null +++ b/migrations/1765587218.sh @@ -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