updated
This commit is contained in:
parent
6f97ae2d33
commit
9f8ac8a84e
12 changed files with 1787 additions and 106 deletions
|
@ -9,8 +9,7 @@
|
|||
### STARTING XSESSION
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]
|
||||
then
|
||||
#startx -- vt1 -keeptty &>/dev/null
|
||||
sh "./.local/bin/hyprland_session"
|
||||
sh $HOME/.winitrc
|
||||
logout
|
||||
fi
|
||||
|
||||
|
@ -21,4 +20,4 @@ export XDG_CACHE_HOME="${XDG_CACHE_HOME:="$HOME/.cache"}"
|
|||
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:="$HOME/.config"}"
|
||||
|
||||
### BASHRC
|
||||
source "$HOME"/.bashrc # Load the bashrc
|
||||
source "$HOME"/.bashrc # Load the bashrc
|
||||
|
|
|
@ -4,9 +4,9 @@ exec-once /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
|
|||
exec-once = /usr/lib/xdg-desktop-portal
|
||||
exec-once = /usr/lib/xdg-desktop-portal-wlr
|
||||
exec-once = dunst --config ~/.config/dunst/dunstrc
|
||||
exec-once = $HOME/.wbg
|
||||
exec-once = wl-paste --type text --watch cliphist store #Stores only text data
|
||||
exec-once = wl-paste --type image --watch cliphist store #Stores only image data
|
||||
exec-once = hyprpaper
|
||||
exec-once = waybar
|
||||
|
||||
# Monitors
|
||||
|
@ -14,65 +14,65 @@ monitor=,preferred,auto,1
|
|||
|
||||
# Input
|
||||
input {
|
||||
kb_layout = us,es
|
||||
kb_options = grp:shift_caps_toggle
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
}
|
||||
sensitivity = -0.2 # -1.0 - 1.0, 0 means no modification.
|
||||
kb_layout = us,es
|
||||
kb_options = grp:shift_caps_toggle
|
||||
follow_mouse = 1
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
}
|
||||
sensitivity = -0.2 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
# General
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 5
|
||||
border_size = 3
|
||||
col.active_border = rgb(9d0006) rgb(fb4934) 45deg
|
||||
col.inactive_border = rgb(504945)
|
||||
layout = master
|
||||
gaps_in = 5
|
||||
gaps_out = 10
|
||||
border_size = 3
|
||||
col.active_border = rgb(9d0006) rgb(fb4934) 45deg
|
||||
col.inactive_border = rgb(504945)
|
||||
layout = master
|
||||
}
|
||||
|
||||
# Decorations
|
||||
decoration {
|
||||
rounding = 5
|
||||
blur = yes
|
||||
blur_size = 3
|
||||
blur_passes = 1
|
||||
blur_new_optimizations = on
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
rounding = 7
|
||||
blur = yes
|
||||
blur_size = 3
|
||||
blur_passes = 1
|
||||
blur_new_optimizations = on
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
# Animations
|
||||
animations {
|
||||
enabled = yes
|
||||
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
|
||||
enabled = yes
|
||||
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
|
||||
}
|
||||
|
||||
# Dwindle layout config
|
||||
dwindle {
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
# Master layout config
|
||||
master {
|
||||
no_gaps_when_only = true
|
||||
new_is_master = false
|
||||
no_gaps_when_only = true
|
||||
new_is_master = false
|
||||
}
|
||||
|
||||
# Mouse gestures
|
||||
gestures {
|
||||
workspace_swipe = on
|
||||
workspace_swipe = on
|
||||
}
|
||||
|
||||
# Misc
|
||||
|
@ -85,25 +85,16 @@ misc {
|
|||
}
|
||||
|
||||
device:epic mouse V1 {
|
||||
sensitivity = -0.5
|
||||
sensitivity = -0.5
|
||||
}
|
||||
|
||||
# Window rules
|
||||
# Example windowrule v1
|
||||
# windowrule = float, ^(kitty)$
|
||||
# Example windowrule v2
|
||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
|
||||
$supMod = SUPER
|
||||
$altMod = ALT
|
||||
$conMod = CONTROL
|
||||
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $supMod, RETURN, exec, wezterm
|
||||
bind = $supMod, Q, killactive,
|
||||
bind = $supMod_$conMod_SHIFT, Q, exit,
|
||||
bind = $supMod, R, exec, pkill rofi || rofi -show drun
|
||||
bind = $supMod, B, exec, pkill waybar || waybar
|
||||
bind = $supMod, V, togglefloating,
|
||||
bind = $supMod, P, pseudo, # dwindle
|
||||
|
@ -128,8 +119,8 @@ bind = $supMod, I, layoutmsg, addmaster
|
|||
bind = $supMod, D, layoutmsg, removemaster
|
||||
|
||||
# change the master orientation
|
||||
bind = $supMod, h, layoutmsg, orientationnext
|
||||
bind = $supMod, l, layoutmsg, orientationprev
|
||||
bind = $supMod, l, layoutmsg, orientationnext
|
||||
bind = $supMod, h, layoutmsg, orientationprev
|
||||
|
||||
# Switch workspaces with supMod + [0-9]
|
||||
bind = $supMod, 1, workspace, 1
|
||||
|
@ -143,32 +134,6 @@ bind = $supMod, 8, workspace, 8
|
|||
bind = $supMod, 9, workspace, 9
|
||||
bind = $supMod, 0, workspace, 10
|
||||
|
||||
# Apps
|
||||
bind = $supMod, E, exec, wezterm start --class editor -- ./.local/bin/lvim
|
||||
bind = $supMod, W, exec, firefox
|
||||
bind = $supMod, F, exec, wezterm start --class file_manager -- ranger
|
||||
bind = $supMod, M, exec, wezterm start --class music_player -- cmus
|
||||
bind = $supMod, P, exec, keepassxc
|
||||
bind = $supMod, G, exec, retroarch
|
||||
|
||||
# Quick terminal scripts/commands
|
||||
bind = $supMod_$altMod, T, exec, wezterm start --class tut -- tut
|
||||
bind = $supMod_$altMod, F, exec, wezterm start --class flix_cli -- flix-cli
|
||||
bind = $supMod_$altMod, A, exec, wezterm start --class ani_cli -- ani-cli
|
||||
bind = $supMod_$altMod, Y, exec, wezterm start --class ytfzf -- ytfzf -flstT chafa
|
||||
bind = $supMod_$altMod, M, exec, wezterm start --class ytfzf_music -- ytfzf -mlstT chafa
|
||||
bind = $supMod_$altMod, P, exec, wezterm start --class pulsemixer -- pulsemixer
|
||||
bind = $supMod_$altMod, O, exec, wezterm start --class alsamixer -- alsamixer
|
||||
bind = $supMod_$altMod, R, exec, wezterm start --class newsboat -- newsboat
|
||||
|
||||
# Quick rofi scripts
|
||||
bind = $supMod_SHIFT, W, exec, $HOME/.config/rofi/scripts/rofi_wifi
|
||||
bind = $supMod_SHIFT, E, exec, $HOME/.config/rofi/scripts/rofi_emoji
|
||||
bind = $supMod_SHIFT, S, exec, $HOME/.config/rofi/scripts/rofi_scrot
|
||||
bind = $supMod_$conMod_SHIFT, S, exec, $HOME/.config/rofi/scripts/rofi_scrot -s
|
||||
bind = $supMod_SHIFT, Q, exec, $HOME/.config/rofi/scripts/rofi_power
|
||||
bind = $supMod_SHIFT, C, exec, cliphist list | rofi -dmenu -p " Clipboard " | cliphist decode | wl-copy
|
||||
|
||||
# Move active window to a workspace with supMod + SHIFT + [0-9]
|
||||
bind = $supMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $supMod SHIFT, 2, movetoworkspace, 2
|
||||
|
@ -201,10 +166,40 @@ bindl=, XF86AudioPrev, exec, playerctl previous
|
|||
bindl=, XF86AudioStop, exec, playerctl stop
|
||||
bindl=, XF86News, exec, wezterm start --class newsboat -- newsboat
|
||||
|
||||
|
||||
# Brightness control
|
||||
bindl=, XF86MonBrightnessUp, exec, light -A 10
|
||||
bindl=, XF86MonBrightnessDown, exec, light -U 10
|
||||
bindl=, XF86MonBrightnessUp, exec, brightnessctl s 10%+
|
||||
bindl=, XF86MonBrightnessDown, exec, brightnessctl s 10%-
|
||||
|
||||
# Display configuration
|
||||
bindl=, XF86Display, exec, wdisplays
|
||||
|
||||
# Rofi menus
|
||||
binde = $supMod_SHIFT, D, exec, pkill rofi || rofi -show drun
|
||||
binde = $supMod_SHIFT, W, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_wall
|
||||
binde = $supMod_SHIFT, I, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_wifi
|
||||
binde = $supMod_SHIFT, E, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_emoji
|
||||
binde = $supMod_SHIFT, S, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_scrot
|
||||
binde = $supMod_$conMod, S, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_scrot -s
|
||||
binde = $supMod_SHIFT, Q, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_power
|
||||
binde = $supMod_SHIFT, B, exec, pkill rofi || $HOME/.config/rofi/scripts/rofi_blue
|
||||
binde = $supMod_SHIFT, C, exec, pkill rofi || cliphist list | rofi -dmenu -p " Clipboard " | cliphist decode | wl-copy
|
||||
|
||||
# Quick terminal scripts/commands
|
||||
binde = $supMod_$altMod, T, exec, wezterm start --class tut -- tut
|
||||
binde = $supMod_$altMod, F, exec, wezterm start --class flix_cli -- flix-cli
|
||||
binde = $supMod_$altMod, A, exec, wezterm start --class ani_cli -- ani-cli
|
||||
binde = $supMod_$altMod, Y, exec, wezterm start --class ytfzf -- ytfzf -flstT chafa
|
||||
binde = $supMod_$altMod, M, exec, wezterm start --class ytfzf_music -- ytfzf -mlstT chafa
|
||||
binde = $supMod_$altMod, P, exec, wezterm start --class pulsemixer -- pulsemixer
|
||||
binde = $supMod_$altMod, O, exec, wezterm start --class alsamixer -- alsamixer
|
||||
binde = $supMod_$altMod, R, exec, wezterm start --class newsboat -- newsboat
|
||||
binde = $supMod_$altMod, B, exec, wezterm start --class btop -- btop
|
||||
binde = $supMod_$altMod, H, exec, wezterm start --class htop -- htop
|
||||
|
||||
# Apps
|
||||
binde = $supMod, E, exec, wezterm start --class editor -- ./.local/bin/lvim
|
||||
binde = $supMod, W, exec, firefox
|
||||
binde = $supMod, F, exec, wezterm start --class file_manager -- ranger
|
||||
binde = $supMod, M, exec, wezterm start --class music_player -- cmus
|
||||
binde = $supMod, P, exec, keepassxc
|
||||
binde = $supMod, G, exec, retroarch
|
||||
|
|
317
new-config/.config/rofi/scripts/rofi_blue
Executable file
317
new-config/.config/rofi/scripts/rofi_blue
Executable file
|
@ -0,0 +1,317 @@
|
|||
#!/usr/bin/env bash
|
||||
# __ _ _ _ _ _ _
|
||||
# _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__
|
||||
# | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \
|
||||
# | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | |
|
||||
# |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_|
|
||||
#
|
||||
# Author: Nick Clyde (clydedroid)
|
||||
#
|
||||
# A script that generates a rofi menu that uses bluetoothctl to
|
||||
# connect to bluetooth devices and display status info.
|
||||
#
|
||||
# Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu)
|
||||
# Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl)
|
||||
#
|
||||
# Depends on:
|
||||
# Arch repositories: rofi, bluez-utils (contains bluetoothctl)
|
||||
|
||||
# Constants
|
||||
divider="---------"
|
||||
goback="Back"
|
||||
|
||||
# Checks if bluetooth controller is powered on
|
||||
power_on() {
|
||||
if bluetoothctl show | grep -q "Powered: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles power state
|
||||
toggle_power() {
|
||||
if power_on; then
|
||||
bluetoothctl power off
|
||||
show_menu
|
||||
else
|
||||
if rfkill list bluetooth | grep -q 'blocked: yes'; then
|
||||
rfkill unblock bluetooth && sleep 3
|
||||
fi
|
||||
bluetoothctl power on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is scanning for new devices
|
||||
scan_on() {
|
||||
if bluetoothctl show | grep -q "Discovering: yes"; then
|
||||
echo "Scan: on"
|
||||
return 0
|
||||
else
|
||||
echo "Scan: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles scanning state
|
||||
toggle_scan() {
|
||||
if scan_on; then
|
||||
kill $(pgrep -f "bluetoothctl scan on")
|
||||
bluetoothctl scan off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl scan on &
|
||||
echo "Scanning..."
|
||||
sleep 5
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is able to pair to devices
|
||||
pairable_on() {
|
||||
if bluetoothctl show | grep -q "Pairable: yes"; then
|
||||
echo "Pairable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Pairable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles pairable state
|
||||
toggle_pairable() {
|
||||
if pairable_on; then
|
||||
bluetoothctl pairable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl pairable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if controller is discoverable by other devices
|
||||
discoverable_on() {
|
||||
if bluetoothctl show | grep -q "Discoverable: yes"; then
|
||||
echo "Discoverable: on"
|
||||
return 0
|
||||
else
|
||||
echo "Discoverable: off"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles discoverable state
|
||||
toggle_discoverable() {
|
||||
if discoverable_on; then
|
||||
bluetoothctl discoverable off
|
||||
show_menu
|
||||
else
|
||||
bluetoothctl discoverable on
|
||||
show_menu
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is connected
|
||||
device_connected() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Connected: yes"; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_connection() {
|
||||
if device_connected "$1"; then
|
||||
bluetoothctl disconnect "$1"
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl connect "$1"
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is paired
|
||||
device_paired() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Paired: yes"; then
|
||||
echo "Paired: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Paired: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device paired state
|
||||
toggle_paired() {
|
||||
if device_paired "$1"; then
|
||||
bluetoothctl remove "$1"
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl pair "$1"
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Checks if a device is trusted
|
||||
device_trusted() {
|
||||
device_info=$(bluetoothctl info "$1")
|
||||
if echo "$device_info" | grep -q "Trusted: yes"; then
|
||||
echo "Trusted: yes"
|
||||
return 0
|
||||
else
|
||||
echo "Trusted: no"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
# Toggles device connection
|
||||
toggle_trust() {
|
||||
if device_trusted "$1"; then
|
||||
bluetoothctl untrust "$1"
|
||||
device_menu "$device"
|
||||
else
|
||||
bluetoothctl trust "$1"
|
||||
device_menu "$device"
|
||||
fi
|
||||
}
|
||||
|
||||
# Prints a short string with the current bluetooth status
|
||||
# Useful for status bars like polybar, etc.
|
||||
print_status() {
|
||||
if power_on; then
|
||||
printf ''
|
||||
|
||||
paired_devices_cmd="devices Paired"
|
||||
# Check if an outdated version of bluetoothctl is used to preserve backwards compatibility
|
||||
if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then
|
||||
paired_devices_cmd="paired-devices"
|
||||
fi
|
||||
|
||||
mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2)
|
||||
counter=0
|
||||
|
||||
for device in "${paired_devices[@]}"; do
|
||||
if device_connected "$device"; then
|
||||
device_alias=$(bluetoothctl info "$device" | grep "Alias" | cut -d ' ' -f 2-)
|
||||
|
||||
if [ $counter -gt 0 ]; then
|
||||
printf ", %s" "$device_alias"
|
||||
else
|
||||
printf " %s" "$device_alias"
|
||||
fi
|
||||
|
||||
((counter++))
|
||||
fi
|
||||
done
|
||||
printf "\n"
|
||||
else
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
# A submenu for a specific device that allows connecting, pairing, and trusting
|
||||
device_menu() {
|
||||
device=$1
|
||||
|
||||
# Get device name and mac address
|
||||
device_name=$(echo "$device" | cut -d ' ' -f 3-)
|
||||
mac=$(echo "$device" | cut -d ' ' -f 2)
|
||||
|
||||
# Build options
|
||||
if device_connected "$mac"; then
|
||||
connected="Connected: yes"
|
||||
else
|
||||
connected="Connected: no"
|
||||
fi
|
||||
paired=$(device_paired "$mac")
|
||||
trusted=$(device_trusted "$mac")
|
||||
options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit"
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command "$device_name")"
|
||||
|
||||
# Match chosen option to command
|
||||
case "$chosen" in
|
||||
"" | "$divider")
|
||||
echo "No option chosen."
|
||||
;;
|
||||
"$connected")
|
||||
toggle_connection "$mac"
|
||||
;;
|
||||
"$paired")
|
||||
toggle_paired "$mac"
|
||||
;;
|
||||
"$trusted")
|
||||
toggle_trust "$mac"
|
||||
;;
|
||||
"$goback")
|
||||
show_menu
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Opens a rofi menu with current bluetooth status and options to connect
|
||||
show_menu() {
|
||||
# Get menu options
|
||||
if power_on; then
|
||||
power="Power: on"
|
||||
|
||||
# Human-readable names of devices, one per line
|
||||
# If scan is off, will only list paired devices
|
||||
devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-)
|
||||
|
||||
# Get controller flags
|
||||
scan=$(scan_on)
|
||||
pairable=$(pairable_on)
|
||||
discoverable=$(discoverable_on)
|
||||
|
||||
# Options passed to rofi
|
||||
options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit"
|
||||
else
|
||||
power="Power: off"
|
||||
options="$power\nExit"
|
||||
fi
|
||||
|
||||
# Open rofi menu, read chosen option
|
||||
chosen="$(echo -e "$options" | $rofi_command " Bluetooth ")"
|
||||
|
||||
# Match chosen option to command
|
||||
case "$chosen" in
|
||||
"" | "$divider")
|
||||
echo "No option chosen."
|
||||
;;
|
||||
"$power")
|
||||
toggle_power
|
||||
;;
|
||||
"$scan")
|
||||
toggle_scan
|
||||
;;
|
||||
"$discoverable")
|
||||
toggle_discoverable
|
||||
;;
|
||||
"$pairable")
|
||||
toggle_pairable
|
||||
;;
|
||||
*)
|
||||
device=$(bluetoothctl devices | grep "$chosen")
|
||||
# Open a submenu if a device is selected
|
||||
if [[ $device ]]; then device_menu "$device"; fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Rofi command to pipe into, can add any options here
|
||||
rofi_command="rofi -dmenu $* -p"
|
||||
|
||||
case "$1" in
|
||||
--status)
|
||||
print_status
|
||||
;;
|
||||
*)
|
||||
show_menu
|
||||
;;
|
||||
esac
|
|
@ -3,6 +3,10 @@
|
|||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple power menu rofi script
|
||||
# - Dependencies: rofi, power-profiles-daemon
|
||||
#
|
||||
|
||||
## CURRENT WALLPAPER FOR LOCKSCREEN ##
|
||||
currwall=$(tail --l 1 "$HOME/.wbg" | awk '{print $5}')
|
||||
|
||||
## OPTIONS ##
|
||||
option1=" Logout"
|
||||
|
@ -35,11 +39,11 @@ case "$action" in
|
|||
$option3*)
|
||||
systemctl poweroff || loginctl poweroff;;
|
||||
$option4*)
|
||||
swaylock &
|
||||
swaylock -i "$currwall" &
|
||||
sleep 0.1
|
||||
systemctl suspend;;
|
||||
$option5*)
|
||||
swaylock;;
|
||||
swaylock -i "$currwall";;
|
||||
$option6*)
|
||||
currentpwr=$(powerprofilesctl get)
|
||||
if [ "$currentpwr" = "performance" ]; then
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
screenshot_directory="$HOME/Pictures/Screenshots"
|
||||
|
||||
countdown() {
|
||||
notify-send "Screenshot" "Recording in 3 seconds" -t 1000
|
||||
notify-send "Screenshot" "Executing in 3 seconds" -t 1000
|
||||
sleep 1
|
||||
notify-send "Screenshot" "Recording in 2 seconds" -t 1000
|
||||
sleep 1
|
||||
notify-send "Screenshot" "Recording in 1 seconds" -t 1000
|
||||
notify-send "Screenshot" "Executing in 2 seconds" -t 1000
|
||||
sleep 1
|
||||
notify-send "Screenshot" "Executing in 1 seconds" -t 1000
|
||||
sleep 2
|
||||
}
|
||||
|
||||
crtf() {
|
||||
|
|
53
new-config/.config/rofi/scripts/rofi_wall
Executable file
53
new-config/.config/rofi/scripts/rofi_wall
Executable file
|
@ -0,0 +1,53 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# ***This script was made by Clay Gomera (Drake)***
|
||||
# - Description: A simple wallpaper changer script
|
||||
# - Dependencies: rofi, fd, feh
|
||||
|
||||
## MAIN VARIABLES AND COMMANDS ##
|
||||
walldir="$HOME/Pictures/Wallpapers" # wallpapers folder, change it to yours, make sure that it ends with a /
|
||||
cd "$walldir" || exit
|
||||
|
||||
## SELECT PICTURE FUNCTION ##
|
||||
selectpic() {
|
||||
wallpaper=$(fd -p "$walldir" | rofi -dmenu -i -p " Wallpaper Selector ")
|
||||
if [ "$wallpaper" ]; then
|
||||
chosenwall=$wallpaper
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
selectpic
|
||||
|
||||
## WALLPAPER SETTING OPTIONS ##
|
||||
option1=" Fill"
|
||||
option2=" Center"
|
||||
option3=" Tile"
|
||||
option4=" Fit"
|
||||
options="$option1\n$option2\n$option3\n$option4\n$option5"
|
||||
|
||||
## MAIN ACTION ##
|
||||
action=$(echo -e "$options" | rofi -dmenu -i -p " Chose the format ")
|
||||
case "$action" in
|
||||
$option1*)
|
||||
pkill swaybg
|
||||
swaybg -m fill -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m fill -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
$option2*)
|
||||
pkill swaybg
|
||||
swaybg -m center -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m center -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
$option3*)
|
||||
pkill swaybg
|
||||
swaybg -m tile -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m tile -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
$option4*)
|
||||
pkill swaybg
|
||||
swaybg -m fit -i "$chosenwall" &
|
||||
echo -e "#!/bin/sh\nswaybg -m fit -i" $walldir/$chosenwall > "$HOME/.wbg"
|
||||
chmod +x "$HOME/.wbg";;
|
||||
esac
|
||||
exit 0
|
1283
new-config/.config/tut/config.toml
Normal file
1283
new-config/.config/tut/config.toml
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"position": "top",
|
||||
"height": 26,
|
||||
"height": 22,
|
||||
"spacing": 3,
|
||||
|
||||
// Choose the order of the modules
|
||||
"modules-left": ["wlr/workspaces"],
|
||||
"modules-center": ["clock"],
|
||||
"modules-right": ["idle_inhibitor", "hyprland/language", "pulseaudio", "backlight", "battery", "network"],
|
||||
"modules-right": ["idle_inhibitor", "hyprland/language", "pulseaudio", "backlight", "battery", "custom/powerprofiles", "network"],
|
||||
|
||||
"wlr/workspaces": {
|
||||
"on-click": "activate",
|
||||
|
@ -51,11 +51,17 @@
|
|||
"format-charging": "{capacity}% ",
|
||||
"format-plugged": "{capacity}% ",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-critical": "{capacity}% {icon}",
|
||||
"format-warning": "{capacity}% {icon}",
|
||||
"format-critical": "{capacity}% {icon} ",
|
||||
"format-warning": "{capacity}% {icon} ",
|
||||
"format-icons": [" ", " ", " ", " ", " "]
|
||||
},
|
||||
|
||||
"custom/powerprofiles": {
|
||||
"exec": "bash $HOME/.config/waybar/power-profiles",
|
||||
"restart-interval": 5,
|
||||
"format": "{}",
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"scroll-step": 1, // %, can be a float
|
||||
"format": "{volume}% {icon} {format_source}",
|
||||
|
@ -78,7 +84,7 @@
|
|||
|
||||
"network": {
|
||||
// "interface": "wlp2*", // (Optional) To force the use of this interface
|
||||
"format-wifi": "{essid} ({signalStrength}%) ",
|
||||
"format-wifi": "{essid} ",
|
||||
"format-ethernet": "{ipaddr}/{cidr} ",
|
||||
"format-disconnected": "Disconnected ",
|
||||
"format-alt": "{ifname}: {ipaddr}/{cidr}"
|
||||
|
|
10
new-config/.config/waybar/power-profiles
Executable file
10
new-config/.config/waybar/power-profiles
Executable file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/bash
|
||||
currntpwr=$(powerprofilesctl get)
|
||||
if [ "${currntpwr}" = "performance" ]; then
|
||||
pwr=" Performance"
|
||||
elif [ "${currntpwr}" = "balanced" ]; then
|
||||
pwr=" Balanced"
|
||||
elif [ "${currntpwr}" = "power-saver" ]; then
|
||||
pwr=" PowerSaver"
|
||||
fi
|
||||
echo "$pwr"
|
|
@ -4,7 +4,7 @@
|
|||
margin-right: 2.5px;
|
||||
margin-left: 2.5px;
|
||||
font-family: mononoki Nerd Font, mononoki Nerd Font Mono;
|
||||
font-size: 18px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
|
@ -45,24 +45,30 @@ button:hover {
|
|||
padding: 0 5px;
|
||||
background-color: transparent;
|
||||
color: #ebdbb2;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
background-color: rgba(204, 36, 29, 0.3);
|
||||
color: #ebdbb2;
|
||||
background-color: rgba(102, 92, 84, 0.5);
|
||||
color: #8ec07c;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: #9d0006;
|
||||
background: #7c6f64;
|
||||
color: #8ec07c;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button.focused {
|
||||
background-color: #64727D;
|
||||
background-color: #7c6f64;
|
||||
box-shadow: inset 0 -3px #ebdbb2;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button.urgent {
|
||||
background-color: #eb4d4b;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#mode {
|
||||
|
@ -71,6 +77,7 @@ button:hover {
|
|||
}
|
||||
|
||||
#clock,
|
||||
#custom-powerprofiles,
|
||||
#battery,
|
||||
#backlight,
|
||||
#network,
|
||||
|
@ -98,7 +105,7 @@ button:hover {
|
|||
}
|
||||
|
||||
#clock {
|
||||
background-color: #3c3836;
|
||||
background-color: #504945;
|
||||
color: #ebdbb2;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
@ -110,8 +117,8 @@ button:hover {
|
|||
}
|
||||
|
||||
#battery.charging, #battery.plugged {
|
||||
background-color: #98971a;
|
||||
color: #ebdbb2;
|
||||
background-color: #689d6a;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
|
@ -150,31 +157,32 @@ label:focus {
|
|||
}
|
||||
|
||||
#network.disconnected {
|
||||
background-color: #cc241d;
|
||||
background-color: #9d0006;
|
||||
color: #ebdbb2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
background-color: #458588;
|
||||
background-color: #076678;
|
||||
color: #ebdbb2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#pulseaudio.muted {
|
||||
background-color: #90b1b1;
|
||||
color: #2a5c45;
|
||||
background-color: #076678;
|
||||
color: #ebdbb2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#idle_inhibitor {
|
||||
background-color: #d65d0e;
|
||||
background-color: #af3a03;
|
||||
color: #ebdbb2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#idle_inhibitor.activated {
|
||||
background-color: #fe8019;
|
||||
color: #3c3836;
|
||||
background-color: #d55d09;
|
||||
color: #ebdbb2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
|
@ -183,3 +191,9 @@ label:focus {
|
|||
color: #ebdbb2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#custom-powerprofiles {
|
||||
background-color: #427b58;
|
||||
color: #ebdbb2;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
|
|
@ -29,5 +29,5 @@ return {
|
|||
exit_behavior = "Close",
|
||||
window_close_confirmation = 'NeverPrompt',
|
||||
tab_bar_at_bottom = false,
|
||||
window_background_opacity = 0.8,
|
||||
window_background_opacity = 0.9,
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue