Compare commits
46 Commits
dc30bbe28d
...
nxps
| Author | SHA1 | Date | |
|---|---|---|---|
| db7d5d17a6 | |||
| 70de42923c | |||
| dae66e3608 | |||
| 2fb95b16e8 | |||
| 89ce9ab548 | |||
| 146429f594 | |||
| 13bc86f713 | |||
| e8ef6712af | |||
| d7c1b0e733 | |||
| 20ea9cc4d1 | |||
| bc9e2b7c19 | |||
| 85feb977a1 | |||
| 5356157750 | |||
| 2f31b86e65 | |||
| 6acb9b9aaa | |||
| 918c52f6f3 | |||
| c93e9cf826 | |||
| 8c8ca7b0f2 | |||
| fe2e971850 | |||
| fb67c05bb6 | |||
| edcfc9d911 | |||
| 801d990154 | |||
| 9679cb29f0 | |||
| 7d16572181 | |||
| d835a4c4ab | |||
| 6af5a295b1 | |||
| 8e5a15395a | |||
| 653591289d | |||
| 251b5a5eeb | |||
| 02e48b7d1e | |||
| 52cc37a102 | |||
| b81c6e2228 | |||
| 1b88c5cc71 | |||
| 6a3de0df23 | |||
| 2a3f8f7294 | |||
| 5599be8150 | |||
| 5696aeed8d | |||
| bc2cabece3 | |||
| bab1718ea5 | |||
| 9f31f26325 | |||
| c6d9cfc270 | |||
| 7850c7bb0e | |||
| 44b40bc8e7 | |||
| 53b1b5bc27 | |||
| 0244eef63d | |||
| e32ff37a24 |
8
.gitignore
vendored
8
.gitignore
vendored
@@ -6,14 +6,22 @@
|
||||
!alacritty/
|
||||
!dunst/
|
||||
!hypr/
|
||||
!hyprpanel/
|
||||
!nvim/
|
||||
!waybar/
|
||||
!zathura/
|
||||
!mimeapps.list
|
||||
!fuzzel/
|
||||
!fish/
|
||||
!packages
|
||||
!brave-flags.conf
|
||||
!chromium-flags.conf
|
||||
!README.md
|
||||
!rice.png
|
||||
!rice-2.png
|
||||
!rice-3.png
|
||||
!btop
|
||||
!wireplumber/
|
||||
!systemd/
|
||||
fish/fish_variables
|
||||
waybar/fluxo-rs
|
||||
|
||||
27
.gitmodules
vendored
Normal file
27
.gitmodules
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
[submodule "waybar/catppuccin-waybar"]
|
||||
path = waybar/catppuccin-waybar
|
||||
url = https://github.com/catppuccin/waybar.git
|
||||
[submodule "hypr/catppuccin-hyprland"]
|
||||
path = hypr/catppuccin-hyprland
|
||||
url = https://github.com/catppuccin/hyprland.git
|
||||
[submodule "hypr/catppuccin-hyprlock"]
|
||||
path = hypr/catppuccin-hyprlock
|
||||
url = https://github.com/catppuccin/hyprlock.git
|
||||
[submodule "zathura/catppuccin-zathura"]
|
||||
path = zathura/catppuccin-zathura
|
||||
url = https://github.com/catppuccin/zathura.git
|
||||
[submodule "nvim/pack/nvim/start/mini.nvim"]
|
||||
path = nvim/pack/nvim/start/mini.nvim
|
||||
url = https://github.com/echasnovski/mini.nvim
|
||||
[submodule "nvim/pack/nvim/start/nvim-lspconfig"]
|
||||
path = nvim/pack/nvim/start/nvim-lspconfig
|
||||
url = https://github.com/neovim/nvim-lspconfig
|
||||
[submodule "btop/catppuccin-btop"]
|
||||
path = btop/catppuccin-btop
|
||||
url = https://github.com/catppuccin/btop.git
|
||||
[submodule "fuzzel/catppuccin-fuzzel"]
|
||||
path = fuzzel/catppuccin-fuzzel
|
||||
url = https://github.com/catppuccin/fuzzel.git
|
||||
[submodule "nvim"]
|
||||
path = nvim
|
||||
url = https://git.narl.io/nvrl/nvim-config.git
|
||||
@@ -2,3 +2,4 @@
|
||||
|
||||

|
||||

|
||||

|
||||
|
||||
@@ -26,8 +26,8 @@ lines = 24
|
||||
|
||||
## Blank space added around the window in pixels.
|
||||
[window.padding]
|
||||
x = 30
|
||||
y = 30
|
||||
x = 3
|
||||
y = 0
|
||||
|
||||
## SCROLLING ------------------------------------------------------
|
||||
[scrolling]
|
||||
|
||||
114
btop/btop.conf
114
btop/btop.conf
@@ -1,18 +1,18 @@
|
||||
#? Config file for btop v. 1.4.4
|
||||
#? 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/narl/.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 = False
|
||||
theme_background = false
|
||||
|
||||
#* Sets if 24-bit truecolor should be used, will convert 24-bit colors to 256 color (6x6x6 color cube) if false.
|
||||
truecolor = True
|
||||
truecolor = true
|
||||
|
||||
#* Set to true to force tty mode regardless if a real tty has been detected or not.
|
||||
#* Will force 16-color mode and TTY theme, set all graph symbols to "tty" and swap out other non tty friendly symbols.
|
||||
force_tty = False
|
||||
force_tty = false
|
||||
|
||||
#* Define presets for the layout of the boxes. Preset 0 is always all boxes shown with default settings. Max 9 presets.
|
||||
#* Format: "box_name:P:G,box_name:P:G" P=(0 or 1) for alternate positions, G=graph symbol to use for box.
|
||||
@@ -22,10 +22,13 @@ presets = "cpu:1:default,proc:0:default cpu:0:default,mem:0:default,net:0:defaul
|
||||
|
||||
#* Set to True to enable "h,j,k,l,g,G" keys for directional control in lists.
|
||||
#* Conflicting keys for h:"help" and k:"kill" is accessible while holding shift.
|
||||
vim_keys = True
|
||||
vim_keys = true
|
||||
|
||||
#* Rounded corners on boxes, is ignored if TTY mode is ON.
|
||||
rounded_corners = True
|
||||
rounded_corners = true
|
||||
|
||||
#* Use terminal synchronized output sequences to reduce flickering on supported terminals.
|
||||
terminal_sync = true
|
||||
|
||||
#* Default symbols to use for graph creation, "braille", "block" or "tty".
|
||||
#* "braille" offers the highest resolution but might not be included in all fonts.
|
||||
@@ -53,44 +56,47 @@ graph_symbol_proc = "default"
|
||||
shown_boxes = "cpu mem net proc"
|
||||
|
||||
#* Update time in milliseconds, recommended 2000 ms or above for better sample times for graphs.
|
||||
update_ms = 2000
|
||||
update_ms = 1000
|
||||
|
||||
#* 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
|
||||
proc_reversed = false
|
||||
|
||||
#* Show processes as a tree.
|
||||
proc_tree = False
|
||||
proc_tree = true
|
||||
|
||||
#* Use the cpu graph colors in the process list.
|
||||
proc_colors = True
|
||||
proc_colors = true
|
||||
|
||||
#* Use a darkening gradient in the process list.
|
||||
proc_gradient = True
|
||||
proc_gradient = true
|
||||
|
||||
#* If process cpu usage should be of the core it's running on or usage of the total available cpu power.
|
||||
proc_per_core = False
|
||||
proc_per_core = false
|
||||
|
||||
#* Show process memory as bytes instead of percent.
|
||||
proc_mem_bytes = True
|
||||
proc_mem_bytes = true
|
||||
|
||||
#* Show cpu graph for each process.
|
||||
proc_cpu_graphs = True
|
||||
proc_cpu_graphs = true
|
||||
|
||||
#* Use /proc/[pid]/smaps for memory information in the process info box (very slow but more accurate)
|
||||
proc_info_smaps = False
|
||||
proc_info_smaps = false
|
||||
|
||||
#* Show proc box on left side of screen instead of right.
|
||||
proc_left = False
|
||||
proc_left = false
|
||||
|
||||
#* (Linux) Filter processes tied to the Linux kernel(similar behavior to htop).
|
||||
proc_filter_kernel = False
|
||||
proc_filter_kernel = false
|
||||
|
||||
#* In tree-view, always accumulate child process resources in the parent process.
|
||||
proc_aggregate = False
|
||||
proc_aggregate = false
|
||||
|
||||
#* Should cpu and memory usage display be preserved for dead processes when paused.
|
||||
keep_dead_proc_usage = false
|
||||
|
||||
#* Sets the CPU stat shown in upper half of the CPU graph, "total" is always available.
|
||||
#* Select from a list of detected attributes from the options menu.
|
||||
@@ -104,25 +110,28 @@ cpu_graph_lower = "Auto"
|
||||
show_gpu_info = "Auto"
|
||||
|
||||
#* Toggles if the lower CPU graph should be inverted.
|
||||
cpu_invert_lower = True
|
||||
cpu_invert_lower = true
|
||||
|
||||
#* Set to True to completely disable the lower CPU graph.
|
||||
cpu_single_graph = False
|
||||
cpu_single_graph = false
|
||||
|
||||
#* Show cpu box at bottom of screen instead of top.
|
||||
cpu_bottom = False
|
||||
cpu_bottom = false
|
||||
|
||||
#* Shows the system uptime in the CPU box.
|
||||
show_uptime = True
|
||||
show_uptime = true
|
||||
|
||||
#* Shows the CPU package current power consumption in watts. Requires running `make setcap` or `make setuid` or running with sudo.
|
||||
show_cpu_watts = true
|
||||
|
||||
#* Show cpu temperature.
|
||||
check_temp = True
|
||||
check_temp = true
|
||||
|
||||
#* Which sensor to use for cpu temperature, use options menu to select from list of available sensors.
|
||||
cpu_sensor = "Auto"
|
||||
|
||||
#* Show temperatures for cpu cores also if check_temp is True and sensors has been found.
|
||||
show_coretemp = True
|
||||
show_coretemp = true
|
||||
|
||||
#* Set a custom mapping between core and coretemp, can be needed on certain cpus to get correct temperature for correct core.
|
||||
#* Use lm-sensors or similar to see which cores are reporting temperatures on your machine.
|
||||
@@ -134,17 +143,20 @@ cpu_core_map = ""
|
||||
temp_scale = "celsius"
|
||||
|
||||
#* Use base 10 for bits/bytes sizes, KB = 1000 instead of KiB = 1024.
|
||||
base_10_sizes = False
|
||||
base_10_sizes = false
|
||||
|
||||
#* Show CPU frequency.
|
||||
show_cpu_freq = True
|
||||
show_cpu_freq = true
|
||||
|
||||
#* How to calculate CPU frequency, available values: "first", "range", "lowest", "highest" and "average".
|
||||
freq_mode = "first"
|
||||
|
||||
#* Draw a clock at top of screen, formatting according to strftime, empty string to disable.
|
||||
#* 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
|
||||
background_update = true
|
||||
|
||||
#* Custom cpu model name, empty string to disable.
|
||||
custom_cpu_name = ""
|
||||
@@ -154,43 +166,43 @@ custom_cpu_name = ""
|
||||
disks_filter = ""
|
||||
|
||||
#* Show graphs instead of meters for memory values.
|
||||
mem_graphs = True
|
||||
mem_graphs = true
|
||||
|
||||
#* Show mem box below net box instead of above.
|
||||
mem_below_net = False
|
||||
mem_below_net = false
|
||||
|
||||
#* Count ZFS ARC in cached and available memory.
|
||||
zfs_arc_cached = True
|
||||
zfs_arc_cached = true
|
||||
|
||||
#* If swap memory should be shown in memory box.
|
||||
show_swap = True
|
||||
show_swap = true
|
||||
|
||||
#* Show swap as a disk, ignores show_swap value above, inserts itself after first disk.
|
||||
swap_disk = True
|
||||
swap_disk = true
|
||||
|
||||
#* If mem box should be split to also show disks info.
|
||||
show_disks = True
|
||||
show_disks = true
|
||||
|
||||
#* Filter out non physical disks. Set this to False to include network disks, RAM disks and similar.
|
||||
only_physical = True
|
||||
only_physical = true
|
||||
|
||||
#* Read disks list from /etc/fstab. This also disables only_physical.
|
||||
use_fstab = True
|
||||
use_fstab = true
|
||||
|
||||
#* Setting this to True will hide all datasets, and only show ZFS pools. (IO stats will be calculated per-pool)
|
||||
zfs_hide_datasets = False
|
||||
zfs_hide_datasets = false
|
||||
|
||||
#* Set to true to show available disk space for privileged users.
|
||||
disk_free_priv = False
|
||||
disk_free_priv = false
|
||||
|
||||
#* Toggles if io activity % (disk busy time) should be shown in regular disk usage view.
|
||||
show_io_stat = True
|
||||
show_io_stat = true
|
||||
|
||||
#* Toggles io mode for disks, showing big graphs for disk read/write speeds.
|
||||
io_mode = False
|
||||
io_mode = false
|
||||
|
||||
#* Set to True to show combined read/write io graphs in io mode.
|
||||
io_graph_combined = False
|
||||
io_graph_combined = false
|
||||
|
||||
#* Set the top speed for the io graphs in MiB/s (100 by default), use format "mountpoint:speed" separate disks with whitespace " ".
|
||||
#* Example: "/mnt/media:100 /:20 /boot:1".
|
||||
@@ -202,10 +214,10 @@ 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
|
||||
net_auto = true
|
||||
|
||||
#* Sync the auto scaling for download and upload to whichever currently has the highest scale.
|
||||
net_sync = True
|
||||
net_sync = true
|
||||
|
||||
#* Starts with the Network Interface specified here.
|
||||
net_iface = ""
|
||||
@@ -214,26 +226,32 @@ net_iface = ""
|
||||
base_10_bitrate = "Auto"
|
||||
|
||||
#* Show battery stats in top right if battery is present.
|
||||
show_battery = True
|
||||
show_battery = true
|
||||
|
||||
#* Which battery to use if multiple are present. "Auto" for auto detection.
|
||||
selected_battery = "Auto"
|
||||
|
||||
#* Show power stats of battery next to charge indicator.
|
||||
show_battery_watts = True
|
||||
show_battery_watts = true
|
||||
|
||||
#* Set loglevel for "~/.config/btop/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* Set loglevel for "~/.local/state/btop.log" levels are: "ERROR" "WARNING" "INFO" "DEBUG".
|
||||
#* The level set includes all lower levels, i.e. "DEBUG" will show all logging info.
|
||||
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
|
||||
nvml_measure_pcie_speeds = true
|
||||
|
||||
#* Measure PCIe throughput on AMD cards, may impact performance on certain cards.
|
||||
rsmi_measure_pcie_speeds = True
|
||||
rsmi_measure_pcie_speeds = true
|
||||
|
||||
#* Horizontally mirror the GPU graph.
|
||||
gpu_mirror_graph = True
|
||||
gpu_mirror_graph = true
|
||||
|
||||
#* Set which GPU vendors to show. Available values are "nvidia amd intel"
|
||||
shown_gpus = "nvidia amd intel"
|
||||
|
||||
#* Custom gpu0 model name, empty string to disable.
|
||||
custom_gpu_name0 = ""
|
||||
|
||||
39
fish/conf.d/autopair.fish
Normal file
39
fish/conf.d/autopair.fish
Normal file
@@ -0,0 +1,39 @@
|
||||
status is-interactive || exit
|
||||
|
||||
set --global autopair_left "(" "[" "{" '"' "'"
|
||||
set --global autopair_right ")" "]" "}" '"' "'"
|
||||
set --global autopair_pairs "()" "[]" "{}" '""' "''"
|
||||
|
||||
function _autopair_fish_key_bindings --on-variable fish_key_bindings
|
||||
set --query fish_key_bindings[1] || return
|
||||
|
||||
test $fish_key_bindings = fish_default_key_bindings &&
|
||||
set --local mode default insert ||
|
||||
set --local mode insert default
|
||||
|
||||
bind --mode $mode[-1] --erase \177 \b \t
|
||||
|
||||
bind --mode $mode[1] \177 _autopair_backspace # macOS ⌫
|
||||
bind --mode $mode[1] \b _autopair_backspace
|
||||
bind --mode $mode[1] \t _autopair_tab
|
||||
|
||||
printf "%s\n" $autopair_pairs | while read --local left right --delimiter ""
|
||||
bind --mode $mode[-1] --erase $left $right
|
||||
if test $left = $right
|
||||
bind --mode $mode[1] $left "_autopair_insert_same \\$left"
|
||||
else
|
||||
bind --mode $mode[1] $left "_autopair_insert_left \\$left \\$right"
|
||||
bind --mode $mode[1] $right "_autopair_insert_right \\$right"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
_autopair_fish_key_bindings
|
||||
|
||||
function _autopair_uninstall --on-event autopair_uninstall
|
||||
string collect (
|
||||
bind --all | string replace --filter --regex -- "_autopair.*" --erase
|
||||
set --names | string replace --filter --regex -- "^autopair" "set --erase autopair"
|
||||
) | source
|
||||
functions --erase (functions --all | string match "_autopair_*")
|
||||
end
|
||||
300
fish/conf.d/done.fish
Normal file
300
fish/conf.d/done.fish
Normal file
@@ -0,0 +1,300 @@
|
||||
# MIT License
|
||||
|
||||
# Copyright (c) 2016 Francisco Lourenço & Daniel Wehner
|
||||
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
if not status is-interactive
|
||||
exit
|
||||
end
|
||||
|
||||
set -g __done_version 1.16.5
|
||||
|
||||
function __done_run_powershell_script
|
||||
set -l powershell_exe (command --search "powershell.exe")
|
||||
|
||||
if test $status -ne 0
|
||||
and command --search wslvar
|
||||
|
||||
set -l powershell_exe (wslpath (wslvar windir)/System32/WindowsPowerShell/v1.0/powershell.exe)
|
||||
end
|
||||
|
||||
if string length --quiet "$powershell_exe"
|
||||
and test -x "$powershell_exe"
|
||||
|
||||
set cmd (string escape $argv)
|
||||
|
||||
eval "$powershell_exe -Command $cmd"
|
||||
end
|
||||
end
|
||||
|
||||
function __done_windows_notification -a title -a message
|
||||
if test "$__done_notify_sound" -eq 1
|
||||
set soundopt "<audio silent=\"false\" src=\"ms-winsoundevent:Notification.Default\" />"
|
||||
else
|
||||
set soundopt "<audio silent=\"true\" />"
|
||||
end
|
||||
|
||||
__done_run_powershell_script "
|
||||
[Windows.Data.Xml.Dom.XmlDocument, Windows.Data.Xml.Dom.XmlDocument, ContentType = WindowsRuntime] | Out-Null
|
||||
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null
|
||||
|
||||
\$toast_xml_source = @\"
|
||||
<toast>
|
||||
$soundopt
|
||||
<visual>
|
||||
<binding template=\"ToastText02\">
|
||||
<text id=\"1\">$title</text>
|
||||
<text id=\"2\">$message</text>
|
||||
</binding>
|
||||
</visual>
|
||||
</toast>
|
||||
\"@
|
||||
|
||||
\$toast_xml = New-Object Windows.Data.Xml.Dom.XmlDocument
|
||||
\$toast_xml.loadXml(\$toast_xml_source)
|
||||
|
||||
\$toast = New-Object Windows.UI.Notifications.ToastNotification \$toast_xml
|
||||
|
||||
[Windows.UI.Notifications.ToastNotificationManager]::CreateToastNotifier(\"fish\").Show(\$toast)
|
||||
"
|
||||
end
|
||||
|
||||
function __done_get_focused_window_id
|
||||
if type -q lsappinfo
|
||||
lsappinfo info -only bundleID (lsappinfo front) | cut -d '"' -f4
|
||||
else if test -n "$SWAYSOCK"
|
||||
and type -q jq
|
||||
swaymsg --type get_tree | jq '.. | objects | select(.focused == true) | .id'
|
||||
else if begin
|
||||
test "$XDG_SESSION_DESKTOP" = gnome; and type -q gdbus
|
||||
end
|
||||
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval 'global.display.focus_window.get_id()'
|
||||
else if type -q xprop
|
||||
and test -n "$DISPLAY"
|
||||
# Test that the X server at $DISPLAY is running
|
||||
and xprop -grammar >/dev/null 2>&1
|
||||
xprop -root 32x '\t$0' _NET_ACTIVE_WINDOW | cut -f 2
|
||||
else if uname -a | string match --quiet --ignore-case --regex microsoft
|
||||
__done_run_powershell_script '
|
||||
Add-Type @"
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
public class WindowsCompat {
|
||||
[DllImport("user32.dll")]
|
||||
public static extern IntPtr GetForegroundWindow();
|
||||
}
|
||||
"@
|
||||
[WindowsCompat]::GetForegroundWindow()
|
||||
'
|
||||
else if set -q __done_allow_nongraphical
|
||||
echo 12345 # dummy value
|
||||
end
|
||||
end
|
||||
|
||||
function __done_is_tmux_window_active
|
||||
set -q fish_pid; or set -l fish_pid %self
|
||||
|
||||
# find the outermost process within tmux
|
||||
# ppid != "tmux" -> pid = ppid
|
||||
# ppid == "tmux" -> break
|
||||
set tmux_fish_pid $fish_pid
|
||||
while set tmux_fish_ppid (ps -o ppid= -p $tmux_fish_pid | string trim)
|
||||
and ! string match -q "tmux*" (basename (ps -o command= -p $tmux_fish_ppid))
|
||||
set tmux_fish_pid $tmux_fish_ppid
|
||||
end
|
||||
|
||||
# tmux session attached and window is active -> no notification
|
||||
# all other combinations -> send notification
|
||||
tmux list-panes -a -F "#{session_attached} #{window_active} #{pane_pid}" | string match -q "1 1 $tmux_fish_pid"
|
||||
end
|
||||
|
||||
function __done_is_screen_window_active
|
||||
string match --quiet --regex "$STY\s+\(Attached" (screen -ls)
|
||||
end
|
||||
|
||||
function __done_is_process_window_focused
|
||||
# Return false if the window is not focused
|
||||
|
||||
if set -q __done_allow_nongraphical
|
||||
return 1
|
||||
end
|
||||
|
||||
set __done_focused_window_id (__done_get_focused_window_id)
|
||||
if test "$__done_sway_ignore_visible" -eq 1
|
||||
and test -n "$SWAYSOCK"
|
||||
string match --quiet --regex "^true" (swaymsg -t get_tree | jq ".. | objects | select(.id == "$__done_initial_window_id") | .visible")
|
||||
return $status
|
||||
else if test "$__done_initial_window_id" != "$__done_focused_window_id"
|
||||
return 1
|
||||
end
|
||||
# If inside a tmux session, check if the tmux window is focused
|
||||
if type -q tmux
|
||||
and test -n "$TMUX"
|
||||
__done_is_tmux_window_active
|
||||
return $status
|
||||
end
|
||||
|
||||
# If inside a screen session, check if the screen window is focused
|
||||
if type -q screen
|
||||
and test -n "$STY"
|
||||
__done_is_screen_window_active
|
||||
return $status
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
function __done_humanize_duration -a milliseconds
|
||||
set -l seconds (math --scale=0 "$milliseconds/1000" % 60)
|
||||
set -l minutes (math --scale=0 "$milliseconds/60000" % 60)
|
||||
set -l hours (math --scale=0 "$milliseconds/3600000")
|
||||
|
||||
if test $hours -gt 0
|
||||
printf '%s' $hours'h '
|
||||
end
|
||||
if test $minutes -gt 0
|
||||
printf '%s' $minutes'm '
|
||||
end
|
||||
if test $seconds -gt 0
|
||||
printf '%s' $seconds's'
|
||||
end
|
||||
end
|
||||
|
||||
# verify that the system has graphical capabilities before initializing
|
||||
if test -z "$SSH_CLIENT" # not over ssh
|
||||
and count (__done_get_focused_window_id) >/dev/null # is able to get window id
|
||||
set __done_enabled
|
||||
end
|
||||
|
||||
if set -q __done_allow_nongraphical
|
||||
and set -q __done_notification_command
|
||||
set __done_enabled
|
||||
end
|
||||
|
||||
if set -q __done_enabled
|
||||
set -g __done_initial_window_id ''
|
||||
set -q __done_min_cmd_duration; or set -g __done_min_cmd_duration 5000
|
||||
set -q __done_exclude; or set -g __done_exclude 'git (?!push|pull|fetch)'
|
||||
set -q __done_notify_sound; or set -g __done_notify_sound 0
|
||||
set -q __done_sway_ignore_visible; or set -g __done_sway_ignore_visible 0
|
||||
|
||||
function __done_started --on-event fish_preexec
|
||||
set __done_initial_window_id (__done_get_focused_window_id)
|
||||
end
|
||||
|
||||
function __done_ended --on-event fish_prompt
|
||||
set -l exit_status $status
|
||||
|
||||
# backwards compatibility for fish < v3.0
|
||||
set -q cmd_duration; or set -l cmd_duration $CMD_DURATION
|
||||
|
||||
if test $cmd_duration
|
||||
and test $cmd_duration -gt $__done_min_cmd_duration # longer than notify_duration
|
||||
and not __done_is_process_window_focused # process pane or window not focused
|
||||
and not string match -qr $__done_exclude $history[1] # don't notify on git commands which might wait external editor
|
||||
|
||||
# Store duration of last command
|
||||
set -l humanized_duration (__done_humanize_duration "$cmd_duration")
|
||||
|
||||
set -l title "Done in $humanized_duration"
|
||||
set -l wd (string replace --regex "^$HOME" "~" (pwd))
|
||||
set -l message "$wd/ $history[1]"
|
||||
set -l sender $__done_initial_window_id
|
||||
|
||||
if test $exit_status -ne 0
|
||||
set title "Failed ($exit_status) after $humanized_duration"
|
||||
end
|
||||
|
||||
if set -q __done_notification_command
|
||||
eval $__done_notification_command
|
||||
if test "$__done_notify_sound" -eq 1
|
||||
echo -e "\a" # bell sound
|
||||
end
|
||||
else if type -q terminal-notifier # https://github.com/julienXX/terminal-notifier
|
||||
if test "$__done_notify_sound" -eq 1
|
||||
terminal-notifier -message "$message" -title "$title" -sender "$__done_initial_window_id" -sound default
|
||||
else
|
||||
terminal-notifier -message "$message" -title "$title" -sender "$__done_initial_window_id"
|
||||
end
|
||||
|
||||
else if type -q osascript # AppleScript
|
||||
osascript -e "display notification \"$message\" with title \"$title\""
|
||||
if test "$__done_notify_sound" -eq 1
|
||||
echo -e "\a" # bell sound
|
||||
end
|
||||
|
||||
else if type -q notify-send # Linux notify-send
|
||||
# set urgency to normal
|
||||
set -l urgency normal
|
||||
|
||||
# use user-defined urgency if set
|
||||
if set -q __done_notification_urgency_level
|
||||
set urgency "$__done_notification_urgency_level"
|
||||
end
|
||||
# override user-defined urgency level if non-zero exitstatus
|
||||
if test $exit_status -ne 0
|
||||
set urgency critical
|
||||
if set -q __done_notification_urgency_level_failure
|
||||
set urgency "$__done_notification_urgency_level_failure"
|
||||
end
|
||||
end
|
||||
|
||||
notify-send --hint=int:transient:1 --urgency=$urgency --icon=utilities-terminal --app-name=fish "$title" "$message"
|
||||
|
||||
if test "$__done_notify_sound" -eq 1
|
||||
echo -e "\a" # bell sound
|
||||
end
|
||||
|
||||
else if type -q notify-desktop # Linux notify-desktop
|
||||
set -l urgency
|
||||
if test $exit_status -ne 0
|
||||
set urgency "--urgency=critical"
|
||||
end
|
||||
notify-desktop $urgency --icon=utilities-terminal --app-name=fish "$title" "$message"
|
||||
if test "$__done_notify_sound" -eq 1
|
||||
echo -e "\a" # bell sound
|
||||
end
|
||||
|
||||
else if uname -a | string match --quiet --ignore-case --regex microsoft
|
||||
__done_windows_notification "$title" "$message"
|
||||
|
||||
else # anything else
|
||||
echo -e "\a" # bell sound
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function __done_uninstall -e done_uninstall
|
||||
# Erase all __done_* functions
|
||||
functions -e __done_ended
|
||||
functions -e __done_started
|
||||
functions -e __done_get_focused_window_id
|
||||
functions -e __done_is_tmux_window_active
|
||||
functions -e __done_is_screen_window_active
|
||||
functions -e __done_is_process_window_focused
|
||||
functions -e __done_windows_notification
|
||||
functions -e __done_run_powershell_script
|
||||
functions -e __done_humanize_duration
|
||||
|
||||
# Erase __done variables
|
||||
set -e __done_version
|
||||
end
|
||||
14
fish/conf.d/fish_frozen_key_bindings.fish
Normal file
14
fish/conf.d/fish_frozen_key_bindings.fish
Normal file
@@ -0,0 +1,14 @@
|
||||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# the 'fish_key_bindings' variable from its old default scope (universal)
|
||||
# to its new default scope (global). We recommend you delete this file
|
||||
# and configure key bindings in ~/.config/fish/config.fish if needed.
|
||||
|
||||
set --global fish_key_bindings fish_vi_key_bindings
|
||||
|
||||
# Prior to version 4.3, fish shipped an event handler that runs
|
||||
# `set --universal fish_key_bindings fish_default_key_bindings`
|
||||
# whenever the fish_key_bindings variable is erased.
|
||||
# This means that as long as any fish < 4.3 is still running on this system,
|
||||
# we cannot complete the migration.
|
||||
# As a workaround, erase the universal variable at every shell startup.
|
||||
set --erase --universal fish_key_bindings
|
||||
49
fish/conf.d/fish_frozen_theme.fish
Normal file
49
fish/conf.d/fish_frozen_theme.fish
Normal file
@@ -0,0 +1,49 @@
|
||||
# This file was created by fish when upgrading to version 4.3, to migrate
|
||||
# theme variables from universal to global scope.
|
||||
# Don't edit this file, as it will be written by the web-config tool (`fish_config`).
|
||||
# To customize your theme, delete this file and see
|
||||
# help interactive#syntax-highlighting
|
||||
# or
|
||||
# man fish-interactive | less +/^SYNTAX.HIGHLIGHTING
|
||||
# for appropriate commands to add to ~/.config/fish/config.fish instead.
|
||||
# See also the release notes for fish 4.3.0 (run `help relnotes`).
|
||||
|
||||
set --global fish_color_autosuggestion 6c7086
|
||||
set --global fish_color_cancel f38ba8
|
||||
set --global fish_color_command 89b4fa
|
||||
set --global fish_color_comment 7f849c
|
||||
set --global fish_color_cwd f9e2af
|
||||
set --global fish_color_cwd_root red
|
||||
set --global fish_color_end fab387
|
||||
set --global fish_color_error f38ba8
|
||||
set --global fish_color_escape eba0ac
|
||||
set --global fish_color_gray 6c7086
|
||||
set --global fish_color_history_current --bold
|
||||
set --global fish_color_host 89b4fa
|
||||
set --global fish_color_host_remote a6e3a1
|
||||
set --global fish_color_keyword f38ba8
|
||||
set --global fish_color_match --background=brblue
|
||||
set --global fish_color_normal cdd6f4
|
||||
set --global fish_color_operator f5c2e7
|
||||
set --global fish_color_option a6e3a1
|
||||
set --global fish_color_param f2cdcd
|
||||
set --global fish_color_quote a6e3a1
|
||||
set --global fish_color_redirection f5c2e7
|
||||
set --global fish_color_search_match --background=313244
|
||||
set --global fish_color_selection --background=313244
|
||||
set --global fish_color_status f38ba8
|
||||
set --global fish_color_user 94e2d5
|
||||
set --global fish_color_valid_path --underline
|
||||
set --global fish_pager_color_background
|
||||
set --global fish_pager_color_completion cdd6f4
|
||||
set --global fish_pager_color_description 6c7086
|
||||
set --global fish_pager_color_prefix f5c2e7
|
||||
set --global fish_pager_color_progress 6c7086
|
||||
set --global fish_pager_color_secondary_background
|
||||
set --global fish_pager_color_secondary_completion
|
||||
set --global fish_pager_color_secondary_description
|
||||
set --global fish_pager_color_secondary_prefix
|
||||
set --global fish_pager_color_selected_background
|
||||
set --global fish_pager_color_selected_completion
|
||||
set --global fish_pager_color_selected_description
|
||||
set --global fish_pager_color_selected_prefix
|
||||
7
fish/conf.d/omf.fish
Normal file
7
fish/conf.d/omf.fish
Normal file
@@ -0,0 +1,7 @@
|
||||
# Path to Oh My Fish install.
|
||||
set -q XDG_DATA_HOME
|
||||
and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
|
||||
or set -gx OMF_PATH "$HOME/.local/share/omf"
|
||||
|
||||
# Load Oh My Fish configuration.
|
||||
source $OMF_PATH/init.fish
|
||||
39
fish/config.fish
Normal file
39
fish/config.fish
Normal file
@@ -0,0 +1,39 @@
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
# set SPACESHIP_PROMPT_ADD_NEWLINE false
|
||||
# set SPACESHIP_TIME_SHOW false
|
||||
# set SPACESHIP_USER_SHOW always
|
||||
# set SPACESHIP_HOST_SHOW true
|
||||
# set SPACESHIP_CHAR_SYMBOL ""
|
||||
# set SPACESHIP_CHAR_SYMBOL=" "
|
||||
# set SPACESHIP_VI_MODE_INSERT
|
||||
# set SPACESHIP_VI_MODE_NORMAL
|
||||
# Set the cursor shapes for the different vi modes.
|
||||
set fish_cursor_default block blink
|
||||
set fish_cursor_insert line blink
|
||||
set fish_cursor_replace_one underscore blink
|
||||
set fish_cursor_visual block
|
||||
# starship init fish | source
|
||||
fish_vi_key_bindings
|
||||
if test -e ~/.cache/wal/colors.fish
|
||||
source ~/.cache/wal/colors.fish
|
||||
end
|
||||
zoxide init --cmd cd fish | source
|
||||
set -gx PATH ~/.local/bin $PATH
|
||||
# if not pgrep --full ssh-agent | string collect > /dev/null
|
||||
# eval (ssh-agent -c)
|
||||
# set -Ux SSH_AGENT_PID $SSH_AGENT_PID
|
||||
# set -Ux SSH_AUTH_SOCK $SSH_AUTH_SOCK
|
||||
# end
|
||||
# Set SSH_AUTH_SOCK for GNOME Keyring / systemd
|
||||
# The socket path is predictable
|
||||
set -l GCR_SSH_SOCK $XDG_RUNTIME_DIR/gcr/ssh
|
||||
if test -S "$GCR_SSH_SOCK"
|
||||
set -gx SSH_AUTH_SOCK "$GCR_SSH_SOCK"
|
||||
end
|
||||
if status is-login && test -z "$DISPLAY" -a -z "$WAYLAND_DISPLAY"
|
||||
if uwsm check may-start && uwsm select
|
||||
exec uwsm start default
|
||||
end
|
||||
end
|
||||
2
fish/fish_plugins
Normal file
2
fish/fish_plugins
Normal file
@@ -0,0 +1,2 @@
|
||||
franciscolourenco/done
|
||||
jorgebucaran/autopair.fish
|
||||
9
fish/functions/_autopair_backspace.fish
Normal file
9
fish/functions/_autopair_backspace.fish
Normal file
@@ -0,0 +1,9 @@
|
||||
function _autopair_backspace
|
||||
set --local index (commandline --cursor)
|
||||
set --local buffer (commandline)
|
||||
|
||||
test $index -ge 1 &&
|
||||
contains -- (string sub --start=$index --length=2 -- "$buffer") $autopair_pairs &&
|
||||
commandline --function delete-char
|
||||
commandline --function backward-delete-char
|
||||
end
|
||||
13
fish/functions/_autopair_insert_left.fish
Normal file
13
fish/functions/_autopair_insert_left.fish
Normal file
@@ -0,0 +1,13 @@
|
||||
function _autopair_insert_left --argument-names left right
|
||||
set --local buffer (commandline)
|
||||
set --local before (commandline --cut-at-cursor)
|
||||
|
||||
commandline --insert -- $left
|
||||
|
||||
switch "$buffer"
|
||||
case "$before"{," "\*,$autopair_right\*}
|
||||
set --local index (commandline --cursor)
|
||||
commandline --insert -- $right
|
||||
commandline --cursor $index
|
||||
end
|
||||
end
|
||||
11
fish/functions/_autopair_insert_right.fish
Normal file
11
fish/functions/_autopair_insert_right.fish
Normal file
@@ -0,0 +1,11 @@
|
||||
function _autopair_insert_right --argument-names key
|
||||
set --local buffer (commandline)
|
||||
set --local before (commandline --cut-at-cursor)
|
||||
|
||||
switch "$buffer"
|
||||
case "$before$key"\*
|
||||
commandline --cursor (math (commandline --cursor) + 1)
|
||||
case \*
|
||||
commandline --insert -- $key
|
||||
end
|
||||
end
|
||||
20
fish/functions/_autopair_insert_same.fish
Normal file
20
fish/functions/_autopair_insert_same.fish
Normal file
@@ -0,0 +1,20 @@
|
||||
function _autopair_insert_same --argument-names key
|
||||
set --local buffer (commandline)
|
||||
set --local index (commandline --cursor)
|
||||
set --local next (string sub --start=(math $index + 1) --length=1 -- "$buffer")
|
||||
|
||||
if test (math (count (string match --all --regex -- "$key" "$buffer")) % 2) = 0
|
||||
test $key = $next && commandline --cursor (math $index + 1) && return
|
||||
|
||||
commandline --insert -- $key
|
||||
|
||||
if test $index -lt 1 ||
|
||||
contains -- (string sub --start=$index --length=1 -- "$buffer") "" " " $autopair_left &&
|
||||
contains -- $next "" " " $autopair_right
|
||||
commandline --insert -- $key
|
||||
commandline --cursor (math $index + 1)
|
||||
end
|
||||
else
|
||||
commandline --insert -- $key
|
||||
end
|
||||
end
|
||||
7
fish/functions/_autopair_tab.fish
Normal file
7
fish/functions/_autopair_tab.fish
Normal file
@@ -0,0 +1,7 @@
|
||||
function _autopair_tab
|
||||
commandline --paging-mode && down-or-search && return
|
||||
|
||||
string match --quiet --regex -- '\$[^\s]*"$' (commandline --current-token) &&
|
||||
commandline --function delete-char
|
||||
commandline --function complete
|
||||
end
|
||||
3
fish/functions/batdiff.fish
Normal file
3
fish/functions/batdiff.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function batdiff --description 'batdiff function'
|
||||
git diff --name-only --diff-filter=d $argv | bat --diff
|
||||
end
|
||||
3
fish/functions/cat.fish
Normal file
3
fish/functions/cat.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function cat --wraps=bat --description 'alias cat=bat'
|
||||
bat $argv;
|
||||
end
|
||||
3
fish/functions/cpr.fish
Normal file
3
fish/functions/cpr.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function cpr
|
||||
rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 $argv
|
||||
end
|
||||
3
fish/functions/du.fish
Normal file
3
fish/functions/du.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function du --wraps='dust -bs' --description 'alias du=dust -bs'
|
||||
dust -bs $argv;
|
||||
end
|
||||
3
fish/functions/egrep.fish
Normal file
3
fish/functions/egrep.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function egrep --description 'alias egrep=egrep --color=auto'
|
||||
command egrep --color=auto $argv;
|
||||
end
|
||||
3
fish/functions/fgrep.fish
Normal file
3
fish/functions/fgrep.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function fgrep --description 'alias fgrep=fgrep --color=auto'
|
||||
command fgrep --color=auto $argv;
|
||||
end
|
||||
30
fish/functions/fish_prompt.fish
Normal file
30
fish/functions/fish_prompt.fish
Normal file
@@ -0,0 +1,30 @@
|
||||
function fish_prompt --description 'Write out the prompt'
|
||||
set -l last_status $status
|
||||
set -l normal (set_color normal)
|
||||
set -l status_color (set_color brgreen)
|
||||
set -l cwd_color (set_color $fish_color_cwd)
|
||||
set -l vcs_color (set_color brpurple)
|
||||
set -l prompt_status ""
|
||||
|
||||
# Since we display the prompt on a new line allow the directory names to be longer.
|
||||
set -q fish_prompt_pwd_dir_length
|
||||
or set -lx fish_prompt_pwd_dir_length 0
|
||||
|
||||
# Color the prompt differently when we're root
|
||||
set -l suffix '❯'
|
||||
if functions -q fish_is_root_user; and fish_is_root_user
|
||||
if set -q fish_color_cwd_root
|
||||
set cwd_color (set_color $fish_color_cwd_root)
|
||||
end
|
||||
set suffix '#'
|
||||
end
|
||||
|
||||
# Color the prompt in red on error
|
||||
if test $last_status -ne 0
|
||||
set status_color (set_color $fish_color_error)
|
||||
set prompt_status $status_color "[" $last_status "]" $normal
|
||||
end
|
||||
|
||||
echo -s (prompt_login) ' ' $cwd_color (prompt_pwd) $vcs_color (fish_vcs_prompt) $normal ' ' $prompt_status
|
||||
echo -n -s $status_color $suffix ' ' $normal
|
||||
end
|
||||
3
fish/functions/gitzip.fish
Normal file
3
fish/functions/gitzip.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function gitzip
|
||||
git archive HEAD -o (basename $PWD).zip
|
||||
end
|
||||
3
fish/functions/grep.fish
Normal file
3
fish/functions/grep.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function grep --description 'alias grep=grep --color=auto'
|
||||
command grep --color=auto $argv;
|
||||
end
|
||||
3
fish/functions/la.fish
Normal file
3
fish/functions/la.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function la --wraps='exa -a --long --color=auto' --description 'alias la=exa -a --long --color=auto'
|
||||
exa -a --long --color=auto $argv;
|
||||
end
|
||||
3
fish/functions/lg.fish
Normal file
3
fish/functions/lg.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function lg --wraps='exa --git --long' --description 'alias lg=exa --git --long'
|
||||
exa --git --long $argv;
|
||||
end
|
||||
3
fish/functions/ll.fish
Normal file
3
fish/functions/ll.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function ll --wraps='exa --long --color=auto' --description 'alias ll exa --long --color=auto'
|
||||
exa --long --color=auto $argv;
|
||||
end
|
||||
3
fish/functions/ls.fish
Normal file
3
fish/functions/ls.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function ls --wraps='exa --long --color=auto' --description 'alias ls=exa --long --color=auto'
|
||||
exa --long --color=auto $argv;
|
||||
end
|
||||
3
fish/functions/mvr.fish
Normal file
3
fish/functions/mvr.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function mvr
|
||||
rsync --archive -hh --partial --info=stats1,progress2 --modify-window=1 --remove-source-files $argv
|
||||
end
|
||||
3
fish/functions/open.fish
Normal file
3
fish/functions/open.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function open -d "Open an application detached from the terminal"
|
||||
nohup $argv >/dev/null 2>&1 &
|
||||
end
|
||||
30
fish/themes/Catppuccin Frappe.theme
Normal file
30
fish/themes/Catppuccin Frappe.theme
Normal file
@@ -0,0 +1,30 @@
|
||||
# name: 'Catppuccin Frappé'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
# preferred_background: 303446
|
||||
|
||||
fish_color_normal c6d0f5
|
||||
fish_color_command 8caaee
|
||||
fish_color_param eebebe
|
||||
fish_color_keyword e78284
|
||||
fish_color_quote a6d189
|
||||
fish_color_redirection f4b8e4
|
||||
fish_color_end ef9f76
|
||||
fish_color_comment 838ba7
|
||||
fish_color_error e78284
|
||||
fish_color_gray 737994
|
||||
fish_color_selection --background=414559
|
||||
fish_color_search_match --background=414559
|
||||
fish_color_option a6d189
|
||||
fish_color_operator f4b8e4
|
||||
fish_color_escape ea999c
|
||||
fish_color_autosuggestion 737994
|
||||
fish_color_cancel e78284
|
||||
fish_color_cwd e5c890
|
||||
fish_color_user 81c8be
|
||||
fish_color_host 8caaee
|
||||
fish_color_host_remote a6d189
|
||||
fish_color_status e78284
|
||||
fish_pager_color_progress 737994
|
||||
fish_pager_color_prefix f4b8e4
|
||||
fish_pager_color_completion c6d0f5
|
||||
fish_pager_color_description 737994
|
||||
30
fish/themes/Catppuccin Latte.theme
Normal file
30
fish/themes/Catppuccin Latte.theme
Normal file
@@ -0,0 +1,30 @@
|
||||
# name: 'Catppuccin Latte'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
# preferred_background: eff1f5
|
||||
|
||||
fish_color_normal 4c4f69
|
||||
fish_color_command 1e66f5
|
||||
fish_color_param dd7878
|
||||
fish_color_keyword d20f39
|
||||
fish_color_quote 40a02b
|
||||
fish_color_redirection ea76cb
|
||||
fish_color_end fe640b
|
||||
fish_color_comment 8c8fa1
|
||||
fish_color_error d20f39
|
||||
fish_color_gray 9ca0b0
|
||||
fish_color_selection --background=ccd0da
|
||||
fish_color_search_match --background=ccd0da
|
||||
fish_color_option 40a02b
|
||||
fish_color_operator ea76cb
|
||||
fish_color_escape e64553
|
||||
fish_color_autosuggestion 9ca0b0
|
||||
fish_color_cancel d20f39
|
||||
fish_color_cwd df8e1d
|
||||
fish_color_user 179299
|
||||
fish_color_host 1e66f5
|
||||
fish_color_host_remote 40a02b
|
||||
fish_color_status d20f39
|
||||
fish_pager_color_progress 9ca0b0
|
||||
fish_pager_color_prefix ea76cb
|
||||
fish_pager_color_completion 4c4f69
|
||||
fish_pager_color_description 9ca0b0
|
||||
30
fish/themes/Catppuccin Macchiato.theme
Normal file
30
fish/themes/Catppuccin Macchiato.theme
Normal file
@@ -0,0 +1,30 @@
|
||||
# name: 'Catppuccin Macchiato'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
# preferred_background: 24273a
|
||||
|
||||
fish_color_normal cad3f5
|
||||
fish_color_command 8aadf4
|
||||
fish_color_param f0c6c6
|
||||
fish_color_keyword ed8796
|
||||
fish_color_quote a6da95
|
||||
fish_color_redirection f5bde6
|
||||
fish_color_end f5a97f
|
||||
fish_color_comment 8087a2
|
||||
fish_color_error ed8796
|
||||
fish_color_gray 6e738d
|
||||
fish_color_selection --background=363a4f
|
||||
fish_color_search_match --background=363a4f
|
||||
fish_color_option a6da95
|
||||
fish_color_operator f5bde6
|
||||
fish_color_escape ee99a0
|
||||
fish_color_autosuggestion 6e738d
|
||||
fish_color_cancel ed8796
|
||||
fish_color_cwd eed49f
|
||||
fish_color_user 8bd5ca
|
||||
fish_color_host 8aadf4
|
||||
fish_color_host_remote a6da95
|
||||
fish_color_status ed8796
|
||||
fish_pager_color_progress 6e738d
|
||||
fish_pager_color_prefix f5bde6
|
||||
fish_pager_color_completion cad3f5
|
||||
fish_pager_color_description 6e738d
|
||||
30
fish/themes/Catppuccin Mocha.theme
Normal file
30
fish/themes/Catppuccin Mocha.theme
Normal file
@@ -0,0 +1,30 @@
|
||||
# name: 'Catppuccin Mocha'
|
||||
# url: 'https://github.com/catppuccin/fish'
|
||||
# preferred_background: 1e1e2e
|
||||
|
||||
fish_color_normal cdd6f4
|
||||
fish_color_command 89b4fa
|
||||
fish_color_param f2cdcd
|
||||
fish_color_keyword f38ba8
|
||||
fish_color_quote a6e3a1
|
||||
fish_color_redirection f5c2e7
|
||||
fish_color_end fab387
|
||||
fish_color_comment 7f849c
|
||||
fish_color_error f38ba8
|
||||
fish_color_gray 6c7086
|
||||
fish_color_selection --background=313244
|
||||
fish_color_search_match --background=313244
|
||||
fish_color_option a6e3a1
|
||||
fish_color_operator f5c2e7
|
||||
fish_color_escape eba0ac
|
||||
fish_color_autosuggestion 6c7086
|
||||
fish_color_cancel f38ba8
|
||||
fish_color_cwd f9e2af
|
||||
fish_color_user 94e2d5
|
||||
fish_color_host 89b4fa
|
||||
fish_color_host_remote a6e3a1
|
||||
fish_color_status f38ba8
|
||||
fish_pager_color_progress 6c7086
|
||||
fish_pager_color_prefix f5c2e7
|
||||
fish_pager_color_completion cdd6f4
|
||||
fish_pager_color_description 6c7086
|
||||
@@ -1,336 +1,18 @@
|
||||
|
||||
# #######################################################################################
|
||||
# AUTOGENERATED HYPRLAND CONFIG.
|
||||
# PLEASE USE THE CONFIG PROVIDED IN THE GIT REPO /examples/hyprland.conf AND EDIT IT,
|
||||
# OR EDIT THIS ONE ACCORDING TO THE WIKI INSTRUCTIONS.
|
||||
# #######################################################################################
|
||||
# narls hyprland dotfiles
|
||||
|
||||
# This is an example Hyprland config file.
|
||||
# Refer to the wiki for more information.
|
||||
# https://wiki.hyprland.org/Configuring/
|
||||
source = ~/.config/hypr/modules/monitors.conf
|
||||
|
||||
# Please note not all available settings / options are set here.
|
||||
# For a full list, see the wiki
|
||||
source = ~/.config/hypr/modules/programs.conf
|
||||
|
||||
# You can split this configuration into multiple files
|
||||
# Create your files separately and then link them to this file like this:
|
||||
# source = ~/.config/hypr/myColors.conf
|
||||
source = ~/.config/hypr/modules/autostart.conf
|
||||
|
||||
source = ~/.config/hypr/modules/env.conf
|
||||
|
||||
################
|
||||
### MONITORS ###
|
||||
################
|
||||
source = ~/.config/hypr/modules/theme.conf
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
monitor=eDP-1, preferred, 0x0, 1
|
||||
# monitor=DP-4, preferred, auto, 1, mirror, eDP-1
|
||||
monitor=,preferred,auto,auto
|
||||
# trigger when the switch is turning off
|
||||
# bindl = , switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, 1920x1080@60, 0x0, 1"
|
||||
# trigger when the switch is turning on
|
||||
# bindl = , switch:on:Lid Switch,exec,hyprctl keyword monitor "eDP-1, disable"
|
||||
source = ~/.config/hypr/modules/input.conf
|
||||
|
||||
source = ~/.config/hypr/modules/keybinds.conf
|
||||
|
||||
###################
|
||||
### MY PROGRAMS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = alacritty
|
||||
$fileManager = nautilus
|
||||
$menu = fuzzel
|
||||
|
||||
|
||||
#################
|
||||
### AUTOSTART ###
|
||||
#################
|
||||
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# Or execute your favorite apps at launch like this:
|
||||
|
||||
exec-once = uwsm app -- waybar
|
||||
exec-once = uwsm app -- nm-applet
|
||||
exec-once = uwsm app -- nextcloud --background
|
||||
exec-once = uwsm app -- rclone mount google_drive: ~/gdrive
|
||||
exec-once = uwsm app -- protonvpn-app
|
||||
|
||||
|
||||
#############################
|
||||
### ENVIRONMENT VARIABLES ###
|
||||
#############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
|
||||
env = HYPRCURSOR_THEME,Bibata-Modern-Classic
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
env = XCURSOR_SIZE,24
|
||||
env = XCURSOR_THEME,Bibata-Modern-Classic
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
env = debug:full_cm_proto=true
|
||||
env = QT_QPA_PLATFORMTHEME=qt6ct
|
||||
|
||||
|
||||
|
||||
###################
|
||||
### PERMISSIONS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Permissions/
|
||||
# Please note permission changes here require a Hyprland restart and are not applied on-the-fly
|
||||
# for security reasons
|
||||
|
||||
# ecosystem {
|
||||
# enforce_permissions = 1
|
||||
# }
|
||||
|
||||
# permission = /usr/(bin|local/bin)/grim, screencopy, allow
|
||||
# permission = /usr/(lib|libexec|lib64)/xdg-desktop-portal-hyprland, screencopy, allow
|
||||
# permission = /usr/(bin|local/bin)/hyprpm, plugin, allow
|
||||
|
||||
|
||||
#####################
|
||||
### LOOK AND FEEL ###
|
||||
#####################
|
||||
|
||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
source = ~/.config/hypr/catppuccin-hyprland/themes/mocha.conf
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 5, 5, 5, 5
|
||||
|
||||
border_size = 3
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
# col.active_border = rgba(cba6f7ee) rgba(f38ba8ee) 45deg
|
||||
col.active_border = rgb($mauveAlpha) rgb($tealAlpha) 30deg
|
||||
col.inactive_border = rgb($surface2Alpha)
|
||||
|
||||
# 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 = true
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#decoration
|
||||
decoration {
|
||||
rounding = 4
|
||||
rounding_power = 1
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0
|
||||
inactive_opacity = 1.0
|
||||
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = 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 = yes, please :)
|
||||
|
||||
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = easeOutQuint,0.23,1,0.32,1
|
||||
bezier = easeInOutCubic,0.65,0.05,0.36,1
|
||||
bezier = linear,0,0,1,1
|
||||
bezier = almostLinear,0.5,0.5,0.75,1.0
|
||||
bezier = quick,0.15,0,0.1,1
|
||||
|
||||
animation = global, 1, 10, default
|
||||
animation = border, 1, 5.39, easeOutQuint
|
||||
animation = windows, 1, 4.79, easeOutQuint
|
||||
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
|
||||
animation = windowsOut, 1, 1.49, linear, popin 87%
|
||||
animation = fadeIn, 1, 1.73, almostLinear
|
||||
animation = fadeOut, 1, 1.46, almostLinear
|
||||
animation = fade, 1, 3.03, quick
|
||||
animation = layers, 1, 3.81, easeOutQuint
|
||||
animation = layersIn, 1, 4, easeOutQuint, fade
|
||||
animation = layersOut, 1, 1.5, linear, fade
|
||||
animation = fadeLayersIn, 1, 1.79, almostLinear
|
||||
animation = fadeLayersOut, 1, 1.39, almostLinear
|
||||
animation = workspaces, 1, 1.94, almostLinear, fade
|
||||
animation = workspacesIn, 1, 1.21, almostLinear, fade
|
||||
animation = workspacesOut, 1, 1.94, almostLinear, fade
|
||||
}
|
||||
|
||||
# Ref https://wiki.hyprland.org/Configuring/Workspace-Rules/
|
||||
# "Smart gaps" / "No gaps when only"
|
||||
# uncomment all if you wish to use that.
|
||||
# workspace = w[tv1], gapsout:0, gapsin:0
|
||||
# workspace = f[1], gapsout:0, gapsin:0
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:w[tv1]
|
||||
# windowrule = bordersize 0, floating:0, onworkspace:f[1]
|
||||
# windowrule = rounding 0, floating:0, onworkspace:f[1]
|
||||
|
||||
# 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. :(
|
||||
vrr = 0
|
||||
}
|
||||
|
||||
|
||||
#############
|
||||
### INPUT ###
|
||||
#############
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant = dvorak-intl, intl
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
accel_profile = flat
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
}
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#gestures
|
||||
gestures {
|
||||
workspace_swipe = false
|
||||
}
|
||||
|
||||
|
||||
###################
|
||||
### KEYBINDINGS ###
|
||||
###################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
bind = , PRINT, exec, gscreenshot -c -s
|
||||
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
|
||||
bind = $mainMod, RETURN, exec, $terminal
|
||||
bind = $mainMod SHIFT, Q, killactive,
|
||||
# bind = $mainMod, M, exit,
|
||||
bind = $mainMod CTRL, L, exec, hyprlock
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, F, fullscreen,
|
||||
bindr = $mainMod, SPACE, exec, $menu
|
||||
bind = $mainMod, P, exec, ~/.config/hypr/scripts/powermenu.sh &
|
||||
# bind = $mainMod, J, togglesplit, # dwindle
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, k, movefocus, u
|
||||
bind = $mainMod, j, movefocus, d
|
||||
|
||||
bind = $mainMod SHIFT, left, movewindow, l
|
||||
bind = $mainMod SHIFT, right, movewindow, r
|
||||
bind = $mainMod SHIFT, up, movewindow, u
|
||||
bind = $mainMod SHIFT, down, movewindow, d
|
||||
bind = $mainMod SHIFT, H, movewindow, l
|
||||
bind = $mainMod SHIFT, L, movewindow, r
|
||||
bind = $mainMod SHIFT, K, movewindow, u
|
||||
bind = $mainMod SHIFT, J, movewindow, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, magic
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:magic
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Laptop multimedia keys for volume and LCD brightness
|
||||
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
|
||||
|
||||
# Requires playerctl
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
|
||||
|
||||
##############################
|
||||
### WINDOWS AND WORKSPACES ###
|
||||
##############################
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# Example windowrule
|
||||
# windowrule = float,class:^(kitty)$,title:^(kitty)$
|
||||
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
windowrule = suppressevent maximize, class:.*
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
windowrule = nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0
|
||||
windowrulev2=noblur,class:^()$,title:^()$
|
||||
source = ~/.config/hypr/modules/window_rules.conf
|
||||
|
||||
@@ -12,7 +12,7 @@ general {
|
||||
# BACKGROUND
|
||||
background {
|
||||
monitor =
|
||||
path = $HOME/Pictures/rem/rem-latte.jpg
|
||||
path = $HOME/Pictures/mandelbrot.png
|
||||
blur_passes = 0
|
||||
color = $base
|
||||
}
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
preload = ~/Pictures/rem/rem-latte.jpg
|
||||
wallpaper = ,~/Pictures/rem/rem-latte.jpg
|
||||
wallpaper {
|
||||
monitor =
|
||||
path = ~/Pictures/mandelbrot.png
|
||||
fit_mode = fill
|
||||
}
|
||||
|
||||
1
hypr/lid_state.conf
Normal file
1
hypr/lid_state.conf
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
@@ -1,78 +0,0 @@
|
||||
|
||||
$rosewater = rgb(f5e0dc)
|
||||
$rosewaterAlpha = f5e0dc
|
||||
|
||||
$flamingo = rgb(f2cdcd)
|
||||
$flamingoAlpha = f2cdcd
|
||||
|
||||
$pink = rgb(f5c2e7)
|
||||
$pinkAlpha = f5c2e7
|
||||
|
||||
$mauve = rgb(cba6f7)
|
||||
$mauveAlpha = cba6f7
|
||||
|
||||
$red = rgb(f38ba8)
|
||||
$redAlpha = f38ba8
|
||||
|
||||
$maroon = rgb(eba0ac)
|
||||
$maroonAlpha = eba0ac
|
||||
|
||||
$peach = rgb(fab387)
|
||||
$peachAlpha = fab387
|
||||
|
||||
$yellow = rgb(f9e2af)
|
||||
$yellowAlpha = f9e2af
|
||||
|
||||
$green = rgb(a6e3a1)
|
||||
$greenAlpha = a6e3a1
|
||||
|
||||
$teal = rgb(94e2d5)
|
||||
$tealAlpha = 94e2d5
|
||||
|
||||
$sky = rgb(89dceb)
|
||||
$skyAlpha = 89dceb
|
||||
|
||||
$sapphire = rgb(74c7ec)
|
||||
$sapphireAlpha = 74c7ec
|
||||
|
||||
$blue = rgb(89b4fa)
|
||||
$blueAlpha = 89b4fa
|
||||
|
||||
$lavender = rgb(b4befe)
|
||||
$lavenderAlpha = b4befe
|
||||
|
||||
$text = rgb(cdd6f4)
|
||||
$textAlpha = cdd6f4
|
||||
|
||||
$subtext1 = rgb(bac2de)
|
||||
$subtext1Alpha = bac2de
|
||||
|
||||
$subtext0 = rgb(a6adc8)
|
||||
$subtext0Alpha = a6adc8
|
||||
|
||||
$overlay2 = rgb(9399b2)
|
||||
$overlay2Alpha = 9399b2
|
||||
|
||||
$overlay1 = rgb(7f849c)
|
||||
$overlay1Alpha = 7f849c
|
||||
|
||||
$overlay0 = rgb(6c7086)
|
||||
$overlay0Alpha = 6c7086
|
||||
|
||||
$surface2 = rgb(585b70)
|
||||
$surface2Alpha = 585b70
|
||||
|
||||
$surface1 = rgb(45475a)
|
||||
$surface1Alpha = 45475a
|
||||
|
||||
$surface0 = rgb(313244)
|
||||
$surface0Alpha = 313244
|
||||
|
||||
$base = rgb(1e1e2e)
|
||||
$baseAlpha = 1e1e2e
|
||||
|
||||
$mantle = rgb(181825)
|
||||
$mantleAlpha = 181825
|
||||
|
||||
$crust = rgb(11111b)
|
||||
$crustAlpha = 11111b
|
||||
17
hypr/modules/autostart.conf
Normal file
17
hypr/modules/autostart.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
# Autostart necessary processes (like notifications daemons, status bars, etc.)
|
||||
# Or execute your favorite apps at launch like this:
|
||||
|
||||
# exec-once = uwsm app -- waybar
|
||||
# exec-once = uwsm app -- hyprpanel
|
||||
# exec-once = uwsm app -- nextcloud --background
|
||||
exec-once = uwsm app -- nm-applet --indicator
|
||||
# exec-once = uwsm app -- rclone mount google_drive: ~/gdrive
|
||||
# exec-once = uwsm app -- protonvpn-app
|
||||
exec-once = uwsm app -- hyprpaper
|
||||
# exec-once = uwsm app -- /usr/bin/discord --enable-features=UseOzonePlatform --ozone-platform=wayland --start-minimized &> /dev/null
|
||||
# exec-once = sleep 5 && ~/.config/hypr/scripts/replay-ctrl.sh start
|
||||
# exec-once = uwsm app -- /usr/lib/xdg-desktop-portal-hyprland
|
||||
exec-once = wl-paste --type text --watch cliphist store # Stores only text data
|
||||
exec-once = wl-paste --type image --watch cliphist store # Stores only image data
|
||||
exec-once = uwsm app -- ~/.cargo/bin/fluxo-rs daemon
|
||||
17
hypr/modules/env.conf
Normal file
17
hypr/modules/env.conf
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Environment-variables/
|
||||
|
||||
# env = INTEL_DEBUG,noccs
|
||||
# env = WLR_DRM_NO_ATOMIC,1
|
||||
env = HYPRCURSOR_THEME,Bibata-Modern-Classic
|
||||
env = HYPRCURSOR_SIZE,24
|
||||
env = XCURSOR_SIZE,24
|
||||
env = XCURSOR_THEME,Bibata-Modern-Classic
|
||||
env = XDG_CURRENT_DESKTOP,Hyprland
|
||||
# env = debug:full_cm_proto,true
|
||||
env = QT_QPA_PLATFORMTHEME,qt6ct
|
||||
# env = LIBVA_DRIVER_NAME,radeonsi
|
||||
# env = VDPAU_DRIVER,radeonsi
|
||||
env = MOZ_ENABLE_WAYLAND,1
|
||||
env = ELECTRON_OZONE_PLATFORM_HINT,wayland
|
||||
env = EDITOR,nvim
|
||||
34
hypr/modules/input.conf
Normal file
34
hypr/modules/input.conf
Normal file
@@ -0,0 +1,34 @@
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#input
|
||||
input {
|
||||
kb_layout = us,us
|
||||
kb_variant = dvorak-intl, intl
|
||||
# kb_variant = intl
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
kb_options = ctrl:nocaps
|
||||
|
||||
follow_mouse = 0
|
||||
|
||||
accel_profile = flat
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
|
||||
touchpad {
|
||||
natural_scroll = false
|
||||
}
|
||||
}
|
||||
|
||||
device {
|
||||
name = at-translated-set-2-keyboard
|
||||
resolve_binds_by_sym = 1
|
||||
kb_layout = us
|
||||
kb_variant = dvorak-intl
|
||||
}
|
||||
|
||||
device {
|
||||
name = topre-corporation-hhkb-professional
|
||||
resolve_binds_by_sym = 1
|
||||
kb_layout = us
|
||||
kb_variant = dvorak-intl
|
||||
}
|
||||
93
hypr/modules/keybinds.conf
Normal file
93
hypr/modules/keybinds.conf
Normal file
@@ -0,0 +1,93 @@
|
||||
|
||||
$mainMod = SUPER # Sets "Windows" key as main modifier
|
||||
|
||||
bindl=,switch:on:Lid Switch,exec,~/.config/hypr/scripts/lid_handler.sh close
|
||||
bindl=,switch:off:Lid Switch,exec,~/.config/hypr/scripts/lid_handler.sh open
|
||||
|
||||
bindr = ALT, m, exec, cliphist list | fuzzel --dmenu | cliphist decode | wl-copy
|
||||
bind = , PRINT, exec, grim -g "$(slurp)" - | wl-copy
|
||||
bindr = ALT SHIFT, z, exec, ~/.config/hypr/scripts/replay-ctrl.sh save
|
||||
bindr = ALT, z, exec, ~/.config/hypr/scripts/replay-ctrl.sh toggle
|
||||
bindr = ALT SHIFT, c, exec, ~/.config/hypr/scripts/droidcam-ctrl.sh toggle
|
||||
|
||||
# general binds
|
||||
bind = $mainMod, RETURN, exec, $terminal
|
||||
bind = $mainMod SHIFT, Q, killactive,
|
||||
bind = $mainMod CTRL, L, exec, hyprlock
|
||||
bind = $mainMod, E, exec, $fileManager
|
||||
bind = $mainMod, V, togglefloating,
|
||||
bind = $mainMod, F, fullscreen,
|
||||
bind = $mainMod, SPACE, exec, $menu
|
||||
bind = $mainMod, P, exec, ~/.config/hypr/scripts/powermenu.sh
|
||||
bind = $mainMod, t, togglesplit, # dwindle
|
||||
bind = $mainMod, n, togglegroup
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
bind = $mainMod, h, movefocus, l
|
||||
bind = $mainMod, l, movefocus, r
|
||||
bind = $mainMod, k, movefocus, u
|
||||
bind = $mainMod, j, movefocus, d
|
||||
|
||||
bind = $mainMod SHIFT, H, movewindoworgroup, l
|
||||
bind = $mainMod SHIFT, L, movewindoworgroup, r
|
||||
bind = $mainMod SHIFT, K, movewindoworgroup, u
|
||||
bind = $mainMod SHIFT, J, movewindoworgroup, d
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
bind = $mainMod, 1, workspace, 1
|
||||
bind = $mainMod, 2, workspace, 2
|
||||
bind = $mainMod, 3, workspace, 3
|
||||
bind = $mainMod, 4, workspace, 4
|
||||
bind = $mainMod, 5, workspace, 5
|
||||
bind = $mainMod, 6, workspace, 6
|
||||
bind = $mainMod, 7, workspace, 7
|
||||
bind = $mainMod, 8, workspace, 8
|
||||
bind = $mainMod, 9, workspace, 9
|
||||
bind = $mainMod, 0, workspace, 10
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||
|
||||
# groups
|
||||
# bind = ALT, Tab, changegroupactive, prev
|
||||
bind = ALT, Tab, changegroupactive, next
|
||||
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
bind = $mainMod, S, togglespecialworkspace, virtual
|
||||
bind = $mainMod SHIFT, S, movetoworkspace, special:virtual
|
||||
bind = $mainMod, D, togglespecialworkspace, discord
|
||||
bind = $mainMod SHIFT, D, movetoworkspace, special:discord
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
bind = $mainMod, mouse_down, workspace, e+1
|
||||
bind = $mainMod, mouse_up, workspace, e-1
|
||||
|
||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Laptop multimedia keys for volume and LCD brightness
|
||||
bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
|
||||
bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
||||
bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
|
||||
bindel = ,XF86MonBrightnessUp, exec, brightnessctl -e4 -n2 set 5%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl -e4 -n2 set 5%-
|
||||
|
||||
# Requires playerctl
|
||||
bindl = , XF86AudioNext, exec, playerctl next
|
||||
bindl = , XF86AudioPause, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPlay, exec, playerctl play-pause
|
||||
bindl = , XF86AudioPrev, exec, playerctl previous
|
||||
bindel = ,XF86MonBrightnessUp, exec, brightnessctl s 10%+
|
||||
bindel = ,XF86MonBrightnessDown, exec, brightnessctl s 10%-
|
||||
9
hypr/modules/monitors.conf
Normal file
9
hypr/modules/monitors.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
# laptop screen
|
||||
monitor = eDP-1, 1920x1080@60, 0x0, 1
|
||||
# samsung home monitor
|
||||
monitor = desc:Samsung Electric Company LC27G7xT H4ZRA00734, 2560x1440@144, 0x-1440, 1
|
||||
|
||||
|
||||
# lid_state fallback
|
||||
source = ~/.config/hypr/lid_state.conf
|
||||
38
hypr/modules/plugins.conf
Normal file
38
hypr/modules/plugins.conf
Normal file
@@ -0,0 +1,38 @@
|
||||
exec-once = hyprpm reload -n
|
||||
|
||||
# plugin:hyprfocus {
|
||||
# enabled = yes
|
||||
# animate_floating = yes
|
||||
# animate_workspacechange = yes
|
||||
# focus_animation = shrink
|
||||
# # Beziers for focus animations
|
||||
# bezier = bezIn, 0.5,0.0,1.0,0.5
|
||||
# bezier = bezOut, 0.0,0.5,0.5,1.0
|
||||
# bezier = overshot, 0.05, 0.9, 0.1, 1.05
|
||||
# bezier = smoothOut, 0.36, 0, 0.66, -0.56
|
||||
# bezier = smoothIn, 0.25, 1, 0.5, 1
|
||||
# bezier = realsmooth, 0.28,0.29,.69,1.08
|
||||
# # Flash settings
|
||||
# flash {
|
||||
# flash_opacity = 0.95
|
||||
# in_bezier = realsmooth
|
||||
# in_speed = 0.5
|
||||
# out_bezier = realsmooth
|
||||
# out_speed = 3
|
||||
# }
|
||||
# # Shrink settings
|
||||
# shrink {
|
||||
# shrink_percentage = 0.95
|
||||
# in_bezier = realsmooth
|
||||
# in_speed = 1
|
||||
# out_bezier = realsmooth
|
||||
# out_speed = 2
|
||||
# }
|
||||
# }
|
||||
#
|
||||
# plugin:csgo-vulkan-fix {
|
||||
# res_w = 1280
|
||||
# res_h = 960
|
||||
# class = gamescope
|
||||
# fix_mouse = true
|
||||
# }
|
||||
7
hypr/modules/programs.conf
Normal file
7
hypr/modules/programs.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/
|
||||
|
||||
# Set programs that you use
|
||||
$terminal = alacritty
|
||||
$fileManager = nautilus
|
||||
$menu = fuzzel
|
||||
113
hypr/modules/theme.conf
Normal file
113
hypr/modules/theme.conf
Normal file
@@ -0,0 +1,113 @@
|
||||
# catppuccin mocha theme
|
||||
source = ~/.config/hypr/catppuccin-hyprland/themes/mocha.conf
|
||||
|
||||
# Refer to https://wiki.hyprland.org/Configuring/Variables/
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#general
|
||||
|
||||
general {
|
||||
gaps_in = 5
|
||||
gaps_out = 5, 5, 5, 5
|
||||
|
||||
border_size = 3
|
||||
|
||||
# https://wiki.hyprland.org/Configuring/Variables/#variable-types for info about colors
|
||||
# col.active_border = rgba(cba6f7ee) rgba(f38ba8ee) 45deg
|
||||
col.active_border = rgb($mauveAlpha) rgb($blueAlpha) 30deg
|
||||
col.inactive_border = rgb($surface2Alpha)
|
||||
|
||||
# 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 = 4
|
||||
rounding_power = 1
|
||||
|
||||
# Change transparency of focused and unfocused windows
|
||||
active_opacity = 1.0
|
||||
inactive_opacity = 1.0
|
||||
|
||||
shadow {
|
||||
enabled = true
|
||||
range = 4
|
||||
render_power = 3
|
||||
color = 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 = yes, please :)
|
||||
|
||||
# Default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = easeOutQuint,0.23,1,0.32,1
|
||||
bezier = easeInOutCubic,0.65,0.05,0.36,1
|
||||
bezier = linear,0,0,1,1
|
||||
bezier = almostLinear,0.5,0.5,0.75,1.0
|
||||
bezier = quick,0.15,0,0.1,1
|
||||
|
||||
animation = global, 1, 10, default
|
||||
animation = border, 1, 5.39, easeOutQuint
|
||||
animation = windows, 1, 4.79, easeOutQuint
|
||||
animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
|
||||
animation = windowsOut, 1, 1.49, linear, popin 87%
|
||||
animation = fadeIn, 1, 1.73, almostLinear
|
||||
animation = fadeOut, 1, 1.46, almostLinear
|
||||
animation = fade, 1, 3.03, quick
|
||||
animation = layers, 1, 3.81, easeOutQuint
|
||||
animation = layersIn, 1, 4, easeOutQuint, fade
|
||||
animation = layersOut, 1, 1.5, linear, fade
|
||||
animation = fadeLayersIn, 1, 1.79, almostLinear
|
||||
animation = fadeLayersOut, 1, 1.39, almostLinear
|
||||
animation = workspaces, 1, 1.94, almostLinear, fade
|
||||
animation = workspacesIn, 1, 1.21, almostLinear, fade
|
||||
animation = workspacesOut, 1, 1.94, almostLinear, fade
|
||||
}
|
||||
|
||||
# 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. :(
|
||||
vrr = 1
|
||||
font_family = FiraCode Nerd Font
|
||||
}
|
||||
|
||||
group {
|
||||
groupbar {
|
||||
font_size = 14
|
||||
text_color = $text
|
||||
text_color_inactive = $text
|
||||
col.active = $maroon
|
||||
col.inactive = $surface2
|
||||
}
|
||||
col.border_active = $maroon $teal 30deg
|
||||
col.border_inactive = $surface2
|
||||
}
|
||||
77
hypr/modules/window_rules.conf
Normal file
77
hypr/modules/window_rules.conf
Normal file
@@ -0,0 +1,77 @@
|
||||
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
|
||||
# See https://wiki.hyprland.org/Configuring/Workspace-Rules/ for workspace rules
|
||||
|
||||
# ==========================================
|
||||
# VARIABLES
|
||||
# ==========================================
|
||||
# Dialogs and utility apps that should float in the center
|
||||
$dialog_titles = ^(Open Form|Open File|Select a File|Choose a file|Open Workspace|Choose Directory|Save As|Save File|branchdialog|pinentry-gtk-2|Confirm to replace files|File Operation Progress|Open Files|Anmelden – Google Konten — Zen Browser)$
|
||||
$dialog_classes = ^(pavucontrol|blueman-manager|nm-connection-editor|org.pulseaudio.pavucontrol)$
|
||||
|
||||
# App classes
|
||||
$steam = ^(steam)$
|
||||
$gamescope = ^(gamescope)$
|
||||
|
||||
|
||||
# ==========================================
|
||||
# GENERAL & FIXES
|
||||
# ==========================================
|
||||
# Ignore maximize requests from apps. You'll probably like this.
|
||||
# windowrule = suppress_event maximize, match:class .*
|
||||
|
||||
# Fix some dragging issues with XWayland
|
||||
# windowrule = no_focus 1, match:class ^$, match:title ^$, match:xwayland 1, match:floating 1, match:fullscreen 0, match:pinned 0
|
||||
windowrule = no_blur 1, match:class ^$, match:title ^$
|
||||
|
||||
|
||||
# ==========================================
|
||||
# FLOATING & CENTERED DIALOGS
|
||||
# ==========================================
|
||||
# Make them float
|
||||
windowrule = float 1, match:title $dialog_titles
|
||||
windowrule = float 1, match:class $dialog_classes
|
||||
|
||||
# Set to 800x600
|
||||
windowrule = size 800 600, match:title $dialog_titles
|
||||
windowrule = size 800 600, match:class $dialog_classes
|
||||
|
||||
# Center them on the screen
|
||||
windowrule = center 1, match:title $dialog_titles
|
||||
windowrule = center 1, match:class $dialog_classes
|
||||
|
||||
# Disable blur
|
||||
windowrule = no_blur 1, match:title $dialog_titles
|
||||
windowrule = no_blur 1, match:class $dialog_classes
|
||||
|
||||
|
||||
# ==========================================
|
||||
# WORKSPACE ASSIGNMENTS
|
||||
# ==========================================
|
||||
# Normal Workspaces
|
||||
# windowrule = workspace 1, match:class ^(firefox)$
|
||||
# windowrule = workspace 2, match:class ^(kitty)$
|
||||
# windowrule = workspace 3, match:class ^(Code)$
|
||||
windowrule = workspace 1, match:class $gamescope
|
||||
|
||||
# Special Workspaces
|
||||
windowrule = workspace special:virtual, match:class ^(Spotify|spotify)$
|
||||
windowrule = workspace special:discord, match:class ^(discord|vesktop)$
|
||||
|
||||
|
||||
# ==========================================
|
||||
# APP-SPECIFIC RULES: STEAM & GAMING
|
||||
# ==========================================
|
||||
# windowrule = workspace 3 silent, match:class $steam, match:title ^(Steam)$
|
||||
|
||||
# Fixed sizes for specific Steam windows
|
||||
windowrule = size 400 800, match:title ^(Friends List)$, match:class $steam
|
||||
windowrule = size 1000 800, match:title ^(Steam Settings)$, match:class $steam
|
||||
windowrule = size 1000 800, match:title ^(Add Non-Steam Game)$, match:class $steam
|
||||
|
||||
# Float and disable blur for Steam windows that aren't the main window
|
||||
windowrule = float 1, match:class $steam, match:title negative:^(Steam)$
|
||||
windowrule = no_blur 1, match:class $steam, match:title negative:^(Steam)$
|
||||
# windowrule = center 1, match:class $steam, match:title negative:^(Steam)$
|
||||
|
||||
# Allow tearing for games started with Gamescope
|
||||
windowrule = immediate 1, match:class $gamescope
|
||||
68
hypr/scripts/droidcam-ctrl.sh
Executable file
68
hypr/scripts/droidcam-ctrl.sh
Executable file
@@ -0,0 +1,68 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROGRAM_NAME="droidcam-cli"
|
||||
PID_FILE="/tmp/droidcam.pid"
|
||||
ANDROID_SERIAL=988e5035584a354b4430
|
||||
|
||||
start() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is already active."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is starting ..."
|
||||
|
||||
ANDROID_SERIAL=$ANDROID_SERIAL droidcam-cli -a -v -size=1920x1080 adb 4747 &> /dev/null &
|
||||
echo $! > "$PID_FILE"
|
||||
}
|
||||
|
||||
|
||||
stop() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
kill "$PID"
|
||||
rm "$PID_FILE"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME has been stopped."
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
else
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
stop
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
start
|
||||
fi
|
||||
else
|
||||
start
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
toggle)
|
||||
toggle
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|save}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
53
hypr/scripts/lid_handler.sh
Executable file
53
hypr/scripts/lid_handler.sh
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
# ~/.config/hypr/scripts/lid_handler.sh
|
||||
|
||||
# The file that tells Hyprland to keep the lid off during reloads
|
||||
LID_STATE_FILE="$HOME/.config/hypr/lid_state.conf"
|
||||
|
||||
restart_ui() {
|
||||
# Spawn in background and detach
|
||||
systemctl restart --user waybar hyprpaper
|
||||
}
|
||||
|
||||
if [[ "$1" == "close" ]]; then
|
||||
# Check if ANY external monitor is connected and active
|
||||
if hyprctl monitors all | grep -qE "Monitor (DP|HDMI|Type-C)-"; then
|
||||
|
||||
# Prevent laptop screen from turning on during manual config reloads
|
||||
echo "monitor=eDP-1, disable" > "$LID_STATE_FILE"
|
||||
|
||||
# Extract the CURRENT live settings of all external monitors using jq
|
||||
# This grabs the active resolution, refresh rate, position, and scale.
|
||||
LIVE_MONITORS=$(hyprctl -j monitors | jq -c '.[] | select(.name != "eDP-1")')
|
||||
|
||||
# 3. Disable the laptop screen
|
||||
hyprctl keyword monitor "eDP-1, disable"
|
||||
|
||||
# 4. Re-apply the live settings to external monitors so they don't reset
|
||||
echo "$LIVE_MONITORS" | while read -r mon_json; do
|
||||
NAME=$(echo "$mon_json" | jq -r '.name')
|
||||
WIDTH=$(echo "$mon_json" | jq -r '.width')
|
||||
HEIGHT=$(echo "$mon_json" | jq -r '.height')
|
||||
REFRESH=$(echo "$mon_json" | jq -r '.refreshRate')
|
||||
X=$(echo "$mon_json" | jq -r '.x')
|
||||
Y=$(echo "$mon_json" | jq -r '.y')
|
||||
SCALE=$(echo "$mon_json" | jq -r '.scale')
|
||||
|
||||
# Formats it exactly as Hyprland expects: DP-1, 1920x1080@240, 0x0, 1
|
||||
hyprctl keyword monitor "$NAME, ${WIDTH}x${HEIGHT}@${REFRESH}, ${X}x${Y}, $SCALE"
|
||||
done
|
||||
|
||||
# restart ui
|
||||
restart_ui
|
||||
fi
|
||||
|
||||
elif [[ "$1" == "open" ]]; then
|
||||
# Clear the override file so the laptop screen is allowed to turn on again
|
||||
echo "" > "$LID_STATE_FILE"
|
||||
|
||||
# Let Hyprland reload itself.
|
||||
# This automatically re-enables eDP-1 based on your hardcoded hyprland.conf!
|
||||
hyprctl reload
|
||||
|
||||
restart_ui
|
||||
fi
|
||||
104
hypr/scripts/replay-ctrl.sh
Executable file
104
hypr/scripts/replay-ctrl.sh
Executable file
@@ -0,0 +1,104 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROGRAM_NAME="gpu-screen-recorder"
|
||||
PID_FILE="/tmp/gpu-screen-recorder.pid"
|
||||
|
||||
start() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is already active."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
video_path="$HOME/Videos/replay/"
|
||||
mkdir -p "$video_path"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is starting ..."
|
||||
gpu-screen-recorder \
|
||||
-w screen \
|
||||
-f 60 \
|
||||
-a default_output -a default_input \
|
||||
-fm vfr \
|
||||
-c mkv \
|
||||
-encoder gpu \
|
||||
-bm qp \
|
||||
-cr full \
|
||||
-tune quality \
|
||||
-k av1_10bit \
|
||||
-q high \
|
||||
-r 120 \
|
||||
-replay-storage ram \
|
||||
-ab 320 \
|
||||
-cursor yes \
|
||||
-sc "$HOME/.config/hypr/scripts/replay-notification.sh" \
|
||||
-o "$video_path" &> /dev/null &
|
||||
echo $! > "$PID_FILE"
|
||||
}
|
||||
|
||||
stop() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
kill "$PID"
|
||||
rm "$PID_FILE"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME has been stopped."
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
else
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
}
|
||||
|
||||
toggle() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
stop
|
||||
else
|
||||
rm "$PID_FILE" # Stale PID file
|
||||
start
|
||||
fi
|
||||
else
|
||||
start
|
||||
fi
|
||||
}
|
||||
|
||||
save() {
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
pkill -SIGUSR1 -f gpu-screen-recorder
|
||||
else
|
||||
# The process is not running, but the PID file exists.
|
||||
# This can happen if the process crashed.
|
||||
# We'll remove the stale PID file.
|
||||
rm "$PID_FILE"
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
else
|
||||
notify-send -u low "$PROGRAM_NAME" "$PROGRAM_NAME is not running."
|
||||
fi
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
save)
|
||||
save
|
||||
;;
|
||||
toggle)
|
||||
toggle
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|save}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
17
hypr/scripts/replay-notification.sh
Executable file
17
hypr/scripts/replay-notification.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
PROGRAM_NAME="gpu-screen-recorder"
|
||||
|
||||
case "$2" in
|
||||
replay)
|
||||
notify-send -u low "$PROGRAM_NAME" "Replay saved: $1"
|
||||
;;
|
||||
regular)
|
||||
notify-send -u low "$PROGRAM_NAME" "Stream/Video saved: $1"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {saved_file} {replay|regular}"
|
||||
exit 1
|
||||
esac
|
||||
|
||||
exit 0
|
||||
7
hypr/scripts/restart_xdg-desktop-portal-hyprland.sh
Executable file
7
hypr/scripts/restart_xdg-desktop-portal-hyprland.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
sleep 1
|
||||
killall -e xdg-desktop-portal-hyprland
|
||||
killall xdg-desktop-portal
|
||||
/usr/lib/xdg-desktop-portal-hyprland &
|
||||
sleep 2
|
||||
/usr/lib/xdg-desktop-portal &
|
||||
4
hypr/scripts/start_droidcam.sh
Executable file
4
hypr/scripts/start_droidcam.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
scrcpy -d
|
||||
ANDROID_SERIAL=988e5035584a354b4430 droidcam-cli -a -v -size=1920x1080 adb 4747
|
||||
166
hyprpanel/config.json
Normal file
166
hyprpanel/config.json
Normal file
@@ -0,0 +1,166 @@
|
||||
{
|
||||
"log_level": "LOG_LEVEL_INFO",
|
||||
"log_subprocesses_to_journal": false,
|
||||
"dbus": {
|
||||
"enabled": true,
|
||||
"connect_timeout": "20s",
|
||||
"connect_interval": "0.200s",
|
||||
"notifications": {
|
||||
"enabled": true
|
||||
},
|
||||
"systray": {
|
||||
"enabled": true
|
||||
},
|
||||
"shortcuts": {
|
||||
"enabled": true
|
||||
},
|
||||
"brightness": {
|
||||
"enabled": true,
|
||||
"adjust_step_percent": 5,
|
||||
"min_brightness": 1,
|
||||
"enable_logind": true,
|
||||
"hud_notifications": true
|
||||
},
|
||||
"power": {
|
||||
"enabled": true,
|
||||
"low_percent": 10,
|
||||
"critical_percent": 5,
|
||||
"hud_notifications": true
|
||||
}
|
||||
},
|
||||
"audio": {
|
||||
"enabled": true,
|
||||
"volume_step_percent": 5,
|
||||
"volume_exceed_maximum": false,
|
||||
"hud_notifications": true
|
||||
},
|
||||
"panels": [
|
||||
{
|
||||
"id": "panel0",
|
||||
"edge": "EDGE_TOP",
|
||||
"size": 34,
|
||||
"monitor": "",
|
||||
"modules": [
|
||||
{
|
||||
"pager": {
|
||||
"icon_size": 14,
|
||||
"active_monitor_only": false,
|
||||
"scroll_wrap_workspaces": true,
|
||||
"scroll_include_inactive": true,
|
||||
"enable_workspace_names": false,
|
||||
"pinned": [1, 2, 3, 4, 5, 6],
|
||||
"preview_width": 256
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacer": {
|
||||
"size": 8,
|
||||
"expand": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"taskbar": {
|
||||
"icon_size": 24,
|
||||
"active_workspace_only": true,
|
||||
"active_monitor_only": true,
|
||||
"group_tasks": true,
|
||||
"expand": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacer": {
|
||||
"expand": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"clock": {
|
||||
"time_format": "15:04",
|
||||
"date_format": "%a %d %b",
|
||||
"tooltip_time_format": "15:04",
|
||||
"tooltip_date_format": "Monday, 02 January 2006"
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacer": {
|
||||
"expand": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"systray": {
|
||||
"icon_size": 18,
|
||||
"menu_icon_size": 18,
|
||||
"pinned": [
|
||||
"nm-applet"
|
||||
],
|
||||
"modules": [
|
||||
{
|
||||
"power": {
|
||||
"icon_size": 18,
|
||||
"icon_symbolic": true
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacer": {
|
||||
"size": 8,
|
||||
"expand": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"notifications": {
|
||||
"icon_size": 18,
|
||||
"notification_icon_size": 48,
|
||||
"default_timeout": "7s",
|
||||
"position": "POSITION_TOP_RIGHT",
|
||||
"margin": 24
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacer": {
|
||||
"size": 8,
|
||||
"expand": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"audio": {
|
||||
"icon_size": 18,
|
||||
"icon_symbolic": true,
|
||||
"command_mixer": "pavucontrol",
|
||||
"enable_source": true
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacer": {
|
||||
"size": 8,
|
||||
"expand": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"session": {
|
||||
"icon_size": 18,
|
||||
"icon_symbolic": true,
|
||||
"overlay_icon_size": 64,
|
||||
"overlay_icon_symbolic": true,
|
||||
"command_logout": "uwsm stop",
|
||||
"command_reboot": "systemctl reboot",
|
||||
"command_suspend": "systemctl suspend",
|
||||
"command_shutdown": "systemctl poweroff"
|
||||
}
|
||||
},
|
||||
{
|
||||
"spacer": {
|
||||
"size": 8,
|
||||
"expand": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"launch_wrapper": [
|
||||
"uwsm",
|
||||
"app",
|
||||
"--"
|
||||
]
|
||||
}
|
||||
127
hyprpanel/style.css
Normal file
127
hyprpanel/style.css
Normal file
@@ -0,0 +1,127 @@
|
||||
/* Catppuccin Mocha Palette */
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
@define-color surface0 #313244;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color sky #89dceb;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color peach #fab387;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color red #f38ba8;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color rosewater #f5e0dc;
|
||||
|
||||
* {
|
||||
font-family: "JetBrainsMono Nerd Font";
|
||||
font-size: 13px;
|
||||
border: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
window#panel0 {
|
||||
background-color: alpha(@base, 0.7);
|
||||
color: @text;
|
||||
}
|
||||
|
||||
#pager {
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
#pager button {
|
||||
background-color: @surface0;
|
||||
color: @subtext0;
|
||||
border-radius: 12px;
|
||||
margin: 0 2px;
|
||||
padding: 0 12px;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
#pager button.active {
|
||||
background-color: @mauve;
|
||||
color: @base;
|
||||
}
|
||||
|
||||
#pager button:hover {
|
||||
background-color: @surface1;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
#taskbar button {
|
||||
background-color: transparent;
|
||||
color: @subtext1;
|
||||
border-radius: 12px;
|
||||
margin: 0 2px;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
#taskbar button.active {
|
||||
background-color: @surface0;
|
||||
border-bottom: 2px solid @mauve;
|
||||
}
|
||||
|
||||
#clock, #systray, #audio, #session, #notifications {
|
||||
background-color: @surface0;
|
||||
color: @text;
|
||||
border-radius: 15px;
|
||||
margin: 4px 3px;
|
||||
padding: 0 12px;
|
||||
}
|
||||
|
||||
#notifications {
|
||||
color: @yellow;
|
||||
}
|
||||
|
||||
#clock {
|
||||
color: @mauve;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#audio {
|
||||
color: @sapphire;
|
||||
}
|
||||
|
||||
#audio.muted {
|
||||
color: @subtext0;
|
||||
}
|
||||
|
||||
#session {
|
||||
color: @red;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
/* Notifications and HUD */
|
||||
#notifications {
|
||||
background-color: @base;
|
||||
color: @text;
|
||||
border: 1px solid @surface1;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
#hud {
|
||||
background-color: alpha(@base, 0.8);
|
||||
color: @text;
|
||||
border-radius: 20px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#hud .progress-bar {
|
||||
background-color: @surface1;
|
||||
}
|
||||
|
||||
#hud .progress-bar-fill {
|
||||
background-color: @mauve;
|
||||
}
|
||||
@@ -2,8 +2,29 @@
|
||||
application/pdf=org.pwmt.zathura-pdf-poppler.desktop
|
||||
image/jpeg=feh.desktop
|
||||
image/png=feh.desktop
|
||||
x-scheme-handler/http=zen.desktop
|
||||
x-scheme-handler/https=zen.desktop
|
||||
x-scheme-handler/chrome=zen.desktop
|
||||
text/html=zen.desktop
|
||||
application/x-extension-htm=zen.desktop
|
||||
application/x-extension-html=zen.desktop
|
||||
application/x-extension-shtml=zen.desktop
|
||||
application/xhtml+xml=zen.desktop
|
||||
application/x-extension-xhtml=zen.desktop
|
||||
application/x-extension-xht=zen.desktop
|
||||
x-scheme-handler/about=google-chrome.desktop
|
||||
x-scheme-handler/unknown=google-chrome.desktop
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop
|
||||
x-scheme-handler/ror2mm=r2modman.desktop
|
||||
image/webp=feh.desktop
|
||||
|
||||
[Added Associations]
|
||||
application/pdf=org.pwmt.zathura-pdf-poppler.desktop;
|
||||
image/jpeg=feh.desktop;
|
||||
image/png=feh.desktop;
|
||||
x-scheme-handler/http=zen.desktop;
|
||||
x-scheme-handler/https=zen.desktop;
|
||||
text/html=zen.desktop;
|
||||
x-scheme-handler/chrome=zen.desktop;
|
||||
application/vnd.openxmlformats-officedocument.wordprocessingml.document=libreoffice-writer.desktop;
|
||||
image/webp=feh.desktop;
|
||||
|
||||
1
nvim
Submodule
1
nvim
Submodule
Submodule nvim added at 8d657d0f8d
427
nvim/init.lua
427
nvim/init.lua
@@ -1,427 +0,0 @@
|
||||
vim.o.number = true
|
||||
vim.o.wrap = false
|
||||
vim.o.tabstop = 4
|
||||
vim.o.shiftwidth = 4
|
||||
vim.o.smartcase = true
|
||||
vim.o.ignorecase = true
|
||||
vim.o.hlsearch = false
|
||||
vim.o.signcolumn = 'yes'
|
||||
|
||||
vim.g.mapleader = ','
|
||||
|
||||
-- Set up 'mini.deps' (customize to your liking)
|
||||
require('mini.deps').setup()
|
||||
|
||||
local add = MiniDeps.add
|
||||
|
||||
add({
|
||||
source = 'neovim/nvim-lspconfig'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'chomosuke/typst-preview.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'williamboman/mason.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'stevearc/conform.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'williamboman/mason-lspconfig.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'mhartington/formatter.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'mfussenegger/nvim-lint'
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'akinsho/toggleterm.nvim'
|
||||
})
|
||||
|
||||
-- Add to current session (install if absent)
|
||||
add({
|
||||
source = 'neovim/nvim-lspconfig',
|
||||
-- Supply dependencies near target plugin
|
||||
depends = { 'williamboman/mason.nvim' },
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'seblyng/roslyn.nvim',
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'tris203/rzls.nvim',
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'nvim-treesitter/nvim-treesitter',
|
||||
-- Use 'master' while monitoring updates in 'main'
|
||||
checkout = 'master',
|
||||
monitor = 'main',
|
||||
-- Perform action after every checkout
|
||||
hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
|
||||
})
|
||||
|
||||
add({
|
||||
source = 'simrat39/rust-tools.nvim'
|
||||
})
|
||||
|
||||
add({
|
||||
-- Completion framework:
|
||||
source = 'hrsh7th/nvim-cmp',
|
||||
|
||||
-- LSP completion source:
|
||||
depends = {'hrsh7th/cmp-nvim-lsp',
|
||||
'hrsh7th/cmp-nvim-lua',
|
||||
'hrsh7th/cmp-nvim-lsp-signature-help',
|
||||
'hrsh7th/cmp-vsnip',
|
||||
'hrsh7th/cmp-path',
|
||||
'hrsh7th/cmp-buffer',
|
||||
'hrsh7th/vim-vsnip',
|
||||
},
|
||||
})
|
||||
|
||||
add({ source = "catppuccin/nvim", name = "catppuccin" })
|
||||
|
||||
require('mini.files').setup({
|
||||
mappings = {
|
||||
show_help = 'gh',
|
||||
},
|
||||
})
|
||||
require('mini.icons').setup({style = 'ascii'})
|
||||
require('mini.pick').setup({})
|
||||
require('mini.snippets').setup({})
|
||||
require('mini.notify').setup({
|
||||
-- Content management
|
||||
content = {
|
||||
-- Function which formats the notification message
|
||||
-- By default prepends message with notification time
|
||||
format = nil,
|
||||
|
||||
-- Function which orders notification array from most to least important
|
||||
-- By default orders first by level and then by update timestamp
|
||||
sort = nil,
|
||||
},
|
||||
|
||||
-- Notifications about LSP progress
|
||||
lsp_progress = {
|
||||
-- Whether to enable showing
|
||||
enable = true,
|
||||
|
||||
-- Notification level
|
||||
level = 'INFO',
|
||||
|
||||
-- Duration (in ms) of how long last message should be shown
|
||||
duration_last = 1000,
|
||||
},
|
||||
|
||||
-- Window options
|
||||
window = {
|
||||
-- Floating window config
|
||||
config = {
|
||||
},
|
||||
|
||||
-- Maximum window width as share (between 0 and 1) of available columns
|
||||
max_width_share = 0.382,
|
||||
|
||||
-- Value of 'winblend' option
|
||||
winblend = 0,
|
||||
},
|
||||
})
|
||||
require('mini.statusline').setup({})
|
||||
require('mini.tabline').setup({})
|
||||
require('mini.git').setup({})
|
||||
local imap_expr = function(lhs, rhs)
|
||||
vim.keymap.set('i', lhs, rhs, { expr = true })
|
||||
end
|
||||
imap_expr('<Tab>', [[pumvisible() ? "\<C-n>" : "\<Tab>"]])
|
||||
imap_expr('<S-Tab>', [[pumvisible() ? "\<C-p>" : "\<S-Tab>"]])
|
||||
_G.cr_action = function()
|
||||
-- If there is selected item in popup, accept it with <C-y>
|
||||
if vim.fn.complete_info()['selected'] ~= -1 then return '\25' end
|
||||
-- Fall back to plain `<CR>`. You might want to customize according
|
||||
-- to other plugins. For example if 'mini.pairs' is set up, replace
|
||||
-- next line with `return MiniPairs.cr()`
|
||||
return '\r'
|
||||
end
|
||||
|
||||
vim.keymap.set('i', '<CR>', 'v:lua.cr_action()', { expr = true })
|
||||
require("toggleterm").setup{
|
||||
size = function(term)
|
||||
if term.direction == "horizontal" then
|
||||
return 30
|
||||
elseif term.direction == "vertical" then
|
||||
return 69
|
||||
end
|
||||
end,
|
||||
open_mapping = [[<c-\>]],
|
||||
hide_numbers = true,
|
||||
shade_terminals = true,
|
||||
persist_size = true,
|
||||
direction = 'float',
|
||||
close_on_exit = true,
|
||||
shell = vim.o.shell,
|
||||
}
|
||||
|
||||
require('nvim-treesitter.configs').setup {
|
||||
ensure_installed = { "lua", "rust", "toml", "c_sharp" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting=false,
|
||||
},
|
||||
ident = { enable = true },
|
||||
rainbow = {
|
||||
enable = true,
|
||||
extended_mode = true,
|
||||
max_file_lines = nil,
|
||||
}
|
||||
}
|
||||
require("mason").setup({
|
||||
registries = {
|
||||
"github:mason-org/mason-registry",
|
||||
"github:Crashdummyy/mason-registry",
|
||||
},
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗"
|
||||
}
|
||||
}
|
||||
})
|
||||
require("mason-lspconfig").setup()
|
||||
vim.lsp.config('rust_analyzer', {
|
||||
-- Server-specific settings. See `:help lsp-quickstart`
|
||||
settings = {
|
||||
['rust-analyzer'] = {},
|
||||
},
|
||||
})
|
||||
local mason_registry = require("mason-registry")
|
||||
local cmd = {}
|
||||
vim.list_extend(cmd, {
|
||||
"dotnet",
|
||||
vim.fs.joinpath("/home/narl/.local/share/nvim/mason/packages/roslyn", "libexec", "Microsoft.CodeAnalysis.LanguageServer.dll"),
|
||||
"--stdio",
|
||||
"--logLevel=Information",
|
||||
"--extensionLogDirectory=" .. vim.fs.dirname(vim.lsp.get_log_path()),
|
||||
})
|
||||
|
||||
local rzls_path = vim.fs.joinpath("/home/narl/.local/share/nvim/mason/packages/rzls", "libexec")
|
||||
table.insert(
|
||||
cmd,
|
||||
"--razorSourceGenerator=" .. vim.fs.joinpath(rzls_path, "Microsoft.CodeAnalysis.Razor.Compiler.dll")
|
||||
)
|
||||
table.insert(
|
||||
cmd,
|
||||
"--razorDesignTimePath="
|
||||
.. vim.fs.joinpath(rzls_path, "Targets", "Microsoft.NET.Sdk.Razor.DesignTime.targets")
|
||||
)
|
||||
|
||||
vim.lsp.config("roslyn", {
|
||||
cmd = cmd,
|
||||
config = {
|
||||
-- the rest of your Roslyn configuration
|
||||
handlers = require("rzls.roslyn_handlers"),
|
||||
},
|
||||
})
|
||||
vim.lsp.config('nvim-treesitter.configs', {
|
||||
highlight = { enable = true },
|
||||
})
|
||||
|
||||
vim.cmd("au ColorScheme * highlight MiniNotifyNormal guibg=NONE")
|
||||
vim.cmd("au ColorScheme * highlight MiniNotifyTitle guibg=NONE")
|
||||
vim.cmd("au ColorScheme * highlight MiniNotifyBorder guibg=NONE")
|
||||
require("catppuccin").setup({
|
||||
flavour = "auto", -- latte, frappe, macchiato, mocha
|
||||
background = { -- :h background
|
||||
light = "latte",
|
||||
dark = "mocha",
|
||||
},
|
||||
transparent_background = true, -- disables setting the background color.
|
||||
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
|
||||
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
|
||||
dim_inactive = {
|
||||
enabled = false, -- dims the background color of inactive window
|
||||
shade = "dark",
|
||||
percentage = 0.15, -- percentage of the shade to apply to the inactive window
|
||||
},
|
||||
no_italic = false, -- Force no italic
|
||||
no_bold = false, -- Force no bold
|
||||
no_underline = false, -- Force no underline
|
||||
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
|
||||
comments = { "italic" }, -- Change the style of comments
|
||||
conditionals = { "italic" },
|
||||
loops = {},
|
||||
functions = {},
|
||||
keywords = {},
|
||||
strings = {},
|
||||
variables = {},
|
||||
numbers = {},
|
||||
booleans = {},
|
||||
properties = {},
|
||||
types = {},
|
||||
operators = {},
|
||||
-- miscs = {}, -- Uncomment to turn off hard-coded styles
|
||||
},
|
||||
color_overrides = {},
|
||||
custom_highlights = {},
|
||||
default_integrations = true,
|
||||
integrations = {
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
nvimtree = true,
|
||||
treesitter = true,
|
||||
notify = false,
|
||||
mini = {
|
||||
enabled = true,
|
||||
indentscope_color = "",
|
||||
},
|
||||
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
|
||||
},
|
||||
})
|
||||
|
||||
local sign = function(opts)
|
||||
vim.fn.sign_define(opts.name, {
|
||||
texthl = opts.name,
|
||||
text = opts.text,
|
||||
numhl = ''
|
||||
})
|
||||
end
|
||||
|
||||
sign({name = 'DiagnosticSignError', text = ''})
|
||||
sign({name = 'DiagnosticSignWarn', text = ''})
|
||||
sign({name = 'DiagnosticSignHint', text = ''})
|
||||
sign({name = 'DiagnosticSignInfo', text = ''})
|
||||
--Set completeopt to have a better completion experience
|
||||
-- :help completeopt
|
||||
-- menuone: popup even when there's only one match
|
||||
-- noinsert: Do not insert text until a selection is made
|
||||
-- noselect: Do not select, force to select one from the menu
|
||||
-- shortness: avoid showing extra messages when using completion
|
||||
-- updatetime: set updatetime for CursorHold
|
||||
vim.opt.completeopt = {'menuone', 'noselect', 'noinsert'}
|
||||
vim.opt.shortmess = vim.opt.shortmess + { c = true}
|
||||
vim.api.nvim_set_option('updatetime', 300)
|
||||
|
||||
-- Fixed column for diagnostics to appear
|
||||
-- Show autodiagnostic popup on cursor hover_range
|
||||
-- Goto previous / next diagnostic warning / error
|
||||
-- Show inlay_hints more frequently
|
||||
vim.cmd([[
|
||||
set signcolumn=yes
|
||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||
]])
|
||||
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false,
|
||||
signs = true,
|
||||
update_in_insert = true,
|
||||
underline = true,
|
||||
severity_sort = false,
|
||||
float = {
|
||||
border = 'rounded',
|
||||
source = 'always',
|
||||
header = '',
|
||||
prefix = '',
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd([[
|
||||
set signcolumn=yes
|
||||
autocmd CursorHold * lua vim.diagnostic.open_float(nil, { focusable = false })
|
||||
]])
|
||||
|
||||
-- setup must be called before loading
|
||||
vim.cmd.colorscheme "catppuccin"
|
||||
|
||||
vim.keymap.set('n', '<leader>w', '<cmd>write<cr>', {desc = 'Save file'})
|
||||
vim.keymap.set('n', '<leader>q', '<cmd>quitall<cr>', {desc = 'Exit vim'})
|
||||
|
||||
vim.keymap.set({'n', 'x', 'o'}, 'gy', '"+y', {desc = 'Copy to clipboard'})
|
||||
vim.keymap.set({'n', 'x', 'o'}, 'gp', '"+p', {desc = 'Paste clipboard text'})
|
||||
vim.keymap.set('n', '<leader>e', '<cmd>lua MiniFiles.open()<cr>', {desc = 'File explorer'})
|
||||
vim.keymap.set('n', '<leader><space>', '<cmd>Pick buffers<cr>', {desc = 'Search open files'})
|
||||
vim.keymap.set('n', '<leader>ff', '<cmd>Pick files<cr>', {desc = 'Search all files'})
|
||||
vim.keymap.set('n', '<leader>fh', '<cmd>Pick help<cr>', {desc = 'Search help tags'})
|
||||
|
||||
vim.keymap.set('n', '<leader>h', '<cmd>wincmd h<cr>')
|
||||
vim.keymap.set('n', '<leader>l', '<cmd>wincmd l<cr>')
|
||||
vim.keymap.set('n', '<leader>j', '<cmd>wincmd j<cr>')
|
||||
vim.keymap.set('n', '<leader>k', '<cmd>wincmd k<cr>')
|
||||
|
||||
-- Rust
|
||||
--
|
||||
|
||||
local rt = require("rust-tools")
|
||||
|
||||
rt.setup({
|
||||
server = {
|
||||
on_attach = function(_, bufnr)
|
||||
-- Hover actions
|
||||
vim.keymap.set("n", "<C-space>", rt.hover_actions.hover_actions, { buffer = bufnr })
|
||||
-- Code action groups
|
||||
vim.keymap.set("n", "<Leader>a", rt.code_action_group.code_action_group, { buffer = bufnr })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
local cmp = require'cmp'
|
||||
cmp.setup({
|
||||
-- Enable LSP snippets
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
vim.fn["vsnip#anonymous"](args.body)
|
||||
end,
|
||||
},
|
||||
mapping = {
|
||||
['<C-p>'] = cmp.mapping.select_prev_item(),
|
||||
['<C-n>'] = cmp.mapping.select_next_item(),
|
||||
-- Add tab support
|
||||
['<S-Tab>'] = cmp.mapping.select_prev_item(),
|
||||
['<Tab>'] = cmp.mapping.select_next_item(),
|
||||
['<C-S-f>'] = cmp.mapping.scroll_docs(-4),
|
||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||
['<C-Space>'] = cmp.mapping.complete(),
|
||||
['<C-e>'] = cmp.mapping.close(),
|
||||
['<CR>'] = cmp.mapping.confirm({
|
||||
behavior = cmp.ConfirmBehavior.Insert,
|
||||
select = true,
|
||||
})
|
||||
},
|
||||
-- Installed sources:
|
||||
sources = {
|
||||
{ name = 'path' }, -- file paths
|
||||
{ name = 'nvim_lsp', keyword_length = 3 }, -- from language server
|
||||
{ name = 'nvim_lsp_signature_help'}, -- display function signatures with current parameter emphasized
|
||||
{ name = 'nvim_lua', keyword_length = 2}, -- complete neovim's Lua runtime API such vim.lsp.*
|
||||
{ name = 'buffer', keyword_length = 2 }, -- source current buffer
|
||||
{ name = 'vsnip', keyword_length = 2 }, -- nvim-cmp source for vim-vsnip
|
||||
{ name = 'calc'}, -- source for math calculation
|
||||
},
|
||||
window = {
|
||||
completion = cmp.config.window.bordered(),
|
||||
documentation = cmp.config.window.bordered(),
|
||||
},
|
||||
formatting = {
|
||||
fields = {'menu', 'abbr', 'kind'},
|
||||
format = function(entry, item)
|
||||
local menu_icon ={
|
||||
nvim_lsp = 'λ',
|
||||
vsnip = '⋗',
|
||||
buffer = 'Ω',
|
||||
path = '🖫',
|
||||
}
|
||||
item.menu = menu_icon[entry.source.name]
|
||||
return item
|
||||
end,
|
||||
},
|
||||
})
|
||||
Submodule nvim/pack/nvim/start/mini.nvim deleted from ae198e51b9
Submodule nvim/pack/nvim/start/nvim-lspconfig deleted from dbdb80d3bd
6
nvim/pack/vendor/start/setup_nvim.sh
vendored
6
nvim/pack/vendor/start/setup_nvim.sh
vendored
@@ -1,6 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf ~/.config/nvim
|
||||
cp -r nvim ~/.config/
|
||||
git clone https://github.com/neovim/nvim-lspconfig ~/.config/nvim/pack/vendor/start/nvim-lspconfig
|
||||
git clone https://github.com/echasnovski/mini.nvim ~/.config/nvim/pack/vendor/start/mini.nvim
|
||||
BIN
rice-2.png
BIN
rice-2.png
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.8 MiB |
BIN
rice-3.png
Normal file
BIN
rice-3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 658 KiB |
BIN
rice.png
BIN
rice.png
Binary file not shown.
|
Before Width: | Height: | Size: 1011 KiB After Width: | Height: | Size: 1017 KiB |
1
systemd/user/default.target.wants/gcr-ssh-agent.service
Symbolic link
1
systemd/user/default.target.wants/gcr-ssh-agent.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/gcr-ssh-agent.service
|
||||
1
systemd/user/default.target.wants/gdrive-mount.service
Symbolic link
1
systemd/user/default.target.wants/gdrive-mount.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/narl/.config/systemd/user/gdrive-mount.service
|
||||
1
systemd/user/default.target.wants/narl_io_mount.service
Symbolic link
1
systemd/user/default.target.wants/narl_io_mount.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/narl/.config/systemd/user/narl_io_mount.service
|
||||
1
systemd/user/default.target.wants/pipewire-pulse.service
Symbolic link
1
systemd/user/default.target.wants/pipewire-pulse.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/pipewire-pulse.service
|
||||
1
systemd/user/default.target.wants/pipewire.service
Symbolic link
1
systemd/user/default.target.wants/pipewire.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/pipewire.service
|
||||
1
systemd/user/default.target.wants/vaulthunters_mount.service
Symbolic link
1
systemd/user/default.target.wants/vaulthunters_mount.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/home/narl/.config/systemd/user/vaulthunters_mount.service
|
||||
24
systemd/user/gdrive-mount.service
Normal file
24
systemd/user/gdrive-mount.service
Normal file
@@ -0,0 +1,24 @@
|
||||
# ~/.config/systemd/user/rclone-mount.service
|
||||
|
||||
[Unit]
|
||||
Description=Rclone Mount for google drive
|
||||
# This ensures your network is ready before it tries to mount
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
# The command to start the mount.
|
||||
# Replace "my-remote:" and "/path/to/local/mount" accordingly.
|
||||
# The flags below are highly recommended for a good experience.
|
||||
ExecStart=rclone mount google_drive: %h/remote/gdrive \
|
||||
--vfs-cache-mode writes \
|
||||
--log-file /tmp/rclone.log \
|
||||
--log-level INFO
|
||||
|
||||
# The command to unmount gracefully.
|
||||
ExecStop=fusermount -u %h/gdrive
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
# This tells systemd to start the service at user login.
|
||||
WantedBy=default.target
|
||||
1
systemd/user/graphical-session.target.wants/hyprpaper.service
Symbolic link
1
systemd/user/graphical-session.target.wants/hyprpaper.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/hyprpaper.service
|
||||
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/hyprpolkitagent.service
|
||||
1
systemd/user/graphical-session.target.wants/waybar.service
Symbolic link
1
systemd/user/graphical-session.target.wants/waybar.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/waybar.service
|
||||
1
systemd/user/multi-user.target.wants/wayvnc.service
Symbolic link
1
systemd/user/multi-user.target.wants/wayvnc.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/wayvnc.service
|
||||
21
systemd/user/narl_io_mount.service
Normal file
21
systemd/user/narl_io_mount.service
Normal file
@@ -0,0 +1,21 @@
|
||||
# ~/.config/systemd/user/rclone-mount.service
|
||||
|
||||
[Unit]
|
||||
Description=sshfs mount for narl.io server
|
||||
# This ensures your network is ready before it tries to mount
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
# The command to start the mount.
|
||||
# Replace "my-remote:" and "/path/to/local/mount" accordingly.
|
||||
# The flags below are highly recommended for a good experience.
|
||||
ExecStart=sshfs -f -p 420 narl@narl.io:/opt %h/remote/narl.io
|
||||
|
||||
# The command to unmount gracefully.
|
||||
ExecStop=fusermount -u %h/narl_io
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
# This tells systemd to start the service at user login.
|
||||
WantedBy=default.target
|
||||
1
systemd/user/sockets.target.wants/gcr-ssh-agent.socket
Symbolic link
1
systemd/user/sockets.target.wants/gcr-ssh-agent.socket
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/gcr-ssh-agent.socket
|
||||
1
systemd/user/sockets.target.wants/pipewire-pulse.socket
Symbolic link
1
systemd/user/sockets.target.wants/pipewire-pulse.socket
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/pipewire-pulse.socket
|
||||
1
systemd/user/sockets.target.wants/pipewire.socket
Symbolic link
1
systemd/user/sockets.target.wants/pipewire.socket
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/pipewire.socket
|
||||
10
systemd/user/ssh-agent.service
Normal file
10
systemd/user/ssh-agent.service
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=SSH key agent
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket
|
||||
ExecStart=/usr/bin/ssh-agent -a $SSH_AUTH_SOCK
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
22
systemd/user/vaulthunters_mount.service
Normal file
22
systemd/user/vaulthunters_mount.service
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
# ~/.config/systemd/user/rclone-mount.service
|
||||
|
||||
[Unit]
|
||||
Description=sshfs mount for narl.io vaulthunters server
|
||||
# This ensures your network is ready before it tries to mount
|
||||
After=network-online.target
|
||||
|
||||
[Service]
|
||||
# The command to start the mount.
|
||||
# Replace "my-remote:" and "/path/to/local/mount" accordingly.
|
||||
# The flags below are highly recommended for a good experience.
|
||||
ExecStart=sshfs -f -p 420 narl@vh3.narl.io:/opt/minecraft_vaulthunters %h/remote/vh3.narl.io
|
||||
|
||||
# The command to unmount gracefully.
|
||||
ExecStop=fusermount -u %h/vaulthunters_server
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
|
||||
[Install]
|
||||
# This tells systemd to start the service at user login.
|
||||
WantedBy=default.target
|
||||
1
systemd/user/xdg-desktop-autostart.target.wants/sunshine.service
Symbolic link
1
systemd/user/xdg-desktop-autostart.target.wants/sunshine.service
Symbolic link
@@ -0,0 +1 @@
|
||||
/usr/lib/systemd/user/sunshine.service
|
||||
@@ -1,104 +1,188 @@
|
||||
// ~/.config/waybar/config.jsonc
|
||||
{
|
||||
[
|
||||
{
|
||||
"name": "top",
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 35,
|
||||
"modules-left": ["hyprland/workspaces", "hyprland/window"],
|
||||
"modules-center": [],
|
||||
"modules-right": ["tray", "wireplumber", "custom/pixelbuds", "custom/anc", "network", "cpu", "memory", "custom/tlp", "clock", "custom/power"],
|
||||
"height": 34,
|
||||
"spacing": 4,
|
||||
"margin-top": 6,
|
||||
"margin-left": 10,
|
||||
"margin-right": 10,
|
||||
|
||||
"modules-left": [
|
||||
"hyprland/workspaces",
|
||||
"hyprland/window"
|
||||
],
|
||||
"modules-center": [
|
||||
"clock"
|
||||
],
|
||||
"modules-right": [
|
||||
"tray",
|
||||
"custom/gamemode",
|
||||
"custom/power_status"
|
||||
],
|
||||
|
||||
// --- Standard Modules ---
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate"
|
||||
},
|
||||
"hyprland/window": {
|
||||
"format": "{}",
|
||||
"max-length": 35
|
||||
"max-length": 50
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%I:%M %p}",
|
||||
"format-alt": "{:%a, %b %d}",
|
||||
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"
|
||||
},
|
||||
"cpu": {
|
||||
"format": "CPU: {usage}%",
|
||||
"tooltip": true
|
||||
},
|
||||
"memory": {
|
||||
"format": "MEM: {}%"
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
||||
"format-ethernet": "{ifname}: {ipaddr}",
|
||||
"format-disconnected": "Disconnected",
|
||||
"tooltip-format": "{ifname} via {gwaddr}",
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-muted": "Muted ",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"default": ["", ""]
|
||||
},
|
||||
"on-click": "pavucontrol",
|
||||
"scroll-step": 1
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " Muted",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", ""]
|
||||
},
|
||||
"on-click": "pavucontrol"
|
||||
"format": "{:%a %d %b %H:%M}",
|
||||
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
||||
"tooltip": false
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 18,
|
||||
"spacing": 10
|
||||
},
|
||||
"custom/power": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "~/.config/hypr/scripts/powermenu.sh"
|
||||
},
|
||||
"custom/tlp": {
|
||||
|
||||
"custom/gamemode": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/scripts/tlp-profile.sh",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs game",
|
||||
"on-click": "~/.config/hypr/scripts/gamemode.sh & disown",
|
||||
"interval": 1
|
||||
},
|
||||
|
||||
// --- Fluxo-rs Power ---
|
||||
"custom/power_status": {
|
||||
"format": "{} ",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs power",
|
||||
"on-click": "~/.config/hypr/scripts/powermenu.sh & disown",
|
||||
"interval": 5
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "bottom",
|
||||
"layer": "top",
|
||||
"position": "bottom",
|
||||
"height": 34,
|
||||
"spacing": 4,
|
||||
"margin-bottom": 6,
|
||||
"margin-left": 10,
|
||||
"margin-right": 10,
|
||||
|
||||
"modules-left": [
|
||||
"custom/sys",
|
||||
"custom/cpu",
|
||||
"custom/mem",
|
||||
"custom/network",
|
||||
"custom/disk-root"
|
||||
],
|
||||
"modules-center": [
|
||||
],
|
||||
"modules-right": [
|
||||
"custom/bluetooth-audio",
|
||||
"custom/volume",
|
||||
"custom/mic"
|
||||
],
|
||||
|
||||
// --- Fluxo-rs System & Hardware ---
|
||||
"custom/sys": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs sys",
|
||||
"interval": 5
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}%",
|
||||
"format-charging": "{capacity}%",
|
||||
"format-plugged": "{capacity}%",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-full": "{capacity}%",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"custom/pixelbuds": {
|
||||
"custom/cpu": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/pixelbuds.sh",
|
||||
"interval": 5, // Check status every 30 seconds
|
||||
"on-click": "bluetoothctl disconnect B4:23:A2:09:D3:53" // Optional: opens Bluetooth manager on click
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs cpu",
|
||||
"on-click": "zenmonitor & disown",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/anc": {
|
||||
"custom/mem": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/anc_control.sh",
|
||||
"interval": 5, // Check status every 5 seconds
|
||||
"on-click": "~/.config/waybar/scripts/anc_control.sh off", // Left-click
|
||||
"on-click-right": "~/.config/waybar/scripts/anc_control.sh cycle" // Right-click
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mem",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/network": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs net",
|
||||
"interval": 2
|
||||
},
|
||||
|
||||
// --- Fluxo-rs Utilities ---
|
||||
"custom/disk-root": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs disk /",
|
||||
"interval": 30
|
||||
},
|
||||
|
||||
// --- Fluxo-rs Audio & BT ---
|
||||
"custom/volume": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs vol",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+",
|
||||
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs vol --cycle",
|
||||
"on-click-middle": "pavucontrol",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/mic": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mic",
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
|
||||
"on-scroll-up": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%+",
|
||||
"on-scroll-down": "wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 5%-",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs mic --cycle",
|
||||
"on-click-middle": "pavucontrol",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/bluetooth-audio": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt",
|
||||
"on-click": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt menu",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs bt disconnect",
|
||||
"interval": 3
|
||||
}
|
||||
}
|
||||
|
||||
// --- Commented Out Modules ---
|
||||
/*
|
||||
"custom/gpu": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs gpu",
|
||||
"on-click": "lact gui & disown",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/btrfs": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs pool",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/pixelbuds_pro": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds",
|
||||
"on-click": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds connect & disown",
|
||||
"on-click-right": "~/.config/waybar/fluxo-rs/target/release/fluxo-rs buds cycle_anc & disown",
|
||||
"interval": 5
|
||||
},
|
||||
"custom/gpu-screen-recorder": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
||||
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save & disown",
|
||||
"on-click-middle": "nautilus ~/Videos/replay & disown",
|
||||
"on-click": "~/.config/waybar/scripts/toggle-replay.sh & disown",
|
||||
"interval": 1
|
||||
}
|
||||
*/
|
||||
}
|
||||
]
|
||||
|
||||
202
waybar/config.jsonc.new
Normal file
202
waybar/config.jsonc.new
Normal file
@@ -0,0 +1,202 @@
|
||||
// ~/.config/waybar/config.jsonc
|
||||
{
|
||||
"layer": "top",
|
||||
"position": "top",
|
||||
"height": 36,
|
||||
"modules-left": [
|
||||
"hyprland/workspaces"
|
||||
],
|
||||
"modules-center": [
|
||||
],
|
||||
"modules-right": [
|
||||
// "custom/bluetooth-audio",
|
||||
// "custom/pixelbuds_pro",
|
||||
"custom/mem",
|
||||
"custom/cpu",
|
||||
"custom/gpu",
|
||||
"custom/disk-root",
|
||||
"custom/disk-gdrive",
|
||||
"custom/disk-data",
|
||||
"custom/disk-games",
|
||||
// "network",
|
||||
"custom/audio-output",
|
||||
"wireplumber",
|
||||
"tray",
|
||||
"custom/gpu-screen-recorder",
|
||||
"custom/gamemode",
|
||||
"clock"
|
||||
],
|
||||
"hyprland/workspaces": {
|
||||
"format": "{icon}",
|
||||
"on-click": "activate"
|
||||
},
|
||||
"hyprland/window": {
|
||||
"format": "{}",
|
||||
"max-length": 35
|
||||
},
|
||||
"clock": {
|
||||
"format": "{:%a %d %b %H:%M}",
|
||||
"format-alt": false,
|
||||
"on-click-right": "xdg-open https://calendar.proton.me/u/0/month &> /dev/null & disown",
|
||||
"tooltip": false,
|
||||
},
|
||||
"cpu": {
|
||||
"format": "CPU: {usage}%",
|
||||
"tooltip": true,
|
||||
"interval": 1
|
||||
},
|
||||
"memory": {
|
||||
"format": "MEM: {used}/{total}GB",
|
||||
"interval": 3
|
||||
},
|
||||
"network": {
|
||||
"format-wifi": "{essid} ({signalStrength}%): {ipaddr}",
|
||||
"format-ethernet": "{ifname}: {ipaddr}",
|
||||
"format-disconnected": "Disconnected",
|
||||
"tooltip-format": "{ifname} via {gwaddr}"
|
||||
},
|
||||
"wireplumber": {
|
||||
"format": "{volume}% {icon}",
|
||||
"format-muted": "--- ",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"default": ["", "", ""]
|
||||
},
|
||||
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
|
||||
"on-click-right": "~/.config/waybar/scripts/audio.sh cycle",
|
||||
"on-click-middle": "pavucontrol",
|
||||
"scroll-step": 1
|
||||
},
|
||||
|
||||
"custom/bluetooth-audio": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/bluetooth_audio.sh",
|
||||
"interval": 3,
|
||||
"on-click": "~/.config/waybar/scripts/bluetooth_audio.sh disconnect & disown"
|
||||
},
|
||||
|
||||
"pulseaudio": {
|
||||
"format": "{icon} {volume}%",
|
||||
"format-muted": " Muted",
|
||||
"format-icons": {
|
||||
"headphone": "",
|
||||
"hands-free": "",
|
||||
"headset": "",
|
||||
"phone": "",
|
||||
"portable": "",
|
||||
"car": "",
|
||||
"default": ["", ""]
|
||||
},
|
||||
"on-click": "pavucontrol & disown"
|
||||
},
|
||||
"tray": {
|
||||
"icon-size": 18,
|
||||
"spacing": 10
|
||||
},
|
||||
"custom/power": {
|
||||
"format": "",
|
||||
"tooltip": false,
|
||||
"on-click": "~/.config/hypr/scripts/powermenu.sh & disown"
|
||||
},
|
||||
"custom/tlp": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/scripts/tlp-profile.sh",
|
||||
"return-type": "json",
|
||||
"interval": 5
|
||||
},
|
||||
"battery": {
|
||||
"states": {
|
||||
"warning": 30,
|
||||
"critical": 15
|
||||
},
|
||||
"format": "{capacity}%",
|
||||
"format-charging": "{capacity}%",
|
||||
"format-plugged": "{capacity}%",
|
||||
"format-alt": "{time} {icon}",
|
||||
"format-full": "{capacity}%",
|
||||
"format-icons": ["", "", "", "", ""]
|
||||
},
|
||||
"custom/pixelbuds_pro": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/pixelbuds_pro_control.sh",
|
||||
"interval": 5,
|
||||
"on-click": "~/.config/waybar/scripts/pixelbuds_pro_control.sh connect & disown",
|
||||
"on-click-right": "~/.config/waybar/scripts/pixelbuds_pro_control.sh cycle_anc & disown"
|
||||
},
|
||||
"custom/audio-output": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "/home/narl/.config/waybar/scripts/audio.sh show",
|
||||
"on-click": "/home/narl/.config/waybar/scripts/audio.sh cycle & disown",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/gamemode": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/gamemode_status.sh",
|
||||
"on-click": "~/.config/hypr/scripts/gamemode.sh & disown",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/gpu-screen-recorder": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/gpu-screen-recorder-status.sh",
|
||||
"on-click-right": "~/.config/hypr/scripts/replay-ctrl.sh save & disown",
|
||||
"on-click-middle": "nautilus ~/Videos/replay & disown",
|
||||
"on-click": "~/.config/waybar/scripts/toggle-replay.sh & disown",
|
||||
"interval": 1
|
||||
},
|
||||
"custom/gpu": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/gpu_info.sh",
|
||||
"on-click": "lact gui & disown",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/cpu": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/cpu_info.sh",
|
||||
"on-click": "zenmonitor & disown",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/mem": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/memory.sh",
|
||||
"interval": 3
|
||||
},
|
||||
"custom/btrfs": {
|
||||
"format": "{}",
|
||||
"exec": "~/.config/waybar/scripts/btrfs.sh",
|
||||
"return-type": "json",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/disk-root": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/disk_info.sh /",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/disk-gdrive": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/disk_info.sh ~/gdrive",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/disk-data": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/disk_info.sh ~/data",
|
||||
"interval": 30
|
||||
},
|
||||
"custom/disk-games": {
|
||||
"format": "{}",
|
||||
"return-type": "json",
|
||||
"exec": "~/.config/waybar/scripts/disk_info.sh ~/games",
|
||||
"interval": 30
|
||||
}
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# --- CONFIGURATION ---
|
||||
# Your Pixel Buds Pro's MAC Address
|
||||
MAC_ADDRESS="B4:23:A2:09:D3:53"
|
||||
# --- END CONFIGURATION ---
|
||||
|
||||
# First, check if the device is connected using bluetoothctl.
|
||||
if bluetoothctl info "$MAC_ADDRESS" | grep -q "Connected: yes"; then
|
||||
# --- DEVICE IS CONNECTED ---
|
||||
|
||||
# This function gets the current ANC status and formats it for Waybar.
|
||||
get_status() {
|
||||
# Get the mode from pbpctrl. Redirect errors to null in case of a temporary glitch.
|
||||
current_mode=$(pbpctrl get anc 2>/dev/null)
|
||||
|
||||
# Fallback: If pbpctrl fails or returns 'unknown', hide the module.
|
||||
# This handles cases where buds are connected but not fully ready.
|
||||
if [[ $? -ne 0 || "$current_mode" == "unknown (0)"* || -z "$current_mode" ]]; then
|
||||
echo "{}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Set icon and tooltip based on the current mode.
|
||||
case "$current_mode" in
|
||||
"active")
|
||||
icon="ANC: Active"
|
||||
class="anc-active"
|
||||
;;
|
||||
"aware")
|
||||
icon="ANC: Aware"
|
||||
class="anc-aware"
|
||||
;;
|
||||
"off")
|
||||
icon="ANC: Off"
|
||||
class="anc-off"
|
||||
;;
|
||||
*)
|
||||
# Failsafe to hide the module if the mode is unrecognized.
|
||||
echo "{}"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
echo "{\"text\":\"$icon\", \"class\":\"$class\"}"
|
||||
}
|
||||
|
||||
# Handle click actions passed from Waybar.
|
||||
case "$1" in
|
||||
# Right-click: Cycle between active and aware modes.
|
||||
cycle)
|
||||
current_mode=$(pbpctrl get anc 2>/dev/null)
|
||||
if [[ "$current_mode" == "active" ]]; then
|
||||
pbpctrl set anc aware
|
||||
else
|
||||
pbpctrl set anc active
|
||||
fi
|
||||
sleep 0.1 # Brief pause for the state to update.
|
||||
;;
|
||||
# Left-click: Turn ANC off.
|
||||
off)
|
||||
pbpctrl set anc off
|
||||
sleep 0.1 # Brief pause for the state to update.
|
||||
;;
|
||||
esac
|
||||
|
||||
# Always display the current status after any action or on a scheduled interval.
|
||||
get_status
|
||||
|
||||
else
|
||||
# --- DEVICE IS NOT CONNECTED ---
|
||||
# Output an empty JSON object to completely hide the Waybar module.
|
||||
echo "{}"
|
||||
fi
|
||||
40
waybar/scripts/audio.sh
Executable file
40
waybar/scripts/audio.sh
Executable file
@@ -0,0 +1,40 @@
|
||||
#!/bin/bash
|
||||
DEFAULT_SINK=$(pactl info | grep 'Default Sink' | cut -d ' ' -f3)
|
||||
DESCRIPTION=$(pactl list sinks | grep -A2 "Name: $DEFAULT_SINK" | grep "Description:" | cut -d ' ' -f2-)
|
||||
|
||||
|
||||
case $1 in
|
||||
cycle)
|
||||
SINKS=($(pactl list short sinks | awk '{print $2}'))
|
||||
NUM_SINKS=${#SINKS[@]}
|
||||
CURRENT_SINK=$(pactl info | grep 'Default Sink' | cut -d ' ' -f3)
|
||||
|
||||
for i in "${!SINKS[@]}"; do
|
||||
if [[ "${SINKS[$i]}" == "$CURRENT_SINK" ]]; then
|
||||
NEXT_INDEX=$(( (i + 1) % NUM_SINKS ))
|
||||
pactl set-default-sink "${SINKS[$NEXT_INDEX]}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
;;
|
||||
show)
|
||||
TEXT=$(echo "$DESCRIPTION" | cut -c -20)
|
||||
if [ -z "$DESCRIPTION" ]; then
|
||||
DESCRIPTION=$DEFAULT_SINK
|
||||
fi
|
||||
CLASS=""
|
||||
case $(pactl get-sink-mute @DEFAULT_SINK@ | awk '{print $2}') in
|
||||
yes)
|
||||
CLASS="muted"
|
||||
;;
|
||||
no)
|
||||
CLASS="unmuted"
|
||||
;;
|
||||
esac
|
||||
|
||||
printf '{"text": "%s", "tooltip": "%s", "class": "%s"}' "$TEXT" "$DESCRIPTION" "$CLASS"
|
||||
;;
|
||||
*)
|
||||
echo "usage audio.sh {cycle|show}"
|
||||
;;
|
||||
esac
|
||||
118
waybar/scripts/bluetooth_audio.sh
Executable file
118
waybar/scripts/bluetooth_audio.sh
Executable file
@@ -0,0 +1,118 @@
|
||||
#!/bin/bash
|
||||
|
||||
bt-audio-info() {
|
||||
# Check if a MAC address was provided as the first argument.
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <MAC_ADDRESS>"
|
||||
echo "Example: $0 00:11:22:33:AA:BB"
|
||||
exit 1
|
||||
fi
|
||||
MAC_ADDRESS="$1"
|
||||
|
||||
# --- Main Logic ---
|
||||
|
||||
# Construct the PipeWire sink name from the MAC address.
|
||||
# The format is typically: bluez_output.XX_XX_XX_XX_XX_XX.a2dp_sink
|
||||
# We replace colons with underscores for the format.
|
||||
SINK_IDENTIFIER="bluez_output.$(echo "$MAC_ADDRESS" | tr ':' '_')"
|
||||
|
||||
# Use pactl to get the full details for all sinks, then find the one
|
||||
# that contains our device's identifier. We use awk to print the
|
||||
# entire block of text for that specific sink.
|
||||
# We check for a partial match on the sink identifier because the profile
|
||||
# (e.g., .a2dp_sink) can change.
|
||||
sink_info=$(pactl list sinks | awk -v id="$SINK_IDENTIFIER" '/Sink #/ {p=0} $0 ~ "Name: " id {p=1} p')
|
||||
|
||||
# If sink_info is empty, the device might not be an audio sink or isn't connected.
|
||||
if [ -z "$sink_info" ]; then
|
||||
echo "Error: Could not find an active audio sink for MAC ${MAC_ADDRESS}"
|
||||
echo "Please ensure the device is connected and is an audio output device."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get the full block of info for the device from bluetoothctl.
|
||||
device_info=$(bluetoothctl info "$MAC_ADDRESS")
|
||||
|
||||
# --- Parse Information ---
|
||||
|
||||
# Parse bluetoothctl output for general device details.
|
||||
alias=$(echo "$device_info" | rg "Alias:" | cut -d ' ' -f 2-)
|
||||
trusted=$(echo "$device_info" | rg "Trusted:" | awk '{print $2}')
|
||||
battery_raw=$(echo "$device_info" | rg "Battery Percentage:" | awk -F'[()]' '{print $2}')
|
||||
|
||||
# Parse pactl output for audio-specific details.
|
||||
volume=$(echo "$sink_info" | rg "Volume:" | head -n1 | awk '{print $5}')
|
||||
codec=$(echo "$sink_info" | rg -e 'bluetooth.codec|api.bluez5.codec' | awk -F'"' '{print $2}')
|
||||
|
||||
# --- Build and Display Compact Output ---
|
||||
|
||||
# Build the output string with all the information.
|
||||
output_string="${alias} | MAC: ${MAC_ADDRESS}\n"
|
||||
output_string+="Trusted: ${trusted}"
|
||||
|
||||
# Append battery info if available, otherwise show N/A.
|
||||
if [ -n "$battery_raw" ]; then
|
||||
output_string+=" | Bat: ${battery_raw}%"
|
||||
else
|
||||
output_string+=" | Bat: N/A"
|
||||
fi
|
||||
|
||||
output_string+=" | Vol: ${volume} | Codec: ${codec:-N/A}"
|
||||
|
||||
# Print the final, single-line string.
|
||||
echo "$output_string"
|
||||
}
|
||||
|
||||
# Find the MAC address of the first connected device that is an audio sink
|
||||
find_audio_device() {
|
||||
default_sink_name=$(pactl get-default-sink)
|
||||
|
||||
# Check if the default sink is a Bluetooth device. Their names typically
|
||||
# start with "bluez_output.". If not, print a message and exit.
|
||||
if [[ "$default_sink_name" == bluez_output* ]]; then
|
||||
# Extract the MAC address from the sink name.
|
||||
# The format is bluez_output.XX_XX_XX_XX_XX_XX.profile
|
||||
# We extract the middle part and replace underscores with colons.
|
||||
mac_with_underscores=$(echo "$default_sink_name" | cut -d '.' -f 2)
|
||||
mac=$(echo "$mac_with_underscores" | tr '_' ':')
|
||||
echo "$mac"
|
||||
return
|
||||
fi
|
||||
|
||||
# else look for the first bluetooth device that provides a sink
|
||||
bluetoothctl devices Connected | rg '^Device ' | awk '{print $2}' | while read -r mac;
|
||||
do
|
||||
# Check if the device provides the "Audio Sink" service
|
||||
if bluetoothctl info "$mac" | rg -q "0000110b-0000-1000-8000-00805f9b34fb"; then
|
||||
echo "$mac"
|
||||
# If you only want the first audio device found, you can 'break' or 'exit' here.
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
# If the script is called with "disconnect"
|
||||
if [ "$1" == "disconnect" ]; then
|
||||
device_mac=$(find_audio_device)
|
||||
if [ -n "$device_mac" ]; then
|
||||
bluetoothctl disconnect "$device_mac"
|
||||
fi
|
||||
echo "{}"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Main logic to display the device name
|
||||
device_mac=$(find_audio_device)
|
||||
|
||||
if [ -n "$device_mac" ]; then
|
||||
# Get the device alias (name)
|
||||
device_name=$(bluetoothctl info "$device_mac" | rg "Alias:" | cut -d ' ' -f 2-)
|
||||
# Output in Waybar's JSON format
|
||||
tooltip=$(bt-audio-info $device_mac)
|
||||
echo "{\"text\": \"$device_name <span size='large'></span>\", \"tooltip\": \"$tooltip\"}"
|
||||
else
|
||||
# Output empty string when no device is connected
|
||||
echo "{}"
|
||||
fi
|
||||
|
||||
|
||||
45
waybar/scripts/btrfs.sh
Executable file
45
waybar/scripts/btrfs.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Get BTRFS filesystems
|
||||
btrfs_filesystems=$(df -hT | grep btrfs)
|
||||
|
||||
# Initialize variables
|
||||
total_used=0
|
||||
total_size=0
|
||||
|
||||
# Process each BTRFS filesystem
|
||||
while read -r line; do
|
||||
size_str=$(echo "$line" | awk '{print $3}')
|
||||
used_str=$(echo "$line" | awk '{print $4}')
|
||||
|
||||
size=$(echo "$size_str" | sed 's/[GT]//')
|
||||
used=$(echo "$used_str" | sed 's/[GT]//')
|
||||
|
||||
if [[ $size_str == *T ]]; then
|
||||
size=$(awk -v s="$size" 'BEGIN {print s*1024}')
|
||||
fi
|
||||
if [[ $used_str == *T ]]; then
|
||||
used=$(awk -v u="$used" 'BEGIN {print u*1024}')
|
||||
fi
|
||||
|
||||
total_size=$(awk -v total="$total_size" -v size="$size" 'BEGIN {print total+size}')
|
||||
total_used=$(awk -v total="$total_used" -v used="$used" 'BEGIN {print total+used}')
|
||||
|
||||
done <<< "$btrfs_filesystems"
|
||||
|
||||
# Calculate usage percentage
|
||||
usage_percentage=$(awk -v used="$total_used" -v total="$total_size" 'BEGIN {printf "%.0f", (used/total)*100}')
|
||||
|
||||
# Set class based on usage
|
||||
if [ "$usage_percentage" -gt 95 ]; then
|
||||
class="max"
|
||||
elif [ "$usage_percentage" -gt 80 ]; then
|
||||
class="high"
|
||||
else
|
||||
class="normal"
|
||||
fi
|
||||
|
||||
text="$(printf "%.0f" $total_used)G / $(printf "%.0f" $total_size)G"
|
||||
|
||||
# Manually construct the JSON output
|
||||
echo "{\"text\": \"$text\", \"tooltip\": \"\", \"class\": \"$class\"}"
|
||||
22
waybar/scripts/cpu_info.sh
Executable file
22
waybar/scripts/cpu_info.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
USAGE=$(mpstat 1 1 | awk '/Average:/ {print 100 - $12}')
|
||||
TEMP=$(cat /sys/class/hwmon/hwmon6/temp1_input)
|
||||
TEXT="$(printf "%.1f" $(echo "$USAGE"))% $(printf "%.1f" $(echo "scale=2; $TEMP"/1000 | bc -l))C"
|
||||
CPU=$(lscpu | grep 'Model name' | awk -F': ' '{print $2}' | sed 's/^[ \t]*//')
|
||||
# TOOLTIP=$(ps -eo %cpu,comm --sort=-%cpu | head -n 6 | sed '1d' | awk '{output = output sprintf("%.1f%%\t%s\\n", $1, $2)} END {printf "%s", output}')
|
||||
# TOOLTIP=$(ps -eo %cpu,comm --sort=-%cpu | head -n 6 | sed '1d' | awk -v ncores=$(nproc) '{printf "%.1f%%\t%s\n", $1/ncores, $2}')
|
||||
# TOOLTIP=$(ps -eo %cpu,comm --sort=-%cpu | head -n 6 | sed '1d' | awk -v ncores=$(nproc) '{printf "%.1f%%\t%s\\n", $1/ncores, $2}')
|
||||
# TOOLTIP=$(top -b -n 1 | sed '1,7d' | head -n 5 | awk '{output = output sprintf("%.1f%%\t%s\\n", $9, $12)} END {printf "%s", output}')
|
||||
|
||||
CLASS=""
|
||||
|
||||
if (( $(echo "$USAGE > 95" | bc -l) )); then
|
||||
CLASS="max"
|
||||
elif (( $(echo "$USAGE > 75" | bc -l) )); then
|
||||
CLASS="high"
|
||||
else
|
||||
CLASS="normal"
|
||||
fi
|
||||
|
||||
# echo "{\"text\":\"CPU: $TEXT\", \"tooltip\": \"$TOOLTIP\", \"class\":\"$CLASS\"}"
|
||||
echo "{\"text\":\"CPU: $TEXT\", \"class\":\"$CLASS\"}"
|
||||
45
waybar/scripts/cycle_input.sh
Executable file
45
waybar/scripts/cycle_input.sh
Executable file
@@ -0,0 +1,45 @@
|
||||
#!/bin/bash
|
||||
DEFAULT_SOURCE=$(pactl info | grep 'Default Source' | cut -d ' ' -f3)
|
||||
DESCRIPTION=$(pactl list sources | grep -A2 "Name: $DEFAULT_SOURCE" | grep "Description:" | cut -d ' ' -f2-)
|
||||
|
||||
|
||||
case $1 in
|
||||
cycle)
|
||||
# Filter out monitor sources
|
||||
SOURCES=($(pactl list short sources | awk '{print $2}' | grep -v ".monitor"))
|
||||
NUM_SOURCES=${#SOURCES[@]}
|
||||
CURRENT_SOURCE=$(pactl info | grep 'Default Source' | cut -d ' ' -f3)
|
||||
|
||||
for i in "${!SOURCES[@]}"; do
|
||||
if [[ "${SOURCES[$i]}" == "$CURRENT_SOURCE" ]]; then
|
||||
NEXT_INDEX=$(( (i + 1) % NUM_SOURCES ))
|
||||
pactl set-default-source "${SOURCES[$NEXT_INDEX]}"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
# If current source was a monitor or not in list, just pick the first one
|
||||
if [ $NUM_SOURCES -gt 0 ]; then
|
||||
pactl set-default-source "${SOURCES[0]}"
|
||||
fi
|
||||
;;
|
||||
show)
|
||||
TEXT=$(echo "$DESCRIPTION" | cut -c -20)
|
||||
if [ -z "$DESCRIPTION" ]; then
|
||||
DESCRIPTION=$DEFAULT_SOURCE
|
||||
fi
|
||||
CLASS=""
|
||||
case $(pactl get-source-mute @DEFAULT_SOURCE@ | awk '{print $2}') in
|
||||
yes)
|
||||
CLASS="muted"
|
||||
;;
|
||||
no)
|
||||
CLASS="unmuted"
|
||||
;;
|
||||
esac
|
||||
|
||||
printf '{"text": "%s", "tooltip": "%s", "class": "%s"}' "$TEXT" "$DESCRIPTION" "$CLASS"
|
||||
;;
|
||||
*)
|
||||
echo "usage cycle_input.sh {cycle|show}"
|
||||
;;
|
||||
esac
|
||||
31
waybar/scripts/disk_info.sh
Executable file
31
waybar/scripts/disk_info.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -z "$1" ]; then
|
||||
echo "Usage: $0 <mountpoint>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
MOUNTPOINT=$1
|
||||
|
||||
# Get disk usage info
|
||||
USED=$(df -h --output=used "$MOUNTPOINT" | sed '1d' | awk '{print $1}')
|
||||
TOTAL=$(df -h --output=size "$MOUNTPOINT" | sed '1d' | awk '{print $1}')
|
||||
PERCENTAGE=$(df --output=pcent "$MOUNTPOINT" | sed '1d' | tr -d '%' | awk '{print $1}')
|
||||
|
||||
# Set class based on usage
|
||||
CLASS="normal"
|
||||
if [ "$PERCENTAGE" -gt 95 ]; then
|
||||
CLASS="max"
|
||||
elif [ "$PERCENTAGE" -gt 80 ]; then
|
||||
CLASS="high"
|
||||
fi
|
||||
|
||||
# Create tooltip with more details
|
||||
TOOLTIP=$(df -h "$MOUNTPOINT" | sed '1d' | awk '{printf "Used: %s\nTotal: %s\nFree: %s", $3, $2, $4}')
|
||||
|
||||
# Output JSON for Waybar using jq
|
||||
jq -n -c \
|
||||
--arg text "$1 $USED/$TOTAL" \
|
||||
--arg tooltip "$TOOLTIP" \
|
||||
--arg class "$CLASS" \
|
||||
'{"text": $text, "tooltip": $tooltip, "class": $class}'
|
||||
10
waybar/scripts/gamemode_status.sh
Executable file
10
waybar/scripts/gamemode_status.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
FORMAT_ACTIVATED="<span size='large'></span>"
|
||||
FORMAT_DEACTIVATED="<span size='large'></span>"
|
||||
HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}')
|
||||
if [ "$HYPRGAMEMODE" = 1 ] ; then
|
||||
printf "{\"text\": \"$FORMAT_DEACTIVATED\", \"tooltip\": \"Gamemode deactivated\"}"
|
||||
else
|
||||
printf "{\"text\": \"$FORMAT_ACTIVATED\", \"tooltip\": \"Gamemode activated\", \"class\": \"active\"}"
|
||||
fi
|
||||
20
waybar/scripts/gpu-screen-recorder-status.sh
Executable file
20
waybar/scripts/gpu-screen-recorder-status.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
PID_FILE="/tmp/gpu-screen-recorder.pid"
|
||||
FORMAT_RECORDING="<span size='large'></span>"
|
||||
FORMAT_STOPPED="<span size='large'></span>"
|
||||
|
||||
if [ -f "$PID_FILE" ]; then
|
||||
PID=$(cat "$PID_FILE")
|
||||
if ps -p "$PID" > /dev/null; then
|
||||
echo "{\"text\": \"$FORMAT_RECORDING\", \"tooltip\": \"Replay running\", \"class\": \"recording\"}"
|
||||
else
|
||||
# The process is not running, but the PID file exists.
|
||||
# This can happen if the process crashed.
|
||||
# We'll remove the stale PID file.
|
||||
rm "$PID_FILE"
|
||||
echo "{\"text\": \"$FORMAT_STOPPED\", \"tooltip\": \"Replay paused\"}"
|
||||
fi
|
||||
else
|
||||
echo "{\"text\": \"$FORMAT_STOPPED\", \"tooltip\": \"Replay paused\"}"
|
||||
fi
|
||||
22
waybar/scripts/gpu_info.sh
Executable file
22
waybar/scripts/gpu_info.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
USAGE=$(cat /sys/class/drm/card1/device/gpu_busy_percent)
|
||||
MEM_USED=$(cat /sys/class/drm/card1/device/mem_info_vram_used)
|
||||
MEM_TOTAL=$(cat /sys/class/drm/card1/device/mem_info_vram_total)
|
||||
EDGE_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp1_input)
|
||||
JUNC_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp2_input)
|
||||
MEM_TEMP=$(cat /sys/class/drm/card1/device/hwmon/hwmon2/temp3_input)
|
||||
GPU=$(/opt/rocm/bin/rocm-smi --showproductname | grep "Card Series" | awk -F':' '{print $3}' | xargs)
|
||||
TEXT="$USAGE% $(printf "%.1f" $(echo "scale=2; $MEM_USED/1024/1024/1024" | bc -l))/$(printf "%.1f" $(echo "scale=2; $MEM_TOTAL/1024/1024/1024" | bc -l))GB $(printf "%.1f" $(echo "scale=2; $EDGE_TEMP/1000" | bc -l))/$(printf "%.1f" $(echo "scale=2; $MEM_TEMP/1000" | bc -l))C"
|
||||
RATIO=$(echo "$MEM_USED/ $MEM_TOTAL" | bc -l)
|
||||
|
||||
CLASS=""
|
||||
|
||||
if (( $(echo "$USAGE > 95" | bc -l) )); then
|
||||
CLASS="max"
|
||||
elif (( $(echo "$USAGE > 75" | bc -l) )); then
|
||||
CLASS="high"
|
||||
else
|
||||
CLASS="normal"
|
||||
fi
|
||||
|
||||
echo "{\"text\":\"GPU: $TEXT\", \"tooltip\": \"$GPU\", \"class\":\"$CLASS\"}"
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user