forked from Shinonome/dots-hyprland
Merge branch 'main' into hefty-hype
This commit is contained in:
@@ -9,7 +9,7 @@ import QtQuick.Layouts
|
|||||||
*/
|
*/
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: root
|
id: root
|
||||||
default property alias data: rowLayout.data
|
default property alias groupData: rowLayout.data
|
||||||
property alias uniformCellSizes: rowLayout.uniformCellSizes
|
property alias uniformCellSizes: rowLayout.uniformCellSizes
|
||||||
property real spacing: 5
|
property real spacing: 5
|
||||||
property real padding: 0
|
property real padding: 0
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ StyledFlickable {
|
|||||||
property bool forceWidth: false
|
property bool forceWidth: false
|
||||||
property real bottomContentPadding: 100
|
property real bottomContentPadding: 100
|
||||||
|
|
||||||
default property alias data: contentColumn.data
|
default property alias contentData: contentColumn.data
|
||||||
|
|
||||||
clip: true
|
clip: true
|
||||||
contentHeight: contentColumn.implicitHeight + root.bottomContentPadding // Add some padding at the bottom
|
contentHeight: contentColumn.implicitHeight + root.bottomContentPadding // Add some padding at the bottom
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ ColumnLayout {
|
|||||||
id: root
|
id: root
|
||||||
property string title
|
property string title
|
||||||
property string icon: ""
|
property string icon: ""
|
||||||
default property alias data: sectionContent.data
|
default property alias contentData: sectionContent.data
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
spacing: 6
|
spacing: 6
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ ColumnLayout {
|
|||||||
id: root
|
id: root
|
||||||
property string title: ""
|
property string title: ""
|
||||||
property string tooltip: ""
|
property string tooltip: ""
|
||||||
default property alias data: sectionContent.data
|
default property alias contentData: sectionContent.data
|
||||||
|
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: 4
|
Layout.topMargin: 4
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Item {
|
|||||||
id: root
|
id: root
|
||||||
property int currentIndex: 0
|
property int currentIndex: 0
|
||||||
property bool expanded: false
|
property bool expanded: false
|
||||||
default property alias data: tabBarColumn.data
|
default property alias tabData: tabBarColumn.data
|
||||||
implicitHeight: tabBarColumn.implicitHeight
|
implicitHeight: tabBarColumn.implicitHeight
|
||||||
implicitWidth: tabBarColumn.implicitWidth
|
implicitWidth: tabBarColumn.implicitWidth
|
||||||
Layout.topMargin: 25
|
Layout.topMargin: 25
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
property alias materialIcon: icon.text
|
property alias materialIcon: icon.text
|
||||||
property alias text: noticeText.text
|
property alias text: noticeText.text
|
||||||
default property alias data: buttonRow.data
|
default property alias boxData: buttonRow.data
|
||||||
|
|
||||||
radius: Appearance.rounding.normal
|
radius: Appearance.rounding.normal
|
||||||
color: Appearance.colors.colPrimaryContainer
|
color: Appearance.colors.colPrimaryContainer
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Item {
|
|||||||
property real padding: 8
|
property real padding: 8
|
||||||
property alias colBackground: background.color
|
property alias colBackground: background.color
|
||||||
property alias spacing: toolbarLayout.spacing
|
property alias spacing: toolbarLayout.spacing
|
||||||
default property alias data: toolbarLayout.data
|
default property alias toolbarData: toolbarLayout.data
|
||||||
implicitWidth: background.implicitWidth
|
implicitWidth: background.implicitWidth
|
||||||
implicitHeight: background.implicitHeight
|
implicitHeight: background.implicitHeight
|
||||||
property alias radius: background.radius
|
property alias radius: background.radius
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool show: false
|
property bool show: false
|
||||||
default property alias data: contentColumn.data
|
default property alias contentData: contentColumn.data
|
||||||
property real backgroundHeight: dialogBackground.implicitHeight
|
property real backgroundHeight: dialogBackground.implicitHeight
|
||||||
property real backgroundWidth: 350
|
property real backgroundWidth: 350
|
||||||
property real backgroundAnimationMovementDistance: 60
|
property real backgroundAnimationMovementDistance: 60
|
||||||
|
|||||||
@@ -170,18 +170,13 @@ Item {
|
|||||||
|
|
||||||
ButtonGroup {
|
ButtonGroup {
|
||||||
contentWidth: parent.width - anchors.margins * 2
|
contentWidth: parent.width - anchors.margins * 2
|
||||||
WrapperRectangle {
|
StyledText {
|
||||||
|
Layout.margins: 5
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
color: ColorUtils.transparentize(Appearance.colors.colSurfaceContainer)
|
font.pixelSize: Appearance.font.pixelSize.small
|
||||||
radius: Appearance.rounding.small
|
text: windowButton.modelData?.title
|
||||||
margin: 5
|
elide: Text.ElideRight
|
||||||
StyledText {
|
color: Appearance.m3colors.m3onSurface
|
||||||
Layout.fillWidth: true
|
|
||||||
font.pixelSize: Appearance.font.pixelSize.small
|
|
||||||
text: windowButton.modelData?.title
|
|
||||||
elide: Text.ElideRight
|
|
||||||
color: Appearance.m3colors.m3onSurface
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
GroupButton {
|
GroupButton {
|
||||||
id: closeButton
|
id: closeButton
|
||||||
|
|||||||
@@ -185,7 +185,7 @@ LockScreen {
|
|||||||
id: iconIndicator
|
id: iconIndicator
|
||||||
required property string baseIcon
|
required property string baseIcon
|
||||||
required property string icon
|
required property string icon
|
||||||
default property alias data: iconWidget.data
|
default property alias indicatorData: iconWidget.data
|
||||||
implicitWidth: 40
|
implicitWidth: 40
|
||||||
implicitHeight: 40
|
implicitHeight: 40
|
||||||
FluentIcon {
|
FluentIcon {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Item {
|
|||||||
property alias colBackground: background.color
|
property alias colBackground: background.color
|
||||||
property alias spacing: toolbarLayout.spacing
|
property alias spacing: toolbarLayout.spacing
|
||||||
property alias radius: background.radius
|
property alias radius: background.radius
|
||||||
default property alias data: toolbarLayout.data
|
default property alias toolbarData: toolbarLayout.data
|
||||||
|
|
||||||
implicitWidth: background.implicitWidth
|
implicitWidth: background.implicitWidth
|
||||||
implicitHeight: background.implicitHeight
|
implicitHeight: background.implicitHeight
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ BodyRectangle {
|
|||||||
component PageSection: ColumnLayout {
|
component PageSection: ColumnLayout {
|
||||||
id: pageSection
|
id: pageSection
|
||||||
required property string title
|
required property string title
|
||||||
default property alias data: pageSectionContentArea.data
|
default property alias pageData: pageSectionContentArea.data
|
||||||
|
|
||||||
spacing: 16
|
spacing: 16
|
||||||
|
|
||||||
|
|||||||
@@ -48,9 +48,15 @@ case "${SKIP_HYPRLAND}" in
|
|||||||
true) sleep 0;;
|
true) sleep 0;;
|
||||||
*)
|
*)
|
||||||
install_dir__sync dots/.config/hypr/hyprland "$XDG_CONFIG_HOME"/hypr/hyprland
|
install_dir__sync dots/.config/hypr/hyprland "$XDG_CONFIG_HOME"/hypr/hyprland
|
||||||
for i in hypr{land,lock}.conf {monitors,workspaces}.conf ; do
|
for i in hyprlock.conf {monitors,workspaces}.conf ; do
|
||||||
install_file__auto_backup "dots/.config/hypr/$i" "${XDG_CONFIG_HOME}/hypr/$i"
|
install_file__auto_backup "dots/.config/hypr/$i" "${XDG_CONFIG_HOME}/hypr/$i"
|
||||||
done
|
done
|
||||||
|
for i in hyprland.conf ; do
|
||||||
|
case "${SKIP_HYPRLAND_ENTRY}" in
|
||||||
|
true) sleep 0;;
|
||||||
|
*) install_file "dots/.config/hypr/$i" "${XDG_CONFIG_HOME}/hypr/$i" ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
for i in hypridle.conf ; do
|
for i in hypridle.conf ; do
|
||||||
if [[ "${INSTALL_VIA_NIX}" == true ]]; then
|
if [[ "${INSTALL_VIA_NIX}" == true ]]; then
|
||||||
install_file__auto_backup "dots-extra/via-nix/$i" "${XDG_CONFIG_HOME}/hypr/$i"
|
install_file__auto_backup "dots-extra/via-nix/$i" "${XDG_CONFIG_HOME}/hypr/$i"
|
||||||
@@ -62,7 +68,7 @@ case "${SKIP_HYPRLAND}" in
|
|||||||
v bash -c "printf \"# For fedora to setup polkit\nexec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1\n\" >> ${XDG_CONFIG_HOME}/hypr/hyprland/execs.conf"
|
v bash -c "printf \"# For fedora to setup polkit\nexec-once = /usr/libexec/kf6/polkit-kde-authentication-agent-1\n\" >> ${XDG_CONFIG_HOME}/hypr/hyprland/execs.conf"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
install_dir__skip_existed "dots/.config/hypr/custom" "${XDG_CONFIG_HOME}/hypr/custom"
|
install_dir__ignore_existing "dots/.config/hypr/custom" "${XDG_CONFIG_HOME}/hypr/custom"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,13 @@ rsync_dir(){
|
|||||||
x mkdir -p "$(dirname ${INSTALLED_LISTFILE})"
|
x mkdir -p "$(dirname ${INSTALLED_LISTFILE})"
|
||||||
rsync -a --out-format='%i %n' "$1"/ "$2"/ | awk -v d="$dest" '$1 ~ /^>/{ sub(/^[^ ]+ /,""); printf d "/" $0 "\n" }' >> "${INSTALLED_LISTFILE}"
|
rsync -a --out-format='%i %n' "$1"/ "$2"/ | awk -v d="$dest" '$1 ~ /^>/{ sub(/^[^ ]+ /,""); printf d "/" $0 "\n" }' >> "${INSTALLED_LISTFILE}"
|
||||||
}
|
}
|
||||||
|
rsync_dir__ignore_existing(){
|
||||||
|
# NOTE: This function is only for using in other functions
|
||||||
|
x mkdir -p "$2"
|
||||||
|
local dest="$(realpath -se $2)"
|
||||||
|
x mkdir -p "$(dirname ${INSTALLED_LISTFILE})"
|
||||||
|
rsync -a --ignore-existing --out-format='%i %n' "$1"/ "$2"/ | awk -v d="$dest" '$1 ~ /^>/{ sub(/^[^ ]+ /,""); printf d "/" $0 "\n" }' >> "${INSTALLED_LISTFILE}"
|
||||||
|
}
|
||||||
rsync_dir__sync(){
|
rsync_dir__sync(){
|
||||||
# NOTE: This function is only for using in other functions
|
# NOTE: This function is only for using in other functions
|
||||||
# `--delete' for rsync to make sure that
|
# `--delete' for rsync to make sure that
|
||||||
@@ -129,7 +136,7 @@ function install_dir__sync(){
|
|||||||
fi
|
fi
|
||||||
v rsync_dir__sync $s $t
|
v rsync_dir__sync $s $t
|
||||||
}
|
}
|
||||||
function install_dir__skip_existed(){
|
function install_dir__skip_ifexist(){
|
||||||
# NOTE: Do not add prefix `v` or `x` when using this function
|
# NOTE: Do not add prefix `v` or `x` when using this function
|
||||||
local s=$1
|
local s=$1
|
||||||
local t=$2
|
local t=$2
|
||||||
@@ -140,6 +147,17 @@ function install_dir__skip_existed(){
|
|||||||
v rsync_dir $s $t
|
v rsync_dir $s $t
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
function install_dir__ignore_existing(){
|
||||||
|
# NOTE: Do not add prefix `v` or `x` when using this function
|
||||||
|
local s=$1
|
||||||
|
local t=$2
|
||||||
|
if [ -d $t ];then
|
||||||
|
echo -e "${STY_BLUE}[$0]: \"$t\" already exists, will not do anything.${STY_RST}"
|
||||||
|
else
|
||||||
|
echo -e "${STY_YELLOW}[$0]: \"$t\" does not exist yet.${STY_RST}"
|
||||||
|
v rsync_dir__ignore_existing $s $t
|
||||||
|
fi
|
||||||
|
}
|
||||||
function install_dir__sync_exclude(){
|
function install_dir__sync_exclude(){
|
||||||
# NOTE: Do not add prefix `v` or `x` when using this function
|
# NOTE: Do not add prefix `v` or `x` when using this function
|
||||||
# Sync directory with exclude patterns
|
# Sync directory with exclude patterns
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ Options for install:
|
|||||||
--skip-backup Skip backup conflicting files
|
--skip-backup Skip backup conflicting files
|
||||||
--skip-quickshell Skip installing the config for Quickshell
|
--skip-quickshell Skip installing the config for Quickshell
|
||||||
--skip-hyprland Skip installing the config for Hyprland
|
--skip-hyprland Skip installing the config for Hyprland
|
||||||
|
--skip-hyprland-entry Skip installing the entry config for Hyprland
|
||||||
--skip-fish Skip installing the config for Fish
|
--skip-fish Skip installing the config for Fish
|
||||||
--skip-fontconfig Skip installing the config for fontconfig
|
--skip-fontconfig Skip installing the config for fontconfig
|
||||||
--skip-miscconf Skip copying the dirs and files to \".configs\" except for
|
--skip-miscconf Skip copying the dirs and files to \".configs\" except for
|
||||||
@@ -46,7 +47,7 @@ cleancache(){
|
|||||||
# `man getopt` to see more
|
# `man getopt` to see more
|
||||||
para=$(getopt \
|
para=$(getopt \
|
||||||
-o hfFk:cs \
|
-o hfFk:cs \
|
||||||
-l help,force,firstrun,fontset:,clean,skip-allgreeting,skip-alldeps,skip-allsetups,skip-allfiles,ignore-outdate,skip-sysupdate,skip-plasmaintg,skip-backup,skip-quickshell,skip-fish,skip-hyprland,skip-fontconfig,skip-miscconf,core,exp-files,via-nix \
|
-l help,force,firstrun,fontset:,clean,skip-allgreeting,skip-alldeps,skip-allsetups,skip-allfiles,ignore-outdate,skip-sysupdate,skip-plasmaintg,skip-backup,skip-quickshell,skip-fish,skip-hyprland,skip-hyprland-entry,skip-fontconfig,skip-miscconf,core,exp-files,via-nix \
|
||||||
-n "$0" -- "$@")
|
-n "$0" -- "$@")
|
||||||
[ $? != 0 ] && echo "$0: Error when getopt, please recheck parameters." && exit 1
|
[ $? != 0 ] && echo "$0: Error when getopt, please recheck parameters." && exit 1
|
||||||
#####################################################################################
|
#####################################################################################
|
||||||
@@ -81,6 +82,7 @@ while true ; do
|
|||||||
--skip-plasmaintg) SKIP_PLASMAINTG=true;shift;;
|
--skip-plasmaintg) SKIP_PLASMAINTG=true;shift;;
|
||||||
--skip-backup) SKIP_BACKUP=true;shift;;
|
--skip-backup) SKIP_BACKUP=true;shift;;
|
||||||
--skip-hyprland) SKIP_HYPRLAND=true;shift;;
|
--skip-hyprland) SKIP_HYPRLAND=true;shift;;
|
||||||
|
--skip-hyprland-entry) SKIP_HYPRLAND_ENTRY=true;shift;;
|
||||||
--skip-fish) SKIP_FISH=true;shift;;
|
--skip-fish) SKIP_FISH=true;shift;;
|
||||||
--skip-quickshell) SKIP_QUICKSHELL=true;shift;;
|
--skip-quickshell) SKIP_QUICKSHELL=true;shift;;
|
||||||
--skip-fontconfig) SKIP_FONTCONFIG=true;shift;;
|
--skip-fontconfig) SKIP_FONTCONFIG=true;shift;;
|
||||||
|
|||||||
Reference in New Issue
Block a user