Skip to content

Commit

Permalink
adding hyprpolkitagent
Browse files Browse the repository at this point in the history
  • Loading branch information
Heus-Sueh committed Oct 18, 2024
1 parent 5a546f1 commit c707e07
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 26 deletions.
29 changes: 18 additions & 11 deletions files/scripts/firstboot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,28 @@ run_modules() {

# Example commands
echo "Setting up the environment..."
notify-send "Setting up the environment..."
# Command to install packages, update the system, etc.
xdg-user-dirs-update

echo "Running theme setup script..."
# Commands that require root privileges
pkexec bash -c '
flatpak override --filesystem=xdg-data/themes
flatpak override --filesystem=xdg-data/icons
flatpak override --filesystem=xdg-config/gtk-3.0
flatpak override --filesystem=xdg-config/gtk-4.0
flatpak override --filesystem=xdg-config/Kvantum
'

echo "Initial setup completed!"
echo "Initial setup completed!"
notify-send "Initial setup completed!"
}

# Function to remove the firstboot-related lines from ~/.bashrc
remove_firstboot_lines() {
# Define the pattern to match the block that runs firstboot
local start_line="if [[ ! -f \"\$HOME/.config/firstboot/firstboot_done\" ]]; then"
local end_line="fi"

# Use sed to delete the lines between the pattern
sed -i "/$start_line/,/$end_line/d" "$HOME/.bashrc"
}

# Check if the script has already run
if [[ ! -f "$FIRSTBOOT_FILE" ]]; then
echo "First boot detected. Running setup script..."
notify-send "First boot detected. Running setup script..."
run_modules

# Create the file to indicate that the script has run
Expand All @@ -48,6 +51,10 @@ if [[ ! -f "$FIRSTBOOT_FILE" ]]; then
# Generate and store the hash in the firstboot file
generate_hash

# Remove the firstboot lines from ~/.bashrc
remove_firstboot_lines

else
echo "First boot script has already run. Nothing to do."
notify-send "First boot script has already run. Nothing to do."
fi
5 changes: 5 additions & 0 deletions files/system/etc/skel/.bashrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env bash

# if [[ ! -f "$HOME/.config/firstboot/firstboot_done" ]]; then
# bash "$HOME/.local/bin/firstboot.sh"
# fi

iatest=$(expr index "$-" i)

# Source profile definitions
Expand Down
11 changes: 5 additions & 6 deletions files/system/etc/skel/.config/hypr/exec.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ exec-once = /usr/bin/xdg-user-dirs-update
exec-once = /usr/libexec/xdg-desktop-portal-hyprland
exec-once = /usr/libexec/xdg-desktop-portal-gtk
exec-once = /usr/libexec/xdg-desktop-portal
exec-once = /usr/libexec/xfce-polkit
exec-once = systemctl --user start hyprpolkitagent
exec-once = dbus-update-activation-environment --all
exec-once = /usr/bin/gnome-keyring-daemon --start --components=secrets

Expand All @@ -12,8 +12,8 @@ exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESK

exec-once = fcitx5
exec-once = waybar & dunst & nm-applet
exec-once = hypridle
exec-once = hyprpaper
exec-once = hypridle
exec-once = hyprpaper
# exec-once = swww-daemon

# Clipboard: history
Expand All @@ -23,10 +23,9 @@ exec-once = wl-paste --type image --watch cliphist store
# Theme
$interface = org.gnome.desktop.interface
$wm-preferences = org.gnome.desktop.wm.preferences
exec-once = gsettings set $interface gtk-theme 'adw-gtk3-dark'
exec-once = gsettings set $wm-preferences 'adw-gtk3-dark'
exec-once = gsettings set $interface gtk-theme 'adw-gtk3-dark'
exec-once = gsettings set $wm-preferences 'adw-gtk3-dark'
exec-once = gsettings set $interface color-scheme 'prefer-dark'
exec-once = gsettings set $interface font-name 'Inter Variable 11'
exec-once = gsettings set $interface icon-theme 'Papirus-Dark'
# exec-once = gsettings set $interface cursor-theme 'Bibata-Modern-Ice'

19 changes: 11 additions & 8 deletions files/system/etc/skel/.config/hypr/rules.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ windowrulev2 = tag +dialog, title:^(Open Folder)$
windowrulev2 = tag +dialog, title:^(Save As)$
windowrulev2 = tag +dialog, title:^(Library)$
windowrulev2 = tag +dialog, title:^(File Upload)$
windowrulev2 = tag +dialog, title:^(Confirm to replace files)$
windowrulev2 = tag +dialog, title:^(File Operation Progress)$
windowrulev2 = tag +dialog, title:^(Authentication required)$
windowrulev2 = tag +dialog, title:^(org.kde.polkit-kde-authentication-agent-1)$
Expand All @@ -22,31 +23,33 @@ windowrulev2 = tag +dialog, title:^(Text Import)$

windowrulev2 = tag +float_this, class:^(nm-connection-editor)$
windowrulev2 = tag +float_this, class:^(blueman-manager)$
windowrulev2 = tag +float_this, class:^(file-roller)$
windowrulev2 = tag +float_this, class:^(org.pulseaudio.pavucontrol)$
windowrulev2 = tag +float_this, class:^(eog)$
windowrulev2 = tag +float_this, class:^(rofi)$
windowrulev2 = tag +float_this, class:^(Calculator)$
windowrulev2 = tag +float_this, class:^(yad)$

windowrulev2 = tag +term, class:(footclient)
windowrulev2 = tag +term, class:(Alacritty)
windowrulev2 = tag +term, class:(kitty)
windowrulev2 = tag +code, class:(nvim)
windowrulev2 = tag +code, title:^(Visual Studio Code)$
windowrulev2 = tag +term, class:(footclient)
windowrulev2 = tag +term, class:(Alacritty)
windowrulev2 = tag +term, class:(kitty)
windowrulev2 = tag +code, class:(nvim)
windowrulev2 = tag +code, title:^(Visual Studio Code)$

windowrulev2 = tag +xwayland, class:^(xwaylandvideobridge)$
windowrulev2 = tag +pip, title:^(Picture-in-Picture)$
windowrulev2 = tag +pip, title:^(Picture-in-Picture)$
windowrulev2 = tag +rofi, title:^(rofi)$

################################################################################

windowrulev2 = float, tag:dialog*
windowrulev2 = float, tag:float_this*
windowrulev2 = center, tag:dialog*
windowrulev2 = center, tag:float_this*
windowrulev2 = opacity 0.9 0.8, tag:term*

# fix for rofi xwayland
windowrulev2 = float, tag:rofi
windowrulev2 = float, tag:rofi
windowrulev2 = noborder, tag:rofi
windowrulev2 = norounding, tag:rofi

Expand All @@ -56,7 +59,7 @@ windowrulev2 = opacity 0.9 0.7, class:^(yad)$
windowrulev2 = opacity 0.9 0.7, class:^(Spotify)$
windowrulev2 = opacity 0.9 0.7, class:^(steam)$

# Picture-in-a-Picture (PIP)
# Picture-in-a-Picture (PIP)
windowrulev2 = pin, tag:pip*
windowrulev2 = float, tag:pip*
windowrulev2 = size 25% 25%, tag:pip*
Expand Down
2 changes: 2 additions & 0 deletions files/system/etc/skel/.local/share/flatpak/overrides/global
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[Context]
filesystems=xdg-config/Kvantum;xdg-config/gtk-4.0;xdg-config/gtk-3.0;xdg-data/themes;xdg-data/icons;home
2 changes: 1 addition & 1 deletion recipes/modules/pkgs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ install:
- xorg-x11-server-Xwayland
- xwaylandvideobridge
- polkit
- xfce-polkit
- gnome-keyring
- gnome-keyring-pam
- xdg-desktop-portal
Expand Down Expand Up @@ -92,6 +91,7 @@ install:
- hypridle
- hyprlock
- xdg-desktop-portal-hyprland
- hyprpolkitagent
# SDDM
- sddm
- sddm-themes
Expand Down

0 comments on commit c707e07

Please sign in to comment.