Compare commits
72 Commits
9b49fac517
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
f1b6bcb4c5
|
|||
|
4f77f73860
|
|||
|
b76e27d466
|
|||
|
b58473de89
|
|||
|
8ad47eff6a
|
|||
|
e9d9ec86a3
|
|||
|
262acb7d8b
|
|||
|
53ebb35539
|
|||
|
9d7e338070
|
|||
|
9273a6cb4d
|
|||
|
b6fa9dc31e
|
|||
|
f659be1b00
|
|||
|
27225053bd
|
|||
|
e0f9e19c58
|
|||
|
3b2cc7714b
|
|||
|
f0530f3fff
|
|||
|
de693c786d
|
|||
|
5cda9c37f9
|
|||
|
b284ef3b8e
|
|||
|
9e6bf9618f
|
|||
|
5f0d18b1d0
|
|||
|
a123cd42f0
|
|||
|
8ff188b3fa
|
|||
|
d5bb18adfd
|
|||
|
7e3062121a
|
|||
|
9dc6bd9eb0
|
|||
|
4454b0bb03
|
|||
|
74dda82f24
|
|||
|
566513de78
|
|||
|
dfca6b4752
|
|||
|
916a07c80c
|
|||
|
c21e5736d8
|
|||
|
de1e39b5c4
|
|||
|
ac3bc6e779
|
|||
|
70e15917f4
|
|||
|
cb167933f5
|
|||
|
1c0acb4323
|
|||
|
ecd351208d
|
|||
|
799c63507a
|
|||
|
aef8985b3e
|
|||
|
6bcf153975
|
|||
|
ac9c0798d1
|
|||
|
5f5f338661
|
|||
|
1628b90398
|
|||
|
18d1d6faf0
|
|||
|
2e8a421f1c
|
|||
|
815823b7d6
|
|||
|
70c90fb23c
|
|||
|
3ff4460d12
|
|||
|
3af7c43665
|
|||
|
46f13b7cff
|
|||
|
e5659ce2ff
|
|||
|
f84cd6d66a
|
|||
|
62320e2453
|
|||
|
1c0f14172c
|
|||
|
b07e2ab804
|
|||
|
3bdafc039e
|
|||
|
876ccbe936
|
|||
|
70715b15c3
|
|||
|
1460b7a8e0
|
|||
|
1e99d8a2f6
|
|||
|
2b0ac57413
|
|||
|
6c5554beea
|
|||
|
0136e2cad9
|
|||
|
d6a77eec42
|
|||
|
b2cfb5c616
|
|||
|
83097e961a
|
|||
|
204df8ef95
|
|||
|
9320df5cf2
|
|||
|
b7cc2b7d8a
|
|||
|
817c02816b
|
|||
|
c387261eb2
|
272
btop/btop.conf
Normal file
272
btop/btop.conf
Normal file
@@ -0,0 +1,272 @@
|
|||||||
|
#? Config file for btop v.1.4.6
|
||||||
|
|
||||||
|
#* 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"
|
||||||
|
color_theme = "/home/stereov/.config/btop/themes/catppuccin-mocha.theme"
|
||||||
|
|
||||||
|
#* If the theme set background should be shown, set to False if you want terminal background transparency.
|
||||||
|
theme_background = true
|
||||||
|
|
||||||
|
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
||||||
|
truecolor = true
|
||||||
|
|
||||||
|
#* 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.
|
||||||
|
force_tty = false
|
||||||
|
|
||||||
|
#* 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.
|
||||||
|
#* Use whitespace " " as separator between different presets.
|
||||||
|
#* Example: "cpu:0:default,mem:0:tty,proc:1:default cpu:0:braille,proc:0:tty"
|
||||||
|
presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:default cpu:0:block,net:0:tty"
|
||||||
|
|
||||||
|
#* 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.
|
||||||
|
vim_keys = false
|
||||||
|
|
||||||
|
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||||
|
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".
|
||||||
|
#* "braille" offers the highest resolution but might not be included in all fonts.
|
||||||
|
#* "block" has half the resolution of braille but uses more common characters.
|
||||||
|
#* "tty" uses only 3 different symbols but will work with most fonts and should work in a real TTY.
|
||||||
|
#* Note that "tty" only has half the horizontal resolution of the other two, so will show a shorter historical view.
|
||||||
|
graph_symbol = "braille"
|
||||||
|
|
||||||
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
|
graph_symbol_cpu = "default"
|
||||||
|
|
||||||
|
# Graph symbol to use for graphs in gpu box, "default", "braille", "block" or "tty".
|
||||||
|
graph_symbol_gpu = "default"
|
||||||
|
|
||||||
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
|
graph_symbol_mem = "default"
|
||||||
|
|
||||||
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
|
graph_symbol_net = "default"
|
||||||
|
|
||||||
|
# Graph symbol to use for graphs in cpu box, "default", "braille", "block" or "tty".
|
||||||
|
graph_symbol_proc = "default"
|
||||||
|
|
||||||
|
#* Manually set which boxes to show. Available values are "cpu mem net proc" and "gpu0" through "gpu5", separate values with whitespace.
|
||||||
|
shown_boxes = "mem net proc cpu"
|
||||||
|
|
||||||
|
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||||
|
update_ms = 2000
|
||||||
|
|
||||||
|
#* Processes sorting, "pid" "program" "arguments" "threads" "user" "memory" "cpu lazy" "cpu direct",
|
||||||
|
#* "cpu lazy" sorts top process over time (easier to follow), "cpu direct" updates top process directly.
|
||||||
|
proc_sorting = "cpu lazy"
|
||||||
|
|
||||||
|
#* Reverse sorting order, True or False.
|
||||||
|
proc_reversed = false
|
||||||
|
|
||||||
|
#* Show processes as a tree.
|
||||||
|
proc_tree = false
|
||||||
|
|
||||||
|
#* Use the cpu graph colors in the process list.
|
||||||
|
proc_colors = true
|
||||||
|
|
||||||
|
#* Use a darkening gradient in the process list.
|
||||||
|
proc_gradient = true
|
||||||
|
|
||||||
|
#* 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
|
||||||
|
|
||||||
|
#* Show process memory as bytes instead of percent.
|
||||||
|
proc_mem_bytes = true
|
||||||
|
|
||||||
|
#* Show cpu graph for each process.
|
||||||
|
proc_cpu_graphs = true
|
||||||
|
|
||||||
|
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
||||||
|
proc_info_smaps = false
|
||||||
|
|
||||||
|
#* Show proc box on left side of screen instead of right.
|
||||||
|
proc_left = false
|
||||||
|
|
||||||
|
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||||
|
proc_filter_kernel = false
|
||||||
|
|
||||||
|
#* In tree-view, always accumulate child process resources in the parent process.
|
||||||
|
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.
|
||||||
|
#* Select from a list of detected attributes from the options menu.
|
||||||
|
cpu_graph_upper = "Auto"
|
||||||
|
|
||||||
|
#* Sets the CPU stat shown in lower half of the CPU graph, "total" is always available.
|
||||||
|
#* Select from a list of detected attributes from the options menu.
|
||||||
|
cpu_graph_lower = "Auto"
|
||||||
|
|
||||||
|
#* If gpu info should be shown in the cpu box. Available values = "Auto", "On" and "Off".
|
||||||
|
show_gpu_info = "Auto"
|
||||||
|
|
||||||
|
#* Toggles if the lower CPU graph should be inverted.
|
||||||
|
cpu_invert_lower = true
|
||||||
|
|
||||||
|
#* Set to True to completely disable the lower CPU graph.
|
||||||
|
cpu_single_graph = false
|
||||||
|
|
||||||
|
#* Show cpu box at bottom of screen instead of top.
|
||||||
|
cpu_bottom = false
|
||||||
|
|
||||||
|
#* Shows the system uptime in the CPU box.
|
||||||
|
show_uptime = true
|
||||||
|
|
||||||
|
#* 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 temperature.
|
||||||
|
check_temp = true
|
||||||
|
|
||||||
|
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
||||||
|
cpu_sensor = "Auto"
|
||||||
|
|
||||||
|
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
||||||
|
show_coretemp = true
|
||||||
|
|
||||||
|
#* 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.
|
||||||
|
#* Format "x:y" x=core with wrong temp, y=core with correct temp, use space as separator between multiple entries.
|
||||||
|
#* Example: "4:0 5:1 6:3"
|
||||||
|
cpu_core_map = ""
|
||||||
|
|
||||||
|
#* Which temperature scale to use, available values: "celsius", "fahrenheit", "kelvin" and "rankine".
|
||||||
|
temp_scale = "celsius"
|
||||||
|
|
||||||
|
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
||||||
|
base_10_sizes = false
|
||||||
|
|
||||||
|
#* Show CPU frequency.
|
||||||
|
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.
|
||||||
|
#* Special formatting: /host = hostname | /user = username | /uptime = system uptime
|
||||||
|
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.
|
||||||
|
background_update = true
|
||||||
|
|
||||||
|
#* Custom cpu model name, empty string to disable.
|
||||||
|
custom_cpu_name = ""
|
||||||
|
|
||||||
|
#* Optional filter for shown disks, should be full path of a mountpoint, separate multiple values with whitespace " ".
|
||||||
|
#* Only disks matching the filter will be shown. Prepend exclude= to only show disks not matching the filter. Examples: disk_filter="/boot /home/user", disks_filter="exclude=/boot /home/user"
|
||||||
|
disks_filter = ""
|
||||||
|
|
||||||
|
#* Show graphs instead of meters for memory values.
|
||||||
|
mem_graphs = true
|
||||||
|
|
||||||
|
#* Show mem box below net box instead of above.
|
||||||
|
mem_below_net = false
|
||||||
|
|
||||||
|
#* Count ZFS ARC in cached and available memory.
|
||||||
|
zfs_arc_cached = true
|
||||||
|
|
||||||
|
#* If swap memory should be shown in memory box.
|
||||||
|
show_swap = true
|
||||||
|
|
||||||
|
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
||||||
|
swap_disk = true
|
||||||
|
|
||||||
|
#* If mem box should be split to also show disks info.
|
||||||
|
show_disks = true
|
||||||
|
|
||||||
|
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||||
|
only_physical = true
|
||||||
|
|
||||||
|
#* Read disks list from /etc/fstab. This also disables only_physical.
|
||||||
|
use_fstab = true
|
||||||
|
|
||||||
|
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
||||||
|
zfs_hide_datasets = false
|
||||||
|
|
||||||
|
#* Set to true to show available disk space for privileged users.
|
||||||
|
disk_free_priv = false
|
||||||
|
|
||||||
|
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
||||||
|
show_io_stat = true
|
||||||
|
|
||||||
|
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||||
|
io_mode = false
|
||||||
|
|
||||||
|
#* Set to True to show combined read/write io graphs in io mode.
|
||||||
|
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 " ".
|
||||||
|
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||||
|
io_graph_speeds = ""
|
||||||
|
|
||||||
|
#* Set fixed values for network graphs in Mebibits. Is only used if net_auto is also set to False.
|
||||||
|
net_download = 100
|
||||||
|
|
||||||
|
net_upload = 100
|
||||||
|
|
||||||
|
#* Use network graphs auto rescaling mode, ignores any values set above and rescales down to 10 Kibibytes at the lowest.
|
||||||
|
net_auto = true
|
||||||
|
|
||||||
|
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||||
|
net_sync = true
|
||||||
|
|
||||||
|
#* Starts with the Network Interface specified here.
|
||||||
|
net_iface = ""
|
||||||
|
|
||||||
|
#* "True" shows bitrates in base 10 (Kbps, Mbps). "False" shows bitrates in binary sizes (Kibps, Mibps, etc.). "Auto" uses base_10_sizes.
|
||||||
|
base_10_bitrate = "Auto"
|
||||||
|
|
||||||
|
#* Show battery stats in top right if battery is present.
|
||||||
|
show_battery = true
|
||||||
|
|
||||||
|
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
||||||
|
selected_battery = "Auto"
|
||||||
|
|
||||||
|
#* Show power stats of battery next to charge indicator.
|
||||||
|
show_battery_watts = true
|
||||||
|
|
||||||
|
#* 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.
|
||||||
|
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.
|
||||||
|
nvml_measure_pcie_speeds = true
|
||||||
|
|
||||||
|
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
||||||
|
rsmi_measure_pcie_speeds = true
|
||||||
|
|
||||||
|
#* Horizontally mirror the GPU graph.
|
||||||
|
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_gpu_name0 = ""
|
||||||
|
|
||||||
|
#* Custom gpu1 model name, empty string to disable.
|
||||||
|
custom_gpu_name1 = ""
|
||||||
|
|
||||||
|
#* Custom gpu2 model name, empty string to disable.
|
||||||
|
custom_gpu_name2 = ""
|
||||||
|
|
||||||
|
#* Custom gpu3 model name, empty string to disable.
|
||||||
|
custom_gpu_name3 = ""
|
||||||
|
|
||||||
|
#* Custom gpu4 model name, empty string to disable.
|
||||||
|
custom_gpu_name4 = ""
|
||||||
|
|
||||||
|
#* Custom gpu5 model name, empty string to disable.
|
||||||
|
custom_gpu_name5 = ""
|
||||||
83
btop/themes/catppuccin-mocha.theme
Normal file
83
btop/themes/catppuccin-mocha.theme
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
# Main background, empty for terminal default, need to be empty if you want transparent background
|
||||||
|
theme[main_bg]="#1e1e2e"
|
||||||
|
|
||||||
|
# Main text color
|
||||||
|
theme[main_fg]="#cdd6f4"
|
||||||
|
|
||||||
|
# Title color for boxes
|
||||||
|
theme[title]="#cdd6f4"
|
||||||
|
|
||||||
|
# Highlight color for keyboard shortcuts
|
||||||
|
theme[hi_fg]="#89b4fa"
|
||||||
|
|
||||||
|
# Background color of selected item in processes box
|
||||||
|
theme[selected_bg]="#45475a"
|
||||||
|
|
||||||
|
# Foreground color of selected item in processes box
|
||||||
|
theme[selected_fg]="#89b4fa"
|
||||||
|
|
||||||
|
# Color of inactive/disabled text
|
||||||
|
theme[inactive_fg]="#7f849c"
|
||||||
|
|
||||||
|
# Color of text appearing on top of graphs, i.e uptime and current network graph scaling
|
||||||
|
theme[graph_text]="#f5e0dc"
|
||||||
|
|
||||||
|
# Background color of the percentage meters
|
||||||
|
theme[meter_bg]="#45475a"
|
||||||
|
|
||||||
|
# Misc colors for processes box including mini cpu graphs, details memory graph and details status text
|
||||||
|
theme[proc_misc]="#f5e0dc"
|
||||||
|
|
||||||
|
# CPU, Memory, Network, Proc box outline colors
|
||||||
|
theme[cpu_box]="#cba6f7" #Mauve
|
||||||
|
theme[mem_box]="#a6e3a1" #Green
|
||||||
|
theme[net_box]="#eba0ac" #Maroon
|
||||||
|
theme[proc_box]="#89b4fa" #Blue
|
||||||
|
|
||||||
|
# Box divider line and small boxes line color
|
||||||
|
theme[div_line]="#6c7086"
|
||||||
|
|
||||||
|
# Temperature graph color (Green -> Yellow -> Red)
|
||||||
|
theme[temp_start]="#a6e3a1"
|
||||||
|
theme[temp_mid]="#f9e2af"
|
||||||
|
theme[temp_end]="#f38ba8"
|
||||||
|
|
||||||
|
# CPU graph colors (Teal -> Lavender)
|
||||||
|
theme[cpu_start]="#94e2d5"
|
||||||
|
theme[cpu_mid]="#74c7ec"
|
||||||
|
theme[cpu_end]="#b4befe"
|
||||||
|
|
||||||
|
# Mem/Disk free meter (Mauve -> Lavender -> Blue)
|
||||||
|
theme[free_start]="#cba6f7"
|
||||||
|
theme[free_mid]="#b4befe"
|
||||||
|
theme[free_end]="#89b4fa"
|
||||||
|
|
||||||
|
# Mem/Disk cached meter (Sapphire -> Lavender)
|
||||||
|
theme[cached_start]="#74c7ec"
|
||||||
|
theme[cached_mid]="#89b4fa"
|
||||||
|
theme[cached_end]="#b4befe"
|
||||||
|
|
||||||
|
# Mem/Disk available meter (Peach -> Red)
|
||||||
|
theme[available_start]="#fab387"
|
||||||
|
theme[available_mid]="#eba0ac"
|
||||||
|
theme[available_end]="#f38ba8"
|
||||||
|
|
||||||
|
# Mem/Disk used meter (Green -> Sky)
|
||||||
|
theme[used_start]="#a6e3a1"
|
||||||
|
theme[used_mid]="#94e2d5"
|
||||||
|
theme[used_end]="#89dceb"
|
||||||
|
|
||||||
|
# Download graph colors (Peach -> Red)
|
||||||
|
theme[download_start]="#fab387"
|
||||||
|
theme[download_mid]="#eba0ac"
|
||||||
|
theme[download_end]="#f38ba8"
|
||||||
|
|
||||||
|
# Upload graph colors (Green -> Sky)
|
||||||
|
theme[upload_start]="#a6e3a1"
|
||||||
|
theme[upload_mid]="#94e2d5"
|
||||||
|
theme[upload_end]="#89dceb"
|
||||||
|
|
||||||
|
# Process box color gradient for threads, mem and cpu usage (Sapphire -> Mauve)
|
||||||
|
theme[process_start]="#74c7ec"
|
||||||
|
theme[process_mid]="#b4befe"
|
||||||
|
theme[process_end]="#cba6f7"
|
||||||
7
fish/completions/fisher.fish
Normal file
7
fish/completions/fisher.fish
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
complete --command fisher --exclusive --long help --description "Print help"
|
||||||
|
complete --command fisher --exclusive --long version --description "Print version"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments install --description "Install plugins"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments update --description "Update installed plugins"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments remove --description "Remove installed plugins"
|
||||||
|
complete --command fisher --exclusive --condition __fish_use_subcommand --arguments list --description "List installed plugins matching regex"
|
||||||
|
complete --command fisher --exclusive --condition "__fish_seen_subcommand_from update remove" --arguments "(fisher list)"
|
||||||
8
fish/completions/fzf_configure_bindings.fish
Normal file
8
fish/completions/fzf_configure_bindings.fish
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
complete fzf_configure_bindings --no-files
|
||||||
|
complete fzf_configure_bindings --long help --short h --description "Print help" --condition "not __fish_seen_argument --help -h"
|
||||||
|
complete fzf_configure_bindings --long directory --description "Change the key binding for Search Directory" --condition "not __fish_seen_argument --directory"
|
||||||
|
complete fzf_configure_bindings --long git_log --description "Change the key binding for Search Git Log" --condition "not __fish_seen_argument --git_log"
|
||||||
|
complete fzf_configure_bindings --long git_status --description "Change the key binding for Search Git Status" --condition "not __fish_seen_argument --git_status"
|
||||||
|
complete fzf_configure_bindings --long history --description "Change the key binding for Search History" --condition "not __fish_seen_argument --history"
|
||||||
|
complete fzf_configure_bindings --long processes --description "Change the key binding for Search Processes" --condition "not __fish_seen_argument --processes"
|
||||||
|
complete fzf_configure_bindings --long variables --description "Change the key binding for Search Variables" --condition "not __fish_seen_argument --variables"
|
||||||
@@ -18,6 +18,10 @@ set -x STARSHIP_CONFIG $HOME/.config/starship/starship.toml
|
|||||||
# Set default kubectl editor
|
# Set default kubectl editor
|
||||||
set -x KUBE_EDITOR nvim
|
set -x KUBE_EDITOR nvim
|
||||||
|
|
||||||
|
if not set -q SSH_AUTH_SOCK
|
||||||
|
eval (ssh-agent -c) >/dev/null
|
||||||
|
end
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
alias dc="docker compose"
|
alias dc="docker compose"
|
||||||
alias dl="docker logs"
|
alias dl="docker logs"
|
||||||
|
|||||||
@@ -1 +1,3 @@
|
|||||||
patrickf1/fzf.fish
|
patrickf1/fzf.fish
|
||||||
|
jorgebucaran/fisher
|
||||||
|
reitzig/sdkman-for-fish@v2.1.0
|
||||||
|
|||||||
43
fish/functions/_fzf_configure_bindings_help.fish
Normal file
43
fish/functions/_fzf_configure_bindings_help.fish
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
function _fzf_configure_bindings_help --description "Prints the help message for fzf_configure_bindings."
|
||||||
|
echo "\
|
||||||
|
USAGE:
|
||||||
|
fzf_configure_bindings [--COMMAND=[KEY_SEQUENCE]...]
|
||||||
|
|
||||||
|
DESCRIPTION
|
||||||
|
fzf_configure_bindings installs key bindings for fzf.fish's commands and erases any bindings it
|
||||||
|
previously installed. It installs bindings for both default and insert modes. fzf.fish executes
|
||||||
|
it without options on fish startup to install the out-of-the-box key bindings.
|
||||||
|
|
||||||
|
By default, commands are bound to a mnemonic key sequence, shown below. Each command's binding
|
||||||
|
can be configured using a namesake corresponding option:
|
||||||
|
COMMAND | DEFAULT KEY SEQUENCE | CORRESPONDING OPTION
|
||||||
|
Search Directory | Ctrl+Alt+F (F for file) | --directory
|
||||||
|
Search Git Log | Ctrl+Alt+L (L for log) | --git_log
|
||||||
|
Search Git Status | Ctrl+Alt+S (S for status) | --git_status
|
||||||
|
Search History | Ctrl+R (R for reverse) | --history
|
||||||
|
Search Processes | Ctrl+Alt+P (P for process) | --processes
|
||||||
|
Search Variables | Ctrl+V (V for variable) | --variables
|
||||||
|
Override a command's binding by specifying its corresponding option with the desired key
|
||||||
|
sequence. Disable a command's binding by specifying its corresponding option with no value.
|
||||||
|
|
||||||
|
Because fzf_configure_bindings erases bindings it previously installed, it can be cleanly
|
||||||
|
executed multiple times. Once the desired fzf_configure_bindings command has been found, add it
|
||||||
|
to your config.fish in order to persist the customized bindings.
|
||||||
|
|
||||||
|
In terms of validation, fzf_configure_bindings fails if passed unknown options. It expects an
|
||||||
|
equals sign between an option's name and value. However, it does not validate key sequences.
|
||||||
|
|
||||||
|
Pass -h or --help to print this help message and exit.
|
||||||
|
|
||||||
|
EXAMPLES
|
||||||
|
Default bindings but bind Search Directory to Ctrl+F and Search Variables to Ctrl+Alt+V
|
||||||
|
\$ fzf_configure_bindings --directory=\cf --variables=\e\cv
|
||||||
|
Default bindings but disable Search History
|
||||||
|
\$ fzf_configure_bindings --history=
|
||||||
|
An agglomeration of different options
|
||||||
|
\$ fzf_configure_bindings --git_status=\cg --history=\ch --variables= --processes=
|
||||||
|
|
||||||
|
SEE Also
|
||||||
|
To learn more about fish key bindings, see bind(1) and fish_key_reader(1).
|
||||||
|
"
|
||||||
|
end
|
||||||
15
fish/functions/_fzf_extract_var_info.fish
Normal file
15
fish/functions/_fzf_extract_var_info.fish
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# helper function for _fzf_search_variables
|
||||||
|
function _fzf_extract_var_info --argument-names variable_name set_show_output --description "Extract and reformat lines pertaining to \$variable_name from \$set_show_output."
|
||||||
|
# Extract only the lines about the variable, all of which begin with either
|
||||||
|
# $variable_name: ...or... $variable_name[
|
||||||
|
string match --regex "^\\\$$variable_name(?::|\[).*" <$set_show_output |
|
||||||
|
|
||||||
|
# Strip the variable name prefix, including ": " for scope info lines
|
||||||
|
string replace --regex "^\\\$$variable_name(?:: )?" '' |
|
||||||
|
|
||||||
|
# Distill the lines of values, replacing...
|
||||||
|
# [1]: |value|
|
||||||
|
# ...with...
|
||||||
|
# [1] value
|
||||||
|
string replace --regex ": \|(.*)\|" ' $1'
|
||||||
|
end
|
||||||
49
fish/functions/_fzf_preview_changed_file.fish
Normal file
49
fish/functions/_fzf_preview_changed_file.fish
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
# helper for _fzf_search_git_status
|
||||||
|
# arg should be a line from git status --short, e.g.
|
||||||
|
# MM functions/_fzf_preview_changed_file.fish
|
||||||
|
# D README.md
|
||||||
|
# R LICENSE -> "New License"
|
||||||
|
function _fzf_preview_changed_file --argument-names path_status --description "Show the git diff of the given file."
|
||||||
|
# remove quotes because they'll be interpreted literally by git diff
|
||||||
|
# no need to requote when referencing $path because fish does not perform word splitting
|
||||||
|
# https://fishshell.com/docs/current/fish_for_bash_users.html
|
||||||
|
set -f path (string unescape (string sub --start 4 $path_status))
|
||||||
|
# first letter of short format shows index, second letter shows working tree
|
||||||
|
# https://git-scm.com/docs/git-status/2.35.0#_short_format
|
||||||
|
set -f index_status (string sub --length 1 $path_status)
|
||||||
|
set -f working_tree_status (string sub --start 2 --length 1 $path_status)
|
||||||
|
|
||||||
|
set -f diff_opts --color=always
|
||||||
|
|
||||||
|
if test $index_status = '?'
|
||||||
|
_fzf_report_diff_type Untracked
|
||||||
|
_fzf_preview_file $path
|
||||||
|
else if contains {$index_status}$working_tree_status DD AU UD UA DU AA UU
|
||||||
|
# Unmerged statuses taken directly from git status help's short format table
|
||||||
|
# Unmerged statuses are mutually exclusive with other statuses, so if we see
|
||||||
|
# these, then safe to assume the path is unmerged
|
||||||
|
_fzf_report_diff_type Unmerged
|
||||||
|
git diff $diff_opts -- $path
|
||||||
|
else
|
||||||
|
if test $index_status != ' '
|
||||||
|
_fzf_report_diff_type Staged
|
||||||
|
|
||||||
|
# renames are only detected in the index, never working tree, so only need to test for it here
|
||||||
|
# https://stackoverflow.com/questions/73954214
|
||||||
|
if test $index_status = R
|
||||||
|
# diff the post-rename path with the original path, otherwise the diff will show the entire file as being added
|
||||||
|
set -f orig_and_new_path (string split --max 1 -- ' -> ' $path)
|
||||||
|
git diff --staged $diff_opts -- $orig_and_new_path[1] $orig_and_new_path[2]
|
||||||
|
# path currently has the form of "original -> current", so we need to correct it before it's used below
|
||||||
|
set path $orig_and_new_path[2]
|
||||||
|
else
|
||||||
|
git diff --staged $diff_opts -- $path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if test $working_tree_status != ' '
|
||||||
|
_fzf_report_diff_type Unstaged
|
||||||
|
git diff $diff_opts -- $path
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
43
fish/functions/_fzf_preview_file.fish
Normal file
43
fish/functions/_fzf_preview_file.fish
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# helper function for _fzf_search_directory and _fzf_search_git_status
|
||||||
|
function _fzf_preview_file --description "Print a preview for the given file based on its file type."
|
||||||
|
# because there's no way to guarantee that _fzf_search_directory passes the path to _fzf_preview_file
|
||||||
|
# as one argument, we collect all the arguments into one single variable and treat that as the path
|
||||||
|
set -f file_path $argv
|
||||||
|
|
||||||
|
if test -L "$file_path" # symlink
|
||||||
|
# notify user and recurse on the target of the symlink, which can be any of these file types
|
||||||
|
set -l target_path (realpath "$file_path")
|
||||||
|
|
||||||
|
set_color yellow
|
||||||
|
echo "'$file_path' is a symlink to '$target_path'."
|
||||||
|
set_color normal
|
||||||
|
|
||||||
|
_fzf_preview_file "$target_path"
|
||||||
|
else if test -f "$file_path" # regular file
|
||||||
|
if set --query fzf_preview_file_cmd
|
||||||
|
# need to escape quotes to make sure eval receives file_path as a single arg
|
||||||
|
eval "$fzf_preview_file_cmd '$file_path'"
|
||||||
|
else
|
||||||
|
bat --style=numbers --color=always "$file_path"
|
||||||
|
end
|
||||||
|
else if test -d "$file_path" # directory
|
||||||
|
if set --query fzf_preview_dir_cmd
|
||||||
|
# see above
|
||||||
|
eval "$fzf_preview_dir_cmd '$file_path'"
|
||||||
|
else
|
||||||
|
# -A list hidden files as well, except for . and ..
|
||||||
|
# -F helps classify files by appending symbols after the file name
|
||||||
|
command ls -A -F "$file_path"
|
||||||
|
end
|
||||||
|
else if test -c "$file_path"
|
||||||
|
_fzf_report_file_type "$file_path" "character device file"
|
||||||
|
else if test -b "$file_path"
|
||||||
|
_fzf_report_file_type "$file_path" "block device file"
|
||||||
|
else if test -S "$file_path"
|
||||||
|
_fzf_report_file_type "$file_path" socket
|
||||||
|
else if test -p "$file_path"
|
||||||
|
_fzf_report_file_type "$file_path" "named pipe"
|
||||||
|
else
|
||||||
|
echo "$file_path doesn't exist." >&2
|
||||||
|
end
|
||||||
|
end
|
||||||
18
fish/functions/_fzf_report_diff_type.fish
Normal file
18
fish/functions/_fzf_report_diff_type.fish
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
# helper for _fzf_preview_changed_file
|
||||||
|
# prints out something like
|
||||||
|
# ╭────────╮
|
||||||
|
# │ Staged │
|
||||||
|
# ╰────────╯
|
||||||
|
function _fzf_report_diff_type --argument-names diff_type --description "Print a distinct colored header meant to preface a git patch."
|
||||||
|
# number of "-" to draw is the length of the string to box + 2 for padding
|
||||||
|
set -f repeat_count (math 2 + (string length $diff_type))
|
||||||
|
set -f line (string repeat --count $repeat_count ─)
|
||||||
|
set -f top_border ╭$line╮
|
||||||
|
set -f btm_border ╰$line╯
|
||||||
|
|
||||||
|
set_color yellow
|
||||||
|
echo $top_border
|
||||||
|
echo "│ $diff_type │"
|
||||||
|
echo $btm_border
|
||||||
|
set_color normal
|
||||||
|
end
|
||||||
6
fish/functions/_fzf_report_file_type.fish
Normal file
6
fish/functions/_fzf_report_file_type.fish
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# helper function for _fzf_preview_file
|
||||||
|
function _fzf_report_file_type --argument-names file_path file_type --description "Explain the file type for a file."
|
||||||
|
set_color red
|
||||||
|
echo "Cannot preview '$file_path': it is a $file_type."
|
||||||
|
set_color normal
|
||||||
|
end
|
||||||
33
fish/functions/_fzf_search_directory.fish
Normal file
33
fish/functions/_fzf_search_directory.fish
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
function _fzf_search_directory --description "Search the current directory. Replace the current token with the selected file paths."
|
||||||
|
# Directly use fd binary to avoid output buffering delay caused by a fd alias, if any.
|
||||||
|
# Debian-based distros install fd as fdfind and the fd package is something else, so
|
||||||
|
# check for fdfind first. Fall back to "fd" for a clear error message.
|
||||||
|
set -f fd_cmd (command -v fdfind || command -v fd || echo "fd")
|
||||||
|
set -f --append fd_cmd --color=always $fzf_fd_opts
|
||||||
|
|
||||||
|
set -f fzf_arguments --multi --ansi $fzf_directory_opts
|
||||||
|
set -f token (commandline --current-token)
|
||||||
|
# expand any variables or leading tilde (~) in the token
|
||||||
|
set -f expanded_token (eval echo -- $token)
|
||||||
|
# unescape token because it's already quoted so backslashes will mess up the path
|
||||||
|
set -f unescaped_exp_token (string unescape -- $expanded_token)
|
||||||
|
|
||||||
|
# If the current token is a directory and has a trailing slash,
|
||||||
|
# then use it as fd's base directory.
|
||||||
|
if string match --quiet -- "*/" $unescaped_exp_token && test -d "$unescaped_exp_token"
|
||||||
|
set --append fd_cmd --base-directory=$unescaped_exp_token
|
||||||
|
# use the directory name as fzf's prompt to indicate the search is limited to that directory
|
||||||
|
set --prepend fzf_arguments --prompt="Directory $unescaped_exp_token> " --preview="_fzf_preview_file $expanded_token{}"
|
||||||
|
set -f file_paths_selected $unescaped_exp_token($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments)
|
||||||
|
else
|
||||||
|
set --prepend fzf_arguments --prompt="Directory> " --query="$unescaped_exp_token" --preview='_fzf_preview_file {}'
|
||||||
|
set -f file_paths_selected ($fd_cmd 2>/dev/null | _fzf_wrapper $fzf_arguments)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if test $status -eq 0
|
||||||
|
commandline --current-token --replace -- (string escape -- $file_paths_selected | string join ' ')
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline --function repaint
|
||||||
|
end
|
||||||
36
fish/functions/_fzf_search_git_log.fish
Normal file
36
fish/functions/_fzf_search_git_log.fish
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
function _fzf_search_git_log --description "Search the output of git log and preview commits. Replace the current token with the selected commit hash."
|
||||||
|
if not git rev-parse --git-dir >/dev/null 2>&1
|
||||||
|
echo '_fzf_search_git_log: Not in a git repository.' >&2
|
||||||
|
else
|
||||||
|
if not set --query fzf_git_log_format
|
||||||
|
# %h gives you the abbreviated commit hash, which is useful for saving screen space, but we will have to expand it later below
|
||||||
|
set -f fzf_git_log_format '%C(bold blue)%h%C(reset) - %C(cyan)%ad%C(reset) %C(yellow)%d%C(reset) %C(normal)%s%C(reset) %C(dim normal)[%an]%C(reset)'
|
||||||
|
end
|
||||||
|
|
||||||
|
set -f preview_cmd 'git show --color=always --stat --patch {1}'
|
||||||
|
if set --query fzf_diff_highlighter
|
||||||
|
set preview_cmd "$preview_cmd | $fzf_diff_highlighter"
|
||||||
|
end
|
||||||
|
|
||||||
|
set -f selected_log_lines (
|
||||||
|
git log --no-show-signature --color=always --format=format:$fzf_git_log_format --date=short | \
|
||||||
|
_fzf_wrapper --ansi \
|
||||||
|
--multi \
|
||||||
|
--scheme=history \
|
||||||
|
--prompt="Git Log> " \
|
||||||
|
--preview=$preview_cmd \
|
||||||
|
--query=(commandline --current-token) \
|
||||||
|
$fzf_git_log_opts
|
||||||
|
)
|
||||||
|
if test $status -eq 0
|
||||||
|
for line in $selected_log_lines
|
||||||
|
set -f abbreviated_commit_hash (string split --field 1 " " $line)
|
||||||
|
set -f full_commit_hash (git rev-parse $abbreviated_commit_hash)
|
||||||
|
set -f --append commit_hashes $full_commit_hash
|
||||||
|
end
|
||||||
|
commandline --current-token --replace (string join ' ' $commit_hashes)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline --function repaint
|
||||||
|
end
|
||||||
41
fish/functions/_fzf_search_git_status.fish
Normal file
41
fish/functions/_fzf_search_git_status.fish
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
function _fzf_search_git_status --description "Search the output of git status. Replace the current token with the selected file paths."
|
||||||
|
if not git rev-parse --git-dir >/dev/null 2>&1
|
||||||
|
echo '_fzf_search_git_status: Not in a git repository.' >&2
|
||||||
|
else
|
||||||
|
set -f preview_cmd '_fzf_preview_changed_file {}'
|
||||||
|
if set --query fzf_diff_highlighter
|
||||||
|
set preview_cmd "$preview_cmd | $fzf_diff_highlighter"
|
||||||
|
end
|
||||||
|
|
||||||
|
set -f selected_paths (
|
||||||
|
# Pass configuration color.status=always to force status to use colors even though output is sent to a pipe
|
||||||
|
git -c color.status=always status --short |
|
||||||
|
_fzf_wrapper --ansi \
|
||||||
|
--multi \
|
||||||
|
--prompt="Git Status> " \
|
||||||
|
--query=(commandline --current-token) \
|
||||||
|
--preview=$preview_cmd \
|
||||||
|
--nth="2.." \
|
||||||
|
$fzf_git_status_opts
|
||||||
|
)
|
||||||
|
if test $status -eq 0
|
||||||
|
# git status --short automatically escapes the paths of most files for us so not going to bother trying to handle
|
||||||
|
# the few edges cases of weird file names that should be extremely rare (e.g. "this;needs;escaping")
|
||||||
|
set -f cleaned_paths
|
||||||
|
|
||||||
|
for path in $selected_paths
|
||||||
|
if test (string sub --length 1 $path) = R
|
||||||
|
# path has been renamed and looks like "R LICENSE -> LICENSE.md"
|
||||||
|
# extract the path to use from after the arrow
|
||||||
|
set --append cleaned_paths (string split -- "-> " $path)[-1]
|
||||||
|
else
|
||||||
|
set --append cleaned_paths (string sub --start=4 $path)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline --current-token --replace -- (string join ' ' $cleaned_paths)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline --function repaint
|
||||||
|
end
|
||||||
39
fish/functions/_fzf_search_history.fish
Normal file
39
fish/functions/_fzf_search_history.fish
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
function _fzf_search_history --description "Search command history. Replace the command line with the selected command."
|
||||||
|
# history merge incorporates history changes from other fish sessions
|
||||||
|
# it errors out if called in private mode
|
||||||
|
if test -z "$fish_private_mode"
|
||||||
|
builtin history merge
|
||||||
|
end
|
||||||
|
|
||||||
|
if not set --query fzf_history_time_format
|
||||||
|
# Reference https://devhints.io/strftime to understand strftime format symbols
|
||||||
|
set -f fzf_history_time_format "%m-%d %H:%M:%S"
|
||||||
|
end
|
||||||
|
|
||||||
|
# Delinate time from command in history entries using the vertical box drawing char (U+2502).
|
||||||
|
# Then, to get raw command from history entries, delete everything up to it. The ? on regex is
|
||||||
|
# necessary to make regex non-greedy so it won't match into commands containing the char.
|
||||||
|
set -f time_prefix_regex '^.*? │ '
|
||||||
|
# Delinate commands throughout pipeline using null rather than newlines because commands can be multi-line
|
||||||
|
set -f commands_selected (
|
||||||
|
builtin history --null --show-time="$fzf_history_time_format │ " |
|
||||||
|
_fzf_wrapper --read0 \
|
||||||
|
--print0 \
|
||||||
|
--multi \
|
||||||
|
--scheme=history \
|
||||||
|
--prompt="History> " \
|
||||||
|
--query=(commandline) \
|
||||||
|
--preview="string replace --regex '$time_prefix_regex' '' -- {} | fish_indent --ansi" \
|
||||||
|
--preview-window="bottom:3:wrap" \
|
||||||
|
$fzf_history_opts |
|
||||||
|
string split0 |
|
||||||
|
# remove timestamps from commands selected
|
||||||
|
string replace --regex $time_prefix_regex ''
|
||||||
|
)
|
||||||
|
|
||||||
|
if test $status -eq 0
|
||||||
|
commandline --replace -- $commands_selected
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline --function repaint
|
||||||
|
end
|
||||||
32
fish/functions/_fzf_search_processes.fish
Normal file
32
fish/functions/_fzf_search_processes.fish
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
function _fzf_search_processes --description "Search all running processes. Replace the current token with the pid of the selected process."
|
||||||
|
# Directly use ps command because it is often aliased to a different command entirely
|
||||||
|
# or with options that dirty the search results and preview output
|
||||||
|
set -f ps_cmd (command -v ps || echo "ps")
|
||||||
|
# use all caps to be consistent with ps default format
|
||||||
|
# snake_case because ps doesn't seem to allow spaces in the field names
|
||||||
|
set -f ps_preview_fmt (string join ',' 'pid' 'ppid=PARENT' 'user' '%cpu' 'rss=RSS_IN_KB' 'start=START_TIME' 'command')
|
||||||
|
set -f processes_selected (
|
||||||
|
$ps_cmd -A -opid,command | \
|
||||||
|
_fzf_wrapper --multi \
|
||||||
|
--prompt="Processes> " \
|
||||||
|
--query (commandline --current-token) \
|
||||||
|
--ansi \
|
||||||
|
# first line outputted by ps is a header, so we need to mark it as so
|
||||||
|
--header-lines=1 \
|
||||||
|
# ps uses exit code 1 if the process was not found, in which case show an message explaining so
|
||||||
|
--preview="$ps_cmd -o '$ps_preview_fmt' -p {1} || echo 'Cannot preview {1} because it exited.'" \
|
||||||
|
--preview-window="bottom:4:wrap" \
|
||||||
|
$fzf_processes_opts
|
||||||
|
)
|
||||||
|
|
||||||
|
if test $status -eq 0
|
||||||
|
for process in $processes_selected
|
||||||
|
set -f --append pids_selected (string split --no-empty --field=1 -- " " $process)
|
||||||
|
end
|
||||||
|
|
||||||
|
# string join to replace the newlines outputted by string split with spaces
|
||||||
|
commandline --current-token --replace -- (string join ' ' $pids_selected)
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline --function repaint
|
||||||
|
end
|
||||||
47
fish/functions/_fzf_search_variables.fish
Normal file
47
fish/functions/_fzf_search_variables.fish
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# This function expects the following two arguments:
|
||||||
|
# argument 1 = output of (set --show | psub), i.e. a file with the scope info and values of all variables
|
||||||
|
# argument 2 = output of (set --names | psub), i.e. a file with all variable names
|
||||||
|
function _fzf_search_variables --argument-names set_show_output set_names_output --description "Search and preview shell variables. Replace the current token with the selected variable."
|
||||||
|
if test -z "$set_names_output"
|
||||||
|
printf '%s\n' '_fzf_search_variables requires 2 arguments.' >&2
|
||||||
|
|
||||||
|
commandline --function repaint
|
||||||
|
return 22 # 22 means invalid argument in POSIX
|
||||||
|
end
|
||||||
|
|
||||||
|
# Exclude the history variable from being piped into fzf because
|
||||||
|
# 1. it's not included in $set_names_output
|
||||||
|
# 2. it tends to be a very large value => increases computation time
|
||||||
|
# 3._fzf_search_history is a much better way to examine history anyway
|
||||||
|
set -f all_variable_names (string match --invert history <$set_names_output)
|
||||||
|
|
||||||
|
set -f current_token (commandline --current-token)
|
||||||
|
# Use the current token to pre-populate fzf's query. If the current token begins
|
||||||
|
# with a $, remove it from the query so that it will better match the variable names
|
||||||
|
set -f cleaned_curr_token (string replace -- '$' '' $current_token)
|
||||||
|
|
||||||
|
set -f variable_names_selected (
|
||||||
|
printf '%s\n' $all_variable_names |
|
||||||
|
_fzf_wrapper --preview "_fzf_extract_var_info {} $set_show_output" \
|
||||||
|
--prompt="Variables> " \
|
||||||
|
--preview-window="wrap" \
|
||||||
|
--multi \
|
||||||
|
--query=$cleaned_curr_token \
|
||||||
|
$fzf_variables_opts
|
||||||
|
)
|
||||||
|
|
||||||
|
if test $status -eq 0
|
||||||
|
# If the current token begins with a $, do not overwrite the $ when
|
||||||
|
# replacing the current token with the selected variable.
|
||||||
|
# Uses brace expansion to prepend $ to each variable name.
|
||||||
|
commandline --current-token --replace (
|
||||||
|
if string match --quiet -- '$*' $current_token
|
||||||
|
string join " " \${$variable_names_selected}
|
||||||
|
else
|
||||||
|
string join " " $variable_names_selected
|
||||||
|
end
|
||||||
|
)
|
||||||
|
end
|
||||||
|
|
||||||
|
commandline --function repaint
|
||||||
|
end
|
||||||
21
fish/functions/_fzf_wrapper.fish
Normal file
21
fish/functions/_fzf_wrapper.fish
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
function _fzf_wrapper --description "Prepares some environment variables before executing fzf."
|
||||||
|
# Make sure fzf uses fish to execute preview commands, some of which
|
||||||
|
# are autoloaded fish functions so don't exist in other shells.
|
||||||
|
# Use --function so that it doesn't clobber SHELL outside this function.
|
||||||
|
set -f --export SHELL (command --search fish)
|
||||||
|
|
||||||
|
# If neither FZF_DEFAULT_OPTS nor FZF_DEFAULT_OPTS_FILE are set, then set some sane defaults.
|
||||||
|
# See https://github.com/junegunn/fzf#environment-variables
|
||||||
|
set --query FZF_DEFAULT_OPTS FZF_DEFAULT_OPTS_FILE
|
||||||
|
if test $status -eq 2
|
||||||
|
# cycle allows jumping between the first and last results, making scrolling faster
|
||||||
|
# layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env
|
||||||
|
# border shows where the fzf window begins and ends
|
||||||
|
# height=90% leaves space to see the current command and some scrollback, maintaining context of work
|
||||||
|
# preview-window=wrap wraps long lines in the preview window, making reading easier
|
||||||
|
# marker=* makes the multi-select marker more distinguishable from the pointer (since both default to >)
|
||||||
|
set --export FZF_DEFAULT_OPTS '--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"'
|
||||||
|
end
|
||||||
|
|
||||||
|
fzf $argv
|
||||||
|
end
|
||||||
251
fish/functions/fisher.fish
Normal file
251
fish/functions/fisher.fish
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
function fisher --argument-names cmd --description "A plugin manager for Fish"
|
||||||
|
set --query fisher_path || set --local fisher_path $__fish_config_dir
|
||||||
|
set --local fisher_version 4.4.8
|
||||||
|
set --local fish_plugins $__fish_config_dir/fish_plugins
|
||||||
|
|
||||||
|
switch "$cmd"
|
||||||
|
case -v --version
|
||||||
|
echo "fisher, version $fisher_version"
|
||||||
|
case "" -h --help
|
||||||
|
echo "Usage: fisher install <plugins...> Install plugins"
|
||||||
|
echo " fisher remove <plugins...> Remove installed plugins"
|
||||||
|
echo " fisher uninstall <plugins...> Remove installed plugins (alias)"
|
||||||
|
echo " fisher update <plugins...> Update installed plugins"
|
||||||
|
echo " fisher update Update all installed plugins"
|
||||||
|
echo " fisher list [<regex>] List installed plugins matching regex"
|
||||||
|
echo "Options:"
|
||||||
|
echo " -v, --version Print version"
|
||||||
|
echo " -h, --help Print this help message"
|
||||||
|
echo "Variables:"
|
||||||
|
echo " \$fisher_path Plugin installation path. Default: $__fish_config_dir" | string replace --regex -- $HOME \~
|
||||||
|
case ls list
|
||||||
|
string match --entire --regex -- "$argv[2]" $_fisher_plugins
|
||||||
|
case install update remove uninstall
|
||||||
|
isatty || read --local --null --array stdin && set --append argv $stdin
|
||||||
|
|
||||||
|
test "$cmd" = uninstall && set cmd remove
|
||||||
|
|
||||||
|
set --local install_plugins
|
||||||
|
set --local update_plugins
|
||||||
|
set --local remove_plugins
|
||||||
|
set --local arg_plugins $argv[2..-1]
|
||||||
|
set --local old_plugins $_fisher_plugins
|
||||||
|
set --local new_plugins
|
||||||
|
|
||||||
|
test -e $fish_plugins && set --local file_plugins (string match --regex -- '^[^\s]+$' <$fish_plugins | string replace -- \~ ~)
|
||||||
|
|
||||||
|
if ! set --query argv[2]
|
||||||
|
if test "$cmd" != update
|
||||||
|
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
|
||||||
|
else if ! set --query file_plugins
|
||||||
|
echo "fisher: \"$fish_plugins\" file not found: \"$cmd\"" >&2 && return 1
|
||||||
|
end
|
||||||
|
set arg_plugins $file_plugins
|
||||||
|
else if test "$cmd" = install && ! set --query old_plugins[1]
|
||||||
|
set --append arg_plugins $file_plugins
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $arg_plugins
|
||||||
|
set plugin (test -e "$plugin" && realpath $plugin || string lower -- $plugin)
|
||||||
|
contains -- "$plugin" $new_plugins || set --append new_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query argv[2]
|
||||||
|
for plugin in $new_plugins
|
||||||
|
if contains -- "$plugin" $old_plugins
|
||||||
|
test "$cmd" = remove &&
|
||||||
|
set --append remove_plugins $plugin ||
|
||||||
|
set --append update_plugins $plugin
|
||||||
|
else if test "$cmd" = install
|
||||||
|
set --append install_plugins $plugin
|
||||||
|
else
|
||||||
|
echo "fisher: Plugin not installed: \"$plugin\"" >&2 && return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
for plugin in $new_plugins
|
||||||
|
contains -- "$plugin" $old_plugins &&
|
||||||
|
set --append update_plugins $plugin ||
|
||||||
|
set --append install_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $old_plugins
|
||||||
|
contains -- "$plugin" $new_plugins || set --append remove_plugins $plugin
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local pid_list
|
||||||
|
set --local source_plugins
|
||||||
|
set --local fetch_plugins $update_plugins $install_plugins
|
||||||
|
set --local fish_path (status fish-path)
|
||||||
|
|
||||||
|
echo (set_color --bold)fisher $cmd version $fisher_version(set_color normal)
|
||||||
|
|
||||||
|
for plugin in $fetch_plugins
|
||||||
|
set --local source (command mktemp -d)
|
||||||
|
set --append source_plugins $source
|
||||||
|
|
||||||
|
command mkdir -p $source/{completions,conf.d,themes,functions}
|
||||||
|
|
||||||
|
$fish_path --command "
|
||||||
|
if test -e $plugin
|
||||||
|
command cp -Rf $plugin/* $source
|
||||||
|
else
|
||||||
|
set resp (command mktemp)
|
||||||
|
set temp (command mktemp -d)
|
||||||
|
set repo (string split -- \@ $plugin) || set repo[2] HEAD
|
||||||
|
|
||||||
|
if set path (string replace --regex -- '^(https://)?gitlab.com/' '' \$repo[1])
|
||||||
|
set name (string split -- / \$path)[-1]
|
||||||
|
set url https://gitlab.com/\$path/-/archive/\$repo[2]/\$name-\$repo[2].tar.gz
|
||||||
|
else
|
||||||
|
set url https://api.github.com/repos/\$repo[1]/tarball/\$repo[2]
|
||||||
|
end
|
||||||
|
|
||||||
|
echo Fetching (set_color --underline)\$url(set_color normal)
|
||||||
|
|
||||||
|
set http (command curl -q --silent -L -o \$resp -w %{http_code} \$url)
|
||||||
|
|
||||||
|
if test \"\$http\" = 200 && command tar -xzC \$temp -f \$resp 2>/dev/null
|
||||||
|
command cp -Rf \$temp/*/* $source
|
||||||
|
else if test \"\$http\" = 403
|
||||||
|
echo fisher: GitHub API rate limit exceeded \(HTTP 403\) >&2
|
||||||
|
command rm -rf $source
|
||||||
|
else
|
||||||
|
echo fisher: Invalid plugin name or host unavailable: \\\"$plugin\\\" >&2
|
||||||
|
command rm -rf $source
|
||||||
|
end
|
||||||
|
|
||||||
|
command rm -rf \$temp
|
||||||
|
end
|
||||||
|
|
||||||
|
set files $source/* && string match --quiet --regex -- .+\.fish\\\$ \$files
|
||||||
|
" &
|
||||||
|
|
||||||
|
set --append pid_list (jobs --last --pid)
|
||||||
|
end
|
||||||
|
|
||||||
|
wait $pid_list 2>/dev/null
|
||||||
|
|
||||||
|
for plugin in $fetch_plugins
|
||||||
|
if set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)] && test ! -e $source
|
||||||
|
if set --local index (contains --index -- "$plugin" $install_plugins)
|
||||||
|
set --erase install_plugins[$index]
|
||||||
|
else
|
||||||
|
set --erase update_plugins[(contains --index -- "$plugin" $update_plugins)]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $update_plugins $remove_plugins
|
||||||
|
if set --local index (contains --index -- "$plugin" $_fisher_plugins)
|
||||||
|
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
|
||||||
|
|
||||||
|
if contains -- "$plugin" $remove_plugins
|
||||||
|
for name in (string replace --filter --regex -- '.+/conf\.d/([^/]+)\.fish$' '$1' $$plugin_files_var)
|
||||||
|
emit {$name}_uninstall
|
||||||
|
end
|
||||||
|
printf "%s\n" Removing\ (set_color red --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
|
||||||
|
set --erase _fisher_plugins[$index]
|
||||||
|
end
|
||||||
|
|
||||||
|
command rm -rf (string replace -- \~ ~ $$plugin_files_var)
|
||||||
|
|
||||||
|
functions --erase (string replace --filter --regex -- '.+/functions/([^/]+)\.fish$' '$1' $$plugin_files_var)
|
||||||
|
|
||||||
|
for name in (string replace --filter --regex -- '.+/completions/([^/]+)\.fish$' '$1' $$plugin_files_var)
|
||||||
|
complete --erase --command $name
|
||||||
|
end
|
||||||
|
|
||||||
|
set --erase $plugin_files_var
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query update_plugins[1] || set --query install_plugins[1]
|
||||||
|
command mkdir -p $fisher_path/{functions,themes,conf.d,completions}
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $update_plugins $install_plugins
|
||||||
|
set --local source $source_plugins[(contains --index -- "$plugin" $fetch_plugins)]
|
||||||
|
set --local files $source/{functions,themes,conf.d,completions}/*
|
||||||
|
|
||||||
|
if set --local index (contains --index -- $plugin $install_plugins)
|
||||||
|
set --local user_files $fisher_path/{functions,themes,conf.d,completions}/*
|
||||||
|
set --local conflict_files
|
||||||
|
|
||||||
|
for file in (string replace -- $source/ $fisher_path/ $files)
|
||||||
|
contains -- $file $user_files && set --append conflict_files $file
|
||||||
|
end
|
||||||
|
|
||||||
|
if set --query conflict_files[1] && set --erase install_plugins[$index]
|
||||||
|
echo -s "fisher: Cannot install \"$plugin\": please remove or move conflicting files first:" \n" "$conflict_files >&2
|
||||||
|
continue
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for file in (string replace -- $source/ "" $files)
|
||||||
|
command cp -RLf $source/$file $fisher_path/$file
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local plugin_files_var _fisher_(string escape --style=var -- $plugin)_files
|
||||||
|
|
||||||
|
set --query files[1] && set --universal $plugin_files_var (string replace -- $source $fisher_path $files | string replace -- ~ \~)
|
||||||
|
|
||||||
|
contains -- $plugin $_fisher_plugins || set --universal --append _fisher_plugins $plugin
|
||||||
|
contains -- $plugin $install_plugins && set --local event install || set --local event update
|
||||||
|
|
||||||
|
printf "%s\n" Installing\ (set_color --bold)$plugin(set_color normal) " "$$plugin_files_var | string replace -- \~ ~
|
||||||
|
|
||||||
|
for file in (string match --regex -- '.+/[^/]+\.fish$' $$plugin_files_var | string replace -- \~ ~)
|
||||||
|
source $file
|
||||||
|
if set --local name (string replace --regex -- '.+conf\.d/([^/]+)\.fish$' '$1' $file)
|
||||||
|
emit {$name}_$event
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
command rm -rf $source_plugins
|
||||||
|
|
||||||
|
if set --query _fisher_plugins[1]
|
||||||
|
set --local commit_plugins
|
||||||
|
|
||||||
|
for plugin in $file_plugins
|
||||||
|
contains -- (string lower -- $plugin) (string lower -- $_fisher_plugins) && set --append commit_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
for plugin in $_fisher_plugins
|
||||||
|
contains -- (string lower -- $plugin) (string lower -- $commit_plugins) || set --append commit_plugins $plugin
|
||||||
|
end
|
||||||
|
|
||||||
|
string replace --regex -- $HOME \~ $commit_plugins >$fish_plugins
|
||||||
|
else
|
||||||
|
set --erase _fisher_plugins
|
||||||
|
command rm -f $fish_plugins
|
||||||
|
end
|
||||||
|
|
||||||
|
set --local total (count $install_plugins) (count $update_plugins) (count $remove_plugins)
|
||||||
|
|
||||||
|
test "$total" != "0 0 0" && echo (string join ", " (
|
||||||
|
test $total[1] = 0 || echo "Installed $total[1]") (
|
||||||
|
test $total[2] = 0 || echo "Updated $total[2]") (
|
||||||
|
test $total[3] = 0 || echo "Removed $total[3]")
|
||||||
|
) plugin/s
|
||||||
|
case \*
|
||||||
|
echo "fisher: Unknown command: \"$cmd\"" >&2 && return 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if ! set --query _fisher_upgraded_to_4_4
|
||||||
|
set --universal _fisher_upgraded_to_4_4
|
||||||
|
if functions --query _fisher_list
|
||||||
|
set --query XDG_DATA_HOME[1] || set --local XDG_DATA_HOME ~/.local/share
|
||||||
|
command rm -rf $XDG_DATA_HOME/fisher
|
||||||
|
functions --erase _fisher_{list,plugin_parse}
|
||||||
|
fisher update >/dev/null 2>/dev/null
|
||||||
|
else
|
||||||
|
for var in (set --names | string match --entire --regex '^_fisher_.+_files$')
|
||||||
|
set $var (string replace -- ~ \~ $$var)
|
||||||
|
end
|
||||||
|
functions --erase _fisher_fish_postexec
|
||||||
|
end
|
||||||
|
end
|
||||||
46
fish/functions/fzf_configure_bindings.fish
Normal file
46
fish/functions/fzf_configure_bindings.fish
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# Always installs bindings for insert and default mode for simplicity and b/c it has almost no side-effect
|
||||||
|
# https://gitter.im/fish-shell/fish-shell?at=60a55915ee77a74d685fa6b1
|
||||||
|
function fzf_configure_bindings --description "Installs the default key bindings for fzf.fish with user overrides passed as options."
|
||||||
|
# no need to install bindings if not in interactive mode or running tests
|
||||||
|
status is-interactive || test "$CI" = true; or return
|
||||||
|
|
||||||
|
set -f options_spec h/help 'directory=?' 'git_log=?' 'git_status=?' 'history=?' 'processes=?' 'variables=?'
|
||||||
|
argparse --max-args=0 --ignore-unknown $options_spec -- $argv 2>/dev/null
|
||||||
|
if test $status -ne 0
|
||||||
|
echo "Invalid option or a positional argument was provided." >&2
|
||||||
|
_fzf_configure_bindings_help
|
||||||
|
return 22
|
||||||
|
else if set --query _flag_help
|
||||||
|
_fzf_configure_bindings_help
|
||||||
|
return
|
||||||
|
else
|
||||||
|
# Initialize with default key sequences and then override or disable them based on flags
|
||||||
|
# index 1 = directory, 2 = git_log, 3 = git_status, 4 = history, 5 = processes, 6 = variables
|
||||||
|
set -f key_sequences \e\cf \e\cl \e\cs \cr \e\cp \cv # \c = control, \e = escape
|
||||||
|
set --query _flag_directory && set key_sequences[1] "$_flag_directory"
|
||||||
|
set --query _flag_git_log && set key_sequences[2] "$_flag_git_log"
|
||||||
|
set --query _flag_git_status && set key_sequences[3] "$_flag_git_status"
|
||||||
|
set --query _flag_history && set key_sequences[4] "$_flag_history"
|
||||||
|
set --query _flag_processes && set key_sequences[5] "$_flag_processes"
|
||||||
|
set --query _flag_variables && set key_sequences[6] "$_flag_variables"
|
||||||
|
|
||||||
|
# If fzf bindings already exists, uninstall it first for a clean slate
|
||||||
|
if functions --query _fzf_uninstall_bindings
|
||||||
|
_fzf_uninstall_bindings
|
||||||
|
end
|
||||||
|
|
||||||
|
for mode in default insert
|
||||||
|
test -n $key_sequences[1] && bind --mode $mode $key_sequences[1] _fzf_search_directory
|
||||||
|
test -n $key_sequences[2] && bind --mode $mode $key_sequences[2] _fzf_search_git_log
|
||||||
|
test -n $key_sequences[3] && bind --mode $mode $key_sequences[3] _fzf_search_git_status
|
||||||
|
test -n $key_sequences[4] && bind --mode $mode $key_sequences[4] _fzf_search_history
|
||||||
|
test -n $key_sequences[5] && bind --mode $mode $key_sequences[5] _fzf_search_processes
|
||||||
|
test -n $key_sequences[6] && bind --mode $mode $key_sequences[6] "$_fzf_search_vars_command"
|
||||||
|
end
|
||||||
|
|
||||||
|
function _fzf_uninstall_bindings --inherit-variable key_sequences
|
||||||
|
bind --erase -- $key_sequences
|
||||||
|
bind --erase --mode insert -- $key_sequences
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
24
hypr/autostart.conf
Normal file
24
hypr/autostart.conf
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
#################
|
||||||
|
### AUTOSTART ###
|
||||||
|
#################
|
||||||
|
|
||||||
|
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||||
|
# Or execute your favorite apps at launch like this:
|
||||||
|
|
||||||
|
exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP XDG_SESSION_TYPE XDG_SESSION_DESKTOP
|
||||||
|
exec-once = waybar
|
||||||
|
exec-once = swww-daemon
|
||||||
|
exec-once = swaync
|
||||||
|
exec-once = sh -c "/home/stereov/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox %u & sleep 6 && hyprctl dispatch closewindow class:jetbrains-toolbox"
|
||||||
|
exec-once = "/home/stereov/Developer/antistereov/randrwall/randrwall.py reload"
|
||||||
|
exec-once = ~/.config/hypr/scripts/cover-listener.sh
|
||||||
|
exec-once = hypridle
|
||||||
|
|
||||||
|
exec-once = gsettings set org.gnome.desktop.interface gtk-theme 'adw-gtk3-dark'
|
||||||
|
exec-once = gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'
|
||||||
|
|
||||||
|
exec-once = curl -s https://zenquotes.io/api/random > ~/.cache/quote.json
|
||||||
|
exec-once = "/usr/libexec/polkit-mate-authentication-agent-1"
|
||||||
|
|
||||||
|
exec-once = seafile-applet
|
||||||
|
exec-once = flatpak run org.signal.Signal
|
||||||
14
hypr/bindings.conf
Normal file
14
hypr/bindings.conf
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
####################
|
||||||
|
### KEYBINDINGSS ###
|
||||||
|
####################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||||
|
source = ~/.config/hypr/bindings/tiling.conf
|
||||||
|
|
||||||
|
source = ~/.config/hypr/bindings/hyprshot.conf
|
||||||
|
source = ~/.config/hypr/bindings/lock.conf
|
||||||
|
source = ~/.config/hypr/bindings/media.conf
|
||||||
|
source = ~/.config/hypr/bindings/programs.conf
|
||||||
|
source = ~/.config/hypr/bindings/randrwall.conf
|
||||||
|
|
||||||
|
|
||||||
2
hypr/bindings/hyprshot.conf
Normal file
2
hypr/bindings/hyprshot.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
bind = ALT SHIFT, 4, exec, hyprshot -m region
|
||||||
|
bind = ALT SHIFT, 5, exec, hyprshot -m window
|
||||||
1
hypr/bindings/lock.conf
Normal file
1
hypr/bindings/lock.conf
Normal file
@@ -0,0 +1 @@
|
|||||||
|
bind = CTRL ALT, Q, exec, hyprlock
|
||||||
19
hypr/bindings/media.conf
Normal file
19
hypr/bindings/media.conf
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# Only display the OSD on the currently focused monitor
|
||||||
|
$osdclient = swayosd-client --monitor "$(hyprctl monitors -j | jq -r '.[] | select(.focused == true).name')"
|
||||||
|
|
||||||
|
# Laptop multimedia keys for volume and LCD brightness (with OSD)
|
||||||
|
bindeld = ,XF86AudioRaiseVolume, Volume up, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
||||||
|
bindeld = ,XF86AudioLowerVolume, Volume down, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||||
|
bindeld = ,XF86AudioMute, Mute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||||
|
bindeld = ,XF86AudioMicMute, Mute microphone, exec, $osdclient --input-volume mute-toggle
|
||||||
|
bindeld = ,XF86MonBrightnessUp, Brightness up, exec, brightnessctl set +5%
|
||||||
|
bindeld = ,XF86MonBrightnessDown, Brightness down, exec, brightnessctl set 5%-
|
||||||
|
|
||||||
|
# Requires playerctl
|
||||||
|
bindld = , XF86AudioNext, Next track, exec, playerctl next
|
||||||
|
bindld = , XF86AudioPause, Pause, exec, playerctl play-pause
|
||||||
|
bindld = , XF86AudioPlay, Play, exec, playerctl play-pause
|
||||||
|
bindld = , XF86AudioPrev, Previous track, exec, playerctl previous
|
||||||
|
|
||||||
|
# Switch audio output with Super + Mute
|
||||||
|
bindld = SUPER, XF86AudioMute, Switch audio output, exec, omarchy-cmd-audio-switch
|
||||||
6
hypr/bindings/programs.conf
Normal file
6
hypr/bindings/programs.conf
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
bind = $mainMod, RETURN, exec, $terminal
|
||||||
|
bind = $mainMod, W, killactive,
|
||||||
|
bind = $mainMod, M, exit,
|
||||||
|
bind = $mainMod, E, exec, $fileManager
|
||||||
|
bind = $mainMod, B, exec, $browser
|
||||||
|
bind = ALT, space, exec, $menu
|
||||||
4
hypr/bindings/randrwall.conf
Normal file
4
hypr/bindings/randrwall.conf
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
$randrwall = "/home/stereov/.config/hypr/scripts/randrwall.py"
|
||||||
|
|
||||||
|
bind = SUPER SHIFT, W, exec, $randrwall random
|
||||||
|
bind = SUPER SHIFT, F, exec, $randrwall favorite
|
||||||
@@ -1,17 +1,7 @@
|
|||||||
####################
|
|
||||||
### KEYBINDINGSS ###
|
|
||||||
####################
|
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
|
||||||
$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, Q, exec, $terminal
|
bind = $mainMod, F, togglefloating,
|
||||||
bind = $mainMod, C, killactive,
|
|
||||||
bind = $mainMod, M, exit,
|
|
||||||
bind = $mainMod, E, exec, $fileManager
|
|
||||||
bind = $mainMod, V, togglefloating,
|
|
||||||
bind = ALT, space, exec, $menu
|
|
||||||
bind = $mainMod, P, pseudo, # dwindle
|
bind = $mainMod, P, pseudo, # dwindle
|
||||||
bind = $mainMod SHIFT, J, togglesplit, # dwindle
|
bind = $mainMod SHIFT, J, togglesplit, # dwindle
|
||||||
|
|
||||||
@@ -21,6 +11,9 @@ bind = $mainMod, L, movefocus, r
|
|||||||
bind = $mainMod, K, movefocus, u
|
bind = $mainMod, K, movefocus, u
|
||||||
bind = $mainMod, J, movefocus, d
|
bind = $mainMod, J, movefocus, d
|
||||||
|
|
||||||
|
bind = CTRL ALT, left, workspace, e-1
|
||||||
|
bind = CTRL ALT, right, workspace, e+1
|
||||||
|
|
||||||
# Resize with Mod + Shift + HJKL (repeatable)
|
# Resize with Mod + Shift + HJKL (repeatable)
|
||||||
binde = $mainMod ALT, L, resizeactive, 50 0
|
binde = $mainMod ALT, L, resizeactive, 50 0
|
||||||
binde = $mainMod ALT, H, resizeactive, -50 0
|
binde = $mainMod ALT, H, resizeactive, -50 0
|
||||||
@@ -69,4 +62,3 @@ bind = $mainMod, mouse_up, workspace, e-1
|
|||||||
bindm = $mainMod, mouse:272, movewindow
|
bindm = $mainMod, mouse:272, movewindow
|
||||||
bindm = $mainMod, mouse:273, resizewindow
|
bindm = $mainMod, mouse:273, resizewindow
|
||||||
|
|
||||||
|
|
||||||
31
hypr/colors.conf
Normal file
31
hypr/colors.conf
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
$accent = $lavender
|
||||||
|
|
||||||
|
# accents
|
||||||
|
$rosewater = rgba(f5e0dcFF)
|
||||||
|
$flamingo = rgba(f2cdcdFF)
|
||||||
|
$pink = rgba(f5c2e7FF)
|
||||||
|
$mauve = rgba(cba6f7FF)
|
||||||
|
$red = rgba(f38ba8FF)
|
||||||
|
$maroon = rgba(eba0acFF)
|
||||||
|
$peach = rgba(fab387FF)
|
||||||
|
$yellow = rgba(f9e2afFF)
|
||||||
|
$green = rgba(a6e3a1FF)
|
||||||
|
$teal = rgba(94e2d5FF)
|
||||||
|
$sky = rgba(89dcebFF)
|
||||||
|
$sapphire = rgba(74c7ecFF)
|
||||||
|
$blue = rgba(89b4faFF)
|
||||||
|
$lavender = rgba(b4befeFF)
|
||||||
|
|
||||||
|
# text
|
||||||
|
$text = rgba(cdd6f4FF)
|
||||||
|
$subtext1 = rgba(bac2deFF)
|
||||||
|
$subtext0 = rgba(a6adc8FF)
|
||||||
|
|
||||||
|
# surfaces
|
||||||
|
$surface0 = rgba(313244FF)
|
||||||
|
$surface1 = rgba(45475aFF)
|
||||||
|
$surface2 = rgba(585b70FF)
|
||||||
|
$base = rgba(1e1e2eFF)
|
||||||
|
$mantle = rgba(181825FF)
|
||||||
|
$crust = rgba(11111bFF)
|
||||||
|
|
||||||
25
hypr/environment.conf
Normal file
25
hypr/environment.conf
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
#############################
|
||||||
|
### ENVIRONMENT VARIABLES ###
|
||||||
|
#############################
|
||||||
|
|
||||||
|
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||||
|
|
||||||
|
env = XCURSOR_SIZE,24
|
||||||
|
env = HYPRCURSOR_SIZE,24
|
||||||
|
|
||||||
|
env = GDK_SCALE,1
|
||||||
|
env = XCURSOR_SIZE,24
|
||||||
|
env = QT_AUTO_SCREEN_SCALE_FACTOR,0
|
||||||
|
env = QT_SCALE_FACTOR,1
|
||||||
|
env = _JAVA_AWT_WM_NONREPARENTING,1
|
||||||
|
env = AWT_TOOLKIT,MToolkit
|
||||||
|
env = WINIT_X11_SCALE_FACTOR,1
|
||||||
|
env = XWAYLAND_NO_GLAMOR,0
|
||||||
|
|
||||||
|
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||||
|
env = XDG_SESSION_TYPE,wayland
|
||||||
|
env = XDG_SESSION_DESKTOP,Hyprland
|
||||||
|
|
||||||
|
xwayland {
|
||||||
|
force_zero_scaling = true
|
||||||
|
}
|
||||||
29
hypr/hypridle.conf
Normal file
29
hypr/hypridle.conf
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
general {
|
||||||
|
lock_cmd = hyprlock # lock screen and 1password
|
||||||
|
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.
|
||||||
|
inhibit_sleep = 3 # wait until screen is locked
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 290
|
||||||
|
on-timeout = ~/.config/hypr/scripts/dim-display.sh dim
|
||||||
|
on-resume = ~/.config/hypr/scripts/dim-display.sh restore
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 300
|
||||||
|
on-timeout = loginctl lock-session
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 300
|
||||||
|
on-timeout = ~/.config/hypr/scripts/dim-keyboard.sh dim
|
||||||
|
on-resume = ~/.config/hypr/scripts/dim-keyboard.sh restore
|
||||||
|
}
|
||||||
|
|
||||||
|
listener {
|
||||||
|
timeout = 305 # 5.5min
|
||||||
|
on-timeout = hyprctl dispatch dpms off # screen off when timeout has passed
|
||||||
|
on-resume = hyprctl dispatch dpms on && brightnessctl -r # screen on when activity is detected
|
||||||
|
}
|
||||||
@@ -1,146 +1,10 @@
|
|||||||
|
source = ~/.config/hypr/autostart.conf
|
||||||
source = ~/.config/hypr/monitors.conf
|
source = ~/.config/hypr/monitors.conf
|
||||||
source = ~/.config/hypr/programs.conf
|
source = ~/.config/hypr/programs.conf
|
||||||
source = ~/.config/hypr/binds.conf
|
source = ~/.config/hypr/bindings.conf
|
||||||
|
source = ~/.config/hypr/input.conf
|
||||||
#################
|
source = ~/.config/hypr/looknfeel.conf
|
||||||
### AUTOSTART ###
|
source = ~/.config/hypr/environment.conf
|
||||||
#################
|
|
||||||
|
|
||||||
# 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 = waybar & hyprpaper & firefox
|
|
||||||
exec-once = waybar & hyprpaper
|
|
||||||
|
|
||||||
#############################
|
|
||||||
### ENVIRONMENT VARIABLES ###
|
|
||||||
#############################
|
|
||||||
|
|
||||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
|
||||||
|
|
||||||
env = XCURSOR_SIZE,24
|
|
||||||
env = HYPRCURSOR_SIZE,24
|
|
||||||
|
|
||||||
|
|
||||||
#####################
|
|
||||||
### LOOK AND FEEL ###
|
|
||||||
#####################
|
|
||||||
|
|
||||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
|
||||||
general {
|
|
||||||
gaps_in = 5
|
|
||||||
gaps_out = 20
|
|
||||||
|
|
||||||
border_size = 2
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
|
||||||
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
|
|
||||||
col.inactive_border = rgba(595959aa)
|
|
||||||
|
|
||||||
# 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 = 10
|
|
||||||
|
|
||||||
# Change transparency of focused and unfocused windows
|
|
||||||
active_opacity = 1.0
|
|
||||||
inactive_opacity = 1.0
|
|
||||||
|
|
||||||
drop_shadow = true
|
|
||||||
shadow_range = 4
|
|
||||||
shadow_render_power = 3
|
|
||||||
col.shadow = rgba(1a1a1aee)
|
|
||||||
|
|
||||||
# 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_status = master
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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 = false # If true disables the random hyprland logo / anime girl background. :(
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#############
|
|
||||||
### INPUT ###
|
|
||||||
#############
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
|
||||||
input {
|
|
||||||
kb_layout = us
|
|
||||||
kb_variant =
|
|
||||||
kb_model =
|
|
||||||
kb_options =
|
|
||||||
kb_rules =
|
|
||||||
|
|
||||||
follow_mouse = 1
|
|
||||||
|
|
||||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
|
||||||
|
|
||||||
touchpad {
|
|
||||||
natural_scroll = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
|
||||||
gestures {
|
|
||||||
workspace_swipe = false
|
|
||||||
}
|
|
||||||
|
|
||||||
# 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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
### WINDOWS AND WORKSPACES ###
|
### WINDOWS AND WORKSPACES ###
|
||||||
@@ -155,4 +19,3 @@ device {
|
|||||||
# Example windowrule v2
|
# Example windowrule v2
|
||||||
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
|
||||||
|
|
||||||
windowrulev2 = suppressevent maximize, class:.* # You'll probably like this.
|
|
||||||
|
|||||||
145
hypr/hyprlock.conf
Normal file
145
hypr/hyprlock.conf
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
$color = rgba(#1e1e2e, 1.0)
|
||||||
|
$inner_color = rgba(#1e1e2e, 0.8)
|
||||||
|
$outer_color = rgba(#cdd6f4, 1.0)
|
||||||
|
$font_color = rgba(#cdd6f4, 1.0)
|
||||||
|
$check_color = rgba(#380000, 1.0)
|
||||||
|
|
||||||
|
general {
|
||||||
|
ignore_empty_input = true
|
||||||
|
no_fade_in = true
|
||||||
|
no_fade_out = true
|
||||||
|
hide_cursor = false
|
||||||
|
grace = 0
|
||||||
|
disable_loading_bar = false
|
||||||
|
}
|
||||||
|
|
||||||
|
background {
|
||||||
|
monitor =
|
||||||
|
color = $color
|
||||||
|
path = ~/Pictures/Wallpapers/current
|
||||||
|
blur_passes = 3
|
||||||
|
}
|
||||||
|
|
||||||
|
animations {
|
||||||
|
enabled = true
|
||||||
|
}
|
||||||
|
|
||||||
|
# DATE
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:1000] echo "$(date +"%A, %B %d")"
|
||||||
|
color = rgba(242, 243, 244, 0.75)
|
||||||
|
font_size = 16
|
||||||
|
font_family = Lexend Light
|
||||||
|
position = 0, 300
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
||||||
|
# TIME
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:1000] echo "$(date +"%H:%M")"
|
||||||
|
color = rgba(242, 243, 244, 0.75)
|
||||||
|
font_size = 150
|
||||||
|
font_family = Lexend Extrabold
|
||||||
|
position = 0, 200
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
||||||
|
# NETWORK
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:2000] ~/.config/hypr/scripts/net-status.sh
|
||||||
|
color = rgba(242, 243, 244, 0.8)
|
||||||
|
font_size = 14
|
||||||
|
font_family = Lexend
|
||||||
|
position = 100, 100
|
||||||
|
halign = bottom
|
||||||
|
valign = left
|
||||||
|
}
|
||||||
|
|
||||||
|
# BATTERY
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:1000] echo "$(~/.config/hypr/scripts/battery.sh)"
|
||||||
|
font_family = lexend
|
||||||
|
font_size = 14
|
||||||
|
position = -100, 100
|
||||||
|
halign = right
|
||||||
|
valign = bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
# WEATHER
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:600000] echo "$(~/.config/hypr/scripts/weather.sh | jq -r .text)"
|
||||||
|
font_family = lexend
|
||||||
|
font_size = 14
|
||||||
|
position = -200, 100
|
||||||
|
halign = right
|
||||||
|
valign = bottom
|
||||||
|
}
|
||||||
|
|
||||||
|
# NOW PLAYING
|
||||||
|
image {
|
||||||
|
monitor =
|
||||||
|
path = ~/.cache/nowplaying-cover.jpg
|
||||||
|
size = 300
|
||||||
|
rounding = 20
|
||||||
|
position = 0, -150
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
border_size = 0
|
||||||
|
reload_time = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:1000] playerctl metadata title || jq -r '.[0].q' ~/.cache/quote.json
|
||||||
|
color = rgba(242, 243, 244, 0.8)
|
||||||
|
font_size = 14
|
||||||
|
font_family = Lexend
|
||||||
|
position = 0, -320
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
||||||
|
label {
|
||||||
|
monitor =
|
||||||
|
text = cmd[update:1000] playerctl metadata artist || jq -r '.[0].a' ~/.cache/quote.json
|
||||||
|
color = rgba(242, 243, 244, 0.8)
|
||||||
|
font_size = 14
|
||||||
|
font_family = Lexend Bold
|
||||||
|
position = 0, -345
|
||||||
|
halign = center
|
||||||
|
valign = center
|
||||||
|
}
|
||||||
|
|
||||||
|
input-field {
|
||||||
|
monitor =
|
||||||
|
size = 300, 50
|
||||||
|
position = 0, 100
|
||||||
|
halign = center
|
||||||
|
valign = bottom
|
||||||
|
|
||||||
|
inner_color = rgba(242, 243, 244, 0.8)
|
||||||
|
outer_color = $outer_color
|
||||||
|
outline_thickness = 4
|
||||||
|
|
||||||
|
font_family = Lexend
|
||||||
|
font_color = $font_color
|
||||||
|
|
||||||
|
placeholder_text = Enter Password
|
||||||
|
check_color = $check_color
|
||||||
|
fail_text = $FAIL
|
||||||
|
|
||||||
|
rounding = 10
|
||||||
|
shadow_passes = 0
|
||||||
|
fade_on_empty = true
|
||||||
|
}
|
||||||
|
|
||||||
|
auth {
|
||||||
|
fingerprint:enabled = true
|
||||||
|
}
|
||||||
@@ -1,2 +1,3 @@
|
|||||||
preload = /usr/share/backgrounds/Dynamic_Wallpapers/Ocean/Ocean-1.png
|
preload = /home/stereov/.config/wallpaper/current.png
|
||||||
wallpaper = , /usr/share/backgrounds/Dynamic_Wallpapers/Ocean/Ocean-1.png
|
wallpaper = , /home/stereov/.config/wallpaper/current.png
|
||||||
|
splash = true
|
||||||
|
|||||||
29
hypr/input.conf
Normal file
29
hypr/input.conf
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#############
|
||||||
|
### INPUT ###
|
||||||
|
#############
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||||
|
input {
|
||||||
|
kb_layout = us
|
||||||
|
kb_variant = altgr-intl
|
||||||
|
kb_options = caps:escape
|
||||||
|
kb_rules =
|
||||||
|
|
||||||
|
follow_mouse = 1
|
||||||
|
|
||||||
|
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||||
|
|
||||||
|
touchpad {
|
||||||
|
natural_scroll = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gesture = 3, horizontal, workspace
|
||||||
|
|
||||||
|
# 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
|
||||||
|
}
|
||||||
|
|
||||||
86
hypr/looknfeel.conf
Normal file
86
hypr/looknfeel.conf
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
#####################
|
||||||
|
### LOOK AND FEEL ###
|
||||||
|
#####################
|
||||||
|
|
||||||
|
source = ~/.config/hypr/colors.conf
|
||||||
|
|
||||||
|
# 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 = $accent
|
||||||
|
col.inactive_border = $surface2
|
||||||
|
|
||||||
|
# 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 = 10
|
||||||
|
|
||||||
|
# Change transparency of focused and unfocused windows
|
||||||
|
active_opacity = 0.99
|
||||||
|
inactive_opacity = 0.9
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||||
|
blur {
|
||||||
|
enabled = true
|
||||||
|
size = 5
|
||||||
|
passes = 1
|
||||||
|
vibrancy = 0.1696
|
||||||
|
ignore_opacity = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# 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_status = master
|
||||||
|
}
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#misc
|
||||||
|
misc {
|
||||||
|
force_default_wallpaper = 0 # 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. :(
|
||||||
|
disable_splash_rendering = true
|
||||||
|
background_color = 0x000000
|
||||||
|
}
|
||||||
|
|
||||||
|
layerrule {
|
||||||
|
name = waybar_blur
|
||||||
|
match:namespace = waybar
|
||||||
|
blur = on
|
||||||
|
ignore_alpha = 0.1
|
||||||
|
}
|
||||||
@@ -5,5 +5,8 @@
|
|||||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||||
monitor=,preferred, auto, auto
|
monitor=,preferred, auto, auto
|
||||||
monitor=eDP-1, 2256x1504, 0x0, 1.175
|
monitor=eDP-1, 2256x1504, 0x0, 1.175
|
||||||
monitor=DP-10, 3440x1440, -3440x0, 1
|
monitor=DP-10, 3840x2160, -640x-1800, 1.2
|
||||||
|
|
||||||
|
bindl = , switch:on:Lid Switch, exec, ~/.config/hypr/scripts/lid.sh off
|
||||||
|
bindl = , switch:off:Lid Switch, exec, ~/.config/hypr/scripts/lid.sh on
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@
|
|||||||
|
|
||||||
# Set programs that you use
|
# Set programs that you use
|
||||||
$terminal = kitty
|
$terminal = kitty
|
||||||
$fileManager = dolphin
|
$fileManager = nautilus
|
||||||
$menu = rofi -show drun
|
$browser = flatpak run app.zen_browser.zen
|
||||||
|
$menu = rofi -show drun -terminal kitty -kb-cancel Escape -theme ~/.local/share/rofi/themes/modern/style.rasi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
55
hypr/scripts/battery.sh
Executable file
55
hypr/scripts/battery.sh
Executable file
@@ -0,0 +1,55 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Find battery + AC device (works on most laptops)
|
||||||
|
BAT="$(ls -1 /sys/class/power_supply 2>/dev/null | grep -E '^BAT|^CMB|^BATT' | head -n1 || true)"
|
||||||
|
AC="$(ls -1 /sys/class/power_supply 2>/dev/null | grep -E '^AC|^ADP|^ACAD' | head -n1 || true)"
|
||||||
|
|
||||||
|
if [[ -z "${BAT}" ]]; then
|
||||||
|
echo " --%" # unknown
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
BAT_PATH="/sys/class/power_supply/${BAT}"
|
||||||
|
STATUS="$(<"${BAT_PATH}/status")" # Charging|Discharging|Full|Not charging|Unknown
|
||||||
|
CAPACITY="$(<"${BAT_PATH}/capacity")" # 0-100
|
||||||
|
|
||||||
|
# 0-10, 11-35, 36-60, 61-85, 86-100
|
||||||
|
if ((CAPACITY <= 10)); then
|
||||||
|
if [[ "${STATUS}" == "Charging" || "${STATUS}" == "Not charging" || "${STATUS}" == "Full" ]]; then
|
||||||
|
ICON=" "
|
||||||
|
else
|
||||||
|
ICON=" "
|
||||||
|
fi
|
||||||
|
elif ((CAPACITY <= 30)); then
|
||||||
|
if [[ "${STATUS}" == "Charging" || "${STATUS}" == "Not charging" || "${STATUS}" == "Full" ]]; then
|
||||||
|
ICON=" "
|
||||||
|
else
|
||||||
|
ICON=" "
|
||||||
|
fi
|
||||||
|
elif ((CAPACITY <= 60)); then
|
||||||
|
if [[ "${STATUS}" == "Charging" || "${STATUS}" == "Not charging" || "${STATUS}" == "Full" ]]; then
|
||||||
|
ICON=" "
|
||||||
|
else
|
||||||
|
ICON=" "
|
||||||
|
fi
|
||||||
|
elif ((CAPACITY <= 80)); then
|
||||||
|
if [[ "${STATUS}" == "Charging" || "${STATUS}" == "Not charging" || "${STATUS}" == "Full" ]]; then
|
||||||
|
ICON=" "
|
||||||
|
else
|
||||||
|
ICON=" "
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ "${STATUS}" == "Charging" || "${STATUS}" == "Not charging" ]]; then
|
||||||
|
ICON=" "
|
||||||
|
else
|
||||||
|
ICON=" "
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# If full, show a nicer indicator
|
||||||
|
if [[ "${STATUS}" == "Full" ]]; then
|
||||||
|
CHG_IND=" " # nf-fa-check
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${ICON} ${CAPACITY}%"
|
||||||
5
hypr/scripts/cover-listener.sh
Executable file
5
hypr/scripts/cover-listener.sh
Executable file
@@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
playerctl metadata --follow --format "{{mpris:artUrl}}" | while read -r _; do
|
||||||
|
~/.config/hypr/scripts/cover.sh
|
||||||
|
done
|
||||||
23
hypr/scripts/cover.sh
Executable file
23
hypr/scripts/cover.sh
Executable file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CACHE="$HOME/.cache/nowplaying-cover.jpg"
|
||||||
|
TMP="$HOME/.cache/nowplaying-cover.tmp.jpg"
|
||||||
|
|
||||||
|
status=$(playerctl status 2>/dev/null)
|
||||||
|
|
||||||
|
if [ "$status" != "Playing" ]; then
|
||||||
|
rm -f "$CACHE"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
url=$(playerctl metadata mpris:artUrl)
|
||||||
|
|
||||||
|
[ -z "$url" ] && rm -f "$CACHE" && exit 0
|
||||||
|
|
||||||
|
if [[ "$url" == file://* ]]; then
|
||||||
|
cp "${url#file://}" "$TMP"
|
||||||
|
else
|
||||||
|
curl -sL "$url" -o "$TMP"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv -f "$TMP" "$CACHE"
|
||||||
35
hypr/scripts/dim-display.sh
Executable file
35
hypr/scripts/dim-display.sh
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
SCREEN_DEVICE="amdgpu_bl1"
|
||||||
|
|
||||||
|
STATE_DIR="${XDG_RUNTIME_DIR:-/tmp}/hypridle"
|
||||||
|
SCREEN_STATE_FILE="$STATE_DIR/screen"
|
||||||
|
|
||||||
|
mkdir -p "$STATE_DIR"
|
||||||
|
|
||||||
|
save_current() {
|
||||||
|
brightnessctl -d "$SCREEN_DEVICE" g >"$SCREEN_STATE_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
dim() {
|
||||||
|
save_current
|
||||||
|
brightnessctl -d "$SCREEN_DEVICE" set 10%
|
||||||
|
}
|
||||||
|
|
||||||
|
restore() {
|
||||||
|
[[ -f "$SCREEN_STATE_FILE" ]] && brightnessctl -d "$SCREEN_DEVICE" s "$(cat "$SCREEN_STATE_FILE")"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${1:-}" in
|
||||||
|
dim)
|
||||||
|
dim
|
||||||
|
;;
|
||||||
|
restore)
|
||||||
|
restore
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {dim|restore}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
35
hypr/scripts/dim-keyboard.sh
Executable file
35
hypr/scripts/dim-keyboard.sh
Executable file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
KBD_DEVICE="chromeos::kbd_backlight"
|
||||||
|
|
||||||
|
STATE_DIR="${XDG_RUNTIME_DIR:-/tmp}/hypridle"
|
||||||
|
KBD_STATE_FILE="$STATE_DIR/kbd"
|
||||||
|
|
||||||
|
mkdir -p "$STATE_DIR"
|
||||||
|
|
||||||
|
save_current() {
|
||||||
|
brightnessctl -d "$KBD_DEVICE" g >"$KBD_STATE_FILE"
|
||||||
|
}
|
||||||
|
|
||||||
|
dim() {
|
||||||
|
save_current
|
||||||
|
brightnessctl -d "$KBD_DEVICE" set 0
|
||||||
|
}
|
||||||
|
|
||||||
|
restore() {
|
||||||
|
[[ -f "$KBD_STATE_FILE" ]] && brightnessctl -d "$KBD_DEVICE" s "$(cat "$KBD_STATE_FILE")"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "${1:-}" in
|
||||||
|
dim)
|
||||||
|
dim
|
||||||
|
;;
|
||||||
|
restore)
|
||||||
|
restore
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {dim|restore}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
40
hypr/scripts/lid.sh
Executable file
40
hypr/scripts/lid.sh
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
ACTION="${1:-}" # "on" oder "off"
|
||||||
|
LAPTOP="eDP-1"
|
||||||
|
LAPTOP_MODE="2256x1504"
|
||||||
|
LAPTOP_SCALE="1.175"
|
||||||
|
|
||||||
|
has_external() {
|
||||||
|
hyprctl monitors | awk '/^Monitor /{print $2}' | grep -vq "^${LAPTOP}$"
|
||||||
|
}
|
||||||
|
|
||||||
|
enable_laptop() {
|
||||||
|
hyprctl keyword monitor "${LAPTOP}, ${LAPTOP_MODE}, 0x0, ${LAPTOP_SCALE}"
|
||||||
|
hyprctl dispatch dpms on "${LAPTOP}" 2>/dev/null || true
|
||||||
|
}
|
||||||
|
|
||||||
|
disable_laptop() {
|
||||||
|
hyprctl keyword monitor "${LAPTOP}, disable"
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$ACTION" in
|
||||||
|
off)
|
||||||
|
if has_external; then
|
||||||
|
disable_laptop
|
||||||
|
else
|
||||||
|
disable_laptop
|
||||||
|
hyprlock
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
on)
|
||||||
|
enable_laptop
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "usage: $0 {on|off}" >&2
|
||||||
|
exit 2
|
||||||
|
;;
|
||||||
|
esac
|
||||||
38
hypr/scripts/net-status.sh
Executable file
38
hypr/scripts/net-status.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
IFACE="wlp1s0"
|
||||||
|
|
||||||
|
# Prüfen ob Interface existiert
|
||||||
|
if [ ! -d "/sys/class/net/$IFACE" ]; then
|
||||||
|
echo " no iface"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
STATE=$(cat /sys/class/net/$IFACE/operstate 2>/dev/null)
|
||||||
|
|
||||||
|
if [ "$STATE" != "up" ]; then
|
||||||
|
echo " Disconnected"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# SSID holen
|
||||||
|
SSID=$(iw dev "$IFACE" link 2>/dev/null | awk -F': ' '/SSID/ {print $2}')
|
||||||
|
SIGNAL=$(iw dev "$IFACE" link 2>/dev/null | awk -F'signal: ' '/signal/ {print $2}' | awk '{print $1}')
|
||||||
|
|
||||||
|
if [ -z "$SSID" ]; then
|
||||||
|
echo " Disconnected"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Icon je nach dBm (realistische Werte: -30 sehr stark, -90 sehr schwach)
|
||||||
|
if ((SIGNAL >= -50)); then
|
||||||
|
ICON=" " # stark
|
||||||
|
elif ((SIGNAL >= -65)); then
|
||||||
|
ICON=" " # mittel
|
||||||
|
elif ((SIGNAL >= -75)); then
|
||||||
|
ICON=" " # schwach
|
||||||
|
else
|
||||||
|
ICON=" " # sehr schwach
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "${ICON} ${SSID}"
|
||||||
11
hypr/scripts/nowplaying.sh
Executable file
11
hypr/scripts/nowplaying.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
status=$(playerctl status 2>/dev/null)
|
||||||
|
|
||||||
|
if [ "$status" = "Playing" ]; then
|
||||||
|
artist=$(playerctl metadata artist)
|
||||||
|
title=$(playerctl metadata title)
|
||||||
|
echo "$artist - $title"
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
fi
|
||||||
309
hypr/scripts/randrwall.py
Executable file
309
hypr/scripts/randrwall.py
Executable file
@@ -0,0 +1,309 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import json
|
||||||
|
from os import environ
|
||||||
|
import random
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
from urllib.parse import quote
|
||||||
|
|
||||||
|
import urllib.request
|
||||||
|
|
||||||
|
HOME = Path.home()
|
||||||
|
|
||||||
|
BASE_DIR = HOME / "Pictures" / "Wallpapers"
|
||||||
|
FAV_DIR = BASE_DIR / "favorites"
|
||||||
|
CACHE_DIR = BASE_DIR / "cache"
|
||||||
|
CURRENT = BASE_DIR / "current"
|
||||||
|
STATE_FILE = HOME / ".cache" / "randrwall_state.json"
|
||||||
|
|
||||||
|
DEFAULT_TAGS = [
|
||||||
|
"space",
|
||||||
|
"nebula",
|
||||||
|
"cyberpunk",
|
||||||
|
"minimal",
|
||||||
|
"architecture",
|
||||||
|
"landscape",
|
||||||
|
"fantasy",
|
||||||
|
"digital art",
|
||||||
|
]
|
||||||
|
ATLEAST = "3840x2160"
|
||||||
|
RATIOS = "16x9,21x9"
|
||||||
|
SORTING = "random"
|
||||||
|
|
||||||
|
CATEGORIES = "110"
|
||||||
|
PURITY = "100"
|
||||||
|
|
||||||
|
|
||||||
|
def load_env_file(path: Path) -> None:
|
||||||
|
if not path.exists():
|
||||||
|
return
|
||||||
|
for line in path.read_text().splitlines():
|
||||||
|
line = line.strip()
|
||||||
|
if not line or line.startswith("#"):
|
||||||
|
continue
|
||||||
|
if "=" not in line:
|
||||||
|
continue
|
||||||
|
k, v = line.split("=", 1)
|
||||||
|
environ.setdefault(k.strip(), v.strip())
|
||||||
|
|
||||||
|
|
||||||
|
load_env_file(Path() / ".env")
|
||||||
|
API_KEY = environ.get("WALLHAVEN_API_KEY")
|
||||||
|
|
||||||
|
|
||||||
|
def run(cmd: list[str]) -> None:
|
||||||
|
subprocess.run(cmd, check=True)
|
||||||
|
|
||||||
|
|
||||||
|
def ensure_dirs() -> None:
|
||||||
|
FAV_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
|
CACHE_DIR.mkdir(parents=True, exist_ok=True)
|
||||||
|
STATE_FILE.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
|
|
||||||
|
def read_state() -> dict:
|
||||||
|
if STATE_FILE.exists():
|
||||||
|
try:
|
||||||
|
return json.loads(STATE_FILE.read_text(encoding="utf-8"))
|
||||||
|
except Exception:
|
||||||
|
return {}
|
||||||
|
return {}
|
||||||
|
|
||||||
|
|
||||||
|
def write_state(state: dict) -> None:
|
||||||
|
STATE_FILE.write_text(json.dumps(state, indent=2), encoding="utf-8")
|
||||||
|
|
||||||
|
|
||||||
|
def is_image(path: Path) -> bool:
|
||||||
|
return path.suffix.lower() in {".jpg", ".jpeg", ".png", ".webp"}
|
||||||
|
|
||||||
|
|
||||||
|
def swww_set(path: Path) -> None:
|
||||||
|
run(
|
||||||
|
[
|
||||||
|
"swww",
|
||||||
|
"img",
|
||||||
|
str(path),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def pick_random_from(dir_path: Path) -> Path | None:
|
||||||
|
if not dir_path.exists():
|
||||||
|
return None
|
||||||
|
|
||||||
|
imgs = [p for p in dir_path.iterdir() if p.is_file() and is_image(p)]
|
||||||
|
if not imgs:
|
||||||
|
return None
|
||||||
|
return random.choice(imgs)
|
||||||
|
|
||||||
|
|
||||||
|
UA = "randrwall/0.1 (+https://gitea.stereov.io/antistereov/randrwall)"
|
||||||
|
|
||||||
|
HEADERS = {
|
||||||
|
"User-Agent": UA,
|
||||||
|
"Referer": "https://wallhaven.cc/",
|
||||||
|
"Accept": "*/*",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def http_get_json(url: str, timeout: int = 15) -> dict:
|
||||||
|
req = urllib.request.Request(url, headers=HEADERS)
|
||||||
|
with urllib.request.urlopen(req, timeout=timeout) as resp:
|
||||||
|
return json.loads(resp.read().decode("utf-8"))
|
||||||
|
|
||||||
|
|
||||||
|
def wallhaven_search_random(tags: list[str]) -> str:
|
||||||
|
tag = random.choice(tags)
|
||||||
|
q = quote(tag)
|
||||||
|
|
||||||
|
params = (
|
||||||
|
f"q={q}"
|
||||||
|
f"&categories={CATEGORIES}"
|
||||||
|
f"$purity={PURITY}"
|
||||||
|
f"&atleast={ATLEAST}"
|
||||||
|
f"&ratios={quote(RATIOS)}"
|
||||||
|
f"&sorting={SORTING}"
|
||||||
|
"&order=desc"
|
||||||
|
"&page=1"
|
||||||
|
)
|
||||||
|
|
||||||
|
if API_KEY:
|
||||||
|
print("Using API key")
|
||||||
|
params += f"&apiKey={API_KEY}"
|
||||||
|
|
||||||
|
url = f"https://wallhaven.cc/api/v1/search?{params}"
|
||||||
|
|
||||||
|
data = http_get_json(url)
|
||||||
|
|
||||||
|
arr = data.get("data") or []
|
||||||
|
if not arr:
|
||||||
|
raise RuntimeError(f"Wallhaven: no results for tag='{tag}'")
|
||||||
|
|
||||||
|
item = random.choice(arr)
|
||||||
|
path = item.get("path")
|
||||||
|
if not path:
|
||||||
|
raise RuntimeError("Wallhaven: response does not contain 'path'")
|
||||||
|
return path
|
||||||
|
|
||||||
|
|
||||||
|
def prune_cache(max_files: int = 10) -> None:
|
||||||
|
if max_files <= 0:
|
||||||
|
return
|
||||||
|
|
||||||
|
files = [p for p in CACHE_DIR.iterdir() if p.is_file() and is_image(p)]
|
||||||
|
files.sort(key=lambda p: p.stat().st_mtime, reverse=True)
|
||||||
|
|
||||||
|
for p in files[max_files:]:
|
||||||
|
try:
|
||||||
|
p.unlink()
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def download_to_cache(url: str) -> Path:
|
||||||
|
filename = url.split("/")[-1]
|
||||||
|
out = CACHE_DIR / filename
|
||||||
|
if out.exists() and out.stat().st_size > 0:
|
||||||
|
return out
|
||||||
|
|
||||||
|
tmp_path = CACHE_DIR / (filename + ".part")
|
||||||
|
|
||||||
|
req = urllib.request.Request(url, headers=HEADERS, method="GET")
|
||||||
|
|
||||||
|
try:
|
||||||
|
with urllib.request.urlopen(req, timeout=30) as resp:
|
||||||
|
if resp.status != 200:
|
||||||
|
raise RuntimeError(f"Download failed: HTTP {resp.status}")
|
||||||
|
with open(tmp_path, "wb") as f:
|
||||||
|
shutil.copyfileobj(resp, f)
|
||||||
|
|
||||||
|
tmp_path.replace(out)
|
||||||
|
prune_cache()
|
||||||
|
return out
|
||||||
|
finally:
|
||||||
|
try:
|
||||||
|
if tmp_path.exists():
|
||||||
|
tmp_path.unlink()
|
||||||
|
|
||||||
|
except Exception:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def copy_to_current(img: Path) -> None:
|
||||||
|
shutil.copy2(img, CURRENT)
|
||||||
|
|
||||||
|
|
||||||
|
def cmd_random(args: argparse.Namespace) -> None:
|
||||||
|
ensure_dirs()
|
||||||
|
state = read_state()
|
||||||
|
|
||||||
|
use_fav = random.random() < args.fav_weight
|
||||||
|
fav_pick = pick_random_from(FAV_DIR) if use_fav else None
|
||||||
|
|
||||||
|
if fav_pick is not None:
|
||||||
|
swww_set(fav_pick)
|
||||||
|
state["current"] = str(fav_pick)
|
||||||
|
state["source"] = "favorites"
|
||||||
|
write_state(state)
|
||||||
|
print(f"Set (favorites): {fav_pick}")
|
||||||
|
copy_to_current(fav_pick)
|
||||||
|
return
|
||||||
|
|
||||||
|
url = wallhaven_search_random(args.tags)
|
||||||
|
img = download_to_cache(url)
|
||||||
|
swww_set(img)
|
||||||
|
copy_to_current(img)
|
||||||
|
|
||||||
|
state["current"] = str(img)
|
||||||
|
state["source"] = "wallhaven"
|
||||||
|
state["wallhaven_url"] = url
|
||||||
|
write_state(state)
|
||||||
|
print(f"Set (download): {img}")
|
||||||
|
|
||||||
|
|
||||||
|
def cmd_favorite(args: argparse.Namespace) -> None:
|
||||||
|
ensure_dirs()
|
||||||
|
state = read_state()
|
||||||
|
cur = state.get("current")
|
||||||
|
|
||||||
|
if not cur:
|
||||||
|
print(
|
||||||
|
"No current wallpaper found in state. Please set one first via 'random'",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
src = Path(cur)
|
||||||
|
if not src.exists():
|
||||||
|
print(f"Current wallpaper does not exist anymore: {src}", file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
dest = FAV_DIR / src.name
|
||||||
|
if dest.exists():
|
||||||
|
print(f"Already in favorites: {dest}")
|
||||||
|
return
|
||||||
|
|
||||||
|
shutil.copy2(src, dest)
|
||||||
|
print(f"Saved to favorites: {dest}")
|
||||||
|
|
||||||
|
|
||||||
|
def reload(args: argparse.Namespace) -> None:
|
||||||
|
ensure_dirs()
|
||||||
|
state = read_state()
|
||||||
|
cur = state.get("current")
|
||||||
|
|
||||||
|
if not cur:
|
||||||
|
print(
|
||||||
|
"No current wallpaper found in state. Please set one first via 'random'",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
src = Path(cur)
|
||||||
|
if not src.exists():
|
||||||
|
print(f"Current wallpaper does not exist anymore: {src}", file=sys.stderr)
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
swww_set(cur)
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> None:
|
||||||
|
parser = argparse.ArgumentParser(
|
||||||
|
description="Hyprland wallpaper helper (swww + wallhaven + favorites"
|
||||||
|
)
|
||||||
|
sub = parser.add_subparsers(dest="cmd", required=True)
|
||||||
|
|
||||||
|
p_random = sub.add_parser(
|
||||||
|
"random", help="Set random wallpaper (favorites or download)"
|
||||||
|
)
|
||||||
|
p_random.add_argument(
|
||||||
|
"--fav-weight",
|
||||||
|
type=float,
|
||||||
|
default=0.3,
|
||||||
|
help="Probability to pick from favorites (0..1). Default: 0.3",
|
||||||
|
)
|
||||||
|
p_random.add_argument(
|
||||||
|
"--tags",
|
||||||
|
nargs="+",
|
||||||
|
default=DEFAULT_TAGS,
|
||||||
|
help=f"Wall haven tags list. Default: {DEFAULT_TAGS}",
|
||||||
|
)
|
||||||
|
p_random.set_defaults(func=cmd_random)
|
||||||
|
|
||||||
|
p_fav = sub.add_parser("favorite", help="Save current wallpaper to favorites")
|
||||||
|
p_fav.set_defaults(func=cmd_favorite)
|
||||||
|
|
||||||
|
p_fav = sub.add_parser("reload", help="Reload current wallpaper")
|
||||||
|
p_fav.set_defaults(func=reload)
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
args.func(args)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
102
hypr/scripts/weather.sh
Executable file
102
hypr/scripts/weather.sh
Executable file
@@ -0,0 +1,102 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# --- CONFIGURATION ---
|
||||||
|
LAT="51.0509" # Replace with your Latitude
|
||||||
|
LON="13.7383" # Replace with your Longitude
|
||||||
|
UNITS="metric" # Use "metric" for Celsius, "imperial" for Fahrenheit
|
||||||
|
TZ="Europe/Berlin"
|
||||||
|
# ---------------------
|
||||||
|
|
||||||
|
if [[ "$UNITS" == "metric" ]]; then
|
||||||
|
TEMP_UNIT="celsius"
|
||||||
|
LABEL="°C"
|
||||||
|
else
|
||||||
|
TEMP_UNIT="fahrenheit"
|
||||||
|
LABEL="°F"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fetch the weather data
|
||||||
|
RESPONSE=$(curl -s "https://api.open-meteo.com/v1/forecast?latitude=${LAT}&longitude=${LON}¤t=temperature_2m,weather_code,is_day&timezone=${TZ}")
|
||||||
|
|
||||||
|
# Check if curl failed to get a response
|
||||||
|
if [ -z "$RESPONSE" ]; then
|
||||||
|
echo "No connection"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TEMP=$(echo "$RESPONSE" | jq -r '.current.temperature_2m | round')
|
||||||
|
CODE=$(echo "$RESPONSE" | jq -r '.current.weather_code')
|
||||||
|
IS_DAY=$(echo "$RESPONSE" | jq -r '.current.is_day')
|
||||||
|
|
||||||
|
case "$CODE" in
|
||||||
|
0)
|
||||||
|
if [[ "$IS_DAY" == "1" ]]; then
|
||||||
|
ICON=" " # nf-weather-day_sunny
|
||||||
|
else
|
||||||
|
ICON=" " # nf-weather-night_clear
|
||||||
|
fi
|
||||||
|
DESC="Clear sky"
|
||||||
|
;;
|
||||||
|
1 | 2)
|
||||||
|
if [[ "$IS_DAY" == "1" ]]; then
|
||||||
|
ICON=" " # nf-weather-day_cloudy
|
||||||
|
else
|
||||||
|
ICON=" " # nf-weather-night_alt_cloudy
|
||||||
|
fi
|
||||||
|
DESC="Partly cloudy"
|
||||||
|
;;
|
||||||
|
3)
|
||||||
|
ICON=" " # nf-weather-cloudy
|
||||||
|
DESC="Overcast"
|
||||||
|
;;
|
||||||
|
45 | 48)
|
||||||
|
ICON=" " # nf-weather-fog
|
||||||
|
DESC="Fog"
|
||||||
|
;;
|
||||||
|
51 | 53 | 55)
|
||||||
|
ICON=" " # nf-weather-sprinkle
|
||||||
|
DESC="Drizzle"
|
||||||
|
;;
|
||||||
|
56 | 57)
|
||||||
|
ICON=" "
|
||||||
|
DESC="Freezing drizzle"
|
||||||
|
;;
|
||||||
|
61 | 63 | 65)
|
||||||
|
ICON=" " # nf-weather-rain
|
||||||
|
DESC="Rain"
|
||||||
|
;;
|
||||||
|
66 | 67)
|
||||||
|
ICON=" "
|
||||||
|
DESC="Freezing rain"
|
||||||
|
;;
|
||||||
|
71 | 73 | 75 | 77)
|
||||||
|
ICON=" " # nf-weather-snow
|
||||||
|
DESC="Snow"
|
||||||
|
;;
|
||||||
|
80 | 81 | 82)
|
||||||
|
ICON=" " # nf-weather-showers
|
||||||
|
DESC="Rain showers"
|
||||||
|
;;
|
||||||
|
85 | 86)
|
||||||
|
ICON=" "
|
||||||
|
DESC="Snow showers"
|
||||||
|
;;
|
||||||
|
95)
|
||||||
|
ICON=" " # nf-weather-thunderstorm
|
||||||
|
DESC="Thunderstorm"
|
||||||
|
;;
|
||||||
|
96 | 99)
|
||||||
|
ICON=" "
|
||||||
|
DESC="Thunderstorm with hail"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Determine unit label
|
||||||
|
if [ "$UNITS" = "metric" ]; then
|
||||||
|
LABEL="°C"
|
||||||
|
else
|
||||||
|
LABEL="°F"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Final JSON output for Waybar
|
||||||
|
echo "{\"text\": \"${ICON} ${TEMP}${LABEL}\", \"tooltip\": \"${DESC}\"}"
|
||||||
@@ -18,7 +18,7 @@ window_padding_width 5
|
|||||||
hide_window_decorations no
|
hide_window_decorations no
|
||||||
|
|
||||||
# Display Server
|
# Display Server
|
||||||
linux_display_server x11
|
linux_display_server wayland
|
||||||
|
|
||||||
# Trail
|
# Trail
|
||||||
cursor_trail 10
|
cursor_trail 10
|
||||||
@@ -33,7 +33,7 @@ cursor_trail_start_threshold 1
|
|||||||
include Catppuccin-Mocha.conf
|
include Catppuccin-Mocha.conf
|
||||||
# END_KITTY_THEME
|
# END_KITTY_THEME
|
||||||
|
|
||||||
|
shell fish
|
||||||
|
|
||||||
# BEGIN_KITTY_FONTS
|
# BEGIN_KITTY_FONTS
|
||||||
font_family family='JetBrains Mono' postscript_name=JetBrainsMono-Regular
|
font_family family='JetBrains Mono' postscript_name=JetBrainsMono-Regular
|
||||||
|
|||||||
@@ -28,7 +28,8 @@ devices: (
|
|||||||
}
|
}
|
||||||
|
|
||||||
buttons: (
|
buttons: (
|
||||||
{ // thumb button
|
{
|
||||||
|
// thumb button
|
||||||
cid: 0xc3; action =
|
cid: 0xc3; action =
|
||||||
{
|
{
|
||||||
type: "Gestures";
|
type: "Gestures";
|
||||||
@@ -56,6 +57,7 @@ devices: (
|
|||||||
{
|
{
|
||||||
direction: "left";
|
direction: "left";
|
||||||
mode: "OnRelease";
|
mode: "OnRelease";
|
||||||
|
|
||||||
action = {
|
action = {
|
||||||
type: "Keypress";
|
type: "Keypress";
|
||||||
keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_RIGHT"];
|
keys: ["KEY_LEFTCTRL", "KEY_LEFTALT", "KEY_RIGHT"];
|
||||||
@@ -72,11 +74,10 @@ devices: (
|
|||||||
{
|
{
|
||||||
direction: "None";
|
direction: "None";
|
||||||
mode: "OnRelease";
|
mode: "OnRelease";
|
||||||
action =
|
action = {
|
||||||
{
|
|
||||||
type: "Keypress";
|
type: "Keypress";
|
||||||
keys: ["KEY_LEFTMETA"];
|
keys: ["KEY_LEFTMETA"];
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
direction: "LEFT";
|
direction: "LEFT";
|
||||||
|
|||||||
@@ -57,3 +57,7 @@ alt + shift - 0 : yabai -m window --space 10
|
|||||||
# Toggle pseudo scratchpad window: float, sticky, and center it on grid
|
# Toggle pseudo scratchpad window: float, sticky, and center it on grid
|
||||||
alt - p : yabai -m window --toggle sticky --toggle float --grid 4:4:1:1:2:2
|
alt - p : yabai -m window --toggle sticky --toggle float --grid 4:4:1:1:2:2
|
||||||
|
|
||||||
|
lalt - return : open -a kitty
|
||||||
|
lalt - b : open -a "Zen" --new
|
||||||
|
lalt - e : open -a "Finder"
|
||||||
|
lalt - w : skhd -k "cmd - w"
|
||||||
|
|||||||
5
swww/config
Normal file
5
swww/config
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
transition-type = grow
|
||||||
|
transition-duration = 1.2
|
||||||
|
transition-fps = 60
|
||||||
|
transition-angle = 30
|
||||||
|
transition-step = 90
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"layer": "top",
|
|
||||||
"modules-left": ["hyprland/workspaces"],
|
|
||||||
"modules-center": ["hyprland/window"],
|
|
||||||
"modules-right": ["battery", "clock"],
|
|
||||||
"hyprland/window": {
|
|
||||||
"max-length": 50
|
|
||||||
},
|
|
||||||
"battery": {
|
|
||||||
"format": "{capacity}% {icon}",
|
|
||||||
"format-icons": ["", "", "", "", ""]
|
|
||||||
},
|
|
||||||
"clock": {
|
|
||||||
"format-alt": "{:%a, %d. %b %H:%M}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
195
waybar/config.jsonc
Normal file
195
waybar/config.jsonc
Normal file
@@ -0,0 +1,195 @@
|
|||||||
|
{
|
||||||
|
"layer": "bottom",
|
||||||
|
"position": "top",
|
||||||
|
"height": 30,
|
||||||
|
"spacing": 2,
|
||||||
|
"exclusive": true,
|
||||||
|
"gtk-layer-shell": true,
|
||||||
|
"passthrough": false,
|
||||||
|
"fixed-center": true,
|
||||||
|
"modules-left": [
|
||||||
|
"hyprland/workspaces",
|
||||||
|
"hyprland/window"
|
||||||
|
],
|
||||||
|
"modules-right": [
|
||||||
|
"cpu",
|
||||||
|
"memory",
|
||||||
|
"pulseaudio",
|
||||||
|
"clock",
|
||||||
|
"clock#simpleclock",
|
||||||
|
"custom/weather",
|
||||||
|
"custom/tailscale",
|
||||||
|
"network",
|
||||||
|
"battery",
|
||||||
|
"tray",
|
||||||
|
"custom/notification",
|
||||||
|
"custom/power"
|
||||||
|
],
|
||||||
|
"mpris": {
|
||||||
|
"format": "{cover_art} {artist} - {title}",
|
||||||
|
"icon-size": 20,
|
||||||
|
"max-length": 40
|
||||||
|
},
|
||||||
|
"hyprland/workspaces": {
|
||||||
|
"on-click": "activate",
|
||||||
|
"format": "{windows}",
|
||||||
|
"all-outputs": true,
|
||||||
|
"disable-scroll": false,
|
||||||
|
"active-only": false,
|
||||||
|
"window-rewrite": {
|
||||||
|
"class<*>": " ",
|
||||||
|
"class<firefox>": " ",
|
||||||
|
"class<app.zen_browser.zen>": " ",
|
||||||
|
"class<kitty>": " ",
|
||||||
|
"class<com.seafile.seafile-applet>": " ",
|
||||||
|
"class<org.gnome.Nautilus>": " ",
|
||||||
|
"class<org.gnome.Software>": " ",
|
||||||
|
"class<chromium-browser>": " ",
|
||||||
|
"class<chrome-web.telegram.org__-Default>": " ",
|
||||||
|
"class<chrome-music.youtube.com__-Default>": " "
|
||||||
|
},
|
||||||
|
"window-rewrite-default": " "
|
||||||
|
},
|
||||||
|
"hyprland/window": {
|
||||||
|
"format": "{title}",
|
||||||
|
"icon": true,
|
||||||
|
"icon-size": 22,
|
||||||
|
"seperate-outputs": true,
|
||||||
|
"rewrite": {
|
||||||
|
"": " Empty Workspace"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tray": {
|
||||||
|
"show-passive-items": true,
|
||||||
|
"spacing": 10,
|
||||||
|
},
|
||||||
|
"clock#simpleclock": {
|
||||||
|
"tooltip": false,
|
||||||
|
"format": " {:%H:%M}",
|
||||||
|
},
|
||||||
|
"clock": {
|
||||||
|
"format": " {:L%a %d %b}",
|
||||||
|
"calendar": {
|
||||||
|
"format": {
|
||||||
|
"days": "<span weight='normal'>{}</span>",
|
||||||
|
"months": "<span color='#cdd6f4'><b>{}</b></span>",
|
||||||
|
"today": "<span color='#f38ba8' weight='700'><u>{}</u></span>",
|
||||||
|
"weekdays": "<span color='#f9e2af'><b>{}</b></span>",
|
||||||
|
"weeks": "<span color='#a6e3a1'><b>W{}</b></span>",
|
||||||
|
},
|
||||||
|
"mode": "month",
|
||||||
|
"mode-mon-col": 1,
|
||||||
|
"on-scroll": 1,
|
||||||
|
},
|
||||||
|
"tooltip-format": "<span color='#cdd6f4' font='Lexend 16'><tt><small>{calendar}</small></tt></span>",
|
||||||
|
"on-click": "gnome-calendar"
|
||||||
|
},
|
||||||
|
"cpu": {
|
||||||
|
"format": " {usage}%",
|
||||||
|
"tooltip": true,
|
||||||
|
"interval": 1,
|
||||||
|
"on-click": "kitty btop"
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"format": " {used:0.1f}Gi",
|
||||||
|
"on-click": "kitty btop"
|
||||||
|
},
|
||||||
|
"pulseaudio": {
|
||||||
|
"format": "{icon} {volume}%",
|
||||||
|
"format-muted": " muted",
|
||||||
|
"format-icons": {
|
||||||
|
"headphone": " ",
|
||||||
|
"default": [
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"on-click": "pavucontrol"
|
||||||
|
},
|
||||||
|
"battery": {
|
||||||
|
"format": "{icon} {capacity}%",
|
||||||
|
"format-charging": "{icon} {capacity}%",
|
||||||
|
"format-plugged": "{icon} {capacity}%",
|
||||||
|
"format-icons": [
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"states": {
|
||||||
|
"critical": 15,
|
||||||
|
"warning": 30
|
||||||
|
},
|
||||||
|
"events": {
|
||||||
|
"on-discharging-critical": "notify-send -u critical 'Low Battery'"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"custom/sep": {
|
||||||
|
"format": "|",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"custom/power": {
|
||||||
|
"tooltip": false,
|
||||||
|
"on-click": "wlogout -p layer-shell &",
|
||||||
|
"format": "⏻"
|
||||||
|
},
|
||||||
|
"custom/nowplaying": {
|
||||||
|
"exec": "~/.config/waybar/scripts/nowplaying.sh",
|
||||||
|
"interval": 2,
|
||||||
|
"return-type": "json",
|
||||||
|
"on-click": "playerctl play-pause"
|
||||||
|
},
|
||||||
|
"custom/notification": {
|
||||||
|
"escape": true,
|
||||||
|
"exec": "swaync-client -swb",
|
||||||
|
"exec-if": "which swaync-client",
|
||||||
|
"format": "{icon}",
|
||||||
|
"format-icons": {
|
||||||
|
"none": "",
|
||||||
|
"notification": "",
|
||||||
|
"dnd-notification": "",
|
||||||
|
"": "",
|
||||||
|
"inhibited": ""
|
||||||
|
},
|
||||||
|
"on-click": "sleep 0.1 && swaync-client -t -sw",
|
||||||
|
"return-type": "json",
|
||||||
|
"tooltip": false
|
||||||
|
},
|
||||||
|
"custom/weather": {
|
||||||
|
"format": "{}",
|
||||||
|
"interval": 600,
|
||||||
|
"exec": "~/.config/hypr/scripts/weather.sh", // or your dotfiles folder if you use stow
|
||||||
|
"return-type": "json",
|
||||||
|
"on-click": "gnome-weather"
|
||||||
|
},
|
||||||
|
"custom/tailscale": {
|
||||||
|
"exec": "~/.config/waybar/scripts/tailscale.sh",
|
||||||
|
"interval": 5,
|
||||||
|
"return-type": "json",
|
||||||
|
"on-click": "~/.config/waybar/scripts/tailscale-toggle.sh",
|
||||||
|
"tooltip": true
|
||||||
|
},
|
||||||
|
"network": {
|
||||||
|
"interface": "wlp1s0",
|
||||||
|
"format": "",
|
||||||
|
"format-icons": [
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "
|
||||||
|
],
|
||||||
|
"format-wifi": "{icon} {essid}",
|
||||||
|
"format-ethernet": " Ethernet",
|
||||||
|
"format-disconnected": " Disconnected",
|
||||||
|
"tooltip-format": "{ifname}",
|
||||||
|
"tooltip-format-wifi": "{essid} ({signalStrength}%)",
|
||||||
|
"tooltip-format-ethernet": "{ifname}",
|
||||||
|
"tooltip-format-disconnected": "Disconnected",
|
||||||
|
"max-length": 50
|
||||||
|
}
|
||||||
|
}
|
||||||
24
waybar/scripts/nowplaying.sh
Executable file
24
waybar/scripts/nowplaying.sh
Executable file
@@ -0,0 +1,24 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
CACHE="$HOME/.cache/waybar-cover.jpg"
|
||||||
|
TMP="$HOME/.cache/waybar-cover.tmp.jpg"
|
||||||
|
|
||||||
|
status=$(playerctl status 2>/dev/null)
|
||||||
|
|
||||||
|
if [ "$status" = "Playing" ]; then
|
||||||
|
artist=$(playerctl metadata artist)
|
||||||
|
title=$(playerctl metadata title)
|
||||||
|
url=$(playerctl metadata mpris:artUrl)
|
||||||
|
|
||||||
|
if [[ "$url" == file://* ]]; then
|
||||||
|
cp "${url#file://}" "$TMP"
|
||||||
|
else
|
||||||
|
curl -sL "$url" -o "$TMP"
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv -f "$TMP" "$CACHE"
|
||||||
|
|
||||||
|
echo "{\"text\": \"$artist - $title\", \"tooltip\": \"$artist - $title\", \"class\": \"playing\", \"alt\": \"$CACHE\"}"
|
||||||
|
else
|
||||||
|
echo "{\"text\": \" \", \"class\": \"stopped\"}"
|
||||||
|
fi
|
||||||
7
waybar/scripts/tailscale-toggle.sh
Executable file
7
waybar/scripts/tailscale-toggle.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if tailscale status --json 2>/dev/null | grep -q '"BackendState": "Running"'; then
|
||||||
|
tailscale down
|
||||||
|
else
|
||||||
|
tailscale up
|
||||||
|
fi
|
||||||
7
waybar/scripts/tailscale.sh
Executable file
7
waybar/scripts/tailscale.sh
Executable file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
if tailscale status --json 2>/dev/null | grep -q '"BackendState": "Running"'; then
|
||||||
|
echo '{"text":" ","class":"connected","tooltip":"Tailscale Connected"}'
|
||||||
|
else
|
||||||
|
echo '{"text":" ","class":"disconnected","tooltip":"Tailscale Disconnected"}'
|
||||||
|
fi
|
||||||
165
waybar/style.css
Normal file
165
waybar/style.css
Normal file
@@ -0,0 +1,165 @@
|
|||||||
|
@define-color bg #1e1e2e;
|
||||||
|
@define-color accent #b4befe;
|
||||||
|
|
||||||
|
* {
|
||||||
|
min-height: 0;
|
||||||
|
min-width: 0;
|
||||||
|
font-family: "Lexend", "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
min-height: 0;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#window {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding-left: 5px;
|
||||||
|
padding-right: 0;
|
||||||
|
margin-top: 3px;
|
||||||
|
padding-top: 0;
|
||||||
|
padding-bottom: 0;
|
||||||
|
border: 0;
|
||||||
|
margin-left: 4px;
|
||||||
|
margin-right: 0;
|
||||||
|
|
||||||
|
min-height: 10px;
|
||||||
|
min-width: 24px;
|
||||||
|
|
||||||
|
border-radius: 6px;
|
||||||
|
background: alpha(@bg, 0.3);
|
||||||
|
|
||||||
|
transition:
|
||||||
|
all 180ms cubic-bezier(.4,0,.2,1),
|
||||||
|
color 800ms cubic-bezier(.4, 0, .2, 1);
|
||||||
|
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button label {
|
||||||
|
font-size: 18px;
|
||||||
|
letter-spacing: -3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(255,255,255,0.45);
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.active {
|
||||||
|
min-width: 34px;
|
||||||
|
background: white;
|
||||||
|
background: alpha(@bg,0.3);
|
||||||
|
color: white;
|
||||||
|
border: 1px solid alpha(white, 0.7);
|
||||||
|
opacity: 1.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.visible {
|
||||||
|
background: alpha(@bg,0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background: #ff5f5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-nowplaying,
|
||||||
|
#custom-logo,
|
||||||
|
#custom-power,
|
||||||
|
#custom-spotify,
|
||||||
|
#custom-notification,
|
||||||
|
#custom-tailscale,
|
||||||
|
#custom-weather,
|
||||||
|
#cpu,
|
||||||
|
#tray,
|
||||||
|
#memory,
|
||||||
|
#battery,
|
||||||
|
#network,
|
||||||
|
#window,
|
||||||
|
#mpris {
|
||||||
|
padding: 0.1rem 0.6rem;
|
||||||
|
border-radius: 6px;
|
||||||
|
background-color: alpha(@bg, 0.3);
|
||||||
|
margin-top: 3px;
|
||||||
|
margin-left: 3px;
|
||||||
|
margin-right: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-nowplaying {
|
||||||
|
padding-left: 40px;
|
||||||
|
background-size: 30px 30px;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: left center;
|
||||||
|
background-image: url('/home/stereov/.cache/nowplaying-cover.jpg')
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris.playing {
|
||||||
|
color: #a6e3a1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpris.paused {
|
||||||
|
color: #9399b2;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-sep {
|
||||||
|
padding: 0px;
|
||||||
|
color: #585b70;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
#cpu {
|
||||||
|
color: #94e2d5;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
color: #cba6f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
color: #74c7ec;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock.simpleclock {
|
||||||
|
color: #89b4fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
color: #b4befe;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
color: #a6adc8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-logo {
|
||||||
|
color: #89b4fa;
|
||||||
|
}
|
||||||
|
|
||||||
|
#custom-power {
|
||||||
|
color: #f38ba8;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
color: #94e2d5;
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical {
|
||||||
|
color: red;
|
||||||
|
}
|
||||||
|
|
||||||
|
tooltip {
|
||||||
|
background-color: #181825;
|
||||||
|
border: 2px solid #89b4fa;
|
||||||
|
}
|
||||||
|
*/
|
||||||
BIN
wlogout/icons/hibernate.png
Normal file
BIN
wlogout/icons/hibernate.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 18 KiB |
BIN
wlogout/icons/lock.png
Normal file
BIN
wlogout/icons/lock.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.9 KiB |
BIN
wlogout/icons/logout.png
Normal file
BIN
wlogout/icons/logout.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
BIN
wlogout/icons/reboot.png
Normal file
BIN
wlogout/icons/reboot.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
wlogout/icons/shutdown.png
Normal file
BIN
wlogout/icons/shutdown.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
BIN
wlogout/icons/suspend.png
Normal file
BIN
wlogout/icons/suspend.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
36
wlogout/layout
Normal file
36
wlogout/layout
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
{
|
||||||
|
"label" : "lock",
|
||||||
|
"action" : "hyprlock",
|
||||||
|
"text" : "Lock",
|
||||||
|
"keybind" : "l"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "logout",
|
||||||
|
"action" : "hyprctl dispatch exit",
|
||||||
|
"text" : "Logout",
|
||||||
|
"keybind" : "e"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "suspend",
|
||||||
|
"action" : "systemctl suspend",
|
||||||
|
"text" : "Suspend",
|
||||||
|
"keybind" : "u"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "hibernate",
|
||||||
|
"action" : "systemctl hibernate",
|
||||||
|
"text" : "Hibernate",
|
||||||
|
"keybind" : "h"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "shutdown",
|
||||||
|
"action" : "systemctl poweroff",
|
||||||
|
"text" : "Shutdown",
|
||||||
|
"keybind" : "s"
|
||||||
|
}
|
||||||
|
{
|
||||||
|
"label" : "reboot",
|
||||||
|
"action" : "systemctl reboot",
|
||||||
|
"text" : "Reboot",
|
||||||
|
"keybind" : "r"
|
||||||
|
}
|
||||||
43
wlogout/style.css
Normal file
43
wlogout/style.css
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
window {
|
||||||
|
font-family: "Lexend";
|
||||||
|
font-size: 12pt;
|
||||||
|
color: #cdd6f4;
|
||||||
|
background-color: rgba(30, 30, 46, 0.9);
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center;
|
||||||
|
background-size: 25%;
|
||||||
|
border-style: solid;
|
||||||
|
border-width: 3px;
|
||||||
|
background-color: rgba(12, 12, 12, 0.3);
|
||||||
|
border-color: #313244;
|
||||||
|
margin: 5px;
|
||||||
|
border-radius: 20px;
|
||||||
|
transition: all 0.3s ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
#lock {
|
||||||
|
background-image: image(url("icons/lock.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#logout {
|
||||||
|
background-image: image(url("icons/logout.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#suspend {
|
||||||
|
background-image: image(url("icons/suspend.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#hibernate {
|
||||||
|
background-image: image(url("icons/hibernate.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#reboot {
|
||||||
|
background-image: image(url("icons/reboot.png"));
|
||||||
|
}
|
||||||
|
|
||||||
|
#shutdown {
|
||||||
|
background-image: image(url("icons/shutdown.png"));
|
||||||
|
}
|
||||||
47
wofi/style.css
Normal file
47
wofi/style.css
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
/* The name of the window itself */
|
||||||
|
#window {
|
||||||
|
background-color: rgba(24, 24, 24, 0.8);
|
||||||
|
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
|
||||||
|
border-radius: 1rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
/* The name of the box that contains everything */
|
||||||
|
}
|
||||||
|
#window #outer-box {
|
||||||
|
/* The name of the search bar */
|
||||||
|
/* The name of the scrolled window containing all of the entries */
|
||||||
|
}
|
||||||
|
#window #outer-box #input {
|
||||||
|
background-color: rgba(24, 24, 24, 0.8);
|
||||||
|
color: #f2f2f2;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 1px solid rgba(24, 24, 24, 0.2);
|
||||||
|
padding: 0.8rem 1rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
border-radius: 1rem 1rem 0 0;
|
||||||
|
}
|
||||||
|
#window #outer-box #input:focus, #window #outer-box #input:focus-visible, #window #outer-box #input:active {
|
||||||
|
border: none;
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
#window #outer-box #scroll {
|
||||||
|
/* The name of the box containing all of the entries */
|
||||||
|
}
|
||||||
|
#window #outer-box #scroll #inner-box {
|
||||||
|
/* The name of all entries */
|
||||||
|
/* The name of all boxes shown when expanding */
|
||||||
|
/* entries with multiple actions */
|
||||||
|
}
|
||||||
|
#window #outer-box #scroll #inner-box #entry {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba(24, 24, 24, 0.6);
|
||||||
|
}
|
||||||
|
#window #outer-box #scroll #inner-box #entry #img {
|
||||||
|
width: 1rem;
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
}
|
||||||
|
#window #outer-box #scroll #inner-box #entry:selected {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba(255, 255, 255, 0.6);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
58
wofi/style.scss
Normal file
58
wofi/style.scss
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/* The name of the window itself */
|
||||||
|
#window {
|
||||||
|
background-color: rgba(24,24,24,0.6);
|
||||||
|
box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
||||||
|
border-radius: 1rem;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
/* The name of the box that contains everything */
|
||||||
|
#outer-box {
|
||||||
|
/* The name of the search bar */
|
||||||
|
#input {
|
||||||
|
background-color: rgba(24,24,24,0.8);
|
||||||
|
color: #f2f2f2;
|
||||||
|
border: none;
|
||||||
|
border-bottom: 1px solid rgba(24,24,24,0.2);
|
||||||
|
padding: 0.8rem 1rem;
|
||||||
|
font-size: 1.5rem;
|
||||||
|
border-radius: 1rem 1rem 0 0;
|
||||||
|
&:focus, &:focus-visible, &:active {
|
||||||
|
border: none;
|
||||||
|
outline: 2px solid transparent;
|
||||||
|
outline-offset: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The name of the scrolled window containing all of the entries */
|
||||||
|
#scroll {
|
||||||
|
/* The name of the box containing all of the entries */
|
||||||
|
#inner-box {
|
||||||
|
/* The name of all entries */
|
||||||
|
#entry {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba(24,24,24,0.1);
|
||||||
|
padding: 0.6rem 1rem;
|
||||||
|
|
||||||
|
/* The name of all images in entries displayed in image mode */
|
||||||
|
#img {
|
||||||
|
width: 1rem;
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
}
|
||||||
|
/* The name of all the text in entries */
|
||||||
|
#text {}
|
||||||
|
&:selected {
|
||||||
|
color: #fff;
|
||||||
|
background-color: rgba(255,255,255,0.1);
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* The name of all boxes shown when expanding */
|
||||||
|
/* entries with multiple actions */
|
||||||
|
#expander-box {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -21,22 +21,35 @@ yabai -m rule --add title='^Archive Utility$' manage=off
|
|||||||
|
|
||||||
yabai -m rule --add app="^IntelliJ IDEA$" title="^Welcome to IntelliJ IDEA$" manage=off
|
yabai -m rule --add app="^IntelliJ IDEA$" title="^Welcome to IntelliJ IDEA$" manage=off
|
||||||
yabai -m rule --add app="^WebStorm$" title="^Welcome to WebStorm$" manage=off
|
yabai -m rule --add app="^WebStorm$" title="^Welcome to WebStorm$" manage=off
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Add File to Git$" manage=off
|
jetbrains_dialogs=(
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Delete$" manage=off
|
"^Add File to Git$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Push Commits" manage=off
|
"^Delete$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Update Project$" manage=off
|
"^Push Commits"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^New Project$" manage=off
|
"^Update Project$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Clone Repository$" manage=off
|
"^New Project$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Project Structure$" manage=off
|
"^Clone Repository$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Settings$" manage=off
|
"^Project Structure$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Run/Debug Configurations$" manage=off
|
"^Settings$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Data Sources and Drivers$" manage=off
|
"^Run/Debug Configurations$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Choose Plugins to Install or Enable$" manage=off
|
"^Data Sources and Drivers$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Create New Branch$" manage=off
|
"^Choose Plugins to Install or Enable$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Copy$" manage=off
|
"^Create New Branch$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Rename$" manage=off
|
"^Copy$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Rename Branch" manage=off
|
"^Rename$"
|
||||||
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="^Rollback Changes$"" manage=off
|
"^Rename Branch"
|
||||||
|
"^Rollback Changes$"
|
||||||
|
"^Copy Files/Directory$"
|
||||||
|
"^Choose Package$"
|
||||||
|
"^Move Package$"
|
||||||
|
"^Move$"
|
||||||
|
"^Git Editor$"
|
||||||
|
"^Create New Tag"
|
||||||
|
)
|
||||||
|
|
||||||
|
for title in "${jetbrains_dialogs[@]}"; do
|
||||||
|
yabai -m rule --add app="^(IntelliJ IDEA|WebStorm)$" title="$title" manage=off
|
||||||
|
done
|
||||||
|
|
||||||
# float settings windows
|
# float settings windows
|
||||||
yabai -m rule --add title='Settings$' manage=off
|
yabai -m rule --add title='Settings$' manage=off
|
||||||
|
|
||||||
@@ -67,3 +80,4 @@ yabai -m signal --add event=application_activated action="zsh ~/.config/yabai/ap
|
|||||||
yabai -m signal --add event=window_created action="zsh ~/.config/yabai/window-created.zsh"
|
yabai -m signal --add event=window_created action="zsh ~/.config/yabai/window-created.zsh"
|
||||||
|
|
||||||
echo "yabai configuration loaded.."
|
echo "yabai configuration loaded.."
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user