added hypr and waybar dots
This commit is contained in:
parent
98eb35725e
commit
a3f74e386d
34
hypr/.config/hypr/hypridle.conf
Normal file
34
hypr/.config/hypr/hypridle.conf
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
general {
|
||||||
|
lock_cmd = pidof hyprlock || hyprlock # avoid starting multiple hyprlock instances.
|
||||||
|
before_sleep_cmd = loginctl lock-session # lock before suspend.
|
||||||
|
after_sleep_cmd = hyprctl dispatch dpms on # to avoid having to press a key twice to turn on the display.
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 150 # 2.5min.
|
||||||
|
on-timeout = brightnessctl -s set 10 # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||||
|
on-resume = brightnessctl -r # monitor backlight restore.
|
||||||
|
}
|
||||||
|
|
||||||
|
# turn off keyboard backlight, comment out this section if you dont have a keyboard backlight.
|
||||||
|
listener {
|
||||||
|
timeout = 150 # 2.5min.
|
||||||
|
on-timeout = brightnessctl -sd rgb:kbd_backlight set 0 # turn off keyboard backlight.
|
||||||
|
on-resume = brightnessctl -rd rgb:kbd_backlight # turn on keyboard backlight.
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 300 # 5min
|
||||||
|
on-timeout = loginctl lock-session # lock screen when timeout has passed
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 330 # 5.5min
|
||||||
|
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
||||||
|
on-resume = hyprctl dispatch dpms on # screen on when activity is detected after timeout has fired.
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 1800 # 30min
|
||||||
|
on-timeout = systemctl suspend # suspend pc
|
||||||
|
}
|
337
hypr/.config/hypr/hyprland.conf
Normal file
337
hypr/.config/hypr/hyprland.conf
Normal file
|
@ -0,0 +1,337 @@
|
||||||
|
|
||||||
|
# #######################################################################################
|
||||||
|
# AUTOGENERATED HYPR CONFIG.
|
||||||
|
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hypr.conf AND EDIT IT,
|
||||||
|
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
|
||||||
|
# #######################################################################################
|
||||||
|
|
||||||
|
# autogenerated = 1 # remove this line to remove the warning
|
||||||
|
|
||||||
|
# This is an example Hyprland config file.
|
||||||
|
# Refer to the wiki for more information.
|
||||||
|
# https://wiki.hyprland.org/Configuring/Configuring-Hyprland/
|
||||||
|
|
||||||
|
# Please note not all available settings / options are set here.
|
||||||
|
# For a full list, see the wiki
|
||||||
|
|
||||||
|
# You can split this configuration into multiple files
|
||||||
|
# Create your files separately and then link them to this file like this:
|
||||||
|
# source = ~/.config/hypr/myColors.conf
|
||||||
|
|
||||||
|
|
||||||
|
################
|
||||||
|
### MONITORS ###
|
||||||
|
################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||||
|
monitor=,preferred,auto,1.25
|
||||||
|
|
||||||
|
|
||||||
|
###################
|
||||||
|
### MY PROGRAMS ###
|
||||||
|
###################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||||
|
|
||||||
|
# Set programs that you use
|
||||||
|
$terminal = kitty
|
||||||
|
$fileManager = dolphin
|
||||||
|
$menu = rofi -show run
|
||||||
|
|
||||||
|
|
||||||
|
#################
|
||||||
|
### AUTOSTART ###
|
||||||
|
#################
|
||||||
|
|
||||||
|
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||||
|
# Or execute your favorite apps at launch like this:
|
||||||
|
|
||||||
|
# exec-once = $terminal
|
||||||
|
# exec-once = nm-applet &
|
||||||
|
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
|
||||||
|
exec-once = $HOME/.config/hypr/scripts/polkit.sh
|
||||||
|
exec-once = nm-applet --indicator
|
||||||
|
exec-once = waybar & hyprpaper & dunst & swaync & hypridle
|
||||||
|
|
||||||
|
#############################
|
||||||
|
### ENVIRONMENT VARIABLES ###
|
||||||
|
#############################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||||
|
|
||||||
|
env = XCURSOR_SIZE,24
|
||||||
|
env = HYPRCURSOR_THEME,Bibata-Modern-Ice
|
||||||
|
env = HYPRCURSOR_SIZE,24
|
||||||
|
env = SDL_VIDEODRIVER,wayland
|
||||||
|
env = CLUTTER_BACKEND,wayland
|
||||||
|
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||||
|
|
||||||
|
|
||||||
|
#####################
|
||||||
|
### LOOK AND FEEL ###
|
||||||
|
#####################
|
||||||
|
|
||||||
|
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||||
|
general {
|
||||||
|
gaps_in = 5
|
||||||
|
gaps_out = 5
|
||||||
|
|
||||||
|
border_size = 2
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||||
|
col.active_border = rgb(81a1c1) rgb(a3be8c) 45deg
|
||||||
|
col.inactive_border = rgb(4c566a)
|
||||||
|
|
||||||
|
# Set to true enable resizing windows by clicking and dragging on borders and gaps
|
||||||
|
resize_on_border = false
|
||||||
|
|
||||||
|
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||||
|
allow_tearing = false
|
||||||
|
|
||||||
|
layout = dwindle
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||||
|
decoration {
|
||||||
|
rounding = 5
|
||||||
|
|
||||||
|
# Change transparency of focused and unfocused windows
|
||||||
|
active_opacity = 0.9
|
||||||
|
inactive_opacity = 0.8
|
||||||
|
|
||||||
|
drop_shadow = true
|
||||||
|
shadow_range = 4
|
||||||
|
shadow_render_power = 3
|
||||||
|
col.shadow = rgba(2e3440aa)
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||||
|
blur {
|
||||||
|
enabled = true
|
||||||
|
size = 3
|
||||||
|
passes = 1
|
||||||
|
|
||||||
|
vibrancy = 0.1696
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#animations
|
||||||
|
animations {
|
||||||
|
enabled = true
|
||||||
|
|
||||||
|
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||||
|
|
||||||
|
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||||
|
|
||||||
|
animation = windows, 1, 7, myBezier
|
||||||
|
animation = windowsOut, 1, 7, default, popin 80%
|
||||||
|
animation = border, 1, 10, default
|
||||||
|
animation = borderangle, 1, 8, default
|
||||||
|
animation = fade, 1, 7, default
|
||||||
|
animation = workspaces, 1, 6, default
|
||||||
|
}
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||||
|
dwindle {
|
||||||
|
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||||
|
preserve_split = true # You probably want this
|
||||||
|
}
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||||
|
master {
|
||||||
|
new_is_master = false
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#misc
|
||||||
|
misc {
|
||||||
|
force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||||
|
disable_hyprland_logo = true # If true disables the random hyprland logo / anime girl background. :(
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#############
|
||||||
|
### INPUT ###
|
||||||
|
#############
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||||
|
input {
|
||||||
|
kb_layout = gb
|
||||||
|
kb_variant =
|
||||||
|
kb_model =
|
||||||
|
kb_options =
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 0
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||||
|
gestures {
|
||||||
|
workspace_swipe = true
|
||||||
|
}
|
||||||
|
|
||||||
|
# Example per-device config
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||||
|
device {
|
||||||
|
name = epic-mouse-v1
|
||||||
|
sensitivity = -0.5
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
####################
|
||||||
|
### KEYBINDINGSS ###
|
||||||
|
####################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||||
|
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||||
|
$scriptsDir = $HOME/.config/hypr/scripts
|
||||||
|
|
||||||
|
bind = CTRL ALT, Delete, exec, hyprctl dispatch exit 0
|
||||||
|
bind = $mainMod, Q, killactive,
|
||||||
|
bind = $mainMod, F, fullscreen
|
||||||
|
bind = $mainMod SHIFT, Q, closewindow,
|
||||||
|
bind = $mainMod SHIFT, F, togglefloating,
|
||||||
|
bind = $mainMod ALT, F, exec, hyprctl dispatch workspaceopt allfloat
|
||||||
|
|
||||||
|
# Master Layout
|
||||||
|
bind = $mainMod CTRL, D, layoutmsg, removemaster
|
||||||
|
bind = $mainMod, I, layoutmsg, addmaster
|
||||||
|
bind = $mainMod, J, layoutmsg, cyclenext
|
||||||
|
bind = $mainMod, K, layoutmsg, cycleprev
|
||||||
|
bind = $mainMod, M, exec, hyprctl dispatch splitratio 0.3
|
||||||
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
|
bind = $mainMod CTRL, Return, layoutmsg, swapwithmaster
|
||||||
|
bind = $mainMod, Space, exec, $menu
|
||||||
|
bind = $mainMod, Return, exec, $terminal
|
||||||
|
|
||||||
|
# group
|
||||||
|
bind = $mainMod, G, togglegroup
|
||||||
|
bind = ALT, tab, changegroupactive #change focus to another window
|
||||||
|
|
||||||
|
# Special Keys / Hot Keys
|
||||||
|
bind = , xf86audioraisevolume, exec, $scriptsDir/Volume.sh --inc #volume up
|
||||||
|
bind = , xf86audiolowervolume, exec, $scriptsDir/Volume.sh --dec #volume down
|
||||||
|
bind = , xf86AudioMicMute, exec, $scriptsDir/Volume.sh --toggle-mic #mute mic
|
||||||
|
bind = , xf86audiomute, exec, $scriptsDir/Volume.sh --toggle
|
||||||
|
bind = , xf86Sleep, exec, systemctl suspend # sleep button
|
||||||
|
bind = , xf86Rfkill, exec, $scriptsDir/AirplaneMode.sh #Airplane mode
|
||||||
|
|
||||||
|
binde = , xf86MonBrightnessDown, exec, $scriptsDir/Brightness.sh --dec
|
||||||
|
binde = , xf86MonBrightnessUp, exec, $scriptsDir/Brightness.sh --inc
|
||||||
|
|
||||||
|
# media controls using keyboards
|
||||||
|
bind = , xf86AudioPlayPause, exec, $scriptsDir/MediaCtrl.sh --pause
|
||||||
|
bind = , xf86AudioPause, exec, $scriptsDir/MediaCtrl.sh --pause
|
||||||
|
bind = , xf86AudioPlay, exec, $scriptsDir/MediaCtrl.sh --pause
|
||||||
|
bind = , xf86AudioNext, exec, $scriptsDir/MediaCtrl.sh --nxt
|
||||||
|
bind = , xf86AudioPrev, exec, $scriptsDir/MediaCtrl.sh --prv
|
||||||
|
bind = , xf86audiostop, exec, $scriptsDir/MediaCtrl.sh --stop
|
||||||
|
|
||||||
|
# Screenshot keybindings NOTE: You may need to press Fn key as well
|
||||||
|
bind = $mainMod, Print, exec, $scriptsDir/ScreenShot.sh --now
|
||||||
|
bind = $mainMod SHIFT, Print, exec, $scriptsDir/ScreenShot.sh --area
|
||||||
|
bind = $mainMod CTRL, Print, exec, $scriptsDir/ScreenShot.sh --in5 #screenshot in 5 secs
|
||||||
|
bind = $mainMod CTRL SHIFT, Print, exec, $scriptsDir/ScreenShot.sh --in10 #screenshot in 10 secs
|
||||||
|
bind = ALT, Print, exec, $scriptsDir/ScreenShot.sh --active #take screenshot of active window
|
||||||
|
|
||||||
|
# screenshot with swappy (another screenshot tool)
|
||||||
|
bind = $mainMod SHIFT, S, exec, $scriptsDir/ScreenShot.sh --swappy
|
||||||
|
|
||||||
|
# Resize windows
|
||||||
|
binde = $mainMod SHIFT, left, resizeactive,-50 0
|
||||||
|
binde = $mainMod SHIFT, right, resizeactive,50 0
|
||||||
|
binde = $mainMod SHIFT, up, resizeactive,0 -50
|
||||||
|
binde = $mainMod SHIFT, down, resizeactive,0 50
|
||||||
|
|
||||||
|
# Move windows
|
||||||
|
bind = $mainMod CTRL, left, movewindow, l
|
||||||
|
bind = $mainMod CTRL, right, movewindow, r
|
||||||
|
bind = $mainMod CTRL, up, movewindow, u
|
||||||
|
bind = $mainMod CTRL, down, movewindow, d
|
||||||
|
|
||||||
|
# Move focus with mainMod + arrow keys
|
||||||
|
bind = $mainMod, left, movefocus, l
|
||||||
|
bind = $mainMod, right, movefocus, r
|
||||||
|
bind = $mainMod, up, movefocus, u
|
||||||
|
bind = $mainMod, down, movefocus, d
|
||||||
|
|
||||||
|
# Workspaces related
|
||||||
|
bind = $mainMod, tab, workspace, m+1
|
||||||
|
bind = $mainMod SHIFT, tab, workspace, m-1
|
||||||
|
|
||||||
|
# Special workspace
|
||||||
|
bind = $mainMod SHIFT, U, movetoworkspace, special
|
||||||
|
bind = $mainMod, U, togglespecialworkspace,
|
||||||
|
|
||||||
|
# The following mappings use the key codes to better support various keyboard layouts
|
||||||
|
# 1 is code:10, 2 is code 11, etc
|
||||||
|
# Switch workspaces with mainMod + [0-9]
|
||||||
|
bind = $mainMod, code:10, workspace, 1
|
||||||
|
bind = $mainMod, code:11, workspace, 2
|
||||||
|
bind = $mainMod, code:12, workspace, 3
|
||||||
|
bind = $mainMod, code:13, workspace, 4
|
||||||
|
bind = $mainMod, code:14, workspace, 5
|
||||||
|
bind = $mainMod, code:15, workspace, 6
|
||||||
|
bind = $mainMod, code:16, workspace, 7
|
||||||
|
bind = $mainMod, code:17, workspace, 8
|
||||||
|
bind = $mainMod, code:18, workspace, 9
|
||||||
|
bind = $mainMod, code:19, workspace, 10
|
||||||
|
|
||||||
|
# Move active window and follow to workspace mainMod + SHIFT [0-9]
|
||||||
|
bind = $mainMod SHIFT, code:10, movetoworkspace, 1
|
||||||
|
bind = $mainMod SHIFT, code:11, movetoworkspace, 2
|
||||||
|
bind = $mainMod SHIFT, code:12, movetoworkspace, 3
|
||||||
|
bind = $mainMod SHIFT, code:13, movetoworkspace, 4
|
||||||
|
bind = $mainMod SHIFT, code:14, movetoworkspace, 5
|
||||||
|
bind = $mainMod SHIFT, code:15, movetoworkspace, 6
|
||||||
|
bind = $mainMod SHIFT, code:16, movetoworkspace, 7
|
||||||
|
bind = $mainMod SHIFT, code:17, movetoworkspace, 8
|
||||||
|
bind = $mainMod SHIFT, code:18, movetoworkspace, 9
|
||||||
|
bind = $mainMod SHIFT, code:19, movetoworkspace, 10
|
||||||
|
bind = $mainMod SHIFT, bracketleft, movetoworkspace, -1 # brackets [ or ]
|
||||||
|
bind = $mainMod SHIFT, bracketright, movetoworkspace, +1
|
||||||
|
|
||||||
|
# Move active window to a workspace silently mainMod + CTRL [0-9]
|
||||||
|
bind = $mainMod CTRL, code:10, movetoworkspacesilent, 1
|
||||||
|
bind = $mainMod CTRL, code:11, movetoworkspacesilent, 2
|
||||||
|
bind = $mainMod CTRL, code:12, movetoworkspacesilent, 3
|
||||||
|
bind = $mainMod CTRL, code:13, movetoworkspacesilent, 4
|
||||||
|
bind = $mainMod CTRL, code:14, movetoworkspacesilent, 5
|
||||||
|
bind = $mainMod CTRL, code:15, movetoworkspacesilent, 6
|
||||||
|
bind = $mainMod CTRL, code:16, movetoworkspacesilent, 7
|
||||||
|
bind = $mainMod CTRL, code:17, movetoworkspacesilent, 8
|
||||||
|
bind = $mainMod CTRL, code:18, movetoworkspacesilent, 9
|
||||||
|
bind = $mainMod CTRL, code:19, movetoworkspacesilent, 10
|
||||||
|
bind = $mainMod CTRL, bracketleft, movetoworkspacesilent, -1 # brackets [ or ]
|
||||||
|
bind = $mainMod CTRL, bracketright, movetoworkspacesilent, +1
|
||||||
|
|
||||||
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
|
bind = $mainMod, mouse_down, workspace, e+1
|
||||||
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
bind = $mainMod, period, workspace, e+1
|
||||||
|
bind = $mainMod, comma, workspace, e-1
|
||||||
|
|
||||||
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
##############################
|
||||||
|
### WINDOWS AND WORKSPACES ###
|
||||||
|
##############################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||||
|
|
||||||
|
# Example windowrule v1
|
||||||
|
# windowrule = float, ^(kitty)$
|
||||||
|
|
||||||
|
# Example windowrule v2
|
||||||
|
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||||
|
|
||||||
|
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
28
hypr/.config/hypr/hyprlock.conf
Normal file
28
hypr/.config/hypr/hyprlock.conf
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
background {
|
||||||
|
monitor =
|
||||||
|
path = /home/lucxjo/Pictures/Wallpapers/nord-arch.png # supports png, jpg, webp (no animations, though)
|
||||||
|
color = rgba(25, 20, 20, 1.0)
|
||||||
|
|
||||||
|
# all these options are taken from hyprland, see https://wiki.hyprland.org/Configuring/Variables/#blur for explanations
|
||||||
|
blur_passes = 0 # 0 disables blurring
|
||||||
|
blur_size = 7
|
||||||
|
noise = 0.0117
|
||||||
|
contrast = 0.8916
|
||||||
|
brightness = 0.8172
|
||||||
|
vibrancy = 0.1696
|
||||||
|
vibrancy_darkness = 0.0
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = Hi there, $USER
|
||||||
|
text_align = center # center/right or any value for default left. multi-line text alignment inside label container
|
||||||
|
color = rgba(200, 200, 200, 1.0)
|
||||||
|
font_size = 25
|
||||||
|
font_family = Noto Sans
|
||||||
|
rotate = 0 # degrees, counter-clockwise
|
||||||
|
|
||||||
|
position = 0, 80
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
3
hypr/.config/hypr/hyprpaper.conf
Normal file
3
hypr/.config/hypr/hyprpaper.conf
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
|
||||||
|
preload = $HOME/Pictures/Wallpapers/nord-arch.png
|
||||||
|
wallpaper = , $HOME/Pictures/Wallpapers/nord-arch.png
|
16
hypr/.config/hypr/scripts/AirplaneMode.sh
Executable file
16
hypr/.config/hypr/scripts/AirplaneMode.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Airplane Mode. Turning on or off all wifi using rfkill.
|
||||||
|
|
||||||
|
notif="$HOME/.config/swaync/images/bell.png"
|
||||||
|
|
||||||
|
# Check if any wireless device is blocked
|
||||||
|
wifi_blocked=$(rfkill list wifi | grep -o "Soft blocked: yes")
|
||||||
|
|
||||||
|
if [ -n "$wifi_blocked" ]; then
|
||||||
|
rfkill unblock wifi
|
||||||
|
notify-send -u low -i "$notif" 'Airplane mode: OFF'
|
||||||
|
else
|
||||||
|
rfkill block wifi
|
||||||
|
notify-send -u low -i "$notif" 'Airplane mode: ON'
|
||||||
|
fi
|
53
hypr/.config/hypr/scripts/Brightness.sh
Executable file
53
hypr/.config/hypr/scripts/Brightness.sh
Executable file
|
@ -0,0 +1,53 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Script for Monitor backlights (if supported) using brightnessctl
|
||||||
|
|
||||||
|
iDIR="$HOME/.config/swaync/icons"
|
||||||
|
notification_timeout=1000
|
||||||
|
|
||||||
|
# Get brightness
|
||||||
|
get_backlight() {
|
||||||
|
echo $(brightnessctl -m | cut -d, -f4)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get icons
|
||||||
|
get_icon() {
|
||||||
|
current=$(get_backlight | sed 's/%//')
|
||||||
|
if [ "$current" -le "20" ]; then
|
||||||
|
icon="$iDIR/brightness-20.png"
|
||||||
|
elif [ "$current" -le "40" ]; then
|
||||||
|
icon="$iDIR/brightness-40.png"
|
||||||
|
elif [ "$current" -le "60" ]; then
|
||||||
|
icon="$iDIR/brightness-60.png"
|
||||||
|
elif [ "$current" -le "80" ]; then
|
||||||
|
icon="$iDIR/brightness-80.png"
|
||||||
|
else
|
||||||
|
icon="$iDIR/brightness-100.png"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Notify
|
||||||
|
notify_user() {
|
||||||
|
notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Brightness : $current%"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Change brightness
|
||||||
|
change_backlight() {
|
||||||
|
brightnessctl set "$1" && get_icon && notify_user
|
||||||
|
}
|
||||||
|
|
||||||
|
# Execute accordingly
|
||||||
|
case "$1" in
|
||||||
|
"--get")
|
||||||
|
get_backlight
|
||||||
|
;;
|
||||||
|
"--inc")
|
||||||
|
change_backlight "+10%"
|
||||||
|
;;
|
||||||
|
"--dec")
|
||||||
|
change_backlight "10%-"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
get_backlight
|
||||||
|
;;
|
||||||
|
esac
|
51
hypr/.config/hypr/scripts/BrightnessKbd.sh
Executable file
51
hypr/.config/hypr/scripts/BrightnessKbd.sh
Executable file
|
@ -0,0 +1,51 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Script for keyboard backlights (if supported) using brightnessctl
|
||||||
|
|
||||||
|
iDIR="$HOME/.config/swaync/icons"
|
||||||
|
|
||||||
|
# Get keyboard brightness
|
||||||
|
get_kbd_backlight() {
|
||||||
|
echo $(brightnessctl -d '*::kbd_backlight' -m | cut -d, -f4)
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get icons
|
||||||
|
get_icon() {
|
||||||
|
current=$(get_kbd_backlight | sed 's/%//')
|
||||||
|
if [ "$current" -le "20" ]; then
|
||||||
|
icon="$iDIR/brightness-20.png"
|
||||||
|
elif [ "$current" -le "40" ]; then
|
||||||
|
icon="$iDIR/brightness-40.png"
|
||||||
|
elif [ "$current" -le "60" ]; then
|
||||||
|
icon="$iDIR/brightness-60.png"
|
||||||
|
elif [ "$current" -le "80" ]; then
|
||||||
|
icon="$iDIR/brightness-80.png"
|
||||||
|
else
|
||||||
|
icon="$iDIR/brightness-100.png"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Notify
|
||||||
|
notify_user() {
|
||||||
|
notify-send -e -h string:x-canonical-private-synchronous:brightness_notif -h int:value:$current -u low -i "$icon" "Keyboard Brightness : $current%"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Change brightness
|
||||||
|
change_kbd_backlight() {
|
||||||
|
brightnessctl -d *::kbd_backlight set "$1" && get_icon && notify_user
|
||||||
|
}
|
||||||
|
|
||||||
|
# Execute accordingly
|
||||||
|
case "$1" in
|
||||||
|
"--get")
|
||||||
|
get_kbd_backlight
|
||||||
|
;;
|
||||||
|
"--inc")
|
||||||
|
change_kbd_backlight "+30%"
|
||||||
|
;;
|
||||||
|
"--dec")
|
||||||
|
change_kbd_backlight "30%-"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
get_kbd_backlight
|
||||||
|
;;
|
||||||
|
esac
|
17
hypr/.config/hypr/scripts/ChangeBlur.sh
Executable file
17
hypr/.config/hypr/scripts/ChangeBlur.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Script for changing blurs on the fly
|
||||||
|
|
||||||
|
notif="$HOME/.config/swaync/images/bell.png"
|
||||||
|
|
||||||
|
STATE=$(hyprctl -j getoption decoration:blur:passes | jq ".int")
|
||||||
|
|
||||||
|
if [ "${STATE}" == "2" ]; then
|
||||||
|
hyprctl keyword decoration:blur:size 2
|
||||||
|
hyprctl keyword decoration:blur:passes 1
|
||||||
|
notify-send -e -u low -i "$notif" "Less blur"
|
||||||
|
else
|
||||||
|
hyprctl keyword decoration:blur:size 5
|
||||||
|
hyprctl keyword decoration:blur:passes 2
|
||||||
|
notify-send -e -u low -i "$notif" "Normal blur"
|
||||||
|
fi
|
30
hypr/.config/hypr/scripts/ChangeLayout.sh
Executable file
30
hypr/.config/hypr/scripts/ChangeLayout.sh
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# for changing Hyprland Layouts (Master or Dwindle) on the fly
|
||||||
|
|
||||||
|
notif="$HOME/.config/swaync/images/bell.png"
|
||||||
|
|
||||||
|
LAYOUT=$(hyprctl -j getoption general:layout | jq '.str' | sed 's/"//g')
|
||||||
|
|
||||||
|
case $LAYOUT in
|
||||||
|
"master")
|
||||||
|
hyprctl keyword general:layout dwindle
|
||||||
|
hyprctl keyword unbind SUPER,J
|
||||||
|
hyprctl keyword unbind SUPER,K
|
||||||
|
hyprctl keyword bind SUPER,J,cyclenext
|
||||||
|
hyprctl keyword bind SUPER,K,cyclenext,prev
|
||||||
|
hyprctl keyword bind SUPER,O,togglesplit
|
||||||
|
notify-send -e -u low -i "$notif" "Dwindle Layout"
|
||||||
|
;;
|
||||||
|
"dwindle")
|
||||||
|
hyprctl keyword general:layout master
|
||||||
|
hyprctl keyword unbind SUPER,J
|
||||||
|
hyprctl keyword unbind SUPER,K
|
||||||
|
hyprctl keyword unbind SUPER,O
|
||||||
|
hyprctl keyword bind SUPER,J,layoutmsg,cyclenext
|
||||||
|
hyprctl keyword bind SUPER,K,layoutmsg,cycleprev
|
||||||
|
notify-send -e -u low -i "$notif" "Master Layout"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
|
||||||
|
esac
|
40
hypr/.config/hypr/scripts/ClipManager.sh
Executable file
40
hypr/.config/hypr/scripts/ClipManager.sh
Executable file
|
@ -0,0 +1,40 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Clipboard Manager. This script uses cliphist, rofi, and wl-copy.
|
||||||
|
|
||||||
|
# Actions:
|
||||||
|
# CTRL Del to delete an entry
|
||||||
|
# ALT Del to wipe clipboard contents
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
result=$(
|
||||||
|
rofi -i -dmenu \
|
||||||
|
-kb-custom-1 "Control-Delete" \
|
||||||
|
-kb-custom-2 "Alt-Delete" \
|
||||||
|
-config ~/.config/rofi/config-clipboard.rasi < <(cliphist list)
|
||||||
|
)
|
||||||
|
|
||||||
|
case "$?" in
|
||||||
|
1)
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
0)
|
||||||
|
case "$result" in
|
||||||
|
"")
|
||||||
|
continue
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
cliphist decode <<<"$result" | wl-copy
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
10)
|
||||||
|
cliphist delete <<<"$result"
|
||||||
|
;;
|
||||||
|
11)
|
||||||
|
cliphist wipe
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
226
hypr/.config/hypr/scripts/DarkLight.sh
Executable file
226
hypr/.config/hypr/scripts/DarkLight.sh
Executable file
|
@ -0,0 +1,226 @@
|
||||||
|
#!/bin/bash
|
||||||
|
## /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# For Dark and Light switching
|
||||||
|
# Note: Scripts are looking for keywords Light or Dark except for wallpapers as the are in a separate folders
|
||||||
|
|
||||||
|
# Paths
|
||||||
|
wallpaper_base_path="$HOME/Pictures/wallpapers/Dynamic-Wallpapers"
|
||||||
|
dark_wallpapers="$wallpaper_base_path/Dark"
|
||||||
|
light_wallpapers="$wallpaper_base_path/Light"
|
||||||
|
hypr_config_path="$HOME/.config/hypr"
|
||||||
|
swaync_style="$HOME/.config/swaync/style.css"
|
||||||
|
ags_style="$HOME/.config/ags/user/style.css"
|
||||||
|
SCRIPTSDIR="$HOME/.config/hypr/scripts"
|
||||||
|
notif="$HOME/.config/swaync/images/bell.png"
|
||||||
|
wallust_rofi="$HOME/.config/wallust/templates/colors-rofi.rasi"
|
||||||
|
|
||||||
|
wallust_config="$HOME/.config/wallust/wallust.toml"
|
||||||
|
pallete_dark="dark16"
|
||||||
|
pallete_light="light16"
|
||||||
|
|
||||||
|
# kill swaybg if running
|
||||||
|
pkill swaybg
|
||||||
|
|
||||||
|
# Initialize swww if needed
|
||||||
|
swww query || swww-daemon
|
||||||
|
|
||||||
|
# Set swww options
|
||||||
|
swww="swww img"
|
||||||
|
effect="--transition-bezier .43,1.19,1,.4 --transition-fps 60 --transition-type grow --transition-pos 0.925,0.977 --transition-duration 2"
|
||||||
|
|
||||||
|
# Determine current theme mode
|
||||||
|
if [ "$(cat $HOME/.cache/.theme_mode)" = "Light" ]; then
|
||||||
|
next_mode="Dark"
|
||||||
|
# Logic for Dark mode
|
||||||
|
wallpaper_path="$dark_wallpapers"
|
||||||
|
else
|
||||||
|
next_mode="Light"
|
||||||
|
# Logic for Light mode
|
||||||
|
wallpaper_path="$light_wallpapers"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Function to update theme mode for the next cycle
|
||||||
|
update_theme_mode() {
|
||||||
|
echo "$next_mode" > ~/.cache/.theme_mode
|
||||||
|
}
|
||||||
|
|
||||||
|
# Function to notify user
|
||||||
|
notify_user() {
|
||||||
|
notify-send -u low -i "$notif" "Switching to $1 mode"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Use sed to replace the palette setting in the wallust config file
|
||||||
|
if [ "$next_mode" = "Dark" ]; then
|
||||||
|
sed -i 's/^palette = .*/palette = "'"$pallete_dark"'"/' "$wallust_config"
|
||||||
|
else
|
||||||
|
sed -i 's/^palette = .*/palette = "'"$pallete_light"'"/' "$wallust_config"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Function to set Waybar style
|
||||||
|
set_waybar_style() {
|
||||||
|
theme="$1"
|
||||||
|
waybar_styles="$HOME/.config/waybar/style"
|
||||||
|
waybar_style_link="$HOME/.config/waybar/style.css"
|
||||||
|
style_prefix="\\[${theme}\\].*\\.css$"
|
||||||
|
|
||||||
|
style_file=$(find "$waybar_styles" -maxdepth 1 -type f -regex ".*$style_prefix" | shuf -n 1)
|
||||||
|
|
||||||
|
if [ -n "$style_file" ]; then
|
||||||
|
ln -sf "$style_file" "$waybar_style_link"
|
||||||
|
else
|
||||||
|
echo "Style file not found for $theme theme."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the function after determining the mode
|
||||||
|
set_waybar_style "$next_mode"
|
||||||
|
notify_user "$next_mode"
|
||||||
|
|
||||||
|
|
||||||
|
# swaync color change
|
||||||
|
if [ "$next_mode" = "Dark" ]; then
|
||||||
|
sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.8);/' "${swaync_style}"
|
||||||
|
sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${swaync_style}"
|
||||||
|
else
|
||||||
|
sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.9);/' "${swaync_style}"
|
||||||
|
sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${swaync_style}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ags color change
|
||||||
|
if [ "$next_mode" = "Dark" ]; then
|
||||||
|
sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.4);/' "${ags_style}"
|
||||||
|
sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.7);/' "${ags_style}"
|
||||||
|
sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${ags_style}"
|
||||||
|
else
|
||||||
|
sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.4);/' "${ags_style}"
|
||||||
|
sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.7);/' "${ags_style}"
|
||||||
|
sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${ags_style}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set Dynamic Wallpaper for Dark or Light Mode
|
||||||
|
if [ "$next_mode" = "Dark" ]; then
|
||||||
|
next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)"
|
||||||
|
else
|
||||||
|
next_wallpaper="$(find "${light_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update wallpaper using swww command
|
||||||
|
$swww "${next_wallpaper}" $effect
|
||||||
|
|
||||||
|
|
||||||
|
# Set Kvantum Manager theme & QT5/QT6 settings
|
||||||
|
if [ "$next_mode" = "Dark" ]; then
|
||||||
|
kvantum_theme="Catppuccin-Mocha"
|
||||||
|
qt5ct_color_scheme="$HOME/.config/qt5ct/colors/Catppuccin-Mocha.conf"
|
||||||
|
qt6ct_color_scheme="$HOME/.config/qt6ct/colors/Catppuccin-Mocha.conf"
|
||||||
|
else
|
||||||
|
kvantum_theme="Catppuccin-Latte"
|
||||||
|
qt5ct_color_scheme="$HOME/.config/qt5ct/colors/Catppuccin-Latte.conf"
|
||||||
|
qt6ct_color_scheme="$HOME/.config/qt6ct/colors/Catppuccin-Latte.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed -i "s|^color_scheme_path=.*$|color_scheme_path=$qt5ct_color_scheme|" "$HOME/.config/qt5ct/qt5ct.conf"
|
||||||
|
sed -i "s|^color_scheme_path=.*$|color_scheme_path=$qt6ct_color_scheme|" "$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
|
kvantummanager --set "$kvantum_theme"
|
||||||
|
|
||||||
|
|
||||||
|
# set the rofi color for background
|
||||||
|
if [ "$next_mode" = "Dark" ]; then
|
||||||
|
sed -i '24s/.*/background: rgba(0,0,0,0.7);/' $wallust_rofi
|
||||||
|
else
|
||||||
|
sed -i '24s/.*/background: rgba(255,255,255,0.9);/' $wallust_rofi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# GTK themes and icons switching
|
||||||
|
set_custom_gtk_theme() {
|
||||||
|
mode=$1
|
||||||
|
gtk_themes_directory="$HOME/.themes"
|
||||||
|
icon_directory="$HOME/.icons"
|
||||||
|
color_setting="org.gnome.desktop.interface color-scheme"
|
||||||
|
theme_setting="org.gnome.desktop.interface gtk-theme"
|
||||||
|
icon_setting="org.gnome.desktop.interface icon-theme"
|
||||||
|
|
||||||
|
if [ "$mode" == "Light" ]; then
|
||||||
|
search_keywords="*Light*"
|
||||||
|
gsettings set $color_setting 'prefer-light'
|
||||||
|
elif [ "$mode" == "Dark" ]; then
|
||||||
|
search_keywords="*Dark*"
|
||||||
|
gsettings set $color_setting 'prefer-dark'
|
||||||
|
else
|
||||||
|
echo "Invalid mode provided."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
themes=()
|
||||||
|
icons=()
|
||||||
|
|
||||||
|
while IFS= read -r -d '' theme_search; do
|
||||||
|
themes+=("$(basename "$theme_search")")
|
||||||
|
done < <(find "$gtk_themes_directory" -maxdepth 1 -type d -iname "$search_keywords" -print0)
|
||||||
|
|
||||||
|
while IFS= read -r -d '' icon_search; do
|
||||||
|
icons+=("$(basename "$icon_search")")
|
||||||
|
done < <(find "$icon_directory" -maxdepth 1 -type d -iname "$search_keywords" -print0)
|
||||||
|
|
||||||
|
if [ ${#themes[@]} -gt 0 ]; then
|
||||||
|
if [ "$mode" == "Dark" ]; then
|
||||||
|
selected_theme=${themes[RANDOM % ${#themes[@]}]}
|
||||||
|
else
|
||||||
|
selected_theme=${themes[$RANDOM % ${#themes[@]}]}
|
||||||
|
fi
|
||||||
|
echo "Selected GTK theme for $mode mode: $selected_theme"
|
||||||
|
gsettings set $theme_setting "$selected_theme"
|
||||||
|
|
||||||
|
# Flatpak GTK apps (themes)
|
||||||
|
if command -v flatpak &> /dev/null; then
|
||||||
|
flatpak --user override --filesystem=$HOME/.themes
|
||||||
|
sleep 0.5
|
||||||
|
flatpak --user override --env=GTK_THEME="$selected_theme"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No $mode GTK theme found"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ${#icons[@]} -gt 0 ]; then
|
||||||
|
if [ "$mode" == "Dark" ]; then
|
||||||
|
selected_icon=${icons[RANDOM % ${#icons[@]}]}
|
||||||
|
else
|
||||||
|
selected_icon=${icons[$RANDOM % ${#icons[@]}]}
|
||||||
|
fi
|
||||||
|
echo "Selected icon theme for $mode mode: $selected_icon"
|
||||||
|
gsettings set $icon_setting "$selected_icon"
|
||||||
|
|
||||||
|
## QT5ct icon_theme
|
||||||
|
sed -i "s|^icon_theme=.*$|icon_theme=$selected_icon|" "$HOME/.config/qt5ct/qt5ct.conf"
|
||||||
|
sed -i "s|^icon_theme=.*$|icon_theme=$selected_icon|" "$HOME/.config/qt6ct/qt6ct.conf"
|
||||||
|
|
||||||
|
# Flatpak GTK apps (icons)
|
||||||
|
if command -v flatpak &> /dev/null; then
|
||||||
|
flatpak --user override --filesystem=$HOME/.icons
|
||||||
|
sleep 0.5
|
||||||
|
flatpak --user override --env=ICON_THEME="$selected_icon"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "No $mode icon theme found"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Call the function to set GTK theme and icon theme based on mode
|
||||||
|
set_custom_gtk_theme "$next_mode"
|
||||||
|
|
||||||
|
# Update theme mode for the next cycle
|
||||||
|
update_theme_mode
|
||||||
|
|
||||||
|
sleep 0.5
|
||||||
|
# Run remaining scripts
|
||||||
|
${SCRIPTSDIR}/WallustSwww.sh
|
||||||
|
sleep 1
|
||||||
|
${SCRIPTSDIR}/Refresh.sh
|
||||||
|
|
||||||
|
sleep 0.3
|
||||||
|
# Display notifications for theme and icon changes
|
||||||
|
notify-send -u normal -i "$notif" "Themes in $next_mode Mode"
|
||||||
|
|
||||||
|
exit 0
|
||||||
|
|
31
hypr/.config/hypr/scripts/GameMode.sh
Executable file
31
hypr/.config/hypr/scripts/GameMode.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Game Mode. Turning off all animations
|
||||||
|
|
||||||
|
notif="$HOME/.config/swaync/images/bell.png"
|
||||||
|
SCRIPTSDIR="$HOME/.config/hypr/scripts"
|
||||||
|
|
||||||
|
|
||||||
|
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
|
||||||
|
if [ "$HYPRGAMEMODE" = 1 ] ; then
|
||||||
|
hyprctl --batch "\
|
||||||
|
keyword animations:enabled 0;\
|
||||||
|
keyword decoration:drop_shadow 0;\
|
||||||
|
keyword decoration:blur:passes 0;\
|
||||||
|
keyword general:gaps_in 0;\
|
||||||
|
keyword general:gaps_out 0;\
|
||||||
|
keyword general:border_size 1;\
|
||||||
|
keyword decoration:rounding 0"
|
||||||
|
swww kill
|
||||||
|
notify-send -e -u low -i "$notif" "gamemode enabled. All animations off"
|
||||||
|
exit
|
||||||
|
else
|
||||||
|
swww-daemon && swww img "$HOME/.config/rofi/.current_wallpaper" &
|
||||||
|
sleep 0.1
|
||||||
|
${SCRIPTSDIR}/WallustSwww.sh
|
||||||
|
sleep 0.5
|
||||||
|
${SCRIPTSDIR}/Refresh.sh
|
||||||
|
notify-send -e -u normal -i "$notif" "gamemode disabled. All animations normal"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
hyprctl reload
|
78
hypr/.config/hypr/scripts/KeyHints.sh
Executable file
78
hypr/.config/hypr/scripts/KeyHints.sh
Executable file
|
@ -0,0 +1,78 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Keyhints. Idea got from Garuda Hyprland
|
||||||
|
|
||||||
|
# Detect monitor resolution and scale
|
||||||
|
x_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .width')
|
||||||
|
y_mon=$(hyprctl -j monitors | jq '.[] | select(.focused==true) | .height')
|
||||||
|
hypr_scale=$(hyprctl -j monitors | jq '.[] | select (.focused == true) | .scale' | sed 's/\.//')
|
||||||
|
|
||||||
|
# Calculate width and height based on percentages and monitor resolution
|
||||||
|
width=$((x_mon * hypr_scale / 100))
|
||||||
|
height=$((y_mon * hypr_scale / 100))
|
||||||
|
|
||||||
|
# Set maximum width and height
|
||||||
|
max_width=1200
|
||||||
|
max_height=1000
|
||||||
|
|
||||||
|
# Set percentage of screen size for dynamic adjustment
|
||||||
|
percentage_width=70
|
||||||
|
percentage_height=70
|
||||||
|
|
||||||
|
# Calculate dynamic width and height
|
||||||
|
dynamic_width=$((width * percentage_width / 100))
|
||||||
|
dynamic_height=$((height * percentage_height / 100))
|
||||||
|
|
||||||
|
# Limit width and height to maximum values
|
||||||
|
dynamic_width=$(($dynamic_width > $max_width ? $max_width : $dynamic_width))
|
||||||
|
dynamic_height=$(($dynamic_height > $max_height ? $max_height : $dynamic_height))
|
||||||
|
|
||||||
|
# Launch yad with calculated width and height
|
||||||
|
yad --width=$dynamic_width --height=$dynamic_height \
|
||||||
|
--center \
|
||||||
|
--title="Keybindings" \
|
||||||
|
--no-buttons \
|
||||||
|
--list \
|
||||||
|
--column=Key: \
|
||||||
|
--column=Description: \
|
||||||
|
--column=Command: \
|
||||||
|
--timeout-indicator=bottom \
|
||||||
|
"ESC" "close this app" "" "=" "SUPER KEY (Windows Key)" "(SUPER KEY)" \
|
||||||
|
" enter" "Terminal" "(kitty)" \
|
||||||
|
" SHIFT enter" "DropDown Terminal" "(kitty-pyprland)" \
|
||||||
|
" A" "Desktop Overview" "(AGS Overview)" \
|
||||||
|
" D" "App Launcher" "(rofi-wayland)" \
|
||||||
|
" T" "Open File Manager" "(Thunar)" \
|
||||||
|
" S" "Google Search" "(rofi)" \
|
||||||
|
" Q" "close active window" "(not kill)" \
|
||||||
|
" Shift Q " "closes a specified window" "(window)" \
|
||||||
|
" Z" "Desktop Zoom" "(pyprland)" \
|
||||||
|
" Alt V" "Clipboard Manager" "(cliphist)" \
|
||||||
|
" W" "Choose wallpaper" "(Wallpaper Menu)" \
|
||||||
|
"CTRL ALT W" "Random wallpaper" "(via swww)" \
|
||||||
|
" B" "Hide/UnHide Waybar" "waybar" \
|
||||||
|
" CTRL B" "Choose waybar styles" "(waybar styles)" \
|
||||||
|
" ALT B" "Choose waybar layout" "(waybar layout)" \
|
||||||
|
" ALT R" "Reload Waybar swaync Rofi" "CHECK NOTIFICATION FIRST!!!" \
|
||||||
|
" SHIFT N" "Launch Notification Panel" "swaync Notification Center" \
|
||||||
|
" Print" "screenshot" "(grim)" \
|
||||||
|
" Shift Print" "screenshot region" "(grim + slurp)" \
|
||||||
|
" Shift S" "screenshot region" "(swappy)" \
|
||||||
|
" CTRL Print" "screenshot timer 5 secs " "(grim)" \
|
||||||
|
" CTRL SHIFT Print" "screenshot timer 10 secs " "(grim)" \
|
||||||
|
"ALT Print" "Screenshot active window" "active window only" \
|
||||||
|
"CTRL ALT P" "power-menu" "(wlogout)" \
|
||||||
|
"CTRL ALT L" "screen lock" "(hyprlock)" \
|
||||||
|
"CTRL ALT Del" "Hyprland Exit" "(SAVE YOUR WORK!!!)" \
|
||||||
|
" F" "Fullscreen" "Toggles to full screen" \
|
||||||
|
" ALT L" "Toggle Dwindle | Master Layout" "Hyprland Layout" \
|
||||||
|
" Shift F" "Toggle float" "single window" \
|
||||||
|
" ALT F" "Toggle all windows to float" "all windows" \
|
||||||
|
" Shift B" "Toggle Blur" "normal or less blur" \
|
||||||
|
" SHIFT G" "Gamemode! All animations OFF or ON" "toggle" \
|
||||||
|
" ALT E" "Rofi Emoticons" "Emoticon" \
|
||||||
|
" ALT V" "Clipboard Manager" "cliphist" \
|
||||||
|
" H" "Launch this app" "" \
|
||||||
|
" E" "View or EDIT Keybinds, Settings, Monitor" "" \
|
||||||
|
"" "" "" \
|
||||||
|
"More tips:" "https://github.com/JaKooLit/Hyprland-Dots/wiki" ""\
|
5
hypr/.config/hypr/scripts/LockScreen.sh
Executable file
5
hypr/.config/hypr/scripts/LockScreen.sh
Executable file
|
@ -0,0 +1,5 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
|
||||||
|
# For Hyprlock
|
||||||
|
hyprlock -q --immediate
|
61
hypr/.config/hypr/scripts/MediaCtrl.sh
Executable file
61
hypr/.config/hypr/scripts/MediaCtrl.sh
Executable file
|
@ -0,0 +1,61 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Playerctl
|
||||||
|
|
||||||
|
music_icon="$HOME/.config/swaync/icons/music.png"
|
||||||
|
|
||||||
|
# Play the next track
|
||||||
|
play_next() {
|
||||||
|
playerctl next
|
||||||
|
show_music_notification
|
||||||
|
}
|
||||||
|
|
||||||
|
# Play the previous track
|
||||||
|
play_previous() {
|
||||||
|
playerctl previous
|
||||||
|
show_music_notification
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggle play/pause
|
||||||
|
toggle_play_pause() {
|
||||||
|
playerctl play-pause
|
||||||
|
show_music_notification
|
||||||
|
}
|
||||||
|
|
||||||
|
# Stop playback
|
||||||
|
stop_playback() {
|
||||||
|
playerctl stop
|
||||||
|
notify-send -e -u low -i "$music_icon" "Playback Stopped"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Display notification with song information
|
||||||
|
show_music_notification() {
|
||||||
|
status=$(playerctl status)
|
||||||
|
if [[ "$status" == "Playing" ]]; then
|
||||||
|
song_title=$(playerctl metadata title)
|
||||||
|
song_artist=$(playerctl metadata artist)
|
||||||
|
notify-send -e -u low -i "$music_icon" "Now Playing:" "$song_title\nby $song_artist"
|
||||||
|
elif [[ "$status" == "Paused" ]]; then
|
||||||
|
notify-send -e -u low -i "$music_icon" "Playback Paused"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get media control action from command line argument
|
||||||
|
case "$1" in
|
||||||
|
"--nxt")
|
||||||
|
play_next
|
||||||
|
;;
|
||||||
|
"--prv")
|
||||||
|
play_previous
|
||||||
|
;;
|
||||||
|
"--pause")
|
||||||
|
toggle_play_pause
|
||||||
|
;;
|
||||||
|
"--stop")
|
||||||
|
stop_playback
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 [--nxt|--prv|--pause|--stop]"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
21
hypr/.config/hypr/scripts/Polkit-NixOS.sh
Executable file
21
hypr/.config/hypr/scripts/Polkit-NixOS.sh
Executable file
|
@ -0,0 +1,21 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# For NixOS starting of polkit-gnome. Dec 2023, the settings stated in NixOS wiki does not work so have to manual start it
|
||||||
|
|
||||||
|
# Find all polkit-gnome executables in the Nix store
|
||||||
|
polkit_gnome_paths=$(find /nix/store -name 'polkit-gnome-authentication-agent-1' -type f 2>/dev/null)
|
||||||
|
|
||||||
|
for polkit_gnome_path in $polkit_gnome_paths; do
|
||||||
|
# Extract the directory containing the executable
|
||||||
|
polkit_gnome_dir=$(dirname "$polkit_gnome_path")
|
||||||
|
|
||||||
|
# Check if the executable is valid and exists
|
||||||
|
if [ -x "$polkit_gnome_dir/polkit-gnome-authentication-agent-1" ]; then
|
||||||
|
# Start the Polkit-GNOME Authentication Agent
|
||||||
|
"$polkit_gnome_dir/polkit-gnome-authentication-agent-1" &
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If no valid executable is found, report an error
|
||||||
|
echo "No valid Polkit-GNOME Authentication Agent executable found."
|
30
hypr/.config/hypr/scripts/Polkit.sh
Executable file
30
hypr/.config/hypr/scripts/Polkit.sh
Executable file
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# This is for polkits, it will start from top and will stop if the top is executed
|
||||||
|
|
||||||
|
# Polkit possible paths files to check
|
||||||
|
polkit=(
|
||||||
|
"/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1"
|
||||||
|
"/usr/lib/polkit-kde-authentication-agent-1"
|
||||||
|
"/usr/lib/polkit-gnome-authentication-agent-1"
|
||||||
|
"/usr/libexec/polkit-gnome-authentication-agent-1"
|
||||||
|
"/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1"
|
||||||
|
"/usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1"
|
||||||
|
)
|
||||||
|
|
||||||
|
executed=false # Flag to track if a file has been executed
|
||||||
|
|
||||||
|
# Loop through the list of files
|
||||||
|
for file in "${polkit[@]}"; do
|
||||||
|
if [ -e "$file" ]; then
|
||||||
|
echo "File $file found, executing command..."
|
||||||
|
exec "$file"
|
||||||
|
executed=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# If none of the files were found, you can add a fallback command here
|
||||||
|
if [ "$executed" == false ]; then
|
||||||
|
echo "None of the specified files were found. Install a Polkit"
|
||||||
|
fi
|
16
hypr/.config/hypr/scripts/PortalHyprland.sh
Executable file
16
hypr/.config/hypr/scripts/PortalHyprland.sh
Executable file
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# For manually starting xdg-desktop-portal
|
||||||
|
|
||||||
|
sleep 1
|
||||||
|
killall xdg-desktop-portal-hyprland
|
||||||
|
killall xdg-desktop-portal-wlr
|
||||||
|
killall xdg-desktop-portal-gnome
|
||||||
|
killall xdg-desktop-portal
|
||||||
|
sleep 1
|
||||||
|
/usr/lib/xdg-desktop-portal-hyprland &
|
||||||
|
/usr/libexec/xdg-desktop-portal-hyprland &
|
||||||
|
sleep 2
|
||||||
|
/usr/lib/xdg-desktop-portal-hyprland &
|
||||||
|
/usr/libexec/xdg-desktop-portal &
|
||||||
|
|
46
hypr/.config/hypr/scripts/Refresh.sh
Executable file
46
hypr/.config/hypr/scripts/Refresh.sh
Executable file
|
@ -0,0 +1,46 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Scripts for refreshing ags waybar, rofi, swaync, wallust
|
||||||
|
|
||||||
|
SCRIPTSDIR=$HOME/.config/hypr/scripts
|
||||||
|
UserScripts=$HOME/.config/hypr/UserScripts
|
||||||
|
|
||||||
|
# Define file_exists function
|
||||||
|
file_exists() {
|
||||||
|
if [ -e "$1" ]; then
|
||||||
|
return 0 # File exists
|
||||||
|
else
|
||||||
|
return 1 # File does not exist
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kill already running processes
|
||||||
|
_ps=(waybar rofi swaync ags)
|
||||||
|
for _prs in "${_ps[@]}"; do
|
||||||
|
if pidof "${_prs}" >/dev/null; then
|
||||||
|
pkill "${_prs}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# quit ags
|
||||||
|
ags -q
|
||||||
|
|
||||||
|
sleep 0.3
|
||||||
|
# Relaunch waybar
|
||||||
|
waybar &
|
||||||
|
|
||||||
|
# relaunch swaync
|
||||||
|
sleep 0.5
|
||||||
|
swaync > /dev/null 2>&1 &
|
||||||
|
|
||||||
|
# relaunch ags
|
||||||
|
ags &
|
||||||
|
|
||||||
|
# Relaunching rainbow borders if the script exists
|
||||||
|
sleep 1
|
||||||
|
if file_exists "${UserScripts}/RainbowBorders.sh"; then
|
||||||
|
${UserScripts}/RainbowBorders.sh &
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
41
hypr/.config/hypr/scripts/RefreshNoWaybar.sh
Executable file
41
hypr/.config/hypr/scripts/RefreshNoWaybar.sh
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
|
||||||
|
# Modified version of Refresh but no waybar refresh
|
||||||
|
# Used by automatic wallpaper change
|
||||||
|
# Modified inorder to refresh rofi background, Wallust, SwayNC
|
||||||
|
|
||||||
|
SCRIPTSDIR=$HOME/.config/hypr/scripts
|
||||||
|
UserScripts=$HOME/.config/hypr/UserScripts
|
||||||
|
|
||||||
|
# Define file_exists function
|
||||||
|
file_exists() {
|
||||||
|
if [ -e "$1" ]; then
|
||||||
|
return 0 # File exists
|
||||||
|
else
|
||||||
|
return 1 # File does not exist
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kill already running processes
|
||||||
|
_ps=(rofi)
|
||||||
|
for _prs in "${_ps[@]}"; do
|
||||||
|
if pidof "${_prs}" >/dev/null; then
|
||||||
|
pkill "${_prs}"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# quit ags
|
||||||
|
ags -q
|
||||||
|
|
||||||
|
# Wallust refresh
|
||||||
|
${SCRIPTSDIR}/WallustSwww.sh &
|
||||||
|
|
||||||
|
# Relaunching rainbow borders if the script exists
|
||||||
|
sleep 1
|
||||||
|
if file_exists "${UserScripts}/RainbowBorders.sh"; then
|
||||||
|
${UserScripts}/RainbowBorders.sh &
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
exit 0
|
1860
hypr/.config/hypr/scripts/RofiEmoji.sh
Executable file
1860
hypr/.config/hypr/scripts/RofiEmoji.sh
Executable file
File diff suppressed because it is too large
Load diff
17
hypr/.config/hypr/scripts/RofiSearch.sh
Executable file
17
hypr/.config/hypr/scripts/RofiSearch.sh
Executable file
|
@ -0,0 +1,17 @@
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Modified Script for Google Search
|
||||||
|
# Original Submitted by https://github.com/LeventKaanOguz
|
||||||
|
|
||||||
|
# Opens rofi in dmenu mod and waits for input. Then pushes the input to the query of the URL.
|
||||||
|
|
||||||
|
rofi_config="$HOME/.config/rofi/config-search.rasi"
|
||||||
|
|
||||||
|
# Kill Rofi if already running before execution
|
||||||
|
if pgrep -x "rofi" >/dev/null; then
|
||||||
|
pkill rofi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Open rofi with a dmenu and pass the selected item to xdg-open for Google search
|
||||||
|
echo "" | rofi -dmenu -config "$rofi_config" -p "Search:" | xargs -I{} xdg-open "https://www.google.com/search?q={}"
|
||||||
|
|
128
hypr/.config/hypr/scripts/ScreenShot.sh
Executable file
128
hypr/.config/hypr/scripts/ScreenShot.sh
Executable file
|
@ -0,0 +1,128 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Screenshots scripts
|
||||||
|
|
||||||
|
iDIR="$HOME/.config/swaync/icons"
|
||||||
|
sDIR="$HOME/.config/hypr/scripts"
|
||||||
|
notify_cmd_shot="notify-send -h string:x-canonical-private-synchronous:shot-notify -u low -i ${iDIR}/picture.png"
|
||||||
|
|
||||||
|
time=$(date "+%d-%b_%H-%M-%S")
|
||||||
|
dir="$(xdg-user-dir)/Pictures/Screenshots"
|
||||||
|
file="Screenshot_${time}_${RANDOM}.png"
|
||||||
|
|
||||||
|
active_window_class=$(hyprctl -j activewindow | jq -r '(.class)')
|
||||||
|
active_window_file="Screenshot_${time}_${active_window_class}.png"
|
||||||
|
active_window_path="${dir}/${active_window_file}"
|
||||||
|
|
||||||
|
# notify and view screenshot
|
||||||
|
notify_view() {
|
||||||
|
if [[ "$1" == "active" ]]; then
|
||||||
|
if [[ -e "${active_window_path}" ]]; then
|
||||||
|
${notify_cmd_shot} "Screenshot of '${active_window_class}' Saved."
|
||||||
|
"${sDIR}/Sounds.sh" --screenshot
|
||||||
|
else
|
||||||
|
${notify_cmd_shot} "Screenshot of '${active_window_class}' not Saved"
|
||||||
|
fi
|
||||||
|
elif [[ "$1" == "swappy" ]]; then
|
||||||
|
${notify_cmd_shot} "Screenshot Captured."
|
||||||
|
else
|
||||||
|
local check_file="$dir/$file"
|
||||||
|
if [[ -e "$check_file" ]]; then
|
||||||
|
${notify_cmd_shot} "Screenshot Saved."
|
||||||
|
"${sDIR}/Sounds.sh" --screenshot
|
||||||
|
else
|
||||||
|
${notify_cmd_shot} "Screenshot NOT Saved."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# countdown
|
||||||
|
countdown() {
|
||||||
|
for sec in $(seq $1 -1 1); do
|
||||||
|
notify-send -h string:x-canonical-private-synchronous:shot-notify -t 1000 -i "$iDIR"/timer.png "Taking shot in : $sec"
|
||||||
|
sleep 1
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
# take shots
|
||||||
|
shotnow() {
|
||||||
|
cd ${dir} && grim - | tee "$file" | wl-copy
|
||||||
|
sleep 2
|
||||||
|
notify_view
|
||||||
|
}
|
||||||
|
|
||||||
|
shot5() {
|
||||||
|
countdown '5'
|
||||||
|
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
|
||||||
|
sleep 1
|
||||||
|
notify_view
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
shot10() {
|
||||||
|
countdown '10'
|
||||||
|
sleep 1 && cd ${dir} && grim - | tee "$file" | wl-copy
|
||||||
|
notify_view
|
||||||
|
}
|
||||||
|
|
||||||
|
shotwin() {
|
||||||
|
w_pos=$(hyprctl activewindow | grep 'at:' | cut -d':' -f2 | tr -d ' ' | tail -n1)
|
||||||
|
w_size=$(hyprctl activewindow | grep 'size:' | cut -d':' -f2 | tr -d ' ' | tail -n1 | sed s/,/x/g)
|
||||||
|
cd ${dir} && grim -g "$w_pos $w_size" - | tee "$file" | wl-copy
|
||||||
|
notify_view
|
||||||
|
}
|
||||||
|
|
||||||
|
shotarea() {
|
||||||
|
tmpfile=$(mktemp)
|
||||||
|
grim -g "$(slurp)" - >"$tmpfile"
|
||||||
|
if [[ -s "$tmpfile" ]]; then
|
||||||
|
wl-copy <"$tmpfile"
|
||||||
|
mv "$tmpfile" "$dir/$file"
|
||||||
|
fi
|
||||||
|
rm "$tmpfile"
|
||||||
|
notify_view
|
||||||
|
}
|
||||||
|
|
||||||
|
shotactive() {
|
||||||
|
active_window_class=$(hyprctl -j activewindow | jq -r '(.class)')
|
||||||
|
active_window_file="Screenshot_${time}_${active_window_class}.png"
|
||||||
|
active_window_path="${dir}/${active_window_file}"
|
||||||
|
|
||||||
|
hyprctl -j activewindow | jq -r '"\(.at[0]),\(.at[1]) \(.size[0])x\(.size[1])"' | grim -g - "${active_window_path}"
|
||||||
|
sleep 1
|
||||||
|
notify_view "active"
|
||||||
|
}
|
||||||
|
|
||||||
|
shotswappy() {
|
||||||
|
tmpfile=$(mktemp)
|
||||||
|
grim -g "$(slurp)" - >"$tmpfile" && "${sDIR}/Sounds.sh" --screenshot && notify_view "swappy"
|
||||||
|
swappy -f - <"$tmpfile"
|
||||||
|
rm "$tmpfile"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if [[ ! -d "$dir" ]]; then
|
||||||
|
mkdir -p "$dir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$1" == "--now" ]]; then
|
||||||
|
shotnow
|
||||||
|
elif [[ "$1" == "--in5" ]]; then
|
||||||
|
shot5
|
||||||
|
elif [[ "$1" == "--in10" ]]; then
|
||||||
|
shot10
|
||||||
|
elif [[ "$1" == "--win" ]]; then
|
||||||
|
shotwin
|
||||||
|
elif [[ "$1" == "--area" ]]; then
|
||||||
|
shotarea
|
||||||
|
elif [[ "$1" == "--active" ]]; then
|
||||||
|
shotactive
|
||||||
|
elif [[ "$1" == "--swappy" ]]; then
|
||||||
|
shotswappy
|
||||||
|
else
|
||||||
|
echo -e "Available Options : --now --in5 --in10 --win --area --active --swappy"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
72
hypr/.config/hypr/scripts/Sounds.sh
Executable file
72
hypr/.config/hypr/scripts/Sounds.sh
Executable file
|
@ -0,0 +1,72 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# This script is used to play system sounds.
|
||||||
|
# Script is used by Volume.Sh and ScreenShots.sh
|
||||||
|
|
||||||
|
theme="freedesktop" # Set the theme for the system sounds.
|
||||||
|
mute=false # Set to true to mute the system sounds.
|
||||||
|
|
||||||
|
# Mute individual sounds here.
|
||||||
|
muteScreenshots=false
|
||||||
|
muteVolume=false
|
||||||
|
|
||||||
|
# Exit if the system sounds are muted.
|
||||||
|
if [[ "$mute" = true ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Choose the sound to play.
|
||||||
|
if [[ "$1" == "--screenshot" ]]; then
|
||||||
|
if [[ "$muteScreenshots" = true ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
soundoption="screen-capture.*"
|
||||||
|
elif [[ "$1" == "--volume" ]]; then
|
||||||
|
if [[ "$muteVolume" = true ]]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
soundoption="audio-volume-change.*"
|
||||||
|
else
|
||||||
|
echo -e "Available sounds: --screenshot, --volume"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Set the directory defaults for system sounds.
|
||||||
|
if [ -d "/run/current-system/sw/share/sounds" ]; then
|
||||||
|
systemDIR="/run/current-system/sw/share/sounds" # NixOS
|
||||||
|
else
|
||||||
|
systemDIR="/usr/share/sounds"
|
||||||
|
fi
|
||||||
|
userDIR="$HOME/.local/share/sounds"
|
||||||
|
defaultTheme="freedesktop"
|
||||||
|
|
||||||
|
# Prefer the user's theme, but use the system's if it doesn't exist.
|
||||||
|
sDIR="$systemDIR/$defaultTheme"
|
||||||
|
if [ -d "$userDIR/$theme" ]; then
|
||||||
|
sDIR="$userDIR/$theme"
|
||||||
|
elif [ -d "$systemDIR/$theme" ]; then
|
||||||
|
sDIR="$systemDIR/$theme"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Get the theme that it inherits.
|
||||||
|
iTheme=$(cat "$sDIR/index.theme" | grep -i "inherits" | cut -d "=" -f 2)
|
||||||
|
iDIR="$sDIR/../$iTheme"
|
||||||
|
|
||||||
|
# Find the sound file and play it.
|
||||||
|
sound_file=$(find $sDIR/stereo -name "$soundoption" -print -quit)
|
||||||
|
if ! test -f "$sound_file"; then
|
||||||
|
sound_file=$(find $iDIR/stereo -name "$soundoption" -print -quit)
|
||||||
|
if ! test -f "$sound_file"; then
|
||||||
|
sound_file=$(find $userDIR/$defaultTheme/stereo -name "$soundoption" -print -quit)
|
||||||
|
if ! test -f "$sound_file"; then
|
||||||
|
sound_file=$(find $systemDIR/$defaultTheme/stereo -name "$soundoption" -print -quit)
|
||||||
|
if ! test -f "$sound_file"; then
|
||||||
|
echo "Error: Sound file not found."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# pipewire priority, fallback pulseaudio
|
||||||
|
pw-play "$sound_file" || pa-play "$sound_file"
|
78
hypr/.config/hypr/scripts/SwitchKeyboardLayout.sh
Executable file
78
hypr/.config/hypr/scripts/SwitchKeyboardLayout.sh
Executable file
|
@ -0,0 +1,78 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# This is for changing kb_layouts. Set kb_layouts in $settings_file
|
||||||
|
|
||||||
|
layout_f="$HOME/.cache/kb_layout"
|
||||||
|
settings_file="$HOME/.config/hypr/UserConfigs/UserSettings.conf"
|
||||||
|
notif="$HOME/.config/swaync/images/bell.png"
|
||||||
|
|
||||||
|
# Check if ~/.cache/kb_layout exists and create it with a default layout from Settings.conf if not found
|
||||||
|
if [ ! -f "$layout_f" ]; then
|
||||||
|
default_layout=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2 | cut -d ',' -f 1 2>/dev/null)
|
||||||
|
if [ -z "$default_layout" ]; then
|
||||||
|
default_layout="us" # Default to 'us' layout if Settings.conf or 'kb_layout' is not found
|
||||||
|
fi
|
||||||
|
echo "$default_layout" > "$layout_f"
|
||||||
|
fi
|
||||||
|
|
||||||
|
current_layout=$(cat "$layout_f")
|
||||||
|
|
||||||
|
# Read keyboard layout settings from Settings.conf
|
||||||
|
if [ -f "$settings_file" ]; then
|
||||||
|
kb_layout_line=$(grep 'kb_layout=' "$settings_file" | cut -d '=' -f 2)
|
||||||
|
IFS=',' read -ra layout_mapping <<< "$kb_layout_line"
|
||||||
|
fi
|
||||||
|
|
||||||
|
layout_count=${#layout_mapping[@]}
|
||||||
|
|
||||||
|
# Find the index of the current layout in the mapping
|
||||||
|
for ((i = 0; i < layout_count; i++)); do
|
||||||
|
if [ "$current_layout" == "${layout_mapping[i]}" ]; then
|
||||||
|
current_index=$i
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Calculate the index of the next layout
|
||||||
|
next_index=$(( (current_index + 1) % layout_count ))
|
||||||
|
new_layout="${layout_mapping[next_index]}"
|
||||||
|
|
||||||
|
# Update the keyboard layout
|
||||||
|
hyprctl switchxkblayout "at-translated-set-2-keyboard" "$new_layout"
|
||||||
|
echo "$new_layout" > "$layout_f"
|
||||||
|
|
||||||
|
# Created by T-Crypt
|
||||||
|
|
||||||
|
get_keyboard_names() {
|
||||||
|
hyprctl devices -j | jq -r '.keyboards[].name'
|
||||||
|
}
|
||||||
|
|
||||||
|
change_layout() {
|
||||||
|
local got_error=false
|
||||||
|
|
||||||
|
while read -r name; do
|
||||||
|
hyprctl switchxkblayout "$name" next
|
||||||
|
if [[ $? -eq 0 ]]; then
|
||||||
|
echo "Switched the layout for $name."
|
||||||
|
else
|
||||||
|
>&2 echo "Error while switching the layout for $name."
|
||||||
|
got_error=true
|
||||||
|
fi
|
||||||
|
done <<< "$(get_keyboard_names)"
|
||||||
|
|
||||||
|
if [ "$got_error" = true ]; then
|
||||||
|
>&2 echo "Some errors were found during the process..."
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0 # All layouts had been cycled successfully
|
||||||
|
}
|
||||||
|
|
||||||
|
if ! change_layout; then
|
||||||
|
notify-send -u low -t 2000 'Keyboard layout' 'Error: Layout change failed'
|
||||||
|
>&2 echo "Layout change failed."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
# Notification for the new keyboard layout
|
||||||
|
notify-send -u low -i "$notif" "new KB_Layout: $new_layout"
|
||||||
|
fi
|
27
hypr/.config/hypr/scripts/TouchPad.sh
Executable file
27
hypr/.config/hypr/scripts/TouchPad.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# For disabling touchpad.
|
||||||
|
# Edit the Touchpad_Device according to your system
|
||||||
|
# use hyprctl devices to get your system touchpad device name
|
||||||
|
|
||||||
|
|
||||||
|
Touchpad_Device="asue1209:00-04f3:319f-touchpad"
|
||||||
|
notif="$HOME/.config/swaync/images/bell.png"
|
||||||
|
|
||||||
|
XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/run/user/$(id -u)}
|
||||||
|
STATUS_FILE="$XDG_RUNTIME_DIR/touchpad.status"
|
||||||
|
|
||||||
|
toggle_touchpad() {
|
||||||
|
if [ ! -f "$STATUS_FILE" ] || [ "$(cat "$STATUS_FILE")" = "false" ]; then
|
||||||
|
echo "true" > "$STATUS_FILE"
|
||||||
|
action="enabled"
|
||||||
|
else
|
||||||
|
echo "false" > "$STATUS_FILE"
|
||||||
|
action="disabled"
|
||||||
|
fi
|
||||||
|
|
||||||
|
notify-send -u low -i "$notif" "Touchpad $action"
|
||||||
|
hyprctl keyword "device[$Touchpad_Device]:enabled" "$(cat "$STATUS_FILE")"
|
||||||
|
}
|
||||||
|
|
||||||
|
toggle_touchpad
|
33
hypr/.config/hypr/scripts/UptimeNixOS.sh
Executable file
33
hypr/.config/hypr/scripts/UptimeNixOS.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
# Script parses /proc/uptime to get the system uptime
|
||||||
|
# and prints it in a human-readable format
|
||||||
|
# This is a workaround for system where `uptime` command is taken from coreutils
|
||||||
|
# where `uptime -p` is not supported
|
||||||
|
|
||||||
|
if [[ -r /proc/uptime ]]; then
|
||||||
|
s=$(< /proc/uptime)
|
||||||
|
s=${s/.*}
|
||||||
|
else
|
||||||
|
echo "Error UptimeNixOS.sh: Uptime could not be determined." >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
d="$((s / 60 / 60 / 24)) days"
|
||||||
|
h="$((s / 60 / 60 % 24)) hours"
|
||||||
|
m="$((s / 60 % 60)) minutes"
|
||||||
|
|
||||||
|
# Remove plural if < 2.
|
||||||
|
((${d/ *} == 1)) && d=${d/s}
|
||||||
|
((${h/ *} == 1)) && h=${h/s}
|
||||||
|
((${m/ *} == 1)) && m=${m/s}
|
||||||
|
|
||||||
|
# Hide empty fields.
|
||||||
|
((${d/ *} == 0)) && unset d
|
||||||
|
((${h/ *} == 0)) && unset h
|
||||||
|
((${m/ *} == 0)) && unset m
|
||||||
|
|
||||||
|
uptime=${d:+$d, }${h:+$h, }$m
|
||||||
|
uptime=${uptime%', '}
|
||||||
|
uptime=${uptime:-$s seconds}
|
||||||
|
|
||||||
|
echo "up $uptime"
|
143
hypr/.config/hypr/scripts/Volume.sh
Normal file
143
hypr/.config/hypr/scripts/Volume.sh
Normal file
|
@ -0,0 +1,143 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Scripts for volume controls for audio and mic
|
||||||
|
|
||||||
|
iDIR="$HOME/.config/swaync/icons"
|
||||||
|
sDIR="$HOME/.config/hypr/scripts"
|
||||||
|
|
||||||
|
# Get Volume
|
||||||
|
get_volume() {
|
||||||
|
volume=$(pamixer --get-volume)
|
||||||
|
if [[ "$volume" -eq "0" ]]; then
|
||||||
|
echo "Muted"
|
||||||
|
else
|
||||||
|
echo "$volume%"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get icons
|
||||||
|
get_icon() {
|
||||||
|
current=$(get_volume)
|
||||||
|
if [[ "$current" == "Muted" ]]; then
|
||||||
|
echo "$iDIR/volume-mute.png"
|
||||||
|
elif [[ "${current%\%}" -le 30 ]]; then
|
||||||
|
echo "$iDIR/volume-low.png"
|
||||||
|
elif [[ "${current%\%}" -le 60 ]]; then
|
||||||
|
echo "$iDIR/volume-mid.png"
|
||||||
|
else
|
||||||
|
echo "$iDIR/volume-high.png"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Notify
|
||||||
|
notify_user() {
|
||||||
|
if [[ "$(get_volume)" == "Muted" ]]; then
|
||||||
|
notify-send -e -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: Muted"
|
||||||
|
else
|
||||||
|
notify-send -e -h int:value:"$(get_volume | sed 's/%//')" -h string:x-canonical-private-synchronous:volume_notif -u low -i "$(get_icon)" "Volume: $(get_volume)"
|
||||||
|
"$sDIR/Sounds.sh" --volume
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Increase Volume
|
||||||
|
inc_volume() {
|
||||||
|
if [ "$(pamixer --get-mute)" == "true" ]; then
|
||||||
|
toggle_mute
|
||||||
|
else
|
||||||
|
pamixer -i 5 --allow-boost --set-limit 150 && notify_user
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Decrease Volume
|
||||||
|
dec_volume() {
|
||||||
|
if [ "$(pamixer --get-mute)" == "true" ]; then
|
||||||
|
toggle_mute
|
||||||
|
else
|
||||||
|
pamixer -d 5 && notify_user
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggle Mute
|
||||||
|
toggle_mute() {
|
||||||
|
if [ "$(pamixer --get-mute)" == "false" ]; then
|
||||||
|
pamixer -m && notify-send -e -u low -i "$iDIR/volume-mute.png" "Volume Switched OFF"
|
||||||
|
elif [ "$(pamixer --get-mute)" == "true" ]; then
|
||||||
|
pamixer -u && notify-send -e -u low -i "$(get_icon)" "Volume Switched ON"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Toggle Mic
|
||||||
|
toggle_mic() {
|
||||||
|
if [ "$(pamixer --default-source --get-mute)" == "false" ]; then
|
||||||
|
pamixer --default-source -m && notify-send -e -u low -i "$iDIR/microphone-mute.png" "Microphone Switched OFF"
|
||||||
|
elif [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||||
|
pamixer -u --default-source u && notify-send -e -u low -i "$iDIR/microphone.png" "Microphone Switched ON"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
# Get Mic Icon
|
||||||
|
get_mic_icon() {
|
||||||
|
current=$(pamixer --default-source --get-volume)
|
||||||
|
if [[ "$current" -eq "0" ]]; then
|
||||||
|
echo "$iDIR/microphone-mute.png"
|
||||||
|
else
|
||||||
|
echo "$iDIR/microphone.png"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Get Microphone Volume
|
||||||
|
get_mic_volume() {
|
||||||
|
volume=$(pamixer --default-source --get-volume)
|
||||||
|
if [[ "$volume" -eq "0" ]]; then
|
||||||
|
echo "Muted"
|
||||||
|
else
|
||||||
|
echo "$volume%"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Notify for Microphone
|
||||||
|
notify_mic_user() {
|
||||||
|
volume=$(get_mic_volume)
|
||||||
|
icon=$(get_mic_icon)
|
||||||
|
notify-send -e -h int:value:"$volume" -h "string:x-canonical-private-synchronous:volume_notif" -u low -i "$icon" "Mic-Level: $volume"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Increase MIC Volume
|
||||||
|
inc_mic_volume() {
|
||||||
|
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||||
|
toggle_mic
|
||||||
|
else
|
||||||
|
pamixer --default-source -i 5 && notify_mic_user
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Decrease MIC Volume
|
||||||
|
dec_mic_volume() {
|
||||||
|
if [ "$(pamixer --default-source --get-mute)" == "true" ]; then
|
||||||
|
toggle-mic
|
||||||
|
else
|
||||||
|
pamixer --default-source -d 5 && notify_mic_user
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Execute accordingly
|
||||||
|
if [[ "$1" == "--get" ]]; then
|
||||||
|
get_volume
|
||||||
|
elif [[ "$1" == "--inc" ]]; then
|
||||||
|
inc_volume
|
||||||
|
elif [[ "$1" == "--dec" ]]; then
|
||||||
|
dec_volume
|
||||||
|
elif [[ "$1" == "--toggle" ]]; then
|
||||||
|
toggle_mute
|
||||||
|
elif [[ "$1" == "--toggle-mic" ]]; then
|
||||||
|
toggle_mic
|
||||||
|
elif [[ "$1" == "--get-icon" ]]; then
|
||||||
|
get_icon
|
||||||
|
elif [[ "$1" == "--get-mic-icon" ]]; then
|
||||||
|
get_mic_icon
|
||||||
|
elif [[ "$1" == "--mic-inc" ]]; then
|
||||||
|
inc_mic_volume
|
||||||
|
elif [[ "$1" == "--mic-dec" ]]; then
|
||||||
|
dec_mic_volume
|
||||||
|
else
|
||||||
|
get_volume
|
||||||
|
fi
|
37
hypr/.config/hypr/scripts/WallustSwww.sh
Executable file
37
hypr/.config/hypr/scripts/WallustSwww.sh
Executable file
|
@ -0,0 +1,37 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Wallust Colors for current wallpaper
|
||||||
|
|
||||||
|
# Define the path to the swww cache directory
|
||||||
|
cache_dir="$HOME/.cache/swww/"
|
||||||
|
|
||||||
|
# Get a list of monitor outputs
|
||||||
|
monitor_outputs=($(ls "$cache_dir"))
|
||||||
|
|
||||||
|
# Initialize a flag to determine if the ln command was executed
|
||||||
|
ln_success=false
|
||||||
|
|
||||||
|
# Get current focused monitor
|
||||||
|
current_monitor=$(hyprctl monitors | awk '/^Monitor/{name=$2} /focused: yes/{print name}')
|
||||||
|
echo $current_monitor
|
||||||
|
# Construct the full path to the cache file
|
||||||
|
cache_file="$cache_dir$current_monitor"
|
||||||
|
echo $cache_file
|
||||||
|
# Check if the cache file exists for the current monitor output
|
||||||
|
if [ -f "$cache_file" ]; then
|
||||||
|
# Get the wallpaper path from the cache file
|
||||||
|
wallpaper_path=$(cat "$cache_file")
|
||||||
|
echo $wallpaper_path
|
||||||
|
# Copy the wallpaper to the location Rofi can access
|
||||||
|
if ln -sf "$wallpaper_path" "$HOME/.config/rofi/.current_wallpaper"; then
|
||||||
|
ln_success=true # Set the flag to true upon successful execution
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the flag before executing further commands
|
||||||
|
if [ "$ln_success" = true ]; then
|
||||||
|
# execute wallust
|
||||||
|
echo 'about to execute wallust'
|
||||||
|
# execute wallust skipping tty and terminal changes
|
||||||
|
wallust run "$wallpaper_path" -s &
|
||||||
|
fi
|
39
hypr/.config/hypr/scripts/WaybarCava.sh
Executable file
39
hypr/.config/hypr/scripts/WaybarCava.sh
Executable file
|
@ -0,0 +1,39 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
|
||||||
|
# Not my own work. This was added through Github PR. Credit to original author
|
||||||
|
|
||||||
|
#----- Optimized bars animation without much CPU usage increase --------
|
||||||
|
bar="▁▂▃▄▅▆▇█"
|
||||||
|
dict="s/;//g"
|
||||||
|
|
||||||
|
# Calculate the length of the bar outside the loop
|
||||||
|
bar_length=${#bar}
|
||||||
|
|
||||||
|
# Create dictionary to replace char with bar
|
||||||
|
for ((i = 0; i < bar_length; i++)); do
|
||||||
|
dict+=";s/$i/${bar:$i:1}/g"
|
||||||
|
done
|
||||||
|
|
||||||
|
# Create cava config
|
||||||
|
config_file="/tmp/bar_cava_config"
|
||||||
|
cat >"$config_file" <<EOF
|
||||||
|
[general]
|
||||||
|
bars = 10
|
||||||
|
|
||||||
|
[input]
|
||||||
|
method = pulse
|
||||||
|
source = auto
|
||||||
|
|
||||||
|
[output]
|
||||||
|
method = raw
|
||||||
|
raw_target = /dev/stdout
|
||||||
|
data_format = ascii
|
||||||
|
ascii_max_range = 7
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Kill cava if it's already running
|
||||||
|
pkill -f "cava -p $config_file"
|
||||||
|
|
||||||
|
# Read stdout from cava and perform substitution in a single sed command
|
||||||
|
cava -p "$config_file" | sed -u "$dict"
|
64
hypr/.config/hypr/scripts/WaybarLayout.sh
Executable file
64
hypr/.config/hypr/scripts/WaybarLayout.sh
Executable file
|
@ -0,0 +1,64 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Script for waybar layout or configs
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
# Define directories
|
||||||
|
waybar_layouts="$HOME/.config/waybar/configs"
|
||||||
|
waybar_config="$HOME/.config/waybar/config"
|
||||||
|
SCRIPTSDIR="$HOME/.config/hypr/scripts"
|
||||||
|
rofi_config="$HOME/.config/rofi/config-waybar-layout.rasi"
|
||||||
|
|
||||||
|
# Function to display menu options
|
||||||
|
menu() {
|
||||||
|
options=()
|
||||||
|
while IFS= read -r file; do
|
||||||
|
options+=("$(basename "$file")")
|
||||||
|
done < <(find "$waybar_layouts" -maxdepth 1 -type f -exec basename {} \; | sort)
|
||||||
|
|
||||||
|
printf '%s\n' "${options[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Apply selected configuration
|
||||||
|
apply_config() {
|
||||||
|
ln -sf "$waybar_layouts/$1" "$waybar_config"
|
||||||
|
restart_waybar_if_needed
|
||||||
|
}
|
||||||
|
|
||||||
|
# Restart Waybar
|
||||||
|
restart_waybar_if_needed() {
|
||||||
|
if pgrep -x "waybar" >/dev/null; then
|
||||||
|
pkill waybar
|
||||||
|
sleep 0.1 # Delay for Waybar to completely terminate
|
||||||
|
fi
|
||||||
|
"${SCRIPTSDIR}/Refresh.sh" &
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main function
|
||||||
|
main() {
|
||||||
|
choice=$(menu | rofi -i -dmenu -config "$rofi_config")
|
||||||
|
|
||||||
|
if [[ -z "$choice" ]]; then
|
||||||
|
echo "No option selected. Exiting."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
"no panel")
|
||||||
|
pgrep -x "waybar" && pkill waybar || true
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
apply_config "$choice"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kill Rofi if already running before execution
|
||||||
|
if pgrep -x "rofi" >/dev/null; then
|
||||||
|
pkill rofi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
main
|
59
hypr/.config/hypr/scripts/WaybarStyles.sh
Executable file
59
hypr/.config/hypr/scripts/WaybarStyles.sh
Executable file
|
@ -0,0 +1,59 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
# Script for waybar styles
|
||||||
|
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
# Define directories
|
||||||
|
waybar_styles="$HOME/.config/waybar/style"
|
||||||
|
waybar_style="$HOME/.config/waybar/style.css"
|
||||||
|
SCRIPTSDIR="$HOME/.config/hypr/scripts"
|
||||||
|
rofi_config="$HOME/.config/rofi/config-waybar-style.rasi"
|
||||||
|
|
||||||
|
# Function to display menu options
|
||||||
|
menu() {
|
||||||
|
options=()
|
||||||
|
while IFS= read -r file; do
|
||||||
|
if [ -f "$waybar_styles/$file" ]; then
|
||||||
|
options+=("$(basename "$file" .css)")
|
||||||
|
fi
|
||||||
|
done < <(find "$waybar_styles" -maxdepth 1 -type f -name '*.css' -exec basename {} \; | sort)
|
||||||
|
|
||||||
|
printf '%s\n' "${options[@]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Apply selected style
|
||||||
|
apply_style() {
|
||||||
|
ln -sf "$waybar_styles/$1.css" "$waybar_style"
|
||||||
|
restart_waybar_if_needed
|
||||||
|
}
|
||||||
|
|
||||||
|
# Restart Waybar if it's running
|
||||||
|
restart_waybar_if_needed() {
|
||||||
|
if pgrep -x "waybar" >/dev/null; then
|
||||||
|
pkill waybar
|
||||||
|
sleep 0.1 # Delay for Waybar to completely terminate
|
||||||
|
fi
|
||||||
|
"${SCRIPTSDIR}/Refresh.sh" &
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main function
|
||||||
|
main() {
|
||||||
|
choice=$(menu | rofi -i -dmenu -config "$rofi_config")
|
||||||
|
|
||||||
|
if [[ -z "$choice" ]]; then
|
||||||
|
echo "No option selected. Exiting."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
apply_style "$choice"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Kill Rofi if already running before execution
|
||||||
|
if pgrep -x "rofi" >/dev/null; then
|
||||||
|
pkill rofi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
main
|
57
hypr/.config/hypr/scripts/Wlogout.sh
Executable file
57
hypr/.config/hypr/scripts/Wlogout.sh
Executable file
|
@ -0,0 +1,57 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ##
|
||||||
|
|
||||||
|
# wlogout (Power, Screen Lock, Suspend, etc)
|
||||||
|
|
||||||
|
# Set variables for parameters
|
||||||
|
A_2160=450
|
||||||
|
B_2160=450
|
||||||
|
A_1600=400
|
||||||
|
B_1600=400
|
||||||
|
A_1440=350
|
||||||
|
B_1440=350
|
||||||
|
A_1080=350
|
||||||
|
B_1080=350
|
||||||
|
A_720=50
|
||||||
|
B_720=50
|
||||||
|
|
||||||
|
# Check if wlogout is already running
|
||||||
|
if pgrep -x "wlogout" > /dev/null; then
|
||||||
|
pkill -x "wlogout"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect monitor resolution and scaling factor
|
||||||
|
resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}')
|
||||||
|
hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale')
|
||||||
|
|
||||||
|
# Set parameters based on screen resolution and scaling factor
|
||||||
|
if ((resolution >= 2160)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 4k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 1600 && resolution < 2160)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1600 * 1600 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1600 * 1600 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 2.5k and < 4k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 1440 && resolution < 1600)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 2k and < 2.5k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 1080 && resolution < 1440)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 1080p and < 2k"
|
||||||
|
wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val &
|
||||||
|
elif ((resolution >= 720 && resolution < 1080)); then
|
||||||
|
T_val=$(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}")
|
||||||
|
B_val=$(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}")
|
||||||
|
echo "Setting parameters for resolution >= 720p and < 1080p"
|
||||||
|
wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val &
|
||||||
|
else
|
||||||
|
echo "Setting default parameters"
|
||||||
|
wlogout &
|
||||||
|
fi
|
16
hypr/.config/hypr/scripts/polkit.sh
Normal file
16
hypr/.config/hypr/scripts/polkit.sh
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
|
||||||
|
polkit=(
|
||||||
|
"/usr/lib/polkit-kde-authentication-agent-1"
|
||||||
|
"/usr/lib/x86_64-linux-gnu/libexec/polkit-authentication-agent-1"
|
||||||
|
)
|
||||||
|
|
||||||
|
executed=false
|
||||||
|
|
||||||
|
for file in "${polkit[@]}"; do
|
||||||
|
if [ -e "$file" ]; then
|
||||||
|
echo "File $file found"
|
||||||
|
exec "$file"
|
||||||
|
executed=true
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
|
@ -121,15 +121,42 @@ lsp['lua_ls'].setup{
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
local project_features_env = os.getenv("RUST_FEATURES")
|
||||||
|
local project_features = {}
|
||||||
|
|
||||||
|
if project_features_env ~= nil and project_features_env ~= "" then
|
||||||
|
local function split(str, sep)
|
||||||
|
local result = {}
|
||||||
|
local regex = ("([^%s]+)"):format(sep)
|
||||||
|
for each in str:gmatch(regex) do
|
||||||
|
table.insert(result, each)
|
||||||
|
end
|
||||||
|
return result
|
||||||
|
end
|
||||||
|
project_features = split(project_features_env, ",")
|
||||||
|
end
|
||||||
|
|
||||||
lsp['rust_analyzer'].setup{
|
lsp['rust_analyzer'].setup{
|
||||||
on_attach = on_attach,
|
on_attach = function(client, bufnr)
|
||||||
|
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
||||||
|
end,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
cmd = {
|
cmd = {
|
||||||
"rustup", "run", "stable", "rust-analyzer",
|
"rustup", "run", "nightly", "rust-analyzer",
|
||||||
},
|
},
|
||||||
settings = {
|
settings = {
|
||||||
["rust-analyzer"] = {
|
["rust-analyzer"] = {
|
||||||
|
cargo = {
|
||||||
|
features = project_features,
|
||||||
|
buildScripts = {
|
||||||
|
enable = true,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
check = {
|
||||||
|
features = project_features
|
||||||
|
},
|
||||||
procMacro = {
|
procMacro = {
|
||||||
|
enable = true,
|
||||||
ignored = {
|
ignored = {
|
||||||
leptos_macro = {
|
leptos_macro = {
|
||||||
"island",
|
"island",
|
||||||
|
@ -141,6 +168,11 @@ lsp['rust_analyzer'].setup{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lsp['pylsp'].setup{
|
||||||
|
on_attach = on_attach,
|
||||||
|
flags = lsp_flags,
|
||||||
|
}
|
||||||
|
|
||||||
lsp.clangd.setup{
|
lsp.clangd.setup{
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
flags = lsp_flags,
|
flags = lsp_flags,
|
||||||
|
|
|
@ -1,39 +1,39 @@
|
||||||
{
|
{
|
||||||
"LuaSnip": { "branch": "master", "commit": "b152822e1a4bafb6bdf11a16cc26525cbd95ee00" },
|
"LuaSnip": { "branch": "master", "commit": "878ace11983444d865a72e1759dbcc331d1ace4c" },
|
||||||
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
|
||||||
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
|
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
|
||||||
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
|
||||||
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
|
||||||
"editorconfig-vim": { "branch": "master", "commit": "8b7da79e9daee7a3f3a8d4fe29886b9756305aff" },
|
"editorconfig-vim": { "branch": "master", "commit": "8b7da79e9daee7a3f3a8d4fe29886b9756305aff" },
|
||||||
"formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" },
|
"formatter.nvim": { "branch": "master", "commit": "ad246d34ce7a32f752071ed81b09b94e6b127fad" },
|
||||||
"friendly-snippets": { "branch": "main", "commit": "d5f74ce4dfdd82848f3f4eac65fe6e29ac5df4c2" },
|
"friendly-snippets": { "branch": "main", "commit": "d0610077b6129cf9f7f78afbe3a1425d60f6e2f1" },
|
||||||
"gitsigns.nvim": { "branch": "main", "commit": "790355f00af1fc2c330ea1b2b7f68d65f19b57c9" },
|
"gitsigns.nvim": { "branch": "main", "commit": "75dc649106827183547d3bedd4602442340d2f7f" },
|
||||||
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
|
"glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
|
||||||
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
|
"headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" },
|
||||||
"lazy.nvim": { "branch": "main", "commit": "3f13f080434ac942b150679223d54f5ca91e0d52" },
|
"lazy.nvim": { "branch": "main", "commit": "eab487c2520f0fe9e54eb5e3ea0606e20512492e" },
|
||||||
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
|
||||||
"lspsaga.nvim": { "branch": "main", "commit": "052234296f13e2705d5d290c7bd5a36d3dd81fde" },
|
"lspsaga.nvim": { "branch": "main", "commit": "4e9d6162863d2f532751db91a1193cfe1f3a4361" },
|
||||||
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
|
||||||
"mason-lspconfig.nvim": { "branch": "main", "commit": "273fdde8ac5e51f3a223ba70980e52bbc09d9f6f" },
|
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
|
||||||
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
|
"mason.nvim": { "branch": "main", "commit": "0fb4e56837f13b81a972fcc0554be1327b39061e" },
|
||||||
"noice.nvim": { "branch": "main", "commit": "0cbe3f88d038320bdbda3c4c5c95f43a13c3aa12" },
|
"noice.nvim": { "branch": "main", "commit": "69c6ad5c1f1c0777125d0275f9871d8609cb0521" },
|
||||||
"nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" },
|
"nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" },
|
||||||
"nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
|
"nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" },
|
||||||
"nvim-cmp": { "branch": "main", "commit": "8f3c541407e691af6163e2447f3af1bd6e17f9a3" },
|
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
|
||||||
"nvim-dap": { "branch": "master", "commit": "6ae8a14828b0f3bff1721a35a1dfd604b6a933bb" },
|
"nvim-dap": { "branch": "master", "commit": "1f609cbc48718571c2e69b8bdc75ab74ab98354d" },
|
||||||
"nvim-dap-ui": { "branch": "master", "commit": "5934302d63d1ede12c0b22b6f23518bb183fc972" },
|
"nvim-dap-ui": { "branch": "master", "commit": "b7267003ba4dd860350be86f75b9d9ea287cedca" },
|
||||||
"nvim-lint": { "branch": "master", "commit": "861a04313501563bb1b11f125ae9b7237a517b9b" },
|
"nvim-lint": { "branch": "master", "commit": "2f90fe977ef21db3bf3b7a1ceaf4a1e3aafb2b26" },
|
||||||
"nvim-lspconfig": { "branch": "master", "commit": "aa5f4f4ee10b2688fb37fa46215672441d5cd5d9" },
|
"nvim-lspconfig": { "branch": "master", "commit": "710a8fa7379db32199545f30ea01dd8446b9302f" },
|
||||||
"nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" },
|
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
|
||||||
"nvim-treesitter": { "branch": "master", "commit": "1a4274c9e1226fb4c2009f4c0c3521b1931b0c5c" },
|
"nvim-treesitter": { "branch": "master", "commit": "979beffc1a86e7ba19bd6535c0370d8e1aaaad3c" },
|
||||||
"nvim-web-devicons": { "branch": "master", "commit": "794bba734ec95eaff9bb82fbd112473be2087283" },
|
"nvim-web-devicons": { "branch": "master", "commit": "b77921fdc44833c994fdb389d658ccbce5490c16" },
|
||||||
"oil.nvim": { "branch": "master", "commit": "f3a31eba24587bc038592103d8f7e64648292115" },
|
"oil.nvim": { "branch": "master", "commit": "2cb39e838e9dcd8b374f09a3a87a2e5ec9d372f6" },
|
||||||
"plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" },
|
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
|
||||||
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
"telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" },
|
||||||
"telescope.nvim": { "branch": "master", "commit": "35f94f0ef32d70e3664a703cefbe71bd1456d899" },
|
"telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
|
"todo-comments.nvim": { "branch": "main", "commit": "e1549807066947818113a7d7ed48f637e49620d3" },
|
||||||
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
"undotree": { "branch": "master", "commit": "56c684a805fe948936cda0d1b19505b84ad7e065" },
|
||||||
"vim-grammarous": { "branch": "master", "commit": "db46357465ce587d5325e816235b5e92415f8c05" },
|
"vim-grammarous": { "branch": "master", "commit": "db46357465ce587d5325e816235b5e92415f8c05" },
|
||||||
"vim-wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" },
|
"vim-wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" },
|
||||||
"vimtex": { "branch": "master", "commit": "a80934749c69cc6875b3c9b13ef59573a4824fb2" }
|
"vimtex": { "branch": "master", "commit": "cf259f47fc18977f3fbe87ec527d9766b423900a" }
|
||||||
}
|
}
|
5
setup.sh
5
setup.sh
|
@ -2,11 +2,14 @@
|
||||||
|
|
||||||
# what directories should be installable by all users including the root user
|
# what directories should be installable by all users including the root user
|
||||||
base=(
|
base=(
|
||||||
|
sway
|
||||||
)
|
)
|
||||||
|
|
||||||
# folders that should, or only need to be installed for a local user
|
# folders that should, or only need to be installed for a local user
|
||||||
useronly=(
|
useronly=(
|
||||||
nvim
|
nvim
|
||||||
|
waybar
|
||||||
|
hypr
|
||||||
)
|
)
|
||||||
|
|
||||||
# run the stow command for the passed in directory ($2) in location $1
|
# run the stow command for the passed in directory ($2) in location $1
|
||||||
|
@ -29,7 +32,7 @@ done
|
||||||
|
|
||||||
# install only user space folders
|
# install only user space folders
|
||||||
for app in ${useronly[@]}; do
|
for app in ${useronly[@]}; do
|
||||||
if [[! "$(whoami)" = *"root"*]]; then
|
if ! [[ "$(whoami)" = *"root"* ]]; then
|
||||||
stowit "${HOME}" $app
|
stowit "${HOME}" $app
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
137
waybar/.config/waybar/config.jsonc
Normal file
137
waybar/.config/waybar/config.jsonc
Normal file
|
@ -0,0 +1,137 @@
|
||||||
|
{
|
||||||
|
"position": "top",
|
||||||
|
"layer": "top",
|
||||||
|
"height": 16,
|
||||||
|
|
||||||
|
"modules-left": ["custom/launcher","custom/playerctl","custom/playerlabel","cava"],
|
||||||
|
"modules-center": ["hyprland/workspaces"],
|
||||||
|
"modules-right": ["disk","memory","cpu","battery","pulseaudio","clock"],
|
||||||
|
|
||||||
|
"custom/launcher": {
|
||||||
|
"format": "",
|
||||||
|
"on-click": "wlogout",
|
||||||
|
"tooltip": "Power Menu"
|
||||||
|
},
|
||||||
|
|
||||||
|
"cava": {
|
||||||
|
// "cava_config": "$XDG_CONFIG_HOME/cava/config",
|
||||||
|
"framerate": 30,
|
||||||
|
"autosens": 1,
|
||||||
|
"sensitivity": 1,
|
||||||
|
"bars": 14,
|
||||||
|
"lower_cutoff_freq": 50,
|
||||||
|
"higher_cutoff_freq": 10000,
|
||||||
|
"method": "pulse",
|
||||||
|
"source": "auto",
|
||||||
|
"stereo": true,
|
||||||
|
"reverse": false,
|
||||||
|
"bar_delimiter": 0,
|
||||||
|
"monstercat": false,
|
||||||
|
"waves": false,
|
||||||
|
"noise_reduction": 0.77,
|
||||||
|
"input_delay": 2,
|
||||||
|
"format-icons" : ["▁", "▂", "▃", "▄", "▅", "▆", "▇", "█" ],
|
||||||
|
"actions": {
|
||||||
|
"on-click-right": "mode"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"interval": 1,
|
||||||
|
"format": " {:%Y-%m-%d %H:%M}",
|
||||||
|
"format-alt": " {:%H:%M}",
|
||||||
|
"on-click-middle": "gnome-calendar",
|
||||||
|
"tooltip-format": "\n<span size='12pt' font='FiraCode Nerd Font'>{calendar}</span>",
|
||||||
|
"calendar": {
|
||||||
|
"mode" : "month",
|
||||||
|
"mode-mon-col" : 3,
|
||||||
|
"on-scroll" : 1,
|
||||||
|
"on-click-right": "mode",
|
||||||
|
"format": {
|
||||||
|
"months": "<span color='#5e81ac'><b>{}</b></span>",
|
||||||
|
"days": "<span color='#88c0d0'><b>{}</b></span>",
|
||||||
|
"weekdays": "<span color='#d08770'><b>{}</b></span>",
|
||||||
|
"today": "<span color='#bf616a'><b><u>{}</u></b></span>"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"custom/playerctl": {
|
||||||
|
"format": "{icon}",
|
||||||
|
"return-type": "json",
|
||||||
|
"exec": "playerctl --player=mpd -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
|
||||||
|
"on-click": "playerctl --player=mpd play-pause",
|
||||||
|
"on-click-middle": "playerctl --player=mpd previous",
|
||||||
|
"on-click-right": "playerctl --player=mpd next",
|
||||||
|
"format-icons": {
|
||||||
|
"Playing": "<span foreground='#46c880'> </span>",
|
||||||
|
"Paused": "<span foreground='#cdd6f4'> </span>",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"custom/playerlabel": {
|
||||||
|
"format": "<span>{}</span>",
|
||||||
|
"return-type": "json",
|
||||||
|
"max-length": 48,
|
||||||
|
"exec": "playerctl --player=mpd -a metadata --format '{\"text\": \"{{title}} - {{markup_escape(artist)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(artist)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F",
|
||||||
|
"on-click": "playerctl --player=mpd play-pause",
|
||||||
|
"on-click-middle": "playerctl --player=mpd previous",
|
||||||
|
"on-click-right": "playerctl --player=mpd next",
|
||||||
|
},
|
||||||
|
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "<span size='12000'>{icon}</span> {volume}%",
|
||||||
|
"format-muted": "<span size='12000' foreground='#ff7eb6'></span> {volume}%",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": "",
|
||||||
|
"hands-free": "",
|
||||||
|
"headset": "",
|
||||||
|
"phone": "",
|
||||||
|
"portable": "",
|
||||||
|
"car": "",
|
||||||
|
"default": [" ", " "],
|
||||||
|
},
|
||||||
|
"on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle",
|
||||||
|
"on-click-right": "pavucontrol",
|
||||||
|
},
|
||||||
|
|
||||||
|
"tray": {
|
||||||
|
"icon-size": 16,
|
||||||
|
"spacing": 8,
|
||||||
|
},
|
||||||
|
|
||||||
|
"memory": {
|
||||||
|
"format": " {}%",
|
||||||
|
"format-alt": " {used}/{total} GiB",
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": " {usage}%",
|
||||||
|
"format-alt": " {avg_frequency} GHz",
|
||||||
|
"interval": 5,
|
||||||
|
},
|
||||||
|
"disk": {
|
||||||
|
"format": " {}%",
|
||||||
|
"format-alt": " {used}/{total} GiB",
|
||||||
|
"interval": 20,
|
||||||
|
"path": "/"
|
||||||
|
},
|
||||||
|
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{}",
|
||||||
|
"max-length": 25,
|
||||||
|
"separate-outputs": true
|
||||||
|
},
|
||||||
|
|
||||||
|
"battery": {
|
||||||
|
"states": {
|
||||||
|
// "good": 95,
|
||||||
|
"warning": 30,
|
||||||
|
"critical": 15
|
||||||
|
},
|
||||||
|
"format": "{icon} {capacity}%",
|
||||||
|
"format-full": "{icon} {capacity}%",
|
||||||
|
"format-charging": " {capacity}%",
|
||||||
|
"format-plugged": " {capacity}%",
|
||||||
|
"format-alt": "{time} {icon}",
|
||||||
|
"format-icons": ["", "", "", "", ""]
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
220
waybar/.config/waybar/style.css
Normal file
220
waybar/.config/waybar/style.css
Normal file
|
@ -0,0 +1,220 @@
|
||||||
|
* {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0px;
|
||||||
|
font-family: FontAwesome, FiraCode Nerd Font, Inter, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
font-style: normal;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background: rgba(76,86,106,0);
|
||||||
|
color: #cdd6f4
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background: #434c5e;
|
||||||
|
margin: 5px 5px;
|
||||||
|
padding: 8px 5px;
|
||||||
|
border-radius: 16px;
|
||||||
|
border: solid 0px #cdd6f4;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0px 5px;
|
||||||
|
margin: 0px 3px;
|
||||||
|
border-radius: 16px;
|
||||||
|
color: #eceff4;
|
||||||
|
background-color: #6f7787;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
#workspaces button.active {
|
||||||
|
color: #2e3440;
|
||||||
|
background-color: #d8dee9;
|
||||||
|
border-radius: 16px;
|
||||||
|
min-width: 50px;
|
||||||
|
background-size: 400% 400%;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
#workspaces button:hover {
|
||||||
|
background-color: #8fbcbb;
|
||||||
|
color: #2e3440;
|
||||||
|
border-radius: 16px;
|
||||||
|
min-width: 50px;
|
||||||
|
background-size: 400% 400%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#pulseaudio,
|
||||||
|
#network,
|
||||||
|
#custom-launcher,
|
||||||
|
#custom-pacmanAlt,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#cava,
|
||||||
|
#language,
|
||||||
|
#windows,
|
||||||
|
|
||||||
|
#cava{
|
||||||
|
background-color: #434c5e;
|
||||||
|
color: #a3be8c;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: #434c5e;
|
||||||
|
color: #a3be8c;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background: #434c5e;
|
||||||
|
margin: 5px 5px 5px 5px;
|
||||||
|
border-radius: 16px;
|
||||||
|
padding: 0px 12px;
|
||||||
|
/*border-right: solid 1px #282738;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
color: #cdd6f4;
|
||||||
|
background-color: #434c5e;
|
||||||
|
border-radius: 0px 0px 0px 24px;
|
||||||
|
padding-left: 13px;
|
||||||
|
padding-right: 15px;
|
||||||
|
margin-right: 0px;
|
||||||
|
margin-left: 10px;
|
||||||
|
margin-top: 0px;
|
||||||
|
margin-bottom: 0px;
|
||||||
|
font-weight: bold;
|
||||||
|
/*border-left: solid 1px #282738;*/
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
color: #cdd6f4;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-right: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
color: #5e81ac;
|
||||||
|
background: #434c5e;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-launcher {
|
||||||
|
color: #cdd6f4;
|
||||||
|
background-color: #434c5e;
|
||||||
|
border-radius: 0px 24px 0px 0px;
|
||||||
|
margin: 0px 0px 0px 0px;
|
||||||
|
padding: 0 20px 0 13px;
|
||||||
|
/*border-right: solid 1px #282738;*/
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-launcher button:hover {
|
||||||
|
background-color: #FB4934;
|
||||||
|
color: transparent;
|
||||||
|
border-radius: 8px;
|
||||||
|
margin-right: -5px;
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-playerctl {
|
||||||
|
background: #2e3440;
|
||||||
|
padding: 0px 5px 0px 10px;
|
||||||
|
border-radius: 16px;
|
||||||
|
/*border-left: solid 1px #282738;*/
|
||||||
|
/*border-right: solid 1px #282738;*/
|
||||||
|
margin: 5px 7px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-playerlabel {
|
||||||
|
background: transparent;
|
||||||
|
padding-left: 10px;
|
||||||
|
padding-right: 5px;
|
||||||
|
border-radius: 16px;
|
||||||
|
/*border-left: solid 1px #282738;*/
|
||||||
|
/*border-right: solid 1px #282738;*/
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
background: #2e3440;
|
||||||
|
padding-left: 15px;
|
||||||
|
padding-right: 15px;
|
||||||
|
border-radius: 16px;
|
||||||
|
/*border-left: solid 1px #282738;*/
|
||||||
|
/*border-right: solid 1px #282738;*/
|
||||||
|
margin-top: 5px;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
font-weight: normal;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
background-color: #434c5e;
|
||||||
|
color: #bf616a;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
background-color: #434c5e;
|
||||||
|
color: #b48ead;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#disk {
|
||||||
|
background-color: #434c5e;
|
||||||
|
color: #d08770;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#language {
|
||||||
|
background-color: #434c5e;
|
||||||
|
color: #a3be8c;
|
||||||
|
border-radius: 16px;
|
||||||
|
margin: 5px;
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
padding: 0px 10px 0px 10px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
Loading…
Reference in a new issue