Skip to content

Commit

Permalink
updated UX
Browse files Browse the repository at this point in the history
  • Loading branch information
itsManjeet committed Jun 6, 2024
1 parent 2c6bd3a commit e404bae
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 17 deletions.
62 changes: 46 additions & 16 deletions elements/components/desktop-shell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ script: |-
set $highlight %{highlight_color}
set $font "IBM Plex Sans 12"
set $menu bemenu-run -p "🔎" \
set $menu bemenu-run -p "run" \
--fn "IBM Plex Sans 13" \
-l10 -c -W0.5 -B1 -H30 \
--fixed-height \
Expand All @@ -145,6 +145,7 @@ script: |-
--hf "$foreground_secondary" \
--hb "$background_secondary" \
--bdr "$border" \
--scrollbar hide \
--fb "$background" \
--ff "$foreground" | xargs swaymsg exec
Expand All @@ -166,7 +167,7 @@ script: |-
client.placeholder $background_secondary $background_secondary $foreground_secondary $highlight $background_secondary
blur on
blur_xray on
blur_xray off
blur_passes 2
blur_radius 5
Expand All @@ -193,16 +194,14 @@ script: |-
set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
seat seat0 xcursor_theme Qogir-Light 24
seat seat0 xcursor_theme Qogir 24
exec swayidle -w \
timeout 300 '$lock' \
timeout 600 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
before-sleep '$lock'
exec iio-sway
bindswitch tablet:on exec %{bindir}/tablet-mode on
bindswitch tablet:off exec %{bindir}/tablet-mode off
Expand Down Expand Up @@ -395,14 +394,15 @@ script: |-
include /etc/sway/config.d/*
EOF
install -v -D -m 0755 /dev/stdin %{install-root}%{sysconfdir}/sway/config.d/gtk-themes << "EOF"
exec {
gsettings set org.gtk.Settings.FileChooser window-size '(1000, 500)'
gsettings set org.gnome.desktop.interface gtk-theme 'Qogir-Light'
gsettings set org.gnome.desktop.interface.wm.preferences theme 'Qogir-Light'
gsettings set org.gnome.desktop.interface icon-theme 'Qogir'
gsettings set org.gnome.desktop.interface cursor-theme 'Qogir-Light'
gsettings set org.gnome.desktop.interface font-name '%{font_theme}'
install -v -D -m 0644 /dev/stdin %{install-root}%{sysconfdir}/sway/config.d/gtk-themes << "EOF"
set $schema org.gnome.desktop.interface
exec_always {
gsettings set org.gtk.Settings.FileChooser window-size "(1000, 500)"
gsettings set $schema gtk-theme "Qogir-Light"
gsettings set $schema.wm.preferences theme "Qogir-Light"
gsettings set $schema icon-theme "Qogir"
gsettings set $schema cursor-theme "Qogir"
gsettings set $schema font-name "%{font_theme}"
}
EOF
Expand Down Expand Up @@ -462,6 +462,36 @@ script: |-
audio_active='🔊'
fi
POWER_CACHE="/tmp/power_notification"
update_power_cache() {
echo "$(date +%s) $battery_charge" > $POWER_CACHE
}
if [ $battery_status == "discharging" ] ; then
if [ ! -f $POWER_CACHE ] && [ $battery_charge -lt 10 ] ; then
notify-send "Low power" "System Power is running low ($battery_charge)" 2>/dev/null
update_power_cache
else
last_date="$(cat $POWER_CACHE | awk '{print $1}')"
last_charge="$(cat $POWER_CACHE | awk '{print $1}')"
cur_date="$(date +%s)"
delta_time=$((last_date - cur_date))
if [ $delta_time -gt 600000 ] ; then
if [ $last_charge -lt 5 ] ; then
notify-send "Critical battery level ($battery_charge)" "Shutting Down in 20sec" 2>/dev/null
sleep 20
systemctl suspend-then-hibernate
else
update_power_cache
fi
fi
fi
fi
echo " ⌨ $language | $network_active $interface_easyname ($ping ms) | 🏋 $loadavg_5min | $audio_active $audio_volume% | $battery_pluggedin $battery_charge | $date_and_week 🕘 $current_time "
EOF
Expand Down Expand Up @@ -554,10 +584,10 @@ script: |-
local _bin=$1
shift
local _pid=$(pidof $1)
local _pid=$(pidof $_bin)
if [ -z "$_pid" ] ; then
echo "Starting $1"
$1 $@ &
echo "Starting $_bin"
$_bin $@ &
fi
}
Expand Down
2 changes: 1 addition & 1 deletion elements/components/themes/qogir-gtk-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,4 @@ script: |
mkdir -p %{install-root}/%{datadir}/themes/
./install.sh -d %{install-root}/%{datadir}/themes/ \
--tweaks image square
--tweaks square
4 changes: 4 additions & 0 deletions elements/components/themes/qogir-icon-theme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,9 @@ sources:
script: |
install -d %{install-root}%{datadir}/icons
for icon in $(find . -type f -name "*.svg") ; do
sed -i 's/#6ba4e7/#B1B2FF/g' $icon
done
./install.sh -t default \
-d %{install-root}%{datadir}/icons

0 comments on commit e404bae

Please sign in to comment.