mirror of
https://github.com/Dichgrem/dotfiles.git
synced 2025-07-31 00:59:31 -04:00
Compare commits
3 Commits
8f62614b3d
...
8aeb0c38b9
Author | SHA1 | Date | |
---|---|---|---|
8aeb0c38b9 | |||
c1725285b8 | |||
6a1e94e6b6 |
@ -1,137 +0,0 @@
|
|||||||
## Source from conf.d before our fish config
|
|
||||||
source ~/.config/fish/conf.d/done.fish
|
|
||||||
|
|
||||||
## Set values
|
|
||||||
## Run fastfetch as welcome message
|
|
||||||
function fish_greeting
|
|
||||||
fastfetch
|
|
||||||
end
|
|
||||||
|
|
||||||
# Format man pages
|
|
||||||
set -x MANROFFOPT -c
|
|
||||||
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
|
||||||
|
|
||||||
# Set settings for https://github.com/franciscolourenco/done
|
|
||||||
set -U __done_min_cmd_duration 10000
|
|
||||||
set -U __done_notification_urgency_level low
|
|
||||||
|
|
||||||
## Environment setup
|
|
||||||
# Apply .profile: use this to put fish compatible .profile stuff in
|
|
||||||
if test -f ~/.fish_profile
|
|
||||||
source ~/.fish_profile
|
|
||||||
end
|
|
||||||
|
|
||||||
# Add ~/.local/bin to PATH
|
|
||||||
if test -d ~/.local/bin
|
|
||||||
if not contains -- ~/.local/bin $PATH
|
|
||||||
set -p PATH ~/.local/bin
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
# Add depot_tools to PATH
|
|
||||||
if test -d ~/Applications/depot_tools
|
|
||||||
if not contains -- ~/Applications/depot_tools $PATH
|
|
||||||
set -p PATH ~/Applications/depot_tools
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
## Functions
|
|
||||||
# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
|
|
||||||
function __history_previous_command
|
|
||||||
switch (commandline -t)
|
|
||||||
case "!"
|
|
||||||
commandline -t $history[1]
|
|
||||||
commandline -f repaint
|
|
||||||
case "*"
|
|
||||||
commandline -i !
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
function __history_previous_command_arguments
|
|
||||||
switch (commandline -t)
|
|
||||||
case "!"
|
|
||||||
commandline -t ""
|
|
||||||
commandline -f history-token-search-backward
|
|
||||||
case "*"
|
|
||||||
commandline -i '$'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if [ "$fish_key_bindings" = fish_vi_key_bindings ]
|
|
||||||
|
|
||||||
bind -Minsert ! __history_previous_command
|
|
||||||
bind -Minsert '$' __history_previous_command_arguments
|
|
||||||
else
|
|
||||||
bind ! __history_previous_command
|
|
||||||
bind '$' __history_previous_command_arguments
|
|
||||||
end
|
|
||||||
|
|
||||||
# Fish command history
|
|
||||||
function history
|
|
||||||
builtin history --show-time='%F %T '
|
|
||||||
end
|
|
||||||
|
|
||||||
function backup --argument filename
|
|
||||||
cp $filename $filename.bak
|
|
||||||
end
|
|
||||||
|
|
||||||
# Copy DIR1 DIR2
|
|
||||||
function copy
|
|
||||||
set count (count $argv | tr -d \n)
|
|
||||||
if test "$count" = 2; and test -d "$argv[1]"
|
|
||||||
set from (echo $argv[1] | trim-right /)
|
|
||||||
set to (echo $argv[2])
|
|
||||||
command cp -r $from $to
|
|
||||||
else
|
|
||||||
command cp $argv
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
## Useful aliases
|
|
||||||
# Replace ls with eza
|
|
||||||
alias ls='eza -al --color=always --group-directories-first --icons' # preferred listing
|
|
||||||
alias la='eza -a --color=always --group-directories-first --icons' # all files and dirs
|
|
||||||
alias ll='eza -l --color=always --group-directories-first --icons' # long format
|
|
||||||
alias lt='eza -aT --color=always --group-directories-first --icons' # tree listing
|
|
||||||
alias l.="eza -a | grep -e '^\.'" # show only dotfiles
|
|
||||||
|
|
||||||
# Common use
|
|
||||||
alias grubup="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
|
||||||
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
|
|
||||||
alias tarnow='tar -acf '
|
|
||||||
alias untar='tar -zxvf '
|
|
||||||
alias wget='wget -c '
|
|
||||||
alias psmem='ps auxf | sort -nr -k 4'
|
|
||||||
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
|
|
||||||
alias ..='cd ..'
|
|
||||||
alias ...='cd ../..'
|
|
||||||
alias ....='cd ../../..'
|
|
||||||
alias .....='cd ../../../..'
|
|
||||||
alias ......='cd ../../../../..'
|
|
||||||
alias dir='dir --color=auto'
|
|
||||||
alias vdir='vdir --color=auto'
|
|
||||||
alias grep='grep --color=auto'
|
|
||||||
alias fgrep='fgrep --color=auto'
|
|
||||||
alias egrep='egrep --color=auto'
|
|
||||||
alias hw='hwinfo --short' # Hardware Info
|
|
||||||
alias big="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages according to size in MB
|
|
||||||
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' # List amount of -git packages
|
|
||||||
alias update='sudo pacman -Syu'
|
|
||||||
|
|
||||||
# Get fastest mirrors
|
|
||||||
alias mirror="sudo cachyos-rate-mirrors"
|
|
||||||
|
|
||||||
# Help people new to Arch
|
|
||||||
alias apt='man pacman'
|
|
||||||
alias apt-get='man pacman'
|
|
||||||
alias please='sudo'
|
|
||||||
alias tb='nc termbin.com 9999'
|
|
||||||
|
|
||||||
# Cleanup orphaned packages
|
|
||||||
alias cleanup='sudo pacman -Rns (pacman -Qtdq)'
|
|
||||||
|
|
||||||
# Get the error messages from journalctl
|
|
||||||
alias jctl="journalctl -p 3 -xb"
|
|
||||||
|
|
||||||
# Recent installed packages
|
|
||||||
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
|
|
136
fish/config.fish
136
fish/config.fish
@ -1,7 +1,131 @@
|
|||||||
source ~/.config/fish/cachyos-config.fish
|
## Source from conf.d before our fish config
|
||||||
|
source ~/.config/fish/conf.d/done.fish
|
||||||
atuin init fish | source
|
atuin init fish | source
|
||||||
# overwrite greeting
|
## Set values
|
||||||
# potentially disabling fastfetch
|
## Run fastfetch as welcome message
|
||||||
#function fish_greeting
|
function fish_greeting
|
||||||
# # smth smth
|
fastfetch
|
||||||
#end
|
end
|
||||||
|
|
||||||
|
# Format man pages
|
||||||
|
set -x MANROFFOPT -c
|
||||||
|
set -x MANPAGER "sh -c 'col -bx | bat -l man -p'"
|
||||||
|
|
||||||
|
# Set settings for https://github.com/franciscolourenco/done
|
||||||
|
set -U __done_min_cmd_duration 10000
|
||||||
|
set -U __done_notification_urgency_level low
|
||||||
|
|
||||||
|
## Environment setup
|
||||||
|
# Apply .profile: use this to put fish compatible .profile stuff in
|
||||||
|
if test -f ~/.fish_profile
|
||||||
|
source ~/.fish_profile
|
||||||
|
end
|
||||||
|
|
||||||
|
# Add ~/.local/bin to PATH
|
||||||
|
if test -d ~/.local/bin
|
||||||
|
if not contains -- ~/.local/bin $PATH
|
||||||
|
set -p PATH ~/.local/bin
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
# Add depot_tools to PATH
|
||||||
|
if test -d ~/Applications/depot_tools
|
||||||
|
if not contains -- ~/Applications/depot_tools $PATH
|
||||||
|
set -p PATH ~/Applications/depot_tools
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
## Functions
|
||||||
|
# Functions needed for !! and !$ https://github.com/oh-my-fish/plugin-bang-bang
|
||||||
|
function __history_previous_command
|
||||||
|
switch (commandline -t)
|
||||||
|
case "!"
|
||||||
|
commandline -t $history[1]
|
||||||
|
commandline -f repaint
|
||||||
|
case "*"
|
||||||
|
commandline -i !
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function __history_previous_command_arguments
|
||||||
|
switch (commandline -t)
|
||||||
|
case "!"
|
||||||
|
commandline -t ""
|
||||||
|
commandline -f history-token-search-backward
|
||||||
|
case "*"
|
||||||
|
commandline -i '$'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if [ "$fish_key_bindings" = fish_vi_key_bindings ]
|
||||||
|
|
||||||
|
bind -Minsert ! __history_previous_command
|
||||||
|
bind -Minsert '$' __history_previous_command_arguments
|
||||||
|
else
|
||||||
|
bind ! __history_previous_command
|
||||||
|
bind '$' __history_previous_command_arguments
|
||||||
|
end
|
||||||
|
|
||||||
|
# Fish command history
|
||||||
|
function history
|
||||||
|
builtin history --show-time='%F %T '
|
||||||
|
end
|
||||||
|
|
||||||
|
function backup --argument filename
|
||||||
|
cp $filename $filename.bak
|
||||||
|
end
|
||||||
|
|
||||||
|
# Copy DIR1 DIR2
|
||||||
|
function copy
|
||||||
|
set count (count $argv | tr -d \n)
|
||||||
|
if test "$count" = 2; and test -d "$argv[1]"
|
||||||
|
set from (echo $argv[1] | trim-right /)
|
||||||
|
set to (echo $argv[2])
|
||||||
|
command cp -r $from $to
|
||||||
|
else
|
||||||
|
command cp $argv
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
## Useful aliases
|
||||||
|
# Replace ls with eza
|
||||||
|
alias ls='eza -al --color=always --group-directories-first --icons' # preferred listing
|
||||||
|
alias la='eza -a --color=always --group-directories-first --icons' # all files and dirs
|
||||||
|
alias ll='eza -l --color=always --group-directories-first --icons' # long format
|
||||||
|
alias lt='eza -aT --color=always --group-directories-first --icons' # tree listing
|
||||||
|
alias l.="eza -a | grep -e '^\.'" # show only dotfiles
|
||||||
|
|
||||||
|
# Common use
|
||||||
|
alias grubup="sudo grub-mkconfig -o /boot/grub/grub.cfg"
|
||||||
|
alias fixpacman="sudo rm /var/lib/pacman/db.lck"
|
||||||
|
alias tarnow='tar -acf '
|
||||||
|
alias untar='tar -zxvf '
|
||||||
|
alias wget='wget -c '
|
||||||
|
alias psmem='ps auxf | sort -nr -k 4'
|
||||||
|
alias psmem10='ps auxf | sort -nr -k 4 | head -10'
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias ...='cd ../..'
|
||||||
|
alias ....='cd ../../..'
|
||||||
|
alias .....='cd ../../../..'
|
||||||
|
alias ......='cd ../../../../..'
|
||||||
|
alias dir='dir --color=auto'
|
||||||
|
alias vdir='vdir --color=auto'
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
alias hw='hwinfo --short' # Hardware Info
|
||||||
|
alias big="expac -H M '%m\t%n' | sort -h | nl" # Sort installed packages according to size in MB
|
||||||
|
alias gitpkg='pacman -Q | grep -i "\-git" | wc -l' # List amount of -git packages
|
||||||
|
alias update='sudo pacman -Syu'
|
||||||
|
|
||||||
|
# Get fastest mirrors
|
||||||
|
alias mirror="sudo cachyos-rate-mirrors"
|
||||||
|
|
||||||
|
# Cleanup orphaned packages
|
||||||
|
alias cleanup='sudo pacman -Rns (pacman -Qtdq)'
|
||||||
|
|
||||||
|
# Get the error messages from journalctl
|
||||||
|
alias jctl="journalctl -p 3 -xb"
|
||||||
|
|
||||||
|
# Recent installed packages
|
||||||
|
alias rip="expac --timefmt='%Y-%m-%d %T' '%l\t%n %v' | sort | tail -200 | nl"
|
||||||
|
@ -9,6 +9,7 @@ exec-once = swww-daemon
|
|||||||
exec-once = waybar &
|
exec-once = waybar &
|
||||||
exec-once = fcitx5 -d &
|
exec-once = fcitx5 -d &
|
||||||
exec-once = swayosd-server
|
exec-once = swayosd-server
|
||||||
|
exec-once = wl-clip-persist --clipboard regular
|
||||||
# exec-once = mako &
|
# exec-once = mako &
|
||||||
exec-once = nm-applet --indicator &
|
exec-once = nm-applet --indicator &
|
||||||
exec-once = bash -c "mkfifo /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob && tail -f /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob | wob & disown" &
|
exec-once = bash -c "mkfifo /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob && tail -f /tmp/$HYPRLAND_INSTANCE_SIGNATURE.wob | wob & disown" &
|
||||||
|
@ -10,8 +10,8 @@ monitor = eDP-1, 2560x1600@165, auto, 1.25
|
|||||||
|
|
||||||
# If you need to scale things like steam etc, please uncomment these lines.
|
# If you need to scale things like steam etc, please uncomment these lines.
|
||||||
# Adjust GDK_SCALE accordingly to your liking.
|
# Adjust GDK_SCALE accordingly to your liking.
|
||||||
#xwayland {
|
xwayland {
|
||||||
# force_zero_scaling = true # Unscale XWayland
|
force_zero_scaling = true # Unscale XWayland
|
||||||
#}
|
}
|
||||||
|
|
||||||
#env = GDK_SCALE, 1.25 # GDK Scaling Factor
|
env = GDK_SCALE, 1.25 # GDK Scaling Factor
|
||||||
|
@ -2,15 +2,15 @@
|
|||||||
"layer": "top",
|
"layer": "top",
|
||||||
"position": "top",
|
"position": "top",
|
||||||
//"height": 20,
|
//"height": 20,
|
||||||
"margin-left": 10,
|
"margin-left": 0,
|
||||||
"margin-bottom": 0,
|
"margin-bottom": 0,
|
||||||
"margin-right": 10,
|
"margin-right": 0,
|
||||||
"spacing": 8,
|
"spacing": 8,
|
||||||
"modules-left": [
|
"modules-left": [
|
||||||
"custom/startmenu",
|
"custom/startmenu",
|
||||||
"backlight",
|
"backlight",
|
||||||
|
"wireplumber",
|
||||||
"battery",
|
"battery",
|
||||||
// "network",
|
|
||||||
"hyprland/workspaces",
|
"hyprland/workspaces",
|
||||||
"niri/workspaces",
|
"niri/workspaces",
|
||||||
"sway/workspaces"
|
"sway/workspaces"
|
||||||
@ -21,9 +21,8 @@
|
|||||||
"modules-right": [
|
"modules-right": [
|
||||||
"custom/screenshot",
|
"custom/screenshot",
|
||||||
"tray",
|
"tray",
|
||||||
"custom/wl-gammarelay-brightness",
|
// "custom/wl-gammarelay-brightness",
|
||||||
"custom/wl-gammarelay-temperature",
|
// "custom/wl-gammarelay-temperature",
|
||||||
"wireplumber",
|
|
||||||
"clock",
|
"clock",
|
||||||
"custom/swaync",
|
"custom/swaync",
|
||||||
],
|
],
|
||||||
@ -59,16 +58,7 @@
|
|||||||
"format-plugged": " {capacity}%",
|
"format-plugged": " {capacity}%",
|
||||||
"format-icons": ["", "", "", "", ""],
|
"format-icons": ["", "", "", "", ""],
|
||||||
},
|
},
|
||||||
/*
|
|
||||||
"network": {
|
|
||||||
"interval": 3,
|
|
||||||
"format": "{bandwidthUpBytes} {bandwidthDownBytes}",
|
|
||||||
"format-disconnected": " ",
|
|
||||||
"on-click": "alacritty -e zenith",
|
|
||||||
"on-click-right": "corestats",
|
|
||||||
"tooltip-format": "{ifname}\n{ipaddr}/{cidr}\n",
|
|
||||||
},
|
|
||||||
*/
|
|
||||||
"hyprland/workspaces": {
|
"hyprland/workspaces": {
|
||||||
"all-outputs": true,
|
"all-outputs": true,
|
||||||
"format": "{name}",
|
"format": "{name}",
|
||||||
@ -96,7 +86,7 @@
|
|||||||
"on-click": "activate",
|
"on-click": "activate",
|
||||||
"on-click-middle": "close",
|
"on-click-middle": "close",
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
"custom/screenshot": {
|
"custom/screenshot": {
|
||||||
"format": " ",
|
"format": " ",
|
||||||
"on-click": "sh ~/.config/waybar/scripts/Screenshot-Area.sh",
|
"on-click": "sh ~/.config/waybar/scripts/Screenshot-Area.sh",
|
||||||
@ -104,7 +94,7 @@
|
|||||||
"on-click-middle": "sh ~/.config/waybar/scripts/Screenshot-Fullscreen.sh",
|
"on-click-middle": "sh ~/.config/waybar/scripts/Screenshot-Fullscreen.sh",
|
||||||
"tooltip": false,
|
"tooltip": false,
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
"tray": {
|
"tray": {
|
||||||
"spacing": 8,
|
"spacing": 8,
|
||||||
},
|
},
|
||||||
@ -127,7 +117,6 @@
|
|||||||
"on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100",
|
"on-scroll-down": "busctl --user -- call rs.wl-gammarelay / rs.wl.gammarelay UpdateTemperature n -100",
|
||||||
"tooltip": false
|
"tooltip": false
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
"wireplumber": {
|
"wireplumber": {
|
||||||
"on-click": "pwvucontrol",
|
"on-click": "pwvucontrol",
|
||||||
@ -144,12 +133,13 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
"wireplumber": {
|
"wireplumber": {
|
||||||
"on-click": "pwvucontrol",
|
"on-click": "pwvucontrol",
|
||||||
"on-click-right": "easyeffects",
|
"on-click-right": "easyeffects",
|
||||||
"on-click-middle": "pamixer -t && swayosd-client --output-volume mute-toggle",
|
"on-click-middle": "pamixer -t && swayosd-client --output-volume mute-toggle",
|
||||||
"on-scroll-down": "pamixer -d 2 && swayosd-client --output-volume -2",
|
"on-scroll-down": "pamixer -d 1 && swayosd-client --output-volume -1",
|
||||||
"on-scroll-up": "pamixer -i 2 && swayosd-client --output-volume +2",
|
"on-scroll-up": "pamixer -i 1 && swayosd-client --output-volume +1",
|
||||||
"format": "{icon} {volume}%",
|
"format": "{icon} {volume}%",
|
||||||
"format-muted": "MUTE",
|
"format-muted": "MUTE",
|
||||||
"format-source": "",
|
"format-source": "",
|
||||||
@ -158,14 +148,22 @@
|
|||||||
"default": ["", "", ""]
|
"default": ["", "", ""]
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
"clock": {
|
"clock": {
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"align": 0,
|
"align": 0,
|
||||||
"rotate": 0,
|
"rotate": 0,
|
||||||
"tooltip-format": "<tt><big>{calendar}</big></tt>",
|
"tooltip-format": "<tt><big>{calendar}</big></tt>",
|
||||||
"format": " {:%H:%M}",
|
"format": " {:%d.%m.%Y}",
|
||||||
"format-alt": " {:%a %b %d, %G}",
|
"format-alt": " {:%b%d %a,%G}",
|
||||||
|
},
|
||||||
|
*/
|
||||||
|
"clock": {
|
||||||
|
"interval": 60,
|
||||||
|
"align": 0,
|
||||||
|
"rotate": 0,
|
||||||
|
"format": " {:%a %d %H:%M}",
|
||||||
|
"tooltip-format": "<tt><big>{:%A, %d %B %Y}</big></tt>",
|
||||||
},
|
},
|
||||||
|
|
||||||
"custom/swaync": {
|
"custom/swaync": {
|
||||||
@ -184,4 +182,3 @@
|
|||||||
"escape": true,
|
"escape": true,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user