├── hypr
├── rofi
│ ├── global
│ │ ├── .gitignore
│ │ ├── icons
│ │ │ ├── suggestion.svg
│ │ │ ├── result.svg
│ │ │ ├── history.svg
│ │ │ ├── google.svg
│ │ │ └── ddg.svg
│ │ ├── rofi.rasi
│ │ ├── web-search.py
│ │ └── rofi-spotlight.sh
│ ├── launcher.rasi
│ ├── powermenu.sh
│ ├── powermenu.rasi
│ ├── list_launcher.rasi
│ └── touch_launcher.rasi
├── scripts
│ ├── idle_script.sh
│ ├── ncmpcppnotif.sh
│ ├── toggle_sidebar.sh
│ └── autolaunch_onws.sh
├── grass.png
├── sat_moon.jpg
├── rail_tracks.jpg
├── wallpaper.png
├── tabbed_ws1.sh
└── hyprland.conf
├── my_bar
├── scripts
│ ├── getbat
│ ├── showmpd
│ ├── getbat_status
│ ├── showbat
│ ├── quotes
│ ├── getram
│ ├── getmusic
│ ├── getvol
│ ├── widget_search
│ ├── mails
│ ├── test_art.sh
│ ├── new_album_art_script.sh
│ ├── check-network
│ ├── widget_apps
│ ├── system
│ ├── battery
│ ├── volume
│ ├── music_info
│ ├── workspace_mine
│ ├── sys_info
│ ├── workspace
│ └── weather_info
├── eww-bar.png
├── images
│ ├── music.png
│ ├── profile.jpg
│ ├── icons
│ │ ├── gmail.png
│ │ ├── quotes.png
│ │ ├── apps
│ │ │ ├── files.png
│ │ │ ├── notes.png
│ │ │ ├── reddit.png
│ │ │ ├── discord.png
│ │ │ ├── firefox.png
│ │ │ ├── telegram.png
│ │ │ └── terminal.png
│ │ ├── battery
│ │ │ ├── low.png
│ │ │ ├── full.png
│ │ │ ├── charge.png
│ │ │ ├── battery-1.png
│ │ │ ├── battery-2.png
│ │ │ └── battery-3.png
│ │ ├── system
│ │ │ ├── wifi.png
│ │ │ ├── calendar.png
│ │ │ ├── no-wifi.png
│ │ │ ├── poweroff.png
│ │ │ ├── shutdown.png
│ │ │ ├── sys-exit.png
│ │ │ ├── sys-lock.png
│ │ │ ├── sys-sleep.png
│ │ │ └── sys-reboot.png
│ │ ├── volume
│ │ │ ├── mute.png
│ │ │ └── volume.png
│ │ ├── music
│ │ │ ├── next-button.png
│ │ │ ├── pause-button.png
│ │ │ ├── play-button.png
│ │ │ ├── next-button_og.png
│ │ │ ├── pause-button_og.png
│ │ │ ├── play-button_og.png
│ │ │ ├── previous-button.png
│ │ │ ├── next-button_blue.png
│ │ │ ├── pause-button_blue.png
│ │ │ ├── play-button_blue.png
│ │ │ ├── previous-button_blue.png
│ │ │ └── previous-button_og.png
│ │ ├── dashboard.svg
│ │ └── search.svg
│ └── black_armour_80.png
├── feh_4033036_000001_cover_art.png
├── launch_music
├── launch_bar
├── sidebar
│ ├── toggle_sidebar
│ ├── eww.scss
│ └── eww.yuck
├── eww.scss
└── eww.yuck
├── ytmp3.sh
├── 99-my_bat.rules
├── README.md
└── starship.toml
/hypr/rofi/global/.gitignore:
--------------------------------------------------------------------------------
1 | history.txt
2 |
--------------------------------------------------------------------------------
/hypr/rofi/launcher.rasi:
--------------------------------------------------------------------------------
1 | touch_launcher.rasi
--------------------------------------------------------------------------------
/hypr/scripts/idle_script.sh:
--------------------------------------------------------------------------------
1 | swayidle -w timeout 10 'swaylock -f -c 000000'
2 |
--------------------------------------------------------------------------------
/my_bar/scripts/getbat:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cat /sys/class/power_supply/BAT0/capacity
3 |
--------------------------------------------------------------------------------
/my_bar/scripts/showmpd:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | timeout 2s ~/.config/rofi/bin/applet_mpd
3 |
--------------------------------------------------------------------------------
/hypr/scripts/ncmpcppnotif.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | timeout 5s ~/.config/rofi/bin/applet_mpd
3 |
--------------------------------------------------------------------------------
/my_bar/scripts/getbat_status:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | cat /sys/class/power_supply/BAT0/status
3 |
--------------------------------------------------------------------------------
/my_bar/scripts/showbat:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | timeout 1.5s ~/.config/rofi/bin/applet_battery
3 |
--------------------------------------------------------------------------------
/hypr/grass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/hypr/grass.png
--------------------------------------------------------------------------------
/hypr/sat_moon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/hypr/sat_moon.jpg
--------------------------------------------------------------------------------
/hypr/rail_tracks.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/hypr/rail_tracks.jpg
--------------------------------------------------------------------------------
/hypr/wallpaper.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/hypr/wallpaper.png
--------------------------------------------------------------------------------
/my_bar/eww-bar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/eww-bar.png
--------------------------------------------------------------------------------
/my_bar/scripts/quotes:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | quote="`fortune -n 90 -s | head -n 1`"
4 | echo "$quote"
5 |
--------------------------------------------------------------------------------
/my_bar/scripts/getram:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
3 |
--------------------------------------------------------------------------------
/my_bar/images/music.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/music.png
--------------------------------------------------------------------------------
/my_bar/images/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/profile.jpg
--------------------------------------------------------------------------------
/my_bar/images/icons/gmail.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/gmail.png
--------------------------------------------------------------------------------
/my_bar/images/icons/quotes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/quotes.png
--------------------------------------------------------------------------------
/my_bar/images/black_armour_80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/black_armour_80.png
--------------------------------------------------------------------------------
/my_bar/images/icons/apps/files.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/apps/files.png
--------------------------------------------------------------------------------
/my_bar/images/icons/apps/notes.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/apps/notes.png
--------------------------------------------------------------------------------
/my_bar/images/icons/apps/reddit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/apps/reddit.png
--------------------------------------------------------------------------------
/my_bar/images/icons/battery/low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/battery/low.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/wifi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/wifi.png
--------------------------------------------------------------------------------
/my_bar/images/icons/volume/mute.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/volume/mute.png
--------------------------------------------------------------------------------
/my_bar/images/icons/apps/discord.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/apps/discord.png
--------------------------------------------------------------------------------
/my_bar/images/icons/apps/firefox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/apps/firefox.png
--------------------------------------------------------------------------------
/my_bar/images/icons/apps/telegram.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/apps/telegram.png
--------------------------------------------------------------------------------
/my_bar/images/icons/apps/terminal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/apps/terminal.png
--------------------------------------------------------------------------------
/my_bar/images/icons/battery/full.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/battery/full.png
--------------------------------------------------------------------------------
/my_bar/images/icons/volume/volume.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/volume/volume.png
--------------------------------------------------------------------------------
/my_bar/scripts/getmusic:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | # Convuluted but will not output a mess when mpc is stopped
3 | mpc status | tac | awk 'FNR==3'
4 |
--------------------------------------------------------------------------------
/my_bar/scripts/getvol:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | amixer -D pulse sget Master | grep 'Left:' | awk -F'[][]' '{ print $2 }' | tr -d '%' | head -1
3 |
--------------------------------------------------------------------------------
/hypr/tabbed_ws1.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | hyprctl dispatch workspace 1
3 | hyprctl dispatch togglegroup none
4 | hyprctl dispatch togglegroup none
5 |
--------------------------------------------------------------------------------
/my_bar/feh_4033036_000001_cover_art.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/feh_4033036_000001_cover_art.png
--------------------------------------------------------------------------------
/my_bar/images/icons/battery/charge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/battery/charge.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/calendar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/calendar.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/no-wifi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/no-wifi.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/poweroff.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/poweroff.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/shutdown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/shutdown.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/sys-exit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/sys-exit.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/sys-lock.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/sys-lock.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/sys-sleep.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/sys-sleep.png
--------------------------------------------------------------------------------
/my_bar/images/icons/battery/battery-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/battery/battery-1.png
--------------------------------------------------------------------------------
/my_bar/images/icons/battery/battery-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/battery/battery-2.png
--------------------------------------------------------------------------------
/my_bar/images/icons/battery/battery-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/battery/battery-3.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/next-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/next-button.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/pause-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/pause-button.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/play-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/play-button.png
--------------------------------------------------------------------------------
/my_bar/images/icons/system/sys-reboot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/system/sys-reboot.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/next-button_og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/next-button_og.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/pause-button_og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/pause-button_og.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/play-button_og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/play-button_og.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/previous-button.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/previous-button.png
--------------------------------------------------------------------------------
/hypr/scripts/toggle_sidebar.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | eww daemon
3 | ~/.config/eww/sidedar/toggle_sidebar
4 | sleep 5s
5 | ~/.config/eww/sidedar/toggle_sidebar
6 |
--------------------------------------------------------------------------------
/my_bar/images/icons/music/next-button_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/next-button_blue.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/pause-button_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/pause-button_blue.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/play-button_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/play-button_blue.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/previous-button_blue.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/previous-button_blue.png
--------------------------------------------------------------------------------
/my_bar/images/icons/music/previous-button_og.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/adishourya/wayland_dotfiles/HEAD/my_bar/images/icons/music/previous-button_og.png
--------------------------------------------------------------------------------
/my_bar/scripts/widget_search:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [[ "$1" == "--menu" ]]; then
4 | rofi -show drun
5 |
6 | elif [[ "$1" == "--search" ]]; then
7 | firefox --new-tab "https://google.com"
8 |
9 | fi
10 |
--------------------------------------------------------------------------------
/my_bar/scripts/mails:
--------------------------------------------------------------------------------
1 | #!/bin/python
2 |
3 | import imaplib
4 | obj = imaplib.IMAP4_SSL('imap.gmail.com',993)
5 | obj.login('username@gmail.com','PASSWORD') # write your email and password
6 | obj.select()
7 | print(len(obj.search(None, 'UnSeen')[1][0].split()))
8 |
--------------------------------------------------------------------------------
/ytmp3.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | yt-dlp -x $1 --add-metadata --xattrs --audio-format mp3 --embed-thumbnail -v --convert-thumbnail jpg --ppa "EmbedThumbnail+ffmpeg_o:-c:v mjpeg -vf crop=\"'if(gt(ih,iw),iw,ih)':'if(gt(iw,ih),ih,iw)'\"" --exec ffprobe --parse-metadata "%(title).50s [%(id)s, %(upload_date)s]:%(meta_filename)s" -o "%(artist)s-%(title)s.%(ext)s"
3 |
4 |
5 |
--------------------------------------------------------------------------------
/hypr/scripts/autolaunch_onws.sh:
--------------------------------------------------------------------------------
1 | #! /bin/sh
2 | # Always keep this at EOL of hyprland.conf
3 | # Definitely consider increasing sleep time on an underpowered PC
4 | # Start Music at ws4
5 | hyprctl keyword windowrule "workspace 4 silent,kitty" && kitty ncmpcpp &
6 | #sleep 1 && hyprctl reload
7 | sleep 0.5 && hyprctl reload
8 | hyprctl keyword windowrule "workspace unset,kitty"
9 |
--------------------------------------------------------------------------------
/my_bar/scripts/test_art.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | status=$(playerctl status)
3 | COVER="/tmp/music_cover.png"
4 | MUSIC_DIR="$HOME/Music"
5 | if [ $status = "Playing" -o $status = "Paused" ]; then
6 | url=$(playerctl metadata mpris:artUrl | cut -c 1-)
7 | convert -resize 1000x1000 $url $COVER
8 | fi
9 | # Take precedence firefox > mpd
10 | # ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &> /dev/null
11 | echo $COVER
12 |
--------------------------------------------------------------------------------
/my_bar/scripts/new_album_art_script.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | status=$(playerctl status)
3 | COVER="/tmp/music_cover.jpg"
4 | # MPD_COVER= ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &> /dev/null
5 | MUSIC_DIR="$HOME/Music"
6 |
7 | if [ $status = "Playing" -o $status = "Paused" ]; then
8 | url=$(playerctl metadata mpris:artUrl | cut -c 8-)
9 | cp $url $COVER
10 | if cp $url $COVER; then
11 | echo "ok"
12 | else
13 | echo "failed"
14 | fi
15 | fi
16 |
--------------------------------------------------------------------------------
/hypr/rofi/global/icons/suggestion.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/my_bar/launch_music:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Files and cmd
4 | FILE="$HOME/.cache/eww_launch.xyz"
5 | EWW="$HOME/opt/bin/eww -c $HOME/.config/my_bar"
6 |
7 | ## Run eww daemon if not running already
8 | if [[ ! `pidof eww` ]]; then
9 | ${EWW} daemon
10 | sleep 1
11 | fi
12 |
13 | ## Open widgets
14 | run_eww() {
15 | ${EWW} open-many \
16 | album_art
17 |
18 | }
19 |
20 | ## Launch or close widgets accordingly
21 | if [[ ! -f "$FILE" ]]; then
22 | touch "$FILE"
23 | run_eww && bspc config -m LVDS-1 top_padding 10
24 | else
25 | ${EWW} close-all && killall eww && run_eww && bspc config -m LVDS-1 top_padding 10
26 | fi
27 |
--------------------------------------------------------------------------------
/my_bar/launch_bar:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Files and cmd
4 | FILE="$HOME/.cache/eww_launch.xyz"
5 | EWW="$HOME/opt/bin/eww -c $HOME/.config/my_bar"
6 |
7 | ## Run eww daemon if not running already
8 | if [[ ! `pidof eww` ]]; then
9 | ${EWW} daemon
10 | sleep 1
11 | fi
12 |
13 | ## Open widgets
14 | run_eww() {
15 | ${EWW} open-many \
16 | bar \
17 | album_art
18 |
19 | }
20 |
21 | ## Launch or close widgets accordingly
22 | if [[ ! -f "$FILE" ]]; then
23 | touch "$FILE"
24 | run_eww && bspc config -m LVDS-1 top_padding 10
25 | else
26 | ${EWW} close-all && killall eww && run_eww && bspc config -m LVDS-1 top_padding 10
27 | fi
28 |
--------------------------------------------------------------------------------
/my_bar/scripts/check-network:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | count=0
4 |
5 | ID="$(ip link | awk '/state UP/ {print $2}')"
6 | SSID="$(iwgetid -r)"
7 |
8 | net_stat () {
9 | if (ping -c 1 archlinux.org || ping -c 1 google.com || ping -c 1 bitbucket.org || ping -c 1 github.com || ping -c 1 sourceforge.net) &>/dev/null; then
10 | if [[ $ID == e* ]]; then
11 | echo "Online"
12 | echo "images/icons/system/wifi.png"
13 | else
14 | echo "$SSID"
15 | echo "images/icons/system/wifi.png"
16 | fi
17 | else
18 | echo "Offline"
19 | echo "images/icons/system/no-wifi.png"
20 | fi
21 | }
22 |
23 | if [[ $1 == '--stat' ]]; then
24 | net_stat | head -n1
25 | elif [[ $1 == '--icon' ]]; then
26 | net_stat | tail -n1
27 | fi
28 |
--------------------------------------------------------------------------------
/my_bar/sidebar/toggle_sidebar:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Files and CMD
4 | FILE="$HOME/.cache/eww_launch.sidebar"
5 | CFG="$HOME/.config/my_bar/sidebar"
6 | EWW=`which eww`
7 |
8 | ## Run eww daemon if not running already
9 | if [[ ! `pidof eww` ]]; then
10 | ${EWW} daemon
11 | sleep 1
12 | fi
13 |
14 | ## Open widgets
15 | run_eww() {
16 | ${EWW} --config "$CFG" open-many \
17 | resources \
18 | logout \
19 | suspend \
20 | lock \
21 | reboot \
22 | shutdown \
23 | quotes
24 | }
25 |
26 | ## Launch or close widgets accordingly
27 | if [[ ! -f "$FILE" ]]; then
28 | touch "$FILE"
29 | run_eww
30 | else
31 | ${EWW} --config "$CFG" close resources logout suspend lock reboot shutdown quotes
32 | rm "$FILE"
33 | fi
34 |
--------------------------------------------------------------------------------
/my_bar/scripts/widget_apps:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [[ "$1" == "--tr" ]]; then
4 | alacritty --working-directory ~ &
5 |
6 | elif [[ "$1" == "--ff" ]]; then
7 | firefox &
8 |
9 | elif [[ "$1" == "--fm" ]]; then
10 | thunar ~ &
11 |
12 | elif [[ "$1" == "--ge" ]]; then
13 | geany &
14 |
15 | elif [[ "$1" == "--dc" ]]; then
16 | discord &
17 |
18 | elif [[ "$1" == "--tg" ]]; then
19 | telegram-desktop &
20 |
21 | elif [[ "$1" == "--rd" ]]; then
22 | firefox --new-tab "https://reddit.com"
23 |
24 | elif [[ "$1" == "--ml" ]]; then
25 | firefox --new-tab "https://mail.google.com"
26 |
27 | elif [[ "$1" == "--pow" ]]; then
28 | xfce4-power-manager-settings &
29 |
30 | elif [[ "$1" == "--nm" ]]; then
31 | networkmanager_dmenu
32 |
33 | fi
34 |
--------------------------------------------------------------------------------
/hypr/rofi/powermenu.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | THEME="$HOME/.config/bspwm/rofi/powermenu.rasi"
4 |
5 | rofi_command="rofi -no-config -theme $THEME"
6 |
7 | # Options
8 | shutdown="Shutdown"
9 | reboot="Restart"
10 | lock="Lock"
11 | suspend="Suspend"
12 | logout="Logout"
13 |
14 | # Variable passed to rofi
15 | options="$lock\n$suspend\n$logout\n$reboot\n$shutdown"
16 |
17 | chosen="$(echo -e "$options" | $rofi_command -dmenu -selected-row 0)"
18 | case $chosen in
19 | $shutdown)
20 | systemctl poweroff
21 | ;;
22 | $reboot)
23 | systemctl reboot
24 | ;;
25 | $lock)
26 | betterlockscreen -l
27 | ;;
28 | $suspend)
29 | systemctl suspend
30 | ;;
31 | $logout)
32 | bspc quit
33 | ;;
34 | esac
35 |
--------------------------------------------------------------------------------
/my_bar/images/icons/dashboard.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
--------------------------------------------------------------------------------
/my_bar/scripts/system:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | CFG="$HOME/.config/eww/arin/sidedar"
4 | EWW=`which eww`
5 |
6 | close_eww() {
7 | ${EWW} --config "$CFG" close resources logout suspend lock reboot shutdown quotes
8 | }
9 |
10 | ## Options #############################################
11 | if [[ $1 = "--lock" ]]; then
12 | close_eww
13 | betterlockscreen --lock
14 |
15 | elif [[ $1 = "--logout" ]]; then
16 | close_eww
17 | #openbox --exit
18 | berryc quit
19 |
20 | elif [[ $1 = "--suspend" ]]; then
21 | close_eww
22 | amixer set Master mute
23 | systemctl suspend
24 |
25 | elif [[ $1 = "--reboot" ]]; then
26 | close_eww
27 | systemctl reboot
28 |
29 | elif [[ $1 = "--shutdown" ]]; then
30 | close_eww
31 | systemctl poweroff
32 |
33 | ## Help Menu #############################################
34 | else
35 | echo "
36 | Available options:
37 | --lock --logout --suspend --reboot --shutdown
38 | "
39 | fi
40 |
--------------------------------------------------------------------------------
/my_bar/images/icons/search.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
23 |
--------------------------------------------------------------------------------
/99-my_bat.rules:
--------------------------------------------------------------------------------
1 | ACTION=="change", KERNEL=="BAT0", \
2 | SUBSYSTEM=="power_supply", \
3 | ATTR{status}=="Discharging", \
4 | ATTR{capacity}=="[0-9]", \
5 | IMPORT{program}="/usr/bin/xpub", \
6 | RUN+="/bin/su $env{XUSER} -c 'timeout 2s ~/.config/rofi/bin/applet_battery'"
7 |
8 | ACTION=="change", KERNEL=="BAT0", \
9 | SUBSYSTEM=="power_supply", \
10 | ATTR{status}=="Discharging", \
11 | ATTR{capacity}=="1[0-9]", \
12 | IMPORT{program}="/usr/bin/xpub", \
13 | RUN+="/bin/su $env{XUSER} -c 'timeout 2s ~/.config/rofi/bin/applet_battery'"
14 |
15 | SUBSYSTEM=="power_supply", ACTION=="change", \
16 | ENV{POWER_SUPPLY_ONLINE}=="0", ENV{POWER}="off", \
17 | OPTIONS+="last_rule", \
18 | IMPORT{program}="/usr/bin/xpub", \
19 | RUN+="/bin/su $env{XUSER} -c 'timeout 2s ~/.config/rofi/bin/applet_battery'"
20 |
21 | SUBSYSTEM=="power_supply", ACTION=="change", \
22 | ENV{POWER_SUPPLY_ONLINE}=="1", ENV{POWER}="on", \
23 | OPTIONS+="last_rule", \
24 | IMPORT{program}="/usr/bin/xpub", \
25 | RUN+="/bin/su $env{XUSER} -c 'timeout 2s ~/.config/rofi/bin/applet_battery'"
26 |
--------------------------------------------------------------------------------
/my_bar/scripts/battery:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Get battery info
4 | BATTERY="$(acpi | awk -F ' ' 'END {print $4}' | tr -d \%,)"
5 | CHARGE="$(acpi | awk -F ' ' 'END {print $3}' | tr -d \,)"
6 |
7 | main() {
8 | if [[ ($CHARGE = *"Charging"*) && ($BATTERY -lt "100") ]]; then
9 | echo "images/icons/battery/charge.png"
10 | elif [[ $CHARGE = *"Full"* ]]; then
11 | echo "images/icons/battery/full.png"
12 | else
13 | if [[ ($BATTERY -lt 100) && (($BATTERY -gt 65) || ($BATTERY -eq 65)) ]]; then
14 | echo "images/icons/battery/battery-3.png"
15 | elif [[ ($BATTERY -lt 65) && (($BATTERY -gt 35) || ($BATTERY -eq 35)) ]]; then
16 | echo "images/icons/battery/battery-2.png"
17 | elif [[ ($BATTERY -lt 35) && (($BATTERY -gt 10) || ($BATTERY -eq 10)) ]]; then
18 | echo "images/icons/battery/battery-1.png"
19 | elif [[ ($BATTERY -lt 10) && (($BATTERY -gt 0) || ($BATTERY -eq 0)) ]]; then
20 | echo "images/icons/battery/low.png"
21 | fi
22 | fi
23 | }
24 |
25 | if [[ $1 == '--icon' ]]; then
26 | main
27 | elif [[ $1 == '--perc' ]]; then
28 | echo "${BATTERY}%"
29 | fi
30 |
--------------------------------------------------------------------------------
/my_bar/sidebar/eww.scss:
--------------------------------------------------------------------------------
1 | /** Global *******************************************/
2 | *{
3 | all: unset;
4 | font-family: feather;
5 | font-family: "JetBrains Mono";
6 | color: #151515;
7 | }
8 |
9 |
10 | /** Boxes ***********************************/
11 | .winbox {
12 | background-color: #F5EEE6;
13 | border: 1px solid #161616;
14 | border-radius: 12px;
15 | }
16 |
17 | /** Resources ***********************************/
18 | .res_box {
19 | background-color: #F0E9E1;
20 | border: 1px solid #E6DFD7;
21 | border-radius: 12px;
22 | padding: 14px 18px 14px 18px;
23 | }
24 |
25 | .res_circle {
26 | background-color: #E1DCD2;
27 | border: 0px solid #161616;
28 | border-radius: 100%;
29 | padding: 0px;
30 | }
31 |
32 | .res_circle_small {
33 | background-color: #F5EEE6;
34 | border: 0px solid #161616;
35 | border-radius: 100%;
36 | padding: 40px;
37 | }
38 |
39 | .res_text {
40 | background-color: #E6E1D7;
41 | border: 1px solid #161616;
42 | border-radius: 16px;
43 | font-size : 14px;
44 | padding: 0px 8px 0px 8px;
45 | margin: 0px 0px 0px 0px;
46 | font-weight : bold;
47 | }
48 |
49 | .res_cpu {
50 | color: #FD6B85;
51 | }
52 |
53 | .res_mem {
54 | color: #B1A6EE;
55 | }
56 |
57 | .res_disk {
58 | color: #67D4F1;
59 | }
60 |
61 | /** Power Buttons ***********************************/
62 | .powericons {
63 | background-repeat: no-repeat;
64 | background-size: 48px;
65 | min-height: 48px;
66 | min-width: 48px;
67 | }
68 |
69 | /** Quotes ***********************************/
70 | .quote_box {
71 | margin: 20px;
72 | }
73 |
74 | .quote_text {
75 | font-size : 14px;
76 | font-style: italic;
77 | font-weight : bold;
78 | }
79 |
80 | /** EOF *************************************************/
81 |
--------------------------------------------------------------------------------
/my_bar/scripts/volume:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # Get Volume
4 | get_volume() {
5 | status=`amixer get Master | tail -n1 | grep -wo 'on'`
6 |
7 | if [[ "$status" == "on" ]]; then
8 | volume=`amixer get Master | tail -n1 | awk -F ' ' '{print $5}' | tr -d '[]'`
9 | echo "$volume"
10 | else
11 | echo "Mute"
12 | fi
13 | }
14 |
15 | # Get icons
16 | get_icon() {
17 | vol="$(get_volume)"
18 | current="${vol%%%}"
19 | status=`amixer get Master | tail -n1 | grep -wo 'on'`
20 |
21 | if [[ "$status" == "on" ]]; then
22 | if [[ "$current" -eq "0" ]]; then
23 | echo "images/icons/volume/mute.png"
24 | elif [[ ("$current" -ge "0") && ("$current" -le "30") ]]; then
25 | echo "images/icons/volume/volume.png"
26 | elif [[ ("$current" -ge "30") && ("$current" -le "60") ]]; then
27 | echo "images/icons/volume/volume.png"
28 | elif [[ ("$current" -ge "60") && ("$current" -le "100") ]]; then
29 | echo "images/icons/volume/volume.png"
30 | fi
31 | else
32 | echo "images/icons/volume/mute.png"
33 | fi
34 | }
35 |
36 | # Increase Volume
37 | inc_volume() {
38 | amixer -Mq set Master,0 5%+ unmute
39 | }
40 |
41 | # Decrease Volume
42 | dec_volume() {
43 | amixer -Mq set Master,0 5%- unmute
44 | }
45 |
46 | # Toggle Mute
47 | toggle_mute() {
48 | status=`amixer get Master | tail -n1 | grep -wo 'on'`
49 |
50 | if [[ "$status" == "on" ]]; then
51 | amixer set Master toggle
52 | else
53 | amixer set Master toggle
54 | fi
55 | }
56 |
57 | # Execute accordingly
58 | if [[ "$1" == "--get" ]]; then
59 | get_volume
60 | elif [[ "$1" == "--icon" ]]; then
61 | get_icon
62 | elif [[ "$1" == "--inc" ]]; then
63 | inc_volume
64 | elif [[ "$1" == "--dec" ]]; then
65 | dec_volume
66 | elif [[ "$1" == "--toggle" ]]; then
67 | toggle_mute
68 | else
69 | get_volume
70 | fi
71 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Hyprland with Eww bar
2 | A minimalistic Hyprland Configuration with Eww widgets
3 | and snappy animations
4 |
5 | # Install
6 | ```sh
7 | # Basic OS dependency
8 | paru -S light acpi mpd mpc ncmpcpp
9 |
10 | # install hyprland (Optional : swaylock)
11 | paru -S hyprland
12 |
13 | # install eww (install SpaceMono Nerd Font or change it in eww.scss)
14 | place my_bar in ~/.config/
15 |
16 | # install rofi and adi's rofi repo
17 | git clone --depth=1 https://github.com/adi1090x/rofi.git
18 | # cd into the directory and run ./setup.sh
19 |
20 | # udev rules for battery notif : (Optional)
21 | # better to install batify
22 | paru -S batify
23 | # or use my custom rules to get popup with rofi on bat_action
24 | cp 99-my_bat.rules to /etc/udev/rules.d/
25 |
26 | ```
27 |
28 | # Some Screenshots [ My mood changes a lot]
29 | 
30 | 
31 | 
32 | 
33 | 
34 |
35 |
36 |
37 | # Credits:
38 | * Vaxry's Hyprland : https://github.com/hyprwm/Hyprland
39 | * Support them here : https://ko-fi.com/vaxry
40 |
41 | * Elkowar's wacky widgets : https://github.com/elkowar/eww
42 | * u/taylor85345 for the workspace script and more : https://github.com/taylor85345/garden-hyprland-dotfiles
43 | * Vento for batify script https://github.com/Ventto/batify
44 | * adi for https://github.com/adi1090x/rofi.git
45 |
46 | * Me : The British Museum of scripts and repos :P
47 |
--------------------------------------------------------------------------------
/my_bar/scripts/music_info:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Get data
4 | STATUS="$(mpc status)"
5 | COVER="/tmp/.music_cover.jpg"
6 | MUSIC_DIR="$HOME/Music"
7 |
8 | ## Get status
9 | get_status() {
10 | if [[ $STATUS == *"[playing]"* ]]; then
11 | echo "images/icons/music/pause-button.png"
12 | else
13 | echo "images/icons/music/play-button.png"
14 | fi
15 | }
16 |
17 | ## Get song
18 | get_song() {
19 | song=`mpc -f %title% current`
20 | if [[ -z "$song" ]]; then
21 | echo "Offline"
22 | else
23 | echo "$song"
24 | fi
25 | }
26 |
27 | ## Get artist
28 | get_artist() {
29 | artist=`mpc -f %artist% current`
30 | if [[ -z "$artist" ]]; then
31 | echo "Offline"
32 | else
33 | echo "$artist"
34 | fi
35 | }
36 |
37 | ## Get time
38 | get_time() {
39 | time=`mpc status | grep "%)" | awk '{print $4}' | tr -d '(%)'`
40 | if [[ -z "$time" ]]; then
41 | echo "0"
42 | else
43 | echo "$time"
44 | fi
45 | }
46 | get_ctime() {
47 | ctime=`mpc status | grep "#" | awk '{print $3}' | sed 's|/.*||g'`
48 | if [[ -z "$ctime" ]]; then
49 | echo "0:00"
50 | else
51 | echo "$ctime"
52 | fi
53 | }
54 | get_ttime() {
55 | ttime=`mpc -f %time% current`
56 | if [[ -z "$ttime" ]]; then
57 | echo "0:00"
58 | else
59 | echo "$ttime"
60 | fi
61 | }
62 |
63 | ## Get cover
64 | get_cover() {
65 | ffmpeg -i "${MUSIC_DIR}/$(mpc current -f %file%)" "${COVER}" -y &> /dev/null
66 | STATUS=$?
67 |
68 | # Check if the file has a embbeded album art
69 | if [ "$STATUS" -eq 0 ];then
70 | echo "$COVER"
71 | else
72 | echo "images/music.png"
73 | fi
74 | }
75 |
76 | ## Execute accordingly
77 | if [[ "$1" == "--song" ]]; then
78 | get_song
79 | elif [[ "$1" == "--artist" ]]; then
80 | get_artist
81 | elif [[ "$1" == "--status" ]]; then
82 | get_status
83 | elif [[ "$1" == "--time" ]]; then
84 | get_time
85 | elif [[ "$1" == "--ctime" ]]; then
86 | get_ctime
87 | elif [[ "$1" == "--ttime" ]]; then
88 | get_ttime
89 | elif [[ "$1" == "--cover" ]]; then
90 | get_cover
91 | elif [[ "$1" == "--toggle" ]]; then
92 | mpc -q toggle
93 | elif [[ "$1" == "--next" ]]; then
94 | { mpc -q next; get_cover; }
95 | elif [[ "$1" == "--prev" ]]; then
96 | { mpc -q prev; get_cover; }
97 | fi
98 |
--------------------------------------------------------------------------------
/my_bar/scripts/workspace_mine:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 |
3 | #define icons for workspaces 1-9
4 | ic=(0 TERM BROWSER FILES OTHERS)
5 |
6 | #initial check for occupied workspaces
7 | for num in $(hyprctl workspaces | grep ID | sed 's/()/(1)/g' | awk 'NR>1{print $1}' RS='(' FS=')'); do
8 | export o"$num"="$num"
9 | done
10 |
11 | #initial check for focused workspace
12 | for num in $(hyprctl monitors | grep active | sed 's/()/(1)/g' | awk 'NR>1{print $1}' RS='(' FS=')'); do
13 | export f"$num"="$num"
14 | export fnum=f"$num"
15 | done
16 |
17 | workspaces() {
18 | if [[ ${1:0:4} == "workspace" ]]; then #set focused workspace
19 | unset -v "$fnum"
20 | num=${1:11}
21 | export f"$num"="$num"
22 | export fnum=f"$num"
23 |
24 | elif [[ ${1:0:15} == "createworkspace" ]]; then #set Occupied workspace
25 | num=${1:17}
26 | export o"$num"="$num"
27 | export f"$num"="$num"
28 |
29 | elif [[ ${1:0:16} == "destroyworkspace" ]]; then #unset unoccupied workspace
30 | num=${1:18}
31 | unset -v o"$num" f"$num"
32 | fi
33 |
34 | #output eww widget
35 | echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
36 | (box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"true\" \
37 | (button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1 && /home/taylor/.config/hypr/default_app\" :class \"0$o1$f1\" \"${ic[1]}\") \
38 | (button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && /home/taylor/.config/hypr/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \
39 | (button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3 && /home/taylor/.config/hypr/default_app\" :class \"0$o3$f3\" \"${ic[3]}\") \
40 | (button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4 && /home/taylor/.config/hypr/default_app\" :class \"0$o4$f4\" \"${ic[4]}\") \
41 | )\
42 | )"
43 | }
44 |
45 | workspaces
46 |
47 | socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
48 | workspaces "$event"
49 | done
50 |
--------------------------------------------------------------------------------
/my_bar/scripts/sys_info:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Files and Data
4 | PREV_TOTAL=0
5 | PREV_IDLE=0
6 | cpuFile="/tmp/.cpu_usage"
7 |
8 | ## Get CPU usage
9 | get_cpu() {
10 | if [[ -f "${cpuFile}" ]]; then
11 | fileCont=$(cat "${cpuFile}")
12 | PREV_TOTAL=$(echo "${fileCont}" | head -n 1)
13 | PREV_IDLE=$(echo "${fileCont}" | tail -n 1)
14 | fi
15 |
16 | CPU=(`cat /proc/stat | grep '^cpu '`) # Get the total CPU statistics.
17 | unset CPU[0] # Discard the "cpu" prefix.
18 | IDLE=${CPU[4]} # Get the idle CPU time.
19 |
20 | # Calculate the total CPU time.
21 | TOTAL=0
22 |
23 | for VALUE in "${CPU[@]:0:4}"; do
24 | let "TOTAL=$TOTAL+$VALUE"
25 | done
26 |
27 | if [[ "${PREV_TOTAL}" != "" ]] && [[ "${PREV_IDLE}" != "" ]]; then
28 | # Calculate the CPU usage since we last checked.
29 | let "DIFF_IDLE=$IDLE-$PREV_IDLE"
30 | let "DIFF_TOTAL=$TOTAL-$PREV_TOTAL"
31 | let "DIFF_USAGE=(1000*($DIFF_TOTAL-$DIFF_IDLE)/$DIFF_TOTAL+5)/10"
32 | echo "${DIFF_USAGE}"
33 | else
34 | echo "?"
35 | fi
36 |
37 | # Remember the total and idle CPU times for the next check.
38 | echo "${TOTAL}" > "${cpuFile}"
39 | echo "${IDLE}" >> "${cpuFile}"
40 | }
41 |
42 | ## Get Used memory
43 | get_mem() {
44 | printf "%.0f\n" $(free -m | grep Mem | awk '{print ($3/$2)*100}')
45 | }
46 |
47 | ## Get Brightness
48 | get_blight() {
49 | CARD=`ls /sys/class/backlight | head -n 1`
50 |
51 | if [[ "$CARD" == *"intel_"* ]]; then
52 | BNESS=`xbacklight -get`
53 | LIGHT=${BNESS%.*}
54 | else
55 | BNESS=`blight -d $CARD get brightness`
56 | PERC="$(($BNESS*100/255))"
57 | LIGHT=${PERC%.*}
58 | fi
59 |
60 | echo "$LIGHT"
61 | }
62 |
63 | ## Get Battery
64 | get_battery() {
65 | BAT=`ls /sys/class/power_supply | grep BAT | head -n 1`
66 | cat /sys/class/power_supply/${BAT}/capacity
67 | }
68 |
69 | ## Get Disk Usage
70 | get_disk() {
71 | df -h / | awk '{print $5}' | tail -n1 | sed 's/%//g'
72 | }
73 |
74 | ## Execute accordingly
75 | if [[ "$1" == "--cpu" ]]; then
76 | get_cpu
77 | elif [[ "$1" == "--mem" ]]; then
78 | get_mem
79 | elif [[ "$1" == "--blight" ]]; then
80 | get_blight
81 | elif [[ "$1" == "--bat" ]]; then
82 | get_battery
83 | elif [[ "$1" == "--disk" ]]; then
84 | get_disk
85 | fi
86 |
--------------------------------------------------------------------------------
/hypr/rofi/powermenu.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | show-icons: true;
3 | disable-history: false;
4 | fullscreen: false;
5 | hide-scrollbar: true;
6 | sidebar-mode: false;
7 | }
8 |
9 | * {
10 | font: "Inter Nerd Font Semibold 11";
11 | foreground: #f8f8f2;
12 | background-color: #00000066;
13 | selected-foreground: #53E2AE;
14 | selected-background: #56687E50;
15 | separatorcolor: #ff79c6;
16 | bordercolor: #ff79c6;
17 | highlightcolor: #8be9fd;
18 | transparent: #00000000;
19 | }
20 |
21 | #window {
22 | background-color: @background;
23 | text-color: @foreground;
24 | border: 0;
25 | border-color: @background;
26 | border-radius: 8;
27 | width: 300px;
28 | location: southeast;
29 | x-offset: -8;
30 | y-offset: -60;
31 | }
32 |
33 | #listview {
34 | background-color: @transparent;
35 | padding: 0px;
36 | columns: 1;
37 | lines: 5;
38 | spacing: 0px;
39 | cycle: true;
40 | dynamic: true;
41 | layout: vertical;
42 | }
43 |
44 | #mainbox {
45 | children: [ listview ];
46 | background-color: @transparent;
47 | }
48 |
49 | #element {
50 | background-color: @transparent;
51 | text-color: @foreground;
52 | orientation: horizontal;
53 | border-radius: 8;
54 | padding: 10px;
55 | }
56 |
57 | #element.selected {
58 | background-color: @selected-background;
59 | text-color: @selected-foreground;
60 | border: 0;
61 | border-radius: 8;
62 | }
63 |
64 | element-text {
65 | background-color: @transparent;
66 | text-color: inherit;
67 | }
68 |
69 | element-icon {
70 | background-color: @transparent;
71 | text-color: inherit;
72 | }
73 |
--------------------------------------------------------------------------------
/starship.toml:
--------------------------------------------------------------------------------
1 | ## ░█▀▀░▀█▀░█▀█░█▀▄░█▀▀░█░█░▀█▀░█▀█
2 | ## ░▀▀█░░█░░█▀█░█▀▄░▀▀█░█▀█░░█░░█▀▀
3 | ## ░▀▀▀░░▀░░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀░▀░░
4 | ## CROSS-SHELL PROMPT
5 | ##
6 | ## rxyhn's starship configuration
7 | ## The minimal, blazing-fast, and infinitely customizable prompt for any shell!
8 |
9 | format = "$directory$all"
10 | right_format = """$git_branch$git_status$cmd_duration"""
11 |
12 | # Disable the blank line at the start of the prompt
13 | add_newline = false
14 |
15 | [line_break]
16 | disabled = true
17 |
18 | [character]
19 | success_symbol = " [\n ](#6791c9)"
20 | error_symbol = " [\n ](#df5b61)"
21 | vicmd_symbol = "[ \n ](#78b892)"
22 |
23 | [hostname]
24 | ssh_only = true
25 | format = "[$hostname](bold blue) "
26 | disabled = false
27 |
28 | [cmd_duration]
29 | min_time = 1
30 | format = "[](fg:#242424 bg:none)[$duration]($style)[](fg:#242424 bg:#242424)[](fg:#bc83e3 bg:#242424)[](fg:#242424 bg:#bc83e3)[](fg:#bc83e3 bg:none) "
31 | disabled = false
32 | style = "fg:#d9d7d6 bg:#242424"
33 |
34 | [directory]
35 | format = "[](fg:#242424 bg:none)[$path]($style)[](fg:#242424 bg:#242424)[](fg:#6791c9 bg:#242424)[](fg:#242424 bg:#6791c9)[](fg:#6791c9 bg:none)"
36 | style = "fg:#d9d7d6 bg:#242424"
37 | truncation_length = 3
38 | truncate_to_repo=false
39 |
40 | [git_branch]
41 | format = "[](fg:#242424 bg:none)[$branch]($style)[](fg:#242424 bg:#242424)[](fg:#78b892 bg:#242424)[](fg:#282c34 bg:#78b892)[](fg:#78b892 bg:none) "
42 | style = "fg:#d9d7d6 bg:#242424"
43 |
44 | [git_status]
45 | format="[](fg:#242424 bg:none)[$all_status$ahead_behind]($style)[](fg:#242424 bg:#242424)[](fg:#67afc1 bg:#242424)[](fg:#242424 bg:#67afc1)[](fg:#67afc1 bg:none) "
46 | style = "fg:#d9d7d6 bg:#242424"
47 | conflicted = "="
48 | ahead = "⇡${count}"
49 | behind = "⇣${count}"
50 | diverged = "⇕⇡${ahead_count}⇣${behind_count}"
51 | up_to_date = ""
52 | untracked = "?${count}"
53 | stashed = ""
54 | modified = "!${count}"
55 | staged = "+${count}"
56 | renamed = "»${count}"
57 | deleted = "${count}"
58 |
59 | [git_commit]
60 | format = "[\\($hash\\)]($style) [\\($tag\\)]($style)"
61 | style = "green"
62 |
63 | [git_state]
64 | rebase = "REBASING"
65 | merge = "MERGING"
66 | revert = "REVERTING"
67 | cherry_pick = "CHERRY-PICKING"
68 | bisect = "BISECTING"
69 | am = "AM"
70 | am_or_rebase = "AM/REBASE"
71 | style = "yellow"
72 | format = '\([$state( $progress_current/$progress_total)]($style)\) '
73 |
--------------------------------------------------------------------------------
/hypr/rofi/global/icons/result.svg:
--------------------------------------------------------------------------------
1 |
2 |
58 |
--------------------------------------------------------------------------------
/my_bar/scripts/workspace:
--------------------------------------------------------------------------------
1 | #! /bin/bash
2 |
3 | #define icons for workspaces 1-9
4 | ic=(0 Term Browser Files Music Videos CS:GO Other)
5 |
6 | #initial check for occupied workspaces
7 | for num in $(hyprctl workspaces | grep ID | sed 's/()/(1)/g' | awk 'NR>1{print $1}' RS='(' FS=')'); do
8 | export o"$num"="$num"
9 | done
10 |
11 | #initial check for focused workspace
12 | for num in $(hyprctl monitors | grep active | sed 's/()/(1)/g' | awk 'NR>1{print $1}' RS='(' FS=')'); do
13 | export f"$num"="$num"
14 | export fnum=f"$num"
15 | done
16 |
17 | workspaces() {
18 | if [[ ${1:0:9} == "workspace" ]]; then #set focused workspace
19 | unset -v "$fnum"
20 | num=${1:11}
21 | export f"$num"="$num"
22 | export fnum=f"$num"
23 |
24 | elif [[ ${1:0:15} == "createworkspace" ]]; then #set Occupied workspace
25 | num=${1:17}
26 | export o"$num"="$num"
27 | export f"$num"="$num"
28 |
29 | elif [[ ${1:0:16} == "destroyworkspace" ]]; then #unset unoccupied workspace
30 | num=${1:18}
31 | unset -v o"$num" f"$num"
32 | fi
33 |
34 | #output eww widget
35 | echo "(eventbox :onscroll \"echo {} | sed -e 's/up/-1/g' -e 's/down/+1/g' | xargs hyprctl dispatch workspace\" \
36 | (box :class \"works\" :orientation \"h\" :spacing 5 :space-evenly \"true\" \
37 | (button :onclick \"hyprctl dispatch workspace 1\" :onrightclick \"hyprctl dispatch workspace 1 && /home/taylor/.config/hypr/default_app\" :class \"0$o1$f1\" \"${ic[1]}\") \
38 | (button :onclick \"hyprctl dispatch workspace 2\" :onrightclick \"hyprctl dispatch workspace 2 && /home/taylor/.config/hypr/default_app\" :class \"0$o2$f2\" \"${ic[2]}\") \
39 | (button :onclick \"hyprctl dispatch workspace 3\" :onrightclick \"hyprctl dispatch workspace 3 && /home/taylor/.config/hypr/default_app\" :class \"0$o3$f3\" \"${ic[3]}\") \
40 | (button :onclick \"hyprctl dispatch workspace 4\" :onrightclick \"hyprctl dispatch workspace 4 && /home/taylor/.config/hypr/default_app\" :class \"0$o4$f4\" \"${ic[4]}\") \
41 | (button :onclick \"hyprctl dispatch workspace 5\" :onrightclick \"hyprctl dispatch workspace 5 && /home/taylor/.config/hypr/default_app\" :class \"0$o5$f5\" \"${ic[5]}\") \
42 | (button :onclick \"hyprctl dispatch workspace 6\" :onrightclick \"hyprctl dispatch workspace 6 && /home/taylor/.config/hypr/default_app\" :class \"0$o6$f6\" \"${ic[6]}\") \
43 | (button :onclick \"hyprctl dispatch workspace 7\" :onrightclick \"hyprctl dispatch workspace 7 && /home/taylor/.config/hypr/default_app\" :class \"0$o7$f7\" \"${ic[7]}\") \
44 | )\
45 | )"
46 | }
47 |
48 | workspaces
49 |
50 | socat -u UNIX-CONNECT:/tmp/hypr/"$HYPRLAND_INSTANCE_SIGNATURE"/.socket2.sock - | while read -r event; do
51 | workspaces "$event"
52 | done
53 |
--------------------------------------------------------------------------------
/hypr/rofi/global/icons/history.svg:
--------------------------------------------------------------------------------
1 |
2 |
76 |
--------------------------------------------------------------------------------
/hypr/rofi/list_launcher.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | modi: "drun";
3 | display-drun: "Applications";
4 | show-icons: true;
5 | disable-history: false;
6 | fullscreen: false;
7 | hide-scrollbar: true;
8 | sidebar-mode: false;
9 | matching: "fuzzy";
10 | }
11 |
12 | * {
13 | font: "Inter Nerd Font Semibold 11";
14 | foreground: #f8f8f2;
15 | foreground-alt: #9c9c9c;
16 | background-color: #00000066;
17 | selected-foreground: #f48fb1;
18 | selected-background: #b2b2b250;
19 | separatorcolor: #7c7c7c;
20 | bordercolor: #ff79c6;
21 | highlightcolor: #8be9fd;
22 | transparent: #00000000;
23 | }
24 |
25 | #window {
26 | background-color: @background-color;
27 | text-color: @foreground;
28 | border: 0;
29 | border-color: @background-color;
30 | border-radius: 8;
31 | height: 70%;
32 | width: 400px;
33 | location: southwest;
34 | anchor: southwest;
35 | x-offset: 8;
36 | y-offset: -60;
37 | }
38 |
39 | #prompt {
40 | background-color: @transparent;
41 | text-color: @foreground;
42 | }
43 |
44 | #button {
45 | action: "ok";
46 | str: " ";
47 | font: "SauceCodePro Nerd Font Medium 12";
48 | expand: false;
49 | text-color: @foreground;
50 | background-color: @transparent;
51 | vertical-align: 0;
52 | }
53 |
54 | #entry {
55 | background-color: @transparent;
56 | text-color: @foreground;
57 | placeholder: "Search";
58 | placeholder-color: @foreground-alt;
59 | expand: true;
60 | vertical-align: 0;
61 | }
62 |
63 | #inputbar {
64 | children: [ button, entry ];
65 | padding: 10 10 10 15;
66 | background-color: @transparent;
67 | border: 0px 0px 1px dash;
68 | border-color: @separatorcolor;
69 | }
70 |
71 | #listview {
72 | background-color: @transparent;
73 | padding: 0px;
74 | lines: 12;
75 | spacing: 0px;
76 | cycle: true;
77 | dynamic: true;
78 | }
79 |
80 | #element {
81 | background-color: @transparent;
82 | text-color: @foreground;
83 | border-radius: 8;
84 | padding: 10px;
85 | }
86 |
87 | #element-icon {
88 | size: 1.4em;
89 | border: 0px;
90 | }
91 |
92 | #element-text {
93 | highlight: None #8be9fd;
94 | }
95 |
96 | #element.selected {
97 | background-color: @selected-background;
98 | text-color: @selected-foreground;
99 | border: 0;
100 | border-radius: 8;
101 | }
102 |
--------------------------------------------------------------------------------
/hypr/rofi/touch_launcher.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | font: "SpaceMono Nerd Font 12";
3 | show-icons: true;
4 | drun-display-format: "{name}";
5 | drun-match-fields: "name,generic,categories,keywords";
6 | threads: 0;
7 | matching: "fuzzy";
8 | sorting-method: "fzf";
9 | scroll-method: 0;
10 | disable-history: false;
11 | window-thumbnail: true;
12 | }
13 |
14 | * {
15 | transparent: #00000000;
16 | foreground: #F2F2F2EE;
17 | foreground-selected: #F2F2F2EE;
18 | foreground-active: #F2F2F2EE;
19 | background-selected: #F2F2F245;
20 | background-active: #F2F2F230;
21 | background-white: #F2F2F211;
22 | background-black: #000000CC;
23 | urgent: #E91E6366;
24 | urgent-selected: #E91E6377;
25 | }
26 |
27 | window {
28 | transparency: "real";
29 | background-color: @transparent;
30 | text-color: @foreground;
31 | location: north;
32 | anchor: northwest;
33 | fullscreen: true;
34 | }
35 |
36 | prompt {
37 | enabled: false;
38 | }
39 |
40 | button {
41 | action: "ok";
42 | str: " ";
43 | font: "Inter Nerd Font 11";
44 | expand: false;
45 | text-color: @foreground;
46 | background-color: @transparent;
47 | vertical-align: 0.7;
48 | horizontal-align: 0.5;
49 | }
50 |
51 | entry {
52 | font: "Inter Regular 11";
53 | background-color: @transparent;
54 | text-color: @foreground;
55 | expand: true;
56 | vertical-align: 0.5;
57 | horizontal-align: 0.5;
58 | placeholder: "Type to search";
59 | placeholder-color: @foreground;
60 | blink: true;
61 | }
62 |
63 | case-indicator {
64 | background-color: @transparent;
65 | text-color: @foreground;
66 | vertical-align: 0.5;
67 | horizontal-align: 0.5;
68 | }
69 |
70 | entry-wrapper {
71 | orientation: horizontal;
72 | vertical-align: 0.5;
73 | spacing: 4px;
74 | background-color: @transparent;
75 | children: [ button, entry, case-indicator ];
76 | }
77 |
78 | inputbar {
79 | background-color: @background-white;
80 | text-color: @foreground;
81 | expand: false;
82 | border-radius: 6px;
83 | margin: 0px calc((100% - 510px) / 2) 0px calc((100% - 510px) / 2);
84 | padding: 10px 10px 10px 10px;
85 | position: north;
86 | children: [ entry-wrapper ];
87 | }
88 |
89 | listview {
90 | background-color: @transparent;
91 | columns: 7;
92 | spacing: 5px;
93 | cycle: false;
94 | dynamic: true;
95 | layout: vertical;
96 | }
97 |
98 | mainbox {
99 | background-color: @background-black;
100 | children: [ inputbar, listview ];
101 | spacing: 25px;
102 | padding: 70px 135px 0 135px;
103 | }
104 |
105 | element {
106 | background-color: @transparent;
107 | text-color: @foreground;
108 | orientation: vertical;
109 | border-radius: 12px;
110 | padding: 25px 0 25px 0;
111 | }
112 |
113 | element-icon {
114 | background-color: @transparent;
115 | horizontal-align: 0.5;
116 | vertical-align: 0.5;
117 | size: 72px;
118 | border: 0;
119 | }
120 |
121 | element-text {
122 | background-color: @transparent;
123 | text-color: @foreground;
124 | expand: true;
125 | horizontal-align: 0.5;
126 | vertical-align: 0.5;
127 | margin: 0 10px 0 10px;
128 | }
129 |
130 | element normal.urgent,
131 | element alternate.urgent {
132 | background-color: @urgent;
133 | text-color: @foreground;
134 | border-radius: 9px;
135 | }
136 |
137 | element normal.active,
138 | element alternate.active {
139 | background-color: @background-active;
140 | text-color: @foreground;
141 | }
142 |
143 | element selected {
144 | background-color: @background-selected;
145 | text-color: @foreground;
146 | }
147 |
148 | element selected.urgent {
149 | background-color: @urgent-selected;
150 | text-color: @foreground;
151 | }
152 |
153 | element selected.active {
154 | background-color: @background-active;
155 | color: @foreground-selected;
156 | }
157 |
--------------------------------------------------------------------------------
/hypr/rofi/global/rofi.rasi:
--------------------------------------------------------------------------------
1 | configuration {
2 | font: "Inter Nerd Font Regular 10";
3 | sidebar-mode: true;
4 | show-icons: true;
5 | sorting-method: "fzf";
6 | fullscreen: false;
7 | threads: 0;
8 | matching: "fuzzy";
9 | scroll-method: 0;
10 | }
11 |
12 | * {
13 | transparent: #00000000;
14 | foreground: #F2F2F2EE;
15 | foreground-selected: #F2F2F2EE;
16 | foreground-active: #F2F2F2EE;
17 | background-selected: #F2F2F245;
18 | background-active: #F2F2F230;
19 | background-white: #F2F2F211;
20 | background-black: #000000AA;
21 | urgent: #E91E6366;
22 | urgent-selected: #E91E6377;
23 | }
24 |
25 | window {
26 | transparency: "real";
27 | background-color: @transparent;
28 | text-color: @foreground;
29 | location: northwest;
30 | anchor: northwest;
31 | x-offset: 18;
32 | y-offset: 20;
33 | height: 92%;
34 | width: 600px;
35 | orientation: vertical;
36 | }
37 |
38 | prompt {
39 | enabled: false;
40 | }
41 |
42 | button {
43 | action: "ok";
44 | str: " ";
45 | font: "FantasqueSansMono Nerd Font 16";
46 | expand: false;
47 | text-color: @foreground;
48 | background-color: @transparent;
49 | vertical-align: 0.5;
50 | horizontal-align: 0.5;
51 | }
52 |
53 | entry {
54 | font: "Inter Regular 12";
55 | background-color: @transparent;
56 | text-color: @foreground;
57 | expand: true;
58 | vertical-align: 0.5;
59 | horizontal-align: 0;
60 | placeholder: "Global Search";
61 | placeholder-color: @foreground;
62 | blink: true;
63 | }
64 |
65 | entry-wrapper {
66 | orientation: horizontal;
67 | margin: 0 12px 0 12px;
68 | spacing: 24px;
69 | vertical-align: 0.5;
70 | background-color: @transparent;
71 | children: [ button, entry ];
72 | }
73 |
74 | inputbar {
75 | padding: 14px;
76 | margin: 10px 10px 14px 10px;
77 | background-color: @background-white;
78 | text-color: @foreground;
79 | expand: false;
80 | border-radius: 9px;
81 | position: north;
82 | children: [ entry-wrapper ];
83 | }
84 |
85 | listview {
86 | background-color: @transparent;
87 | spacing: 0;
88 | cycle: true;
89 | dynamic: true;
90 | scrollbar: true;
91 | }
92 |
93 | mainbox {
94 | width: 200px;
95 | expand: true;
96 | spacing: 12px;
97 | padding: 5px;
98 | background-color: @background-black;
99 | children: [ inputbar, listview ];
100 | }
101 |
102 | scrollbar {
103 | background-color: @background-white;
104 | handle-width: 0;
105 | margin: 0 0 5px 0;
106 | border-radius: 9px;
107 | }
108 |
109 | element {
110 | background-color: @transparent;
111 | text-color: @foreground;
112 | orientation: horizontal;
113 | border: 0;
114 | border-color: @background-white;
115 | border-radius: 6px;
116 | spacing: 24px;
117 | margin: 0px 12px 0px 12px;
118 | padding: 10px 24px 10px 24px;
119 | }
120 |
121 | element-icon {
122 | size: 24px;
123 | border: 0;
124 | border-color: @transparent;
125 | background-color: @transparent;
126 | }
127 |
128 | element-text {
129 | font: "Inter Regular 11";
130 | background-color: @transparent;
131 | text-color: inherit;
132 | expand: true;
133 | horizontal-align: 0;
134 | vertical-align: 0.5;
135 | }
136 |
137 | element normal.urgent,
138 | element alternate.urgent {
139 | background-color: @urgent;
140 | text-color: @foreground;
141 | border-radius: 9px;
142 | }
143 |
144 | element normal.active,
145 | element alternate.active {
146 | background-color: @background-active;
147 | text-color: @foreground;
148 | }
149 |
150 | element selected {
151 | background-color: @background-selected;
152 | text-color: @foreground;
153 | }
154 |
155 | element selected.urgent {
156 | background-color: @urgent-selected;
157 | text-color: @foreground;
158 | }
159 |
160 | element selected.active {
161 | background-color: @background-active;
162 | color: @foreground-selected;
163 | }
164 |
165 |
--------------------------------------------------------------------------------
/my_bar/eww.scss:
--------------------------------------------------------------------------------
1 | * {
2 | all: unset; //Unsets everything so you can style everything from scratch
3 | //font-family: Inter Nerd Font;
4 | // font-family:Space Mono;
5 | }
6 |
7 | .dockbox {
8 | font-family : Space Mono;
9 | border-radius: 12px;
10 | }
11 |
12 |
13 | //Global Styles
14 | .bar {
15 | color: #dbdee9;
16 | // background-color:rgba(0,0,0,0.2);
17 | // background-color:#181818;
18 | background: linear-gradient(to right, #121212,#181818,#050505,#181818,#121212);
19 | }
20 |
21 | .time {
22 | font-family :Bebas Neue;
23 | font-size: 20px;
24 | color: #bcbcbc;
25 | font-weight:bold;
26 | }
27 |
28 | .date {
29 | font-family :Bebas Neue;
30 | color: #898989;
31 | padding-left:12px;
32 | }
33 |
34 |
35 | // Styles on classes (see eww.yuck for more information)
36 | .music {
37 | font-family: SpaceMono Nerd Font;
38 | font-size: 11px;
39 | }
40 |
41 | .album_art {
42 | background-repeat: no-repeat;
43 | background-size: 300px;
44 | min-height: 300px;
45 | min-width: 300px;
46 | border-radius: 8px;
47 | }
48 |
49 |
50 | .musicbox {
51 | margin : 0px 0px 0px 0px;
52 | }
53 |
54 |
55 | .float_mplayer{
56 | font-family:VictorMono Nerd Font;
57 | padding: 15px;
58 | border-radius: 10px;
59 | background: linear-gradient(to right, #212121,#181818,#171717,#181818,#212121);
60 | }
61 |
62 | .song {
63 | font-size : 12px;
64 | padding:12px;
65 | font-weight : bold;
66 | padding-left:2px;
67 | }
68 | .artist {
69 | font-size : 12px;
70 | padding-left:2px;
71 | }
72 |
73 | .musicbuttons {
74 | margin : -80px 0px 0px 0px;
75 | }
76 |
77 | .playbutton {
78 | background-repeat: no-repeat;
79 | background-size: 18px;
80 | min-height: 18px;
81 | min-width: 18px;
82 | margin: 0px 0px 0px 0px;
83 | }
84 |
85 |
86 | .trackbutton {
87 | background-repeat: no-repeat;
88 | background-size: 18px;
89 | min-height: 18px;
90 | min-width: 18px;
91 | margin: 0px 0px 0px 0px;
92 | }
93 |
94 | .sidestuff {
95 | font-size: 14px;
96 | }
97 |
98 | .sidestuff slider {
99 | all: unset;
100 | color: #c04639;
101 | margin: 10px 0px 7px 0px;
102 | }
103 |
104 |
105 | .battery_metric {
106 | font-size: 14px;
107 | margin-left:0px;
108 | }
109 |
110 | .battery_metric slider {
111 | all: unset;
112 | color: #c04639;
113 | margin: 10px 0px 7px 0px;
114 | min-width: 120px;
115 | }
116 |
117 |
118 | .audiostuff {
119 | font-size: 14px;
120 | }
121 |
122 | .audiostuff slider {
123 | all: unset;
124 | color: #c04639;
125 | margin: 10px 0px 7px 0px;
126 | min-width: 90px;
127 | }
128 |
129 |
130 | .works {
131 | font-family:VictorMono Nerd Font;
132 | font-weight:bold;
133 | }
134 |
135 |
136 | .0 , .01, .02, .03, .04, .05, .06,
137 | .011, .022, .033, .044, .055, .066{
138 | margin: 0px 0px 0px 0px;
139 | }
140 |
141 | /* Unoccupied */
142 | .0 {
143 | color: #606060;
144 | }
145 |
146 | /* Occupied */
147 | .01, .02, .03, .04, .05, .06, .07, .08, .09 {
148 | color:#959595;
149 | }
150 |
151 |
152 | /* Focused */
153 | .011, .022, .033, .044, .055, .066, .077, .088, .099{
154 | color: #ffffff;
155 | font-weight:bold;
156 | }
157 |
158 |
159 | .works button:hover {
160 | color: #000000;
161 | background-color: #bcbcbc;
162 | }
163 |
164 | .module {
165 | margin: 0px 0px 0px 0px;
166 | border-radius: 10px 10px 0px 10px;
167 | }
168 |
169 | .metric scale trough highlight {
170 | all: unset;
171 | //background-color: #D35D6E;
172 | background-color: #bcbcbc;
173 | color: #000000;
174 | border-radius: 4px;
175 | }
176 | .metric scale trough {
177 | all: unset;
178 | //background-color: #323232;
179 | background-color: #bcbcbc;
180 | border-radius: 50px;
181 | min-height: 3px;
182 | min-width: 30px;
183 | margin-left: 8px;
184 | margin-right: 30px;
185 | }
186 | .metric scale trough highlight {
187 | all: unset;
188 | //background-color: #D35D6E;
189 | background-color: #bcbcbc;
190 | color: #000000;
191 | border-radius: 4px;
192 | }
193 | .metric scale trough {
194 | all: unset;
195 | //background-color: #4e4e4e;
196 | background-color: #4e4e4e;
197 | border-radius: 3px;
198 | min-height: 3px;
199 | min-width: 50px;
200 | margin-left: 2px;
201 | margin-right: 18px;
202 | }
203 | .label-ram {
204 | font-size: 12px;
205 | margin-left: 2px;
206 | margin-right: 18px;
207 | }
208 |
209 | .label-Audio {
210 | font-size: 20px;
211 | }
212 |
213 | .mails {
214 | color: #FFC8C8;
215 | border: 0px solid #161616;
216 | border-radius: 16px;
217 | font-size : 14px;
218 | padding: 0px 5px 0px 5px;
219 | margin: 10px 0px 10px 0px;
220 | font-weight : bold;
221 | }
222 |
223 | .trayicon {
224 | background-repeat: no-repeat;
225 | background-size: 24px;
226 | min-height: 24px;
227 | min-width: 24px;
228 | margin: 8px 0px 0px 0px;
229 | }
230 |
231 | .infotext {
232 | color: #DCD7CD;
233 | border: 0px solid #161616;
234 | border-radius: 16px;
235 | font-size : 14px;
236 | padding: 0px 2px 0px 0px;
237 | margin: 10px 0px 10px 0px;
238 | }
239 |
240 | .face {
241 | background-size: 24px;
242 | min-height: 24px;
243 | min-width: 24px;
244 | margin: 8px 0px 8px 0px;
245 | border-radius: 100%;
246 | }
247 |
248 |
--------------------------------------------------------------------------------
/my_bar/scripts/weather_info:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | ## Collect data
4 | cache_dir="$HOME/.cache/eww/weather"
5 | cache_weather_stat=${cache_dir}/weather-stat
6 | cache_weather_degree=${cache_dir}/weather-degree
7 | cache_weather_quote=${cache_dir}/weather-quote
8 | cache_weather_hex=${cache_dir}/weather-hex
9 | cache_weather_icon=${cache_dir}/weather-icon
10 |
11 | ## Weather data
12 | KEY="YOUR_KEY"
13 | ID="CITY_ID"
14 | UNIT="metric" # Available options : 'metric' or 'imperial'
15 |
16 | ## Make cache dir
17 | if [[ ! -d "$cache_dir" ]]; then
18 | mkdir -p ${cache_dir}
19 | fi
20 |
21 | ## Get data
22 | get_weather_data() {
23 | weather=`curl -sf "http://api.openweathermap.org/data/2.5/weather?APPID="$KEY"&id="$ID"&units="$UNIT""`
24 | echo ${weather}
25 |
26 | if [ ! -z "$weather" ]; then
27 | weather_temp=`echo "$weather" | jq ".main.temp" | cut -d "." -f 1`
28 | weather_icon_code=`echo "$weather" | jq -r ".weather[].icon" | head -1`
29 | weather_description=`echo "$weather" | jq -r ".weather[].description" | head -1 | sed -e "s/\b\(.\)/\u\1/g"`
30 |
31 | #Big long if statement of doom
32 | if [ "$weather_icon_code" == "50d" ]; then
33 | weather_icon=" "
34 | weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
35 | weather_hex="#84afdb"
36 | elif [ "$weather_icon_code" == "50n" ]; then
37 | weather_icon=" "
38 | weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
39 | weather_hex="#84afdb"
40 | elif [ "$weather_icon_code" == "01d" ]; then
41 | weather_icon=" "
42 | weather_quote="It's a sunny day, gonna be fun! \nDon't go wandering all by yourself though..."
43 | weather_hex="#ffd86b"
44 | elif [ "$weather_icon_code" == "01n" ]; then
45 | weather_icon=" "
46 | weather_quote="It's a clear night \nYou might want to take a evening stroll to relax..."
47 | weather_hex="#fcdcf6"
48 | elif [ "$weather_icon_code" == "02d" ]; then
49 | weather_icon=" "
50 | weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
51 | weather_hex="#adadff"
52 | elif [ "$weather_icon_code" == "02n" ]; then
53 | weather_icon=" "
54 | weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
55 | weather_hex="#adadff"
56 | elif [ "$weather_icon_code" == "03d" ]; then
57 | weather_icon=" "
58 | weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
59 | weather_hex="#adadff"
60 | elif [ "$weather_icon_code" == "03n" ]; then
61 | weather_icon=" "
62 | weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
63 | weather_hex="#adadff"
64 | elif [ "$weather_icon_code" == "04d" ]; then
65 | weather_icon=" "
66 | weather_quote="It's cloudy, sort of gloomy \nYou'd better get a book to read..."
67 | weather_hex="#adadff"
68 | elif [ "$weather_icon_code" == "04n" ]; then
69 | weather_icon=" "
70 | weather_quote="It's a cloudy night \nHow about some hot chocolate and a warm bed?"
71 | weather_hex="#adadff"
72 | elif [ "$weather_icon_code" == "09d" ]; then
73 | weather_icon=" "
74 | weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
75 | weather_hex="#6b95ff"
76 | elif [ "$weather_icon_code" == "09n" ]; then
77 | weather_icon=" "
78 | weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
79 | weather_hex="#6b95ff"
80 | elif [ "$weather_icon_code" == "10d" ]; then
81 | weather_icon=" "
82 | weather_quote="It's rainy, it's a great day! \nGet some ramen and watch as the rain falls..."
83 | weather_hex="#6b95ff"
84 | elif [ "$weather_icon_code" == "10n" ]; then
85 | weather_icon=" "
86 | weather_quote=" It's gonna rain tonight it seems \nMake sure your clothes aren't still outside..."
87 | weather_hex="#6b95ff"
88 | elif [ "$weather_icon_code" == "11d" ]; then
89 | weather_icon=""
90 | weather_quote="There's storm for forecast today \nMake sure you don't get blown away..."
91 | weather_hex="#ffeb57"
92 | elif [ "$weather_icon_code" == "11n" ]; then
93 | weather_icon=""
94 | weather_quote="There's gonna be storms tonight \nMake sure you're warm in bed and the windows are shut..."
95 | weather_hex="#ffeb57"
96 | elif [ "$weather_icon_code" == "13d" ]; then
97 | weather_icon=" "
98 | weather_quote="It's gonna snow today \nYou'd better wear thick clothes and make a snowman as well!"
99 | weather_hex="#e3e6fc"
100 | elif [ "$weather_icon_code" == "13n" ]; then
101 | weather_icon=" "
102 | weather_quote="It's gonna snow tonight \nMake sure you get up early tomorrow to see the sights..."
103 | weather_hex="#e3e6fc"
104 | elif [ "$weather_icon_code" == "40d" ]; then
105 | weather_icon=" "
106 | weather_quote="Forecast says it's misty \nMake sure you don't get lost on your way..."
107 | weather_hex="#84afdb"
108 | elif [ "$weather_icon_code" == "40n" ]; then
109 | weather_icon=" "
110 | weather_quote="Forecast says it's a misty night \nDon't go anywhere tonight or you might get lost..."
111 | weather_hex="#84afdb"
112 | else
113 | weather_icon=" "
114 | weather_quote="Sort of odd, I don't know what to forecast \nMake sure you have a good time!"
115 | weather_hex="#adadff"
116 | fi
117 | echo "$weather_icon" > ${cache_weather_icon}
118 | echo "$weather_description" > ${cache_weather_stat}
119 | echo "$weather_temp""°C" > ${cache_weather_degree}
120 | echo -e "$weather_quote" > ${cache_weather_quote}
121 | echo "$weather_hex" > ${cache_weather_hex}
122 | else
123 | echo "Weather Unavailable" > ${cache_weather_stat}
124 | echo " " > ${cache_weather_icon}
125 | echo -e "Ah well, no weather huh? \nEven if there's no weather, it's gonna be a great day!" > ${cache_weather_quote}
126 | echo "-" > ${cache_weather_degree}
127 | echo "#adadff" > ${tcache_weather_hex}
128 | fi
129 | }
130 |
131 | ## Execute
132 | if [[ "$1" == "--getdata" ]]; then
133 | get_weather_data
134 | elif [[ "$1" == "--icon" ]]; then
135 | cat ${cache_weather_icon}
136 | elif [[ "$1" == "--temp" ]]; then
137 | cat ${cache_weather_degree}
138 | elif [[ "$1" == "--hex" ]]; then
139 | cat ${cache_weather_hex}
140 | elif [[ "$1" == "--stat" ]]; then
141 | cat ${cache_weather_stat}
142 | elif [[ "$1" == "--quote" ]]; then
143 | cat ${cache_weather_quote} | head -n1
144 | elif [[ "$1" == "--quote2" ]]; then
145 | cat ${cache_weather_quote} | tail -n1
146 | fi
147 |
148 |
--------------------------------------------------------------------------------
/my_bar/sidebar/eww.yuck:
--------------------------------------------------------------------------------
1 | ;; **
2 | ;; ** Widgets config for EWW
3 | ;; ** Created by : @adi1090x
4 | ;; **
5 |
6 | ;; ** Variables ***********************************************************************
7 |
8 | ;; System vars
9 | (defpoll HOST :interval "5s" `hostname`)
10 | (defpoll CPU_USAGE :interval "1s" `../scripts/sys_info --cpu`)
11 | (defpoll MEM_USAGE :interval "1s" `../scripts/sys_info --mem`)
12 | (defpoll DISK_USAGE :interval "1s" `../scripts/sys_info --disk`)
13 | (defpoll BLIGHT :interval "1s" `../scripts/sys_info --blight`)
14 | (defpoll BATTERY :interval "5s" `../scripts/sys_info --bat`)
15 | (defpoll QUOTE :interval "5m" `../scripts/quotes`)
16 |
17 | ;; ** Widgets *************************************************************************
18 |
19 | ;; resources
20 | (defwidget resources []
21 | (box :class "winbox"
22 | (centerbox :orientation "h"
23 | (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false"
24 | (box :class "res_circle" :orientation "v" :valign "center" :halign "center"
25 | (circular-progress :class "res_cpu" :value CPU_USAGE :thickness 5
26 | (label :class "res_circle_small" :text "CPU")))
27 | (label :class "res_text" :valign "end" :halign "center" :text "${CPU_USAGE}%"))
28 | (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false"
29 | (box :class "res_circle" :orientation "v" :valign "center" :halign "center"
30 | (circular-progress :class "res_mem" :value MEM_USAGE :thickness 5
31 | (label :class "res_circle_small" :text "MEMORY")))
32 | (label :class "res_text" :valign "end" :halign "center" :text "${MEM_USAGE}%"))
33 | (box :class "res_box" :orientation "v" :valign "center" :halign "center" :spacing 15 :space-evenly "false"
34 | (box :class "res_circle" :orientation "v" :valign "center" :halign "center"
35 | (circular-progress :class "res_disk" :value DISK_USAGE :thickness 5
36 | (label :class "res_circle_small" :text "DISK")))
37 | (label :class "res_text" :valign "end" :halign "center" :text "${DISK_USAGE}%")))))
38 |
39 | ;; powermenus
40 | (defwidget logout []
41 | (box :class "winbox"
42 | (button :style "background-image: url('../images/icons/system/sys-exit.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --logout")))
43 | (defwidget suspend []
44 | (box :class "winbox"
45 | (button :style "background-image: url('../images/icons/system/sys-sleep.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --suspend")))
46 | (defwidget lock []
47 | (box :class "winbox"
48 | (button :style "background-image: url('../images/icons/system/sys-lock.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --lock")))
49 | (defwidget reboot []
50 | (box :class "winbox"
51 | (button :style "background-image: url('../images/icons/system/sys-reboot.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --reboot")))
52 | (defwidget shutdown []
53 | (box :class "winbox"
54 | (button :style "background-image: url('../images/icons/system/poweroff.png');" :class "powericons" :valign "center" :halign "center" :onclick "../scripts/system --shutdown")))
55 |
56 | ;; quotes
57 | (defwidget quotes []
58 | (box :class "winbox"
59 | (box :class "quote_box" :orientation "h" :valign "center" :halign "center" :spacing 10 :space-evenly "false"
60 | (box :class "powericons" :style "background-image: url('../images/icons/quotes.png');")
61 | (label :class "quote_text" :valign "center" :halign "center" :text QUOTE :wrap true :limit-width 90 ))))
62 |
63 | ;; ** Windows *************************************************************************
64 |
65 | ;; resources
66 | (defwindow resources
67 | :monitor 0
68 | :geometry (geometry :x "1420px"
69 | :y "10px"
70 | :width "480px"
71 | :height "200px"
72 | :anchor "top left")
73 | :stacking "bg"
74 | :wm-ignore false
75 | (resources))
76 |
77 | ;; powermenu
78 | (defwindow logout
79 | :monitor 0
80 | :geometry (geometry :x "1420px"
81 | :y "320px"
82 | :width "80px"
83 | :height "80px"
84 | :anchor "top left")
85 | :stacking "bg"
86 | :wm-ignore false
87 | (logout))
88 |
89 | (defwindow suspend
90 | :monitor 0
91 | :geometry (geometry :x "1520px"
92 | :y "320px"
93 | :width "80px"
94 | :height "80px"
95 | :anchor "top left")
96 | :stacking "bg"
97 | :wm-ignore false
98 | (suspend))
99 |
100 | (defwindow lock
101 | :monitor 0
102 | :geometry (geometry :x "1620px"
103 | :y "320px"
104 | :width "80px"
105 | :height "80px"
106 | :anchor "top left")
107 | :stacking "bg"
108 | :wm-ignore false
109 | (lock))
110 |
111 | (defwindow reboot
112 | :monitor 0
113 | :geometry (geometry :x "1720px"
114 | :y "320px"
115 | :width "80px"
116 | :height "80px"
117 | :anchor "top left")
118 | :stacking "bg"
119 | :wm-ignore false
120 | (reboot))
121 |
122 | (defwindow shutdown
123 | :monitor 0
124 | :geometry (geometry :x "1820px"
125 | :y "320px"
126 | :width "80px"
127 | :height "80px"
128 | :anchor "top left")
129 | :stacking "bg"
130 | :wm-ignore false
131 | (shutdown))
132 |
133 | ;; quotes
134 | (defwindow quotes
135 | :monitor 0
136 | :geometry (geometry :x "1420px"
137 | :y "420px"
138 | :width "480px"
139 | :height "100px"
140 | :anchor "top left")
141 | :stacking "bg"
142 | :wm-ignore false
143 | (quotes))
144 |
--------------------------------------------------------------------------------
/hypr/rofi/global/web-search.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python3
2 |
3 | # MIT License
4 |
5 | # Copyright (c) 2019 Paolo Donadeo
6 |
7 | # Permission is hereby granted, free of charge, to any person obtaining a copy
8 | # of this software and associated documentation files (the "Software"), to deal
9 | # in the Software without restriction, including without limitation the rights
10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 | # copies of the Software, and to permit persons to whom the Software is
12 | # furnished to do so, subject to the following conditions:
13 |
14 | # The above copyright notice and this permission notice shall be included in all
15 | # copies or substantial portions of the Software.
16 |
17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 |
24 | import json
25 | import re
26 | import urllib.parse
27 | import urllib.request
28 | import sys
29 | import os
30 | import datetime
31 | import gzip
32 |
33 | import subprocess as sp
34 |
35 | import html
36 |
37 |
38 | ################################################################################
39 | ##### C O N F I G U R A T I O N ######
40 | ################################################################################
41 | SEARCH_ENGINE = 'google' # or 'duckduckgo'
42 | BROWSER = 'firefox' # or 'firefox', 'chromium', 'brave', 'lynx'
43 | TERMINAL = ['kitty', '--'] # or ['st', '-e'] or something like that
44 | ################################################################################
45 |
46 | CONFIG = {
47 | 'BROWSER_PATH' : {
48 | 'chrome' : ['google-chrome-stable'],
49 | 'firefox' : ['firefox'],
50 | 'chromium' : ['chromium-browser'],
51 | 'brave' : ['brave-browser'],
52 | 'lynx' : TERMINAL + ['lynx']
53 | },
54 | 'USER_AGENT' : {
55 | 'chrome' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36',
56 | 'firefox' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0',
57 | 'chromium' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36',
58 | 'brave' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36',
59 | 'lynx' : 'Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.1.1d'
60 | },
61 | 'SEARCH_ENGINE_NAME' : {
62 | 'google' : 'Google',
63 | 'duckduckgo' : 'DuckDuckGo'
64 | },
65 | 'SEARCH_URL' : {
66 | 'google' : 'https://www.google.com/search?q=',
67 | 'duckduckgo' : 'https://duckduckgo.com/?q='
68 | },
69 | 'SUGGESTION_URL' : {
70 | 'google' : 'https://www.google.com/complete/search?',
71 | 'duckduckgo' : 'https://duckduckgo.com/ac/?'
72 | }
73 | }
74 |
75 | def cleanhtml(txt):
76 | return re.sub(r'<.*?>', '', txt)
77 |
78 | def fetch_suggestions(search_string):
79 | if SEARCH_ENGINE == 'google':
80 | r = {
81 | 'q' : search_string,
82 | 'cp' : '11',
83 | 'client' : 'psy-ab',
84 | 'xssi' : 't',
85 | 'gs_ri' : 'gws-wiz',
86 | 'hl' : 'en-IT',
87 | 'authuser' : '0'
88 | }
89 | url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r)
90 | headers = {
91 | 'sec-fetch-mode' : 'cors',
92 | 'dnt' : '1',
93 | 'accept-encoding' : 'gzip',
94 | 'accept-language' : 'en-US;q=0.9,en;q=0.8',
95 | 'pragma' : 'no-cache',
96 | 'user-agent' : CONFIG['USER_AGENT'][BROWSER],
97 | 'accept' : '*/*',
98 | 'cache-control' : 'no-cache',
99 | 'authority' : 'www.google.com',
100 | 'referer' : 'https://www.google.com/',
101 | 'sec-fetch-site' : 'same-origin'
102 | }
103 | req = urllib.request.Request(url, headers=headers, method='GET')
104 |
105 | reply_data = gzip.decompress(urllib.request.urlopen(req).read()).split(b'\n')[1]
106 | reply_data = json.loads(reply_data)
107 | return [ cleanhtml(res[0]).strip() for res in reply_data[0] ]
108 | else: # 'duckduckgo'
109 | if search_string.startswith('!'):
110 | bang_search = True
111 | search_string = search_string.lstrip('!')
112 | else:
113 | bang_search = False
114 | r = {
115 | 'q' : search_string,
116 | 'callback' : 'autocompleteCallback',
117 | 'kl' : 'wt-wt',
118 | '_' : str(int((datetime.datetime.now().timestamp())*1000))
119 | }
120 | url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r)
121 | if bang_search:
122 | url = url.replace('?q=', '?q=!')
123 | headers = {
124 | 'pragma' : 'no-cache',
125 | 'dnt' : '1',
126 | 'accept-encoding' : 'gzip',
127 | 'accept-language' : 'en-US;q=0.9,en;q=0.8',
128 | 'user-agent' : CONFIG['USER_AGENT'][BROWSER],
129 | 'sec-fetch-mode' : 'no-cors',
130 | 'accept' : '*/*',
131 | 'cache-control' : 'no-cache',
132 | 'authority' : 'duckduckgo.com',
133 | 'referer' : 'https://duckduckgo.com/',
134 | 'sec-fetch-site' : 'same-origin',
135 | }
136 | req = urllib.request.Request(url, headers=headers, method='GET')
137 | reply_data = gzip.decompress(urllib.request.urlopen(req).read()).decode('utf8')
138 | reply_data = json.loads(re.match(r'autocompleteCallback\((.*)\);', reply_data).group(1))
139 | return [ cleanhtml(res['phrase']).strip() for res in reply_data ]
140 |
141 | def main():
142 | search_string = html.unescape((' '.join(sys.argv[1:])).strip())
143 |
144 | path_str = os.path.dirname(os.path.realpath(__file__)) + '/'
145 | icon_path_str = path_str + 'icons/'
146 | icon_name = icon_path_str
147 |
148 | if SEARCH_ENGINE == 'google':
149 | icon_name += 'google.svg'
150 | else:
151 | icon_name += 'ddg.svg'
152 |
153 | if search_string.startswith('!'):
154 | search_string = search_string.rstrip('!').strip()
155 | results = fetch_suggestions(search_string)
156 | for r in results:
157 | print(":wb " + html.unescape(r) + "\0icon\x1f"+icon_name+"\n")
158 | else:
159 | url = CONFIG['SEARCH_URL'][SEARCH_ENGINE] + urllib.parse.quote_plus(search_string)
160 | sp.Popen(CONFIG['BROWSER_PATH'][BROWSER] + [url], stdout=sp.DEVNULL, stderr=sp.DEVNULL, shell=False)
161 |
162 | if __name__ == "__main__":
163 | try:
164 | main()
165 | except Exception as e:
166 | if e:
167 | sys.exit(1)
168 |
--------------------------------------------------------------------------------
/my_bar/eww.yuck:
--------------------------------------------------------------------------------
1 | ;; ** Variables ***********************************************************************
2 | ;; all the deffpolls
3 |
4 | (defpoll bat_label :interval "1s" "scripts/getbat_status")
5 |
6 | (defpoll SONG :interval "1s" `scripts/music_info --song`)
7 | (defpoll COVER :interval "1s" `scripts/music_info --cover`)
8 | ;; (defpoll COVER :interval "1s" `scripts/test_art.sh`)
9 | (defpoll ARTIST :interval "1s" `scripts/music_info --artist`)
10 | (defpoll STATUS :interval "1s" `scripts/music_info --status`)
11 | (defpoll music :interval "1s" "scripts/getmusic")
12 |
13 | (defpoll battery :interval "1s" "scripts/getbat")
14 |
15 | (defpoll volume :interval "1s" "scripts/getvol")
16 |
17 | (defpoll date :interval "1s" "date '+%d/%m %A'")
18 | (defpoll time :interval "1s" "date '+ %H:%M:%S'")
19 |
20 |
21 | ;; Battery vars
22 | (defpoll BATICON :interval "1s" `scripts/battery --icon`)
23 | (defpoll BATPERC :interval "1m" `scripts/battery --perc`)
24 |
25 | ;; Volume vars
26 | (defpoll VOLICON :interval "1s" `scripts/volume --icon`)
27 | (defpoll VOLUME :interval "1s" `scripts/volume --get`)
28 |
29 | ;; Network
30 | (defpoll WIFIICON :interval "1s" `scripts/check-network --icon`)
31 | (defpoll NETSTAT :interval "1s" `scripts/check-network --stat`)
32 |
33 | ;; TIME
34 | (defvar CALENDAR "images/icons/system/calendar.png")
35 |
36 | ;; User
37 | (defvar IMAGE "images/profile.jpg")
38 | (defpoll USER :interval "10m" `whoami`)
39 |
40 | ;; Bar
41 | (defvar BARIMG "images/black_armour_80.png")
42 |
43 |
44 | ;;defwidgets******************************************************************
45 |
46 |
47 | (defwidget system []
48 | (box :class "dockbox"
49 | (box :orientation "h" :spacing 16 :valign "center" :halign "end" :space-evenly "false" :vexpand "false" :hexpand "false"
50 |
51 |
52 | (audiostuff)
53 | (batterystuff)
54 |
55 | (button :onclick "scripts/widget_apps --nm"
56 | (box :orientation "h" :spacing 8 :valign "center" :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
57 | (box :style "background-image: url('${WIFIICON}');" :class "trayicon")
58 | (label :class "infotext" :halign "start" :text NETSTAT)))
59 |
60 |
61 |
62 | (box :class "time" time)
63 | (button :onclick "notify-send zoinks!!!"
64 | (box :orientation "h" :spacing 8 :valign "center" :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
65 | (box :style "background-image: url('${IMAGE}');" :class "face")
66 | (label :class "infotext" :halign "start" :text USER)))
67 |
68 | )))
69 |
70 |
71 | (defwidget batterystuff []
72 | (box :orientation "h"
73 | :space-evenly false
74 | :halign "end"
75 | :class "right_modules"
76 | (bat_label)
77 | (battery_metric)
78 | ))
79 |
80 |
81 | (defwidget right []
82 | (box :orientation "h"
83 | :space-evenly false
84 | :halign "end"
85 | :class "right_modules"
86 | (audiostuff)
87 | (sidestuff)
88 | (batterystuff)
89 | ))
90 |
91 |
92 |
93 | (defwidget bar []
94 |
95 | ;;(centerbox :style "background-image: url('${BARIMG}');"
96 | (centerbox
97 | (left)
98 | (clock)
99 | (system)
100 | ))
101 |
102 |
103 | (defwidget audiostuff []
104 | (box :class "audiostuff" :orientation "h" :space-evenly false :halign "end"
105 |
106 | (metric :label "Audio "
107 | :value volume
108 | :onchange "amixer -D pulse sset Master {}%")
109 | ))
110 |
111 |
112 | (defwidget sidestuff []
113 | (box :class "sidestuff" :orientation "h" :space-evenly false :halign "end"
114 |
115 | (metric :label "Ram "
116 | :value {EWW_RAM.used_mem_perc}
117 | :onchange "")
118 |
119 | (metric :label "Cpu "
120 | :value {round((1 - (EWW_DISK["/"].free / EWW_DISK["/"].total)) * 100, 0)}
121 | :onchange "")
122 |
123 | ))
124 |
125 |
126 |
127 | (defwidget bat_label []
128 | (box :class "bat_label"
129 | :orientation "h"
130 | :space-evenly false
131 | :halign "center"
132 | {bat_label != "" ? "${bat_label} " : ""}))
133 |
134 |
135 |
136 | (defwidget battery_metric []
137 | (box :class "battery_metric" :orientation "h" :space-evenly false :halign "end"
138 | (metric :label ""
139 | :value battery
140 | :onchange "")
141 | ))
142 |
143 |
144 | (defwidget battery_status []
145 | (box :class "battery_metric" :orientation "h" :space-evenly false :halign "end"
146 | (metric :label ""
147 | :value "cat /sys/class/power_supply/BAT0/status"
148 | :onchange "")
149 | ))
150 |
151 |
152 | (deflisten workspace "scripts/workspace")
153 | (defwidget workspaces []
154 | (literal :content workspace))
155 |
156 |
157 | (defwidget float_mplayer []
158 | (box :class "float_mplayer"
159 |
160 | (box :orientation "v" :spacing 0 :valign "center" :halign "start" :space-evenly "false" :vexpand "false" :hexpand "false"
161 |
162 | ;; Album art box
163 | (box :class "album_art" :style "background-image: url('${COVER}');")
164 |
165 | ;; artist and song name box
166 | (box :class "musicbox" :orientation "v" :spacing 0 :valign "center" :halign "start" :space-evenly "false" :vexpand "false" :hexpand "false"
167 | (label :class "song" :halign "start" :wrap "false" :limit-width 30 :text SONG)
168 | (label :class "artist" :halign "start" :wrap "false" :limit-width 30 :text ARTIST)
169 | )
170 |
171 | ;; Player Buttons
172 | (box :class "musicbuttons" :orientation "h" :spacing 100 :valign "center" :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
173 | (button :style "background-image: url('images/icons/music/previous-button.png');" :class "trackbutton" :onclick "scripts/music_info --prev")
174 | (button :style "background-image: url('${STATUS}');" :class "playbutton" :onclick "scripts/music_info --toggle")
175 | (button :style "background-image: url('images/icons/music/next-button.png');" :class "trackbutton" :onclick "scripts/music_info --next")
176 | )
177 |
178 |
179 | )
180 | )
181 | )
182 |
183 |
184 | (defwidget clock []
185 | (box :class "dockbox"
186 | :orientation "h"
187 | :space-evenly false
188 | :halign "center"
189 |
190 | (button :onclick "scripts/widget_apps --nm"
191 | (box :orientation "h" :spacing 2 :valign "center" :halign "center" :space-evenly "false" :vexpand "false" :hexpand "false"
192 | (label :class "infotext" :halign "start")
193 | (box :class "date" date)))
194 | )
195 | )
196 |
197 |
198 | (defwidget battery []
199 | (box :class "battery"
200 | :orientation "h"
201 | :space-evenly false
202 | :halign "left"
203 | {battery != "" ? " ${battery}%" : ""}))
204 |
205 |
206 | (defwidget metric [label value onchange]
207 | (box :orientation "h"
208 | :class "metric"
209 | :space-evenly false
210 | (box :class "label" label)
211 | (scale :min 0
212 | :max 101
213 | :active {onchange != ""}
214 | :value value
215 | :onchange onchange)))
216 |
217 |
218 | (defwidget left []
219 | (box :orientation "h"
220 | :space-evenly false
221 | :halign "start"
222 | :valign "center"
223 | :class "left_modules"
224 | (workspaces)
225 | ))
226 |
227 | ;; windows ****************************************
228 |
229 | (defwindow bar
230 | :exclusive true
231 | :monitor 0
232 | :windowtype "dock"
233 | :stacking "bg"
234 | :focusable false
235 | :geometry (geometry :x "0%"
236 | :y "0%"
237 | :width "100%"
238 | :height "30px"
239 | :anchor "top center")
240 | :reserve (struts :side "top" :distance "4%")
241 | (bar))
242 |
243 |
244 | (defwindow album_art
245 | :monitor 0
246 | :geometry (geometry :x "10px"
247 | :y "10px"
248 | :anchor "top right")
249 | :stacking "bg"
250 | :windowtype "dock"
251 | :wm-ignore false
252 | (float_mplayer))
253 |
--------------------------------------------------------------------------------
/hypr/hyprland.conf:
--------------------------------------------------------------------------------
1 | # My Hyprland configuration
2 | #
3 | ## Autostarts
4 | # Use exec to exec everytime you reload
5 | # Use exec-once to start daemons and stuff
6 | # I use Gnome with hyprland so you might not find relevant stuff here
7 |
8 | # Change walls to your favourite wallpaper directory or your favourite wallpaper
9 | # exec-once=swaybg -i ~/Pictures/fav_walls/$(ls ~/Pictures/fav_walls|shuf -n 1)
10 | exec-once=playerctld
11 | exec-once=mpd
12 | # exec-once=swaybg -i ~/.config/hypr/grass.png
13 | # exec-once=swaybg -i ~/Pictures/fav_walls/covfefe.jpg
14 | exec-once=swaybg --mode fill -i ~/.config/hypr/sat_moon.jpg
15 | exec-once=wl-clipboard-history -t
16 | exec=gnome-keyring-daemon -sd
17 | exec-once=dunst
18 | exec-once=blueman-applet
19 | exec-once=nm-applet
20 | exec-once=libinput-gestures
21 |
22 |
23 | exec-once=eww daemon
24 | exec-once=~/.config/eww/launch_bar &2> /dev/null
25 | exec-once=~/.config/my_bar/launch_bar
26 | #exec-once=swayidle -w timeout 60 'swaylock -f -i ~/.config/hypr/wallpaper.png'
27 | exec-once=~/.config/hypr/scripts/ncmpcppnotif.sh
28 |
29 | exec-once=megasync
30 |
31 | # Monitor Stuff ::
32 | # Your display could be 16:10 or something else
33 | # set that here
34 | # ---------------------------------
35 |
36 | monitor=eDP-1,1920x1080@60,0x0,1
37 | monitor=DP-1,2560x1080@60,0x0,1
38 | #monitor=eDP-1,addreserved,0,0,0,0
39 | #monitor=DP-1,addreserved,50,0,0,0
40 | #workspace=DP-1,10
41 | workspace=eDP-1,1
42 |
43 | # ---------------------------------
44 |
45 |
46 | # Keyboard layout and other settings
47 | # ---------------------------------
48 | input {
49 | kb_layout=
50 | kb_variant=
51 | kb_model=
52 | kb_options=
53 | kb_rules=
54 | repeat_rate=50
55 | repeat_delay=300
56 | numlock_by_default=1
57 |
58 | follow_mouse=0
59 | # force_no_accel=1
60 |
61 | touchpad {
62 | disable_while_typing=0
63 | }
64 | gestures {
65 | workspace_swipe=1
66 | }
67 | }
68 | # ---------------------------------
69 |
70 |
71 |
72 | # Mouse , leader and borders settings
73 | # ---------------------------------
74 | general {
75 | sensitivity=1.00
76 | apply_sens_to_raw=1
77 | main_mod=SUPER
78 | gaps_in=0
79 | gaps_out=0
80 | border_size=2
81 | damage_tracking=full # heavily recom. to use full
82 | col.active_border=0xFFa3be8c
83 | col.inactive_border=0xFF424242
84 | }
85 | # ---------------------------------
86 |
87 |
88 |
89 | # Animations and pseudo tiling <- Literal Star of the show
90 | # The Order of Arguments should be : animation=NAME,ONOFF,SPEED,CURVE,STYLE
91 | # Where Curve is defined woth bezier.
92 | # Keep the speed arg low for snappy animations
93 |
94 | # Available Animations are :
95 | # windows - window movement/resizing - Styles: slide,popin (fallback is popin)
96 | # borders - border color
97 | # fadein - fadein/fadeout on window open/close
98 | # workspaces - workspace change - Styles: slide,slidevert,fadein
99 |
100 | # ---------------------------------
101 | # Format -> bezier=NAME,X0,Y0,X1,Y1 where name is the animation name
102 | #bezier=overshot,0.7,0.6,0.1,1.1
103 | bezier=overshot,0.05,0.9,0.1,1.1
104 |
105 | animations {
106 | enabled=1
107 | animation=windows,1,2,overshot,slide # for switching workspace
108 | animation=borders,1,10,default
109 | animation=fadein,1,5,default
110 | animation=workspaces,1,6,overshot,fadein
111 | }
112 |
113 | # I use this as tabbed
114 | # Bind Dispatchers
115 | # bind=MOD,key,dispatcher,params
116 | # togglegroup - toggles the current window and its siblings (recursively) into a group - params: none
117 | # changegroupactive - switches to the next window in a group. - params: b - back, f - forward.
118 | # togglesplit - toggles the split (top/side) of the current window - params: none
119 |
120 | dwindle {
121 | col.group_border = 0xFF808080
122 | col.group_border_active=0xffa3be8c
123 | # force split :0 -> split follows mouse, 1 -> always split to the left (new
124 | # = left or top) 2 -> always split to the right (new = right or bottom)
125 | force_split= 1
126 | }
127 |
128 | bind=ALT,T,togglegroup,
129 | bind=ALT,L,changegroupactive,f
130 | bind=ALT,H,changegroupactive,b
131 | bind=ALT,S,togglesplit,
132 |
133 |
134 | ## Other Decorations
135 | # ---------------------------------
136 | decoration {
137 | rounding=0
138 | blur=1 # Change this to 1 for dual kawase blur
139 | blur_size=3
140 | blur_passes=5
141 |
142 | drop_shadow=1
143 | shadow_range=20
144 | shadow_render_power=2
145 | shadow_ignore_window=1
146 | shadow_offset= 8 8
147 | col.shadow=0x44000000
148 | }
149 | # ---------------------------------
150 |
151 |
152 | # Some window specific rules
153 | # ---------------------------------
154 | windowrule=float,Rofi
155 | windowrule=float,megasync
156 | windowrule=workspace 2,firefox
157 | windowrule=workspace 7,megasync
158 | windowrule=workspace 3,Nautilus
159 | # ---------------------------------
160 |
161 |
162 | # ---------------------------------
163 | #
164 | # Bindings
165 | # --Basics--
166 | bind=SUPERSHIFT,R,exec,hyprctl reload
167 | bind=SUPERSHIFT,Q,exec,pkill Hyprland
168 | bind=SUPER,T,togglefloating,
169 | bind=SUPER,Q,killactive,
170 | bind=SUPER,F,fullscreen,
171 | bind=SUPER,P,pseudo,
172 | bind=SUPERCONTROL,L,exec,swaylock -f -i ~/.config/hypr/wallpaper.png
173 |
174 |
175 | #-- Workspace--
176 | #Focus window (vim bindings)
177 | bind=SUPER,h,movefocus,l
178 | bind=SUPER,l,movefocus,r
179 | bind=SUPER,k,movefocus,u
180 | bind=SUPER,j,movefocus,d
181 |
182 | bind=SUPERSHIFT,h,movewindow,l
183 | bind=SUPERSHIFT,l,movewindow,r
184 | bind=SUPERSHIFT,k,movewindow,u
185 | bind=SUPERSHIFT,j,movewindow,d
186 |
187 |
188 |
189 | # Resize Mode with Alt + R : Press Escape to quit
190 | bind=ALT,R,submap,resize # will switch to a submap called resize
191 | submap=resize # will start a submap called "resize"
192 |
193 | bind=,l,resizeactive,30 0
194 | bind=,h,resizeactive,-30 0
195 | bind=,k,resizeactive,0 -30
196 | bind=,j,resizeactive,0 30
197 |
198 | bind=,escape,submap,reset # use reset to go back to the global submap
199 | submap=reset # will reset the submap, meaning end the current one and return to the global one.
200 |
201 | #____________________________
202 | # 7ws is enough for everybody >
203 | #-----------------------------
204 | # \ ^__^
205 | # \ (oo)\_______
206 | # (__)\ )\/\
207 | # ||----w |
208 | # || ||
209 | #
210 |
211 | # GoTO
212 | # i like my terminal workspace always tabbed :: Major Hacky way to pass thru the bug
213 | # bind=SUPER,1,exec,~/.config/hypr/tabbed_ws1.sh
214 | bind=SUPER,1,workspace,1
215 | bind=SUPER,2,workspace,2
216 | bind=SUPER,3,workspace,3
217 | bind=SUPER,4,workspace,4
218 | bind=SUPER,5,workspace,5
219 | bind=SUPER,6,workspace,6
220 | bind=SUPER,7,workspace,7
221 |
222 | # Move window to
223 | bind=SUPERSHIFT,exclam,movetoworkspacesilent,1
224 | bind=SUPERSHIFT,at,movetoworkspacesilent,2
225 | bind=SUPERSHIFT,numbersign,movetoworkspacesilent,3
226 | bind=SUPERSHIFT,dollar,movetoworkspacesilent,4
227 | bind=SUPERSHIFT,percent,movetoworkspacesilent,5
228 | bind=SUPERSHIFT,asciicircum,movetoworkspacesilent,6
229 | bind=SUPERSHIFT,ampersand,movetoworkspacesilent,7
230 | #bind=SUPERSHIFT,asterisk,movetoworkspacesilent,8
231 | #bind=SUPERSHIFT,parenleft,movetoworkspacesilent,9
232 | #bind=SUPERSHIFT,parenright,movetoworkspacesilent,10
233 |
234 |
235 |
236 | # --Audio And Brightness--
237 | bind=,XF86AudioRaiseVolume,exec,amixer -D pulse set Master 5%+
238 | bind=,XF86AudioLowerVolume,exec,amixer -D pulse set Master 5%-
239 | bind=,XF86AudioMute,exec,amixer -D pulse set Master +1 toggle
240 |
241 | bind=,XF86MonBrightnessUp,exec,light -A 5
242 | bind=,XF86MonBrightnessDown,exec,light -U 5
243 |
244 | bind=,XF86AudioMedia,exec,playerctl play-pause
245 | bind=,XF86AudioPlay,exec,playerctl play-pause
246 | bind=,XF86AudioStop,exec,playerctl stop
247 |
248 |
249 | # --Apps--
250 | bind=SUPER,Return,exec,kitty
251 | bind=SUPER,SPACE,exec,~/.config/rofi/bin/launcher_slate
252 | bind=SUPER,D,exec,~/.config/rofi/bin/launcher_slate
253 | bind=SUPER,B,exec,timeout 3s ~/.config/rofi/bin/applet_battery
254 |
255 | # Music Stuff
256 | bind=SUPER,M,exec,timeout 5s ~/.config/rofi/bin/applet_mpd
257 | bind=ALT,RIGHT,exec,mpc prev && ~/.config/hypr/scripts/ncmpcppnotif.sh
258 | bind=ALT,LEFT,exec,mpc next && ~/.config/hypr/scripts/ncmpcppnotif.sh
259 | bind=ALT,SPACE,exec,mpc toggle && ~/.config/hypr/scripts/ncmpcppnotif.sh
260 |
261 |
262 | # screenshot stuff
263 | bind=,Print,exec,grim $(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y%m%d%H%M%S_1.png') && notify-send 'Screenshot Saved'
264 | bind=SUPER,Print,exec,grim - | wl-copy && notify-send 'Screenshot Copied to Clipboard'
265 | bind=SUPERSHIFT,Print,exec,grim - | swappy -f -
266 | bind=SUPERCONTROL,S,exec,slurp | grim -g - $(xdg-user-dir PICTURES)/Screenshots/$(date +'%Y%m%d%H%M%S_1.png') && notify-send 'Screenshot Saved'
267 | bind=SUPERSHIFT,S,exec,slurp | grim -g - - | wl-copy && notify-send 'Screenshot Sent to Clipboard'
268 |
269 |
270 | exec=notify-send "Config Loaded"
271 |
--------------------------------------------------------------------------------
/hypr/rofi/global/rofi-spotlight.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | TMP_DIR="/tmp/rofi/${USER}/"
4 |
5 | PREV_LOC_FILE="${TMP_DIR}rofi_fb_prevloc"
6 | CURRENT_FILE="${TMP_DIR}rofi_fb_current_file"
7 |
8 | MY_PATH="$(realpath "$0" | xargs dirname)"
9 | HIST_FILE="${MY_PATH}/history.txt"
10 |
11 | OPENER=xdg-open
12 | TERM_EMU=kitty
13 | TEXT_EDITOR=$EDITOR
14 | FILE_MANAGER=xdg-open
15 | BLUETOOTH_SEND=blueman-sendto
16 |
17 | CUR_DIR=$PWD
18 | NEXT_DIR=""
19 | FD_INSTALLED=$(command -v fd)
20 |
21 | SHOW_HIDDEN=false
22 |
23 | # Setup menu options
24 | declare -a OPEN_FILE_LOCATION=(
25 | "Open file location in ${TERM_EMU}"
26 | "Open file location in ${FILE_MANAGER}"
27 | )
28 | declare -a RUN_COMMANDS=(
29 | "Run"
30 | "Execute in ${TERM_EMU}"
31 | )
32 | declare -a STANDARD_CONTROLS=(
33 | "Move to trash"
34 | "Delete"
35 | "Back"
36 | )
37 | declare -a SHELL_NO_X_OPTIONS=(
38 | "Edit"
39 | "${OPEN_FILE_LOCATION[@]}"
40 | "${STANDARD_CONTROLS[@]}"
41 | )
42 | declare -a SHELL_OPTIONS=(
43 | "${RUN_COMMANDS[@]}"
44 | "${SHELL_NO_X_OPTIONS[@]}"
45 | )
46 | declare -a BIN_NO_X_OPTIONS=(
47 | "${OPEN_FILE_LOCATION[@]}"
48 | "Back"
49 | )
50 | declare -a BIN_OPTIONS=(
51 | "${RUN_COMMANDS[@]}"
52 | "${BIN_NO_X_OPTIONS[@]}"
53 | )
54 | declare -a TEXT_OPTIONS=("${SHELL_NO_X_OPTIONS[@]}")
55 | declare -a HTML_OPTIONS=(
56 | "Open"
57 | "Edit"
58 | "${OPEN_FILE_LOCATION[@]}"
59 | "${STANDARD_CONTROLS[@]}"
60 | )
61 | declare -a XCF_SVG_OPTIONS=(
62 | "Open"
63 | "${OPEN_FILE_LOCATION[@]}"
64 | "${STANDARD_CONTROLS[@]}"
65 | )
66 | declare -a IMAGE_OPTIONS=(
67 | "Open"
68 | "Send via Bluetooth"
69 | "${OPEN_FILE_LOCATION[@]}"
70 | "${STANDARD_CONTROLS[@]}"
71 | )
72 |
73 | declare -a ALL_OPTIONS=()
74 |
75 | # Combine all context menu
76 | COMBINED_OPTIONS=(
77 | "${SHELL_OPTIONS[@]}"
78 | "${IMAGE_OPTIONS[@]}"
79 | )
80 |
81 | # Remove duplicates
82 | ALL_OPTIONS=("$(printf '%s\n' "${COMBINED_OPTIONS[@]}" | sort -u)")
83 |
84 | # Create tmp dir for rofi
85 | [ ! -d "${TMP_DIR}" ] && mkdir -p "${TMP_DIR}";
86 |
87 | # Create hist file if it doesn't exist
88 | [ ! -f "${HIST_FILE}" ] && touch "${HIST_FILE}"
89 |
90 | # Help message
91 | if [ -n "$*" ] && [[ "$*" = ":help" ]]
92 | then
93 | echo -en "Rofi Spotlight
94 | A Rofi with file and web searching functionality
95 |
96 | Commands:
97 | :help to print this help message
98 | :h or :hidden to show hidden files/dirs
99 | :sh or :show_hist to show search history
100 | :ch or :clear_hist to clear search history
101 | :xdg to jump to an xdg directory
102 | Examples:
103 | :xdg DOCUMENTS
104 | :xdg DOWNLOADS
105 | Also supports incomplete path:
106 | Examples:
107 | :xdg doc
108 | :xdg down
109 | For more info about XDG dirs, see:
110 | \`man xdg-user-dir\`
111 |
112 | File search syntaxes:
113 | ! to search for a file and web suggestions
114 | ? to search parent directories
115 | Examples:
116 | !half-life 3
117 | ?portal 3
118 |
119 | Web search syntaxes:
120 | ! to gets search suggestions
121 | :web/:w to also to gets search suggestions
122 | :webbro/:wb to search directly from your browser
123 | Examples:
124 | !how to install archlinux
125 | :web how to install gentoo
126 | :w how to make a nuclear fission
127 | :webbro how to install wine in windowsxp
128 | Back\0icon\x1fdraw-arrow-back\n"
129 |
130 | exit
131 | fi
132 |
133 | # Return the icon string
134 | function icon_file_type(){
135 | icon_name=""
136 | mime_type=$(file --mime-type -b "${1}")
137 |
138 | case "${mime_type}" in
139 | "inode/directory")
140 | case "${1}" in
141 | "Desktop/" )
142 | icon_name='folder-blue-desktop'
143 | ;;
144 | "Documents/" )
145 | icon_name='folder-blue-documents'
146 | ;;
147 | "Downloads/" )
148 | icon_name='folder-blue-downloads'
149 | ;;
150 | "Music/" )
151 | icon_name='folder-blue-music'
152 | ;;
153 | "Pictures/" )
154 | icon_name='folder-blue-pictures'
155 | ;;
156 | "Public/" )
157 | icon_name='folder-blue-public'
158 | ;;
159 | "Templates/" )
160 | icon_name='folder-blue-templates'
161 | ;;
162 | "Videos/" )
163 | icon_name='folder-blue-videos'
164 | ;;
165 | "root/" )
166 | icon_name='folder-root'
167 | ;;
168 | "home/" | "${USER}/")
169 | icon_name='folder-home'
170 | ;;
171 | *"$" )
172 | icon_name='folder-blue'
173 | ;;
174 | *)
175 | icon_name='folder-blue'
176 | ;;
177 | esac
178 | ;;
179 | "inode/symlink" )
180 | icon_name='inode-symlink'
181 | ;;
182 | "audio/flac" | "audio/mpeg" )
183 | icon_name='music'
184 | ;;
185 | "video/mp4" )
186 | icon_name='video-mp4'
187 | ;;
188 | "video/x-matroska" )
189 | icon_name=video-x-matroska
190 | ;;
191 | "image/x-xcf" )
192 | # notify-send '123'
193 | icon_name='image-x-xcf'
194 | ;;
195 | "image/jpeg" | "image/png" | "image/svg+xml")
196 | icon_name="${CUR_DIR}/${1}"
197 | ;;
198 | "image/gif" )
199 | icon_name='gif'
200 | ;;
201 | "image/vnd.adobe.photoshop" )
202 | icon_name='image-vnd.adobe.photoshop'
203 | ;;
204 | "image/webp" )
205 | icon_name='gif'
206 | ;;
207 | "application/x-pie-executable" )
208 | icon_name='binary'
209 | ;;
210 | "application/pdf" )
211 | icon_name='pdf'
212 | ;;
213 | "application/zip" )
214 | icon_name='application-zip'
215 | ;;
216 | "application/x-xz" )
217 | icon_name='application-x-xz-compressed-tar'
218 | ;;
219 | "application/x-7z-compressed" )
220 | icon_name='application-x-7zip'
221 | ;;
222 | "application/x-rar" )
223 | icon_name='application-x-rar'
224 | ;;
225 | "application/octet-stream" | "application/x-iso9660-image" )
226 | icon_name='application-x-iso'
227 | ;;
228 | "application/x-dosexec" )
229 | icon_name='application-x-ms-dos-executable'
230 | ;;
231 | "text/plain" )
232 | icon_name='application-text'
233 | ;;
234 | "text/x-shellscript" )
235 | icon_name='application-x-shellscript'
236 | ;;
237 | "text/html" )
238 | icon_name='text-html'
239 | ;;
240 | "font/sfnt" | "application/vnd.ms-opentype" )
241 | icon_name='application-x-font-ttf'
242 | ;;
243 | * )
244 | case "${1}" in
245 | *."docx" | *".doc" )
246 | icon_name='application-msword'
247 | ;;
248 | *."apk" )
249 | icon_name='android-package-archive'
250 | ;;
251 | * )
252 | icon_name='unknown'
253 | ;;
254 | esac
255 | ;;
256 | esac
257 |
258 | echo -en "$1\0icon\x1f$icon_name\n"
259 | }
260 |
261 | export -f icon_file_type
262 |
263 | # Pass the argument to python script
264 | function web_search() {
265 | # Pass the search query to web-search script
266 | "${MY_PATH}/web-search.py" "${1}"
267 | exit;
268 | }
269 |
270 | # Handles the web search method
271 | if [ ! -z "$@" ] && ([[ "$@" == ":webbro"* ]] || [[ "$@" == ":wb"* ]])
272 | then
273 | remove=''
274 | [[ "$*" = ":webbro"* ]] && remove=":webbro" || remove=":wb"
275 |
276 | # Search directly from your web browser
277 | web_search "$(printf '%s\n' "${1//$remove/}")"
278 | exit;
279 |
280 | elif [ ! -z "$@" ] && ([[ "$@" == ":web"* ]] || [[ "$@" == ":w"* ]])
281 | then
282 | remove=''
283 | [[ "$*" = ":web"* ]] && remove=":web" || remove=":w"
284 |
285 | # Get search suggestions
286 | web_search "!$(printf '%s\n' "${1//$remove/}")"
287 | exit;
288 | fi
289 |
290 | function find_query() {
291 | QUERY=${1}
292 | if [[ ! "${QUERY}" =~ ( |\') ]]
293 | then
294 | if [ -z "$FD_INSTALLED" ];
295 | then
296 | find "${HOME}" -iname *"${QUERY}"* | sed "s/\/home\/$USER/\~/" |
297 | awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}'
298 | else
299 | fd -H ${QUERY} ${HOME} | sed "s/\/home\/$USER/\~/" |
300 | awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}'
301 | fi
302 | fi
303 | }
304 |
305 | # File and calls to the web search
306 | if [ ! -z "$@" ] && ([[ "$@" == ?(\~)/* ]] || [[ "$@" == \?* ]] || [[ "$@" == \!* ]])
307 | then
308 | QUERY=$@
309 |
310 | echo "${QUERY}" >> "${HIST_FILE}"
311 |
312 | if [[ "$@" == ?(\~)/* ]]
313 | then
314 | [[ "$*" = \~* ]] && QUERY="${QUERY//"~"/"$HOME"}"
315 |
316 | coproc ${OPENER} "${QUERY}" > /dev/null 2>&1
317 | exec 1>&-
318 | exit
319 |
320 | elif [[ "$@" == \?* ]]
321 | then
322 | find_query ${QUERY#\?}
323 |
324 | else
325 | # Find the file
326 | find_query ${QUERY#!}
327 |
328 | # Web search
329 | web_search "! ${QUERY#!}"
330 | fi
331 | exit;
332 | fi
333 |
334 | # Create notification if there's an error
335 | function create_notification() {
336 | case "${1}" in
337 | "denied" )
338 | notify-send -a "Global Search" "Permission denied!" \
339 | 'You have no permission to access '"${CUR_DIR}!"
340 | ;;
341 | "deleted" )
342 | notify-send -a "Global Search" "Success!" \
343 | 'File deleted!'
344 | ;;
345 | "trashed" )
346 | notify-send -a "Global Search" "Success!" \
347 | 'The file has been moved to trash!'
348 | ;;
349 | "cleared" )
350 | notify-send -a "Global Search" "Success!" \
351 | 'Search history has been successfully cleared!'
352 | ;;
353 | * )
354 | notify-send -a "Global Search" "Somethings wrong I can feel it!" \
355 | 'This incident will be reported!'
356 | ;;
357 | esac
358 | }
359 |
360 | # Show the files in the current directory
361 | function navigate_to() {
362 | # process current dir.
363 | if [ -n "${CUR_DIR}" ]
364 | then
365 | CUR_DIR=$(readlink -e "${CUR_DIR}")
366 | if [ ! -d "${CUR_DIR}" ] || [ ! -r "${CUR_DIR}" ]
367 | then
368 | create_notification "denied"
369 | CUR_DIR=$(realpath ${CUR_DIR} | xargs dirname)
370 | echo "${CUR_DIR}" > "${PREV_LOC_FILE}"
371 | else
372 | echo "${CUR_DIR}/" > "${PREV_LOC_FILE}"
373 | fi
374 | pushd "${CUR_DIR}" >/dev/null || exit
375 | fi
376 |
377 | printf "..\0icon\x1fup\n"
378 |
379 | if [[ -z "$FD_INSTALLED" ]]
380 | then
381 | #Group directories
382 | if [[ ${SHOW_HIDDEN} == true ]]
383 | then
384 | for i in .*/
385 | do
386 | [[ -d "${i}" ]] && ([[ "${i}" != "./" ]] && [[ "${i}" != "../"* ]]) && icon_file_type "${i}"
387 | done
388 | fi
389 | for i in */
390 | do
391 | [[ -d "${i}" ]] && icon_file_type "${i}"
392 | done
393 | #Group files
394 | if [[ ${SHOW_HIDDEN} = true ]]
395 | then
396 | for i in .*
397 | do
398 | [[ -f "${i}" ]] && icon_file_type "${i}"
399 | done
400 | fi
401 | for i in *
402 | do
403 | [[ -f "${i}" ]] && icon_file_type "${i}"
404 | done
405 | else
406 | THREADS=$(getconf _NPROCESSORS_ONLN)
407 | export CUR_DIR
408 | if [[ ${SHOW_HIDDEN} == true ]]
409 | then
410 | fd -Ht d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS
411 | fd -Ht f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS
412 | else
413 | fd -t d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS
414 | fd -t f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS
415 | fi
416 | fi
417 | }
418 |
419 | # Set XDG dir
420 | function return_xdg_dir() {
421 | target_dir=${1^^}
422 |
423 | if [[ "HOME" == *"${target_dir}"* ]]
424 | then
425 | CUR_DIR=$(xdg-user-dir)
426 |
427 | elif [[ "DESKTOP" == *"${target_dir}"* ]]
428 | then
429 | CUR_DIR=$(xdg-user-dir DESKTOP)
430 |
431 | elif [[ "DOCUMENTS" == *"${target_dir}"* ]]
432 | then
433 | CUR_DIR=$(xdg-user-dir DOCUMENTS)
434 |
435 | elif [[ "DOWNLOADS" == *"${target_dir}"* ]]
436 | then
437 | CUR_DIR=$(xdg-user-dir DOWNLOAD)
438 |
439 | elif [[ "MUSIC" == *"${target_dir}"* ]]
440 | then
441 | CUR_DIR=$(xdg-user-dir MUSIC)
442 |
443 | elif [[ "PICTURES" == *"${target_dir}"* ]]
444 | then
445 | CUR_DIR=$(xdg-user-dir PICTURES)
446 |
447 | elif [[ "PUBLICSHARE" == *"${target_dir}"* ]]
448 | then
449 | CUR_DIR=$(xdg-user-dir PUBLICSHARE)
450 |
451 | elif [[ "TEMPLATES" == *"${target_dir}"* ]]
452 | then
453 | CUR_DIR=$(xdg-user-dir TEMPLATES)
454 |
455 | elif [[ "VIDEOS" == *"${target_dir}"* ]]
456 | then
457 | CUR_DIR=$(xdg-user-dir VIDEOS)
458 |
459 | elif [[ "ROOT" == *"${target_dir}"* ]]
460 | then
461 | CUR_DIR="/"
462 |
463 | else
464 | CUR_DIR="${HOME}"
465 | fi
466 | navigate_to
467 | exit;
468 | }
469 |
470 | # Show and Clear History
471 | if [ ! -z "$@" ] && ([[ "$@" == ":sh" ]] || [[ "$@" == ":show_hist" ]])
472 | then
473 | hist=$(tac "${HIST_FILE}")
474 |
475 | echo -en "Back\0icon\x1fdraw-arrow-back\n"
476 | [ -z "${hist}" ] && echo -en "No History Yet\0icon\x1ftext-plain\n"
477 |
478 | while IFS= read -r line;
479 | do
480 | echo -en "${line}\0icon\x1f${MY_PATH}/icons/history.svg\n";
481 | done <<< "${hist}"
482 |
483 | exit;
484 | elif [ ! -z "$@" ] && ([[ "$@" == ":ch" ]] || [[ "$@" == ":clear_hist" ]])
485 | then
486 | :> "${HIST_FILE}"
487 | create_notification "cleared"
488 |
489 | CUR_DIR="${HOME}"
490 | navigate_to
491 | exit;
492 | fi
493 |
494 | # Accepts XDG command
495 | if [[ ! -z "$@" ]] && [[ "$@" == ":xdg"* ]]
496 | then
497 | NEXT_DIR=${*//":xdg "/}
498 |
499 | [[ -n "$NEXT_DIR" ]] && return_xdg_dir "${NEXT_DIR}" || return_xdg_dir "${HOME}"
500 | fi
501 |
502 | # Read last location, otherwise we default to PWD.
503 | [ -f "${PREV_LOC_FILE}" ] && CUR_DIR=$(< "${PREV_LOC_FILE}")
504 |
505 | if [[ ! -z "$@" ]] && ([[ "$@" == ":h" ]] || [[ "$@" == ":hidden" ]])
506 | then
507 | SHOW_HIDDEN=true
508 | navigate_to
509 | exit;
510 | fi
511 |
512 | # Handle argument.
513 | [ -n "$*" ] && CUR_DIR="${CUR_DIR}/$*"
514 |
515 | # Context Menu
516 | if [ -n "$*" ] && [[ "${ALL_OPTIONS[*]} " = *"$*"* ]]
517 | then
518 | case "${1}" in
519 | "Run" )
520 | coproc ( eval "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 )
521 | kill -9 $(pgrep rofi)
522 | ;;
523 | "Execute in ${TERM_EMU}" )
524 | coproc ( eval "${TERM_EMU} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 )
525 | kill -9 $(pgrep rofi)
526 | ;;
527 | "Open" )
528 | coproc ( eval "${OPENER} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 )
529 | kill -9 $(pgrep rofi)
530 | ;;
531 | "Open file location in ${TERM_EMU}" )
532 | file_path="$(< ${CURRENT_FILE})"
533 | coproc ( ${TERM_EMU} bash -c "cd ${file_path%/*} ; ${SHELL}" & > /dev/null 2>&1 )
534 | kill -9 $(pgrep rofi)
535 | ;;
536 | "Open file location in ${FILE_MANAGER}" )
537 | file_path="$(< "${CURRENT_FILE}")"
538 | coproc ( eval "${FILE_MANAGER} "${file_path%/*}"" & > /dev/null 2>&1 )
539 | kill -9 $(pgrep rofi)
540 | ;;
541 | "Edit" )
542 | coproc ( eval "${TERM_EMU} ${TEXT_EDITOR} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 )
543 | kill -9 $(pgrep rofi)
544 | ;;
545 | "Move to trash" )
546 | coproc( gio trash "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 )
547 | create_notification "trashed"
548 | CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")"
549 | navigate_to
550 | ;;
551 | "Delete" )
552 | shred "$(< ${CURRENT_FILE})"
553 | rm "$(< ${CURRENT_FILE})"
554 | create_notification "deleted"
555 | CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")"
556 | navigate_to
557 | ;;
558 | "Send via Bluetooth" )
559 | rfkill unblock bluetooth && bluetoothctl power on
560 | sleep 1
561 | blueman-sendto "$(< ${CURRENT_FILE})" & > /dev/null 2>&1
562 | kill -9 $(pgrep rofi)
563 | ;;
564 | "Back" )
565 | CUR_DIR="$(< ${PREV_LOC_FILE})"
566 | navigate_to
567 | ;;
568 | esac
569 | exit;
570 | fi
571 |
572 | function context_menu_icons() {
573 |
574 | if [[ "${1}" == "Run" ]]
575 | then
576 | echo '\0icon\x1fsystem-run\n'
577 |
578 | elif [[ "${1}" == "Execute in ${TERM_EMU}" ]]
579 | then
580 | echo "\0icon\x1f${TERM_EMU}\n"
581 |
582 | elif [[ "${1}" == "Open" ]]
583 | then
584 | echo "\0icon\x1futilities-x-terminal\n"
585 |
586 | elif [[ "${1}" == "Open file location in ${TERM_EMU}" ]]
587 | then
588 | echo "\0icon\x1f${TERM_EMU}\n"
589 |
590 | elif [[ "${1}" == "Open file location in ${FILE_MANAGER}" ]]
591 | then
592 | echo "\0icon\x1fblue-folder-open\n"
593 |
594 | elif [[ "${1}" == "Edit" ]]
595 | then
596 | echo "\0icon\x1faccessories-text-editor\n"
597 |
598 | elif [[ "${1}" == "Move to trash" ]]
599 | then
600 | echo "\0icon\x1fapplication-x-trash\n"
601 |
602 | elif [[ "${1}" == "Delete" ]]
603 | then
604 | echo "\0icon\x1findicator-trashindicator\n"
605 |
606 | elif [[ "${1}" == "Send via Bluetooth" ]]
607 | then
608 | echo "\0icon\x1fbluetooth\n"
609 |
610 | elif [[ "${1}" == "Back" ]]
611 | then
612 | echo "\0icon\x1fback\n"
613 | fi
614 | }
615 |
616 | function print_context_menu() {
617 | declare -a arg_arr=("${!1}")
618 |
619 | for menu in "${arg_arr[@]}"
620 | do
621 | printf "$menu$(context_menu_icons "${menu}")\n"
622 | done
623 | }
624 |
625 | function context_menu() {
626 |
627 | type="$(file --mime-type -b "${CUR_DIR}")"
628 |
629 | if [ -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]]
630 | then
631 | if [ -x "${CUR_DIR}" ];
632 | then
633 | print_context_menu SHELL_OPTIONS[@]
634 | else
635 | print_context_menu SHELL_NO_X_OPTIONS[@]
636 | fi
637 |
638 | elif [[ "${type}" == "application/x-executable" ]] || [[ "${type}" == "application/x-pie-executable" ]]
639 | then
640 | if [ -x "${CUR_DIR}" ]
641 | then
642 | print_context_menu BIN_OPTIONS[@]
643 | else
644 | print_context_menu BIN_NO_X_OPTIONS[@]
645 | fi
646 |
647 | elif [[ "${type}" == "text/plain" ]]
648 | then
649 | print_context_menu TEXT_OPTIONS[@]
650 |
651 | elif [[ "${type}" == "text/html" ]]
652 | then
653 | print_context_menu HTML_OPTIONS[@]
654 |
655 | elif [[ "${type}" == "image/jpeg" ]] || [[ "${type}" == "image/png" ]]
656 | then
657 | print_context_menu IMAGE_OPTIONS[@]
658 |
659 | elif [[ "${type}" == "image/x-xcf" ]] || [[ "${type}" == "image/svg+xml" ]]
660 | then
661 | print_context_menu XCF_SVG_OPTIONS[@]
662 |
663 | elif [ ! -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]]
664 | then
665 | coproc ( exec "${CUR_DIR}" & > /dev/null 2>&1 )
666 |
667 | else
668 | if [ ! -d "${CUR_DIR}" ] && [ ! -f "${CUR_DIR}" ]
669 | then
670 | QUERY="${CUR_DIR//*\/\//}"
671 |
672 | echo "${QUERY}" >> "${HIST_FILE}"
673 |
674 | find_query "${QUERY#!}"
675 |
676 | web_search "!${QUERY}"
677 | else
678 | coproc ( ${OPENER} "${CUR_DIR}" & > /dev/null 2>&1 )
679 | fi
680 | fi
681 | exit;
682 | }
683 |
684 | # If argument is not a directory/folder
685 | if [ ! -d "${CUR_DIR}" ]
686 | then
687 | echo "${CUR_DIR}" > "${CURRENT_FILE}"
688 | context_menu
689 | exit;
690 | fi
691 |
692 | navigate_to
693 |
--------------------------------------------------------------------------------
/hypr/rofi/global/icons/google.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
366 |
--------------------------------------------------------------------------------
/hypr/rofi/global/icons/ddg.svg:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
616 |
--------------------------------------------------------------------------------