added scripts to replace waybar
This commit is contained in:
111
btop/btop.conf
111
btop/btop.conf
@@ -1,18 +1,18 @@
|
|||||||
#? Config file for btop v. 1.4.5
|
#? Config file for btop v.1.4.6
|
||||||
|
|
||||||
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
#* Name of a btop++/bpytop/bashtop formatted ".theme" file, "Default" and "TTY" for builtin themes.
|
||||||
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
#* Themes should be placed in "../share/btop/themes" relative to binary or "$HOME/.config/btop/themes"
|
||||||
color_theme = "mytheme"
|
color_theme = "mytheme"
|
||||||
|
|
||||||
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||||
theme_background = True
|
theme_background = true
|
||||||
|
|
||||||
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
||||||
truecolor = True
|
truecolor = true
|
||||||
|
|
||||||
#* Set to true to force tty mode regardless if a real tty has been detected or not.
|
#* Set to true to force tty mode regardless if a real tty has been detected or not.
|
||||||
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
||||||
force_tty = False
|
force_tty = false
|
||||||
|
|
||||||
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
||||||
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
||||||
@@ -22,10 +22,13 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul
|
|||||||
|
|
||||||
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
|
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
|
||||||
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
||||||
vim_keys = False
|
vim_keys = false
|
||||||
|
|
||||||
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||||
rounded_corners = True
|
rounded_corners = true
|
||||||
|
|
||||||
|
#* Use terminal synchronized output sequences to reduce flickering on supported terminals.
|
||||||
|
terminal_sync = true
|
||||||
|
|
||||||
#* Default symbols to use for graph creation, "braille", "block" or "tty".
|
#* Default symbols to use for graph creation, "braille", "block" or "tty".
|
||||||
#* "braille" offers the highest resolution but might not be included in all fonts.
|
#* "braille" offers the highest resolution but might not be included in all fonts.
|
||||||
@@ -60,37 +63,40 @@ update_ms = 2000
|
|||||||
proc_sorting = "cpu lazy"
|
proc_sorting = "cpu lazy"
|
||||||
|
|
||||||
#* Reverse sorting order, True or False.
|
#* Reverse sorting order, True or False.
|
||||||
proc_reversed = False
|
proc_reversed = false
|
||||||
|
|
||||||
#* Show processes as a tree.
|
#* Show processes as a tree.
|
||||||
proc_tree = False
|
proc_tree = false
|
||||||
|
|
||||||
#* Use the cpu graph colors in the process list.
|
#* Use the cpu graph colors in the process list.
|
||||||
proc_colors = True
|
proc_colors = true
|
||||||
|
|
||||||
#* Use a darkening gradient in the process list.
|
#* Use a darkening gradient in the process list.
|
||||||
proc_gradient = True
|
proc_gradient = true
|
||||||
|
|
||||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||||
proc_per_core = False
|
proc_per_core = false
|
||||||
|
|
||||||
#* Show process memory as bytes instead of percent.
|
#* Show process memory as bytes instead of percent.
|
||||||
proc_mem_bytes = True
|
proc_mem_bytes = true
|
||||||
|
|
||||||
#* Show cpu graph for each process.
|
#* Show cpu graph for each process.
|
||||||
proc_cpu_graphs = True
|
proc_cpu_graphs = true
|
||||||
|
|
||||||
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
||||||
proc_info_smaps = False
|
proc_info_smaps = false
|
||||||
|
|
||||||
#* Show proc box on left side of screen instead of right.
|
#* Show proc box on left side of screen instead of right.
|
||||||
proc_left = False
|
proc_left = false
|
||||||
|
|
||||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||||
proc_filter_kernel = False
|
proc_filter_kernel = false
|
||||||
|
|
||||||
#* In tree-view, always accumulate child process resources in the parent process.
|
#* In tree-view, always accumulate child process resources in the parent process.
|
||||||
proc_aggregate = False
|
proc_aggregate = false
|
||||||
|
|
||||||
|
#* Should cpu and memory usage display be preserved for dead processes when paused.
|
||||||
|
keep_dead_proc_usage = false
|
||||||
|
|
||||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||||
#* Select from a list of detected attributes from the options menu.
|
#* Select from a list of detected attributes from the options menu.
|
||||||
@@ -104,28 +110,28 @@ cpu_graph_lower = "Auto"
|
|||||||
show_gpu_info = "Auto"
|
show_gpu_info = "Auto"
|
||||||
|
|
||||||
#* Toggles if the lower CPU graph should be inverted.
|
#* Toggles if the lower CPU graph should be inverted.
|
||||||
cpu_invert_lower = True
|
cpu_invert_lower = true
|
||||||
|
|
||||||
#* Set to True to completely disable the lower CPU graph.
|
#* Set to True to completely disable the lower CPU graph.
|
||||||
cpu_single_graph = False
|
cpu_single_graph = false
|
||||||
|
|
||||||
#* Show cpu box at bottom of screen instead of top.
|
#* Show cpu box at bottom of screen instead of top.
|
||||||
cpu_bottom = False
|
cpu_bottom = false
|
||||||
|
|
||||||
#* Shows the system uptime in the CPU box.
|
#* Shows the system uptime in the CPU box.
|
||||||
show_uptime = True
|
show_uptime = true
|
||||||
|
|
||||||
#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo.
|
#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo.
|
||||||
show_cpu_watts = True
|
show_cpu_watts = true
|
||||||
|
|
||||||
#* Show cpu temperature.
|
#* Show cpu temperature.
|
||||||
check_temp = True
|
check_temp = true
|
||||||
|
|
||||||
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
||||||
cpu_sensor = "Auto"
|
cpu_sensor = "Auto"
|
||||||
|
|
||||||
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
||||||
show_coretemp = True
|
show_coretemp = true
|
||||||
|
|
||||||
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
|
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
|
||||||
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
|
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
|
||||||
@@ -137,17 +143,20 @@ cpu_core_map = ""
|
|||||||
temp_scale = "celsius"
|
temp_scale = "celsius"
|
||||||
|
|
||||||
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
||||||
base_10_sizes = False
|
base_10_sizes = false
|
||||||
|
|
||||||
#* Show CPU frequency.
|
#* Show CPU frequency.
|
||||||
show_cpu_freq = True
|
show_cpu_freq = true
|
||||||
|
|
||||||
|
#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average".
|
||||||
|
freq_mode = "first"
|
||||||
|
|
||||||
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
|
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
|
||||||
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
|
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
|
||||||
clock_format = "%X"
|
clock_format = "%X"
|
||||||
|
|
||||||
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
|
#* Update main ui in background when menus are showing, set this to false if the menus is flickering too much for comfort.
|
||||||
background_update = True
|
background_update = true
|
||||||
|
|
||||||
#* Custom cpu model name, empty string to disable.
|
#* Custom cpu model name, empty string to disable.
|
||||||
custom_cpu_name = ""
|
custom_cpu_name = ""
|
||||||
@@ -157,43 +166,43 @@ custom_cpu_name = ""
|
|||||||
disks_filter = ""
|
disks_filter = ""
|
||||||
|
|
||||||
#* Show graphs instead of meters for memory values.
|
#* Show graphs instead of meters for memory values.
|
||||||
mem_graphs = True
|
mem_graphs = true
|
||||||
|
|
||||||
#* Show mem box below net box instead of above.
|
#* Show mem box below net box instead of above.
|
||||||
mem_below_net = False
|
mem_below_net = false
|
||||||
|
|
||||||
#* Count ZFS ARC in cached and available memory.
|
#* Count ZFS ARC in cached and available memory.
|
||||||
zfs_arc_cached = True
|
zfs_arc_cached = true
|
||||||
|
|
||||||
#* If swap memory should be shown in memory box.
|
#* If swap memory should be shown in memory box.
|
||||||
show_swap = True
|
show_swap = true
|
||||||
|
|
||||||
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
||||||
swap_disk = True
|
swap_disk = true
|
||||||
|
|
||||||
#* If mem box should be split to also show disks info.
|
#* If mem box should be split to also show disks info.
|
||||||
show_disks = True
|
show_disks = true
|
||||||
|
|
||||||
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||||
only_physical = True
|
only_physical = true
|
||||||
|
|
||||||
#* Read disks list from /etc/fstab. This also disables only_physical.
|
#* Read disks list from /etc/fstab. This also disables only_physical.
|
||||||
use_fstab = True
|
use_fstab = true
|
||||||
|
|
||||||
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
||||||
zfs_hide_datasets = False
|
zfs_hide_datasets = false
|
||||||
|
|
||||||
#* Set to true to show available disk space for privileged users.
|
#* Set to true to show available disk space for privileged users.
|
||||||
disk_free_priv = False
|
disk_free_priv = false
|
||||||
|
|
||||||
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
||||||
show_io_stat = True
|
show_io_stat = true
|
||||||
|
|
||||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||||
io_mode = False
|
io_mode = false
|
||||||
|
|
||||||
#* Set to True to show combined read/write io graphs in io mode.
|
#* Set to True to show combined read/write io graphs in io mode.
|
||||||
io_graph_combined = False
|
io_graph_combined = false
|
||||||
|
|
||||||
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
|
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
|
||||||
#* Example: "/mnt/media:100 /:20 /boot:1".
|
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||||
@@ -205,10 +214,10 @@ net_download = 100
|
|||||||
net_upload = 100
|
net_upload = 100
|
||||||
|
|
||||||
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||||
net_auto = True
|
net_auto = true
|
||||||
|
|
||||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||||
net_sync = True
|
net_sync = true
|
||||||
|
|
||||||
#* Starts with the Network Interface specified here.
|
#* Starts with the Network Interface specified here.
|
||||||
net_iface = ""
|
net_iface = ""
|
||||||
@@ -217,26 +226,32 @@ net_iface = ""
|
|||||||
base_10_bitrate = "Auto"
|
base_10_bitrate = "Auto"
|
||||||
|
|
||||||
#* Show battery stats in top right if battery is present.
|
#* Show battery stats in top right if battery is present.
|
||||||
show_battery = True
|
show_battery = true
|
||||||
|
|
||||||
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
||||||
selected_battery = "Auto"
|
selected_battery = "Auto"
|
||||||
|
|
||||||
#* Show power stats of battery next to charge indicator.
|
#* Show power stats of battery next to charge indicator.
|
||||||
show_battery_watts = True
|
show_battery_watts = true
|
||||||
|
|
||||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||||
log_level = "WARNING"
|
log_level = "WARNING"
|
||||||
|
|
||||||
|
#* Automatically save current settings to config file on exit.
|
||||||
|
save_config_on_exit = true
|
||||||
|
|
||||||
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
#* Measure PCIe throughput on NVIDIA cards, may impact performance on certain cards.
|
||||||
nvml_measure_pcie_speeds = True
|
nvml_measure_pcie_speeds = true
|
||||||
|
|
||||||
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
||||||
rsmi_measure_pcie_speeds = True
|
rsmi_measure_pcie_speeds = true
|
||||||
|
|
||||||
#* Horizontally mirror the GPU graph.
|
#* Horizontally mirror the GPU graph.
|
||||||
gpu_mirror_graph = True
|
gpu_mirror_graph = true
|
||||||
|
|
||||||
|
#* Set which GPU vendors to show. Available values are "nvidia amd intel"
|
||||||
|
shown_gpus = "nvidia amd intel"
|
||||||
|
|
||||||
#* Custom gpu0 model name, empty string to disable.
|
#* Custom gpu0 model name, empty string to disable.
|
||||||
custom_gpu_name0 = ""
|
custom_gpu_name0 = ""
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
exec-once = wl-paste --type text --watch cliphist store
|
exec-once = wl-paste --type text --watch cliphist store
|
||||||
exec-once = wl-paste --type image --watch cliphist store
|
exec-once = wl-paste --type image --watch cliphist store
|
||||||
exec-once = waybar & disown
|
#exec-once = waybar & disown
|
||||||
exec-once = librewolf & disown
|
exec-once = librewolf & disown
|
||||||
exec-once = swaync & disown
|
exec-once = swaync & disown
|
||||||
exec-once = hypridle & disown
|
exec-once = hypridle & disown
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||||
|
|
||||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||||
|
bind = $mainMod, A, exec, ~/.config/hypr/scripts/status.sh
|
||||||
bind = $mainMod, B, exec, $browser
|
bind = $mainMod, B, exec, $browser
|
||||||
bind = $mainModu SHIFT, B, exec, $browser2
|
bind = $mainModu SHIFT, B, exec, $browser2
|
||||||
bind = $mainMod, C, killactive,
|
bind = $mainMod, C, killactive,
|
||||||
@@ -17,8 +18,11 @@ bind = $mainMod, M, exit,
|
|||||||
bind = $mainMod, N, exec, swaync-client -t -sw
|
bind = $mainMod, N, exec, swaync-client -t -sw
|
||||||
bind = $mainMod, P, pseudo, # dwindle
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
bind = $mainMod SHIFT, S, exec, hyprshot -m region --clipboard-only,
|
bind = $mainMod SHIFT, S, exec, hyprshot -m region --clipboard-only,
|
||||||
|
bind = $mainMod, Q, exec, ~/.config/hypr/scripts/power-menu.sh
|
||||||
|
bind = $mainMod, U, exec, ~/.config/hypr/scripts/update-sys.sh up
|
||||||
bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
|
bind = $mainMod, V, exec, cliphist list | rofi -dmenu | cliphist decode | wl-copy
|
||||||
bind = $mainMod, W, exec, killall waybar && waybar &
|
bind = $mainMod, W, exec, ~/.config/hypr/scripts/wifi-menu.sh
|
||||||
|
bind = $mainMod SHIFT, W, exec, ~/.config/hypr/scripts/bt-menu.sh
|
||||||
bind = $mainMod, return, exec, $terminal
|
bind = $mainMod, return, exec, $terminal
|
||||||
bind = $mainMod, space, exec, $menu
|
bind = $mainMod, space, exec, $menu
|
||||||
bind = $mainMod, backslash, exec, ~/.config/hypr/scripts/monitor_setup.sh
|
bind = $mainMod, backslash, exec, ~/.config/hypr/scripts/monitor_setup.sh
|
||||||
|
|||||||
@@ -54,13 +54,13 @@ decoration {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# App launcher
|
# App launcher
|
||||||
layerrule = blur, rofi
|
#layerrule = blur, rofi
|
||||||
layerrule = ignorezero, rofi
|
#layerrule = ignorezero, rofi
|
||||||
layerrule = animation slide bottom, rofi
|
#layerrule = animation slide bottom, rofi
|
||||||
|
|
||||||
# Top bar
|
# Top bar
|
||||||
layerrule = blur, waybar
|
#layerrule = blur, waybar
|
||||||
layerrule = ignorezero, waybar
|
#layerrule = ignorezero, waybar
|
||||||
|
|
||||||
dwindle {
|
dwindle {
|
||||||
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||||
|
|||||||
@@ -3,9 +3,5 @@
|
|||||||
# ▀██▀██▀ ██ ██ ██ ████▀ ▀████▀ ▀██▀██▀ ██ ██ ▀████▀ ██████ ██▄▄▄▄ █████▀
|
# ▀██▀██▀ ██ ██ ██ ████▀ ▀████▀ ▀██▀██▀ ██ ██ ▀████▀ ██████ ██▄▄▄▄ █████▀
|
||||||
|
|
||||||
# Ignore maximize requests from apps. You'll probably like this.
|
# Ignore maximize requests from apps. You'll probably like this.
|
||||||
windowrule = suppressevent maximize, class:.*
|
windowrule = suppress_event maximize fullscreen,
|
||||||
|
|
||||||
# Fix some dragging issues with XWayland
|
|
||||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
57
hypr/scripts/bt-menu.sh
Executable file
57
hypr/scripts/bt-menu.sh
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# 1. Notify that we are scanning for new devices
|
||||||
|
notify-send " Bluetooth" "Scanning for devices..." -t 1500
|
||||||
|
|
||||||
|
# 2. Get list of all devices (Connected, Paired, and New)
|
||||||
|
# We run a brief scan to find new devices nearby
|
||||||
|
timeout 2s bluetoothctl scan on > /dev/null 2>&1
|
||||||
|
|
||||||
|
# Get all known/nearby devices
|
||||||
|
devices=$(bluetoothctl devices | cut -d' ' -f2)
|
||||||
|
menu_list=""
|
||||||
|
|
||||||
|
for mac in $devices; do
|
||||||
|
info=$(bluetoothctl info "$mac")
|
||||||
|
name=$(echo "$info" | grep "Name:" | cut -d' ' -f2-)
|
||||||
|
paired=$(echo "$info" | grep "Paired:" | awk '{print $2}')
|
||||||
|
connected=$(echo "$info" | grep "Connected:" | awk '{print $2}')
|
||||||
|
batt=$(echo "$info" | grep "Battery Percentage" | awk -F '[()]' '{print $2}')
|
||||||
|
|
||||||
|
# Set Icons and Status
|
||||||
|
if [ "$connected" == "yes" ]; then
|
||||||
|
icon="" # Connected Icon
|
||||||
|
status="[Connected]"
|
||||||
|
[ -n "$batt" ] && status="[$batt%]"
|
||||||
|
elif [ "$paired" == "yes" ]; then
|
||||||
|
icon="" # Paired but disconnected
|
||||||
|
status="[Paired]"
|
||||||
|
else
|
||||||
|
icon="" # New / Unpaired
|
||||||
|
status="[New]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Format line for Rofi: Icon - Name - Status
|
||||||
|
menu_list+="$icon $name $status\n"
|
||||||
|
done
|
||||||
|
|
||||||
|
# 3. Show Rofi Menu
|
||||||
|
selected=$(echo -e "$menu_list" | sort -r | rofi -dmenu -i -p "Bluetooth" -config "$HOME/.config/rofi/bluetooth.rasi")
|
||||||
|
|
||||||
|
[ -z "$selected" ] && exit
|
||||||
|
|
||||||
|
# 4. Action Logic
|
||||||
|
# Extract the name by removing the icon and the status bracket
|
||||||
|
device_name=$(echo "$selected" | sed -E 's/^[] //' | sed -E 's/ \[.*\]$//')
|
||||||
|
device_mac=$(bluetoothctl devices | grep "$device_name" | awk '{print $2}')
|
||||||
|
|
||||||
|
if [[ "$selected" == *"[Connected]"* ]] || [[ "$selected" == *"%"* ]]; then
|
||||||
|
notify-send "Bluetooth" "Disconnecting $device_name..."
|
||||||
|
bluetoothctl disconnect "$device_mac"
|
||||||
|
elif [[ "$selected" == *"[Paired]"* ]]; then
|
||||||
|
notify-send "Bluetooth" "Connecting to $device_name..."
|
||||||
|
bluetoothctl connect "$device_mac"
|
||||||
|
elif [[ "$selected" == *"[New]"* ]]; then
|
||||||
|
notify-send "Bluetooth" "Pairing with $device_name..."
|
||||||
|
bluetoothctl pair "$device_mac" && bluetoothctl trust "$device_mac" && bluetoothctl connect "$device_mac"
|
||||||
|
fi
|
||||||
19
hypr/scripts/power-menu.sh
Executable file
19
hypr/scripts/power-menu.sh
Executable file
@@ -0,0 +1,19 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
config="$HOME/.config/rofi/power-menu.rasi"
|
||||||
|
|
||||||
|
actions=$(echo -e " Suspend\n Shutdown\n Reboot")
|
||||||
|
|
||||||
|
selected_option=$(echo -e "$actions" | rofi -dmenu -i -config "${config}" -p "Power:")
|
||||||
|
|
||||||
|
case "$selected_option" in
|
||||||
|
*Shutdown)
|
||||||
|
systemctl poweroff
|
||||||
|
;;
|
||||||
|
*Reboot)
|
||||||
|
systemctl reboot
|
||||||
|
;;
|
||||||
|
*Suspend)
|
||||||
|
systemctl suspend
|
||||||
|
;;
|
||||||
|
esac
|
||||||
49
hypr/scripts/status.sh
Executable file
49
hypr/scripts/status.sh
Executable file
@@ -0,0 +1,49 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# --- STAGE 1: THE INSTANT DATA ---
|
||||||
|
# Gather time, workspace, and hardware stats immediately
|
||||||
|
time_info=$(date +"%H:%M | %A, %d %b")
|
||||||
|
workspace_id=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
|
||||||
|
cpu_load=$(top -bn1 | grep "Cpu(s)" | sed "s/.*, *\([0-9.]*\)%* id.*/\1/" | awk '{print 100 - $1"%"}')
|
||||||
|
mem_usage=$(free -h | awk '/^Mem:/ {print $3 "/" $2}')
|
||||||
|
|
||||||
|
batt_pct=$(cat /sys/class/power_supply/BAT0/capacity 2>/dev/null || echo "0")
|
||||||
|
batt_stat=$(cat /sys/class/power_supply/BAT0/status 2>/dev/null)
|
||||||
|
batt_icon=$([ "$batt_stat" = "Charging" ] && echo "" || echo "")
|
||||||
|
|
||||||
|
# Send first notification immediately (ID 9998)
|
||||||
|
notify-send -r 9998 -t 10000 " $time_info" \
|
||||||
|
"<b>Workspace:</b> $workspace_id
|
||||||
|
<b>CPU:</b> $cpu_load <b>Mem:</b> $mem_usage <b>Bat:</b> $batt_icon $batt_pct%"
|
||||||
|
|
||||||
|
# --- STAGE 2: THE NETWORK & UPDATES ---
|
||||||
|
# This part will run in the background and pop up once data is gathered
|
||||||
|
{
|
||||||
|
# Original Networking Logic
|
||||||
|
net_ssid=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2)
|
||||||
|
|
||||||
|
# If Wifi is empty, check for Wired
|
||||||
|
if [ -z "$net_ssid" ]; then
|
||||||
|
net_ssid=$(nmcli device | grep "ethernet" | grep "connected" | awk '{print "Wired "}')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Wireguard status
|
||||||
|
wg0=$(ip addr show wg0 2>/dev/null | grep -q "inet" && echo " wg0 " || echo "")
|
||||||
|
wg1=$(ip addr show wg1 2>/dev/null | grep -q "inet" && echo " wg1 " || echo "")
|
||||||
|
vpn_status="${wg0}${wg1}"
|
||||||
|
[ -z "$vpn_status" ] && vpn_status="No VPN"
|
||||||
|
|
||||||
|
# Updates (Arch Repo + Flatpak)
|
||||||
|
arch_updates=$(checkupdates 2>/dev/null | wc -l)
|
||||||
|
fp_updates=$(flatpak remote-ls --updates 2>/dev/null | wc -l)
|
||||||
|
total_upd=$((arch_updates + fp_updates))
|
||||||
|
|
||||||
|
upd_text=$([ "$total_upd" -gt 0 ] && echo " $total_upd updates available" || echo " System up-to-date")
|
||||||
|
|
||||||
|
# Send second notification (ID 9999)
|
||||||
|
notify-send -r 9999 -t 10000 " Network & Updates" \
|
||||||
|
"<b>Net:</b> ${net_ssid:-Disconnected}
|
||||||
|
<b>VPN:</b> $vpn_status
|
||||||
|
<b>Updates:</b> $upd_text"
|
||||||
|
} &
|
||||||
23
hypr/scripts/update-sys.sh
Executable file
23
hypr/scripts/update-sys.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# If 'up' argument is passed, run update in terminal
|
||||||
|
if [ "$1" == "up" ]; then
|
||||||
|
ghostty -e bash -c "yay -Syu; echo 'Done. Press Enter.'; read"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Otherwise, do a quick parallel check
|
||||||
|
notify-send "Checking Updates..." -t 1500
|
||||||
|
|
||||||
|
# Check Pacman and AUR in parallel
|
||||||
|
pc_count=$(checkupdates 2>/dev/null | wc -l &)
|
||||||
|
aur_count=$(yay -Qua 2>/dev/null | wc -l &)
|
||||||
|
wait
|
||||||
|
|
||||||
|
total=$((pc_count + aur_count))
|
||||||
|
|
||||||
|
if [ "$total" -eq 0 ]; then
|
||||||
|
notify-send "System Up to Date" "No packages to update." -i checkbox-checked-symbolic
|
||||||
|
else
|
||||||
|
notify-send "Updates Available" " Total: $total\nRepo: $pc_count | AUR: $aur_count\n\nPress SUPER+U to update." -i software-update-available-symbolic
|
||||||
|
fi
|
||||||
57
hypr/scripts/wifi-menu.sh
Executable file
57
hypr/scripts/wifi-menu.sh
Executable file
@@ -0,0 +1,57 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# 1. Get current connection info
|
||||||
|
current_ssid=$(nmcli -t -f active,ssid dev wifi | grep '^yes' | cut -d: -f2)
|
||||||
|
|
||||||
|
# 2. Get the list of networks
|
||||||
|
# Format: IN-USE:SIGNAL:BARS:SSID:SECURITY
|
||||||
|
wifi_list=$(nmcli -f IN-USE,SIGNAL,BARS,SSID,SECURITY device wifi list | tail -n +2)
|
||||||
|
|
||||||
|
# 3. Process the list for Rofi
|
||||||
|
# We use AWK to format and ensure we don't show duplicate SSIDs (common with dual-band routers)
|
||||||
|
formatted_list=$(echo "$wifi_list" | awk -F' +' '{
|
||||||
|
icon = ($1 == "*") ? "" : "";
|
||||||
|
# Use different icons based on signal strength if not connected
|
||||||
|
if ($1 != "*") {
|
||||||
|
if ($2 > 70) icon = "";
|
||||||
|
else if ($2 > 40) icon = "";
|
||||||
|
else icon = "";
|
||||||
|
}
|
||||||
|
# Mark secure networks
|
||||||
|
lock = ($5 ~ /WPA/ || $5 ~ /WEP/) ? " " : "";
|
||||||
|
|
||||||
|
printf "%s %-20s %s %s\n", icon, $4, $3, lock
|
||||||
|
}' | sort -u -k2,2)
|
||||||
|
|
||||||
|
# 4. Show the menu
|
||||||
|
selected=$(echo -e "$formatted_list" | rofi -dmenu -i -p "Wi-Fi" -config "$HOME/.config/rofi/wifi.rasi")
|
||||||
|
|
||||||
|
[ -z "$selected" ] && exit
|
||||||
|
|
||||||
|
# Extract SSID (Removes icons, signal bars, and lock icon)
|
||||||
|
# This looks for the name specifically in the second column
|
||||||
|
target_ssid=$(echo "$selected" | awk '{print $2}')
|
||||||
|
|
||||||
|
# 5. Connection Logic
|
||||||
|
if [[ "$selected" == ""* ]]; then
|
||||||
|
# Already connected? Ask to disconnect
|
||||||
|
res=$(echo -e "Yes\nNo" | rofi -dmenu -p "Disconnect from $target_ssid?")
|
||||||
|
[ "$res" == "Yes" ] && nmcli device disconnect wlan0
|
||||||
|
else
|
||||||
|
# Check if it's a known connection
|
||||||
|
known=$(nmcli -t -f name connection show | grep "^$target_ssid$")
|
||||||
|
|
||||||
|
if [ -n "$known" ]; then
|
||||||
|
notify-send "Wi-Fi" "Connecting to known network: $target_ssid"
|
||||||
|
nmcli connection up "$target_ssid"
|
||||||
|
else
|
||||||
|
# New network - ask for password if it has the lock icon
|
||||||
|
if [[ "$selected" == *""* ]]; then
|
||||||
|
pass=$(rofi -dmenu -p "Password for $target_ssid" -password)
|
||||||
|
[ -z "$pass" ] && exit
|
||||||
|
nmcli device wifi connect "$target_ssid" password "$pass"
|
||||||
|
else
|
||||||
|
nmcli device wifi connect "$target_ssid"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
@@ -9,8 +9,8 @@ configuration {
|
|||||||
/* Window */
|
/* Window */
|
||||||
|
|
||||||
window {
|
window {
|
||||||
location: northeast;
|
location: center;
|
||||||
anchor: north;
|
anchor: center;
|
||||||
x-offset: -3px;
|
x-offset: -3px;
|
||||||
y-offset: 3px;
|
y-offset: 3px;
|
||||||
width: 150px;
|
width: 150px;
|
||||||
|
|||||||
@@ -4,20 +4,18 @@
|
|||||||
"mode": "dock",
|
"mode": "dock",
|
||||||
"gtk-layer-shell": true,
|
"gtk-layer-shell": true,
|
||||||
|
|
||||||
// <<--< Positions >-->>
|
|
||||||
|
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
"custom/left1",
|
"custom/left1",
|
||||||
|
|
||||||
"hyprland/workspaces", // workspaces
|
"hyprland/workspaces", // workspaces
|
||||||
"custom/right1",
|
"custom/right1"
|
||||||
|
|
||||||
"custom/paddw"
|
// "custom/paddw"
|
||||||
// "hyprland/window" // window title
|
// "hyprland/window" // window title
|
||||||
],
|
],
|
||||||
|
|
||||||
"modules-center": [
|
"modules-center": [
|
||||||
"custom/paddc",
|
// "custom/paddc",
|
||||||
"custom/left2",
|
"custom/left2",
|
||||||
"custom/temperature", // temperature
|
"custom/temperature", // temperature
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ window#waybar>box {
|
|||||||
/* --------------------------------------------------------- DROP SHADOW --- */
|
/* --------------------------------------------------------- DROP SHADOW --- */
|
||||||
|
|
||||||
window#waybar {
|
window#waybar {
|
||||||
background: @shadow;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ------------------------------------------------------------ TOOLTIPS --- */
|
/* ------------------------------------------------------------ TOOLTIPS --- */
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ VIM="nvim"
|
|||||||
# Dynamic SSH function for numbered hosts
|
# Dynamic SSH function for numbered hosts
|
||||||
sshto() {
|
sshto() {
|
||||||
if [[ "$1" =~ "^[0-9]+$" ]]; then
|
if [[ "$1" =~ "^[0-9]+$" ]]; then
|
||||||
ssh "root@192.168.1.$1"
|
TERM=xterm-256color ssh "root@192.168.1.$1"
|
||||||
else
|
else
|
||||||
echo "Usage: sshto <number>"
|
echo "Usage: sshto <number>"
|
||||||
echo "Example: sshto 12 → connects to root@192.168.1.12"
|
echo "Example: sshto 12 → connects to root@192.168.1.12"
|
||||||
@@ -23,6 +23,7 @@ alias sshsylvia="ssh root@13.37.7.13"
|
|||||||
alias htb="sudo openvpn --config /etc/openvpn/client/htb.conf"
|
alias htb="sudo openvpn --config /etc/openvpn/client/htb.conf"
|
||||||
alias osrs="flatpak run com.jagexlauncher.JagexLauncher"
|
alias osrs="flatpak run com.jagexlauncher.JagexLauncher"
|
||||||
alias vwgermany="ssh -L 8080:localhost:4567 root@13.37.7.42"
|
alias vwgermany="ssh -L 8080:localhost:4567 root@13.37.7.42"
|
||||||
|
alias cleanup='sudo pacman -Rs $(pacman -Qdtq)'
|
||||||
|
|
||||||
# Navigation & listing
|
# Navigation & listing
|
||||||
alias ls='eza --icons --group-directories-first'
|
alias ls='eza --icons --group-directories-first'
|
||||||
|
|||||||
Reference in New Issue
Block a user