mirror of
https://github.com/donovanglover/nix-config.git
synced 2025-01-29 09:08:37 +01:00
Update fish config
Setting XDG_CURRENT_DESKTOP and QT_FONT_DPI lets us run KDE applications in bspwm with near-identical settings without starting plasmashell.
This commit is contained in:
parent
f332ba6c10
commit
4e65100b5e
@ -7,6 +7,9 @@ export VISUAL="nvim"
|
|||||||
export EDITOR="nvim"
|
export EDITOR="nvim"
|
||||||
export BROWSER="firefox"
|
export BROWSER="firefox"
|
||||||
|
|
||||||
|
export XDG_CURRENT_DESKTOP="KDE"
|
||||||
|
export QT_FONT_DPI="192"
|
||||||
|
|
||||||
# Use rg instead of ag / ack / grep for fzf (much faster)
|
# Use rg instead of ag / ack / grep for fzf (much faster)
|
||||||
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
|
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"'
|
||||||
export FZF_DEFAULT_OPTS='--height 40% --reverse --border --color=16'
|
export FZF_DEFAULT_OPTS='--height 40% --reverse --border --color=16'
|
||||||
@ -34,6 +37,7 @@ if not set -q set_abbr
|
|||||||
abbr gd "git diff" # Show all file changes not staged yet
|
abbr gd "git diff" # Show all file changes not staged yet
|
||||||
abbr gds "git diff --staged" # Show changes staged but not committed
|
abbr gds "git diff --staged" # Show changes staged but not committed
|
||||||
abbr gg "git grep"
|
abbr gg "git grep"
|
||||||
|
abbr gi "git init"
|
||||||
abbr gl "git log --oneline --decorate --all --graph -n 10"
|
abbr gl "git log --oneline --decorate --all --graph -n 10"
|
||||||
abbr gp "git push" # Push your commits to a remote server
|
abbr gp "git push" # Push your commits to a remote server
|
||||||
abbr gs "git status"
|
abbr gs "git status"
|
||||||
@ -43,18 +47,25 @@ if not set -q set_abbr
|
|||||||
abbr grh "git reset HEAD"
|
abbr grh "git reset HEAD"
|
||||||
abbr grr "git reset --hard HEAD~" # Remove the last commit and all changes with it
|
abbr grr "git reset --hard HEAD~" # Remove the last commit and all changes with it
|
||||||
|
|
||||||
|
abbr t "task"
|
||||||
|
abbr ta "task add"
|
||||||
|
abbr te "task edit"
|
||||||
|
abbr tc "task completed"
|
||||||
|
|
||||||
abbr dl "youtube-dl"
|
abbr dl "youtube-dl"
|
||||||
abbr back "feh --no-fehbg --bg-fill" # Change the background temporarily
|
abbr back "feh --bg-fill" # Change the background
|
||||||
abbr vol "amixer set 'Master' " # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
|
abbr vol "amixer set 'Master'" # Change the volume, e.g. vol 10%+, vol 10%-, vol 100%
|
||||||
abbr copy "xclip -sel clip < " # Easily copy the contents of any file
|
abbr copy "xclip -sel clip <" # Easily copy the contents of any file
|
||||||
abbr dog "pygmentize -g" # "dog" is a colorful version of cat
|
abbr dog "pygmentize -g" # "dog" is a colorful version of cat
|
||||||
|
abbr cf "tput reset" # Clear the terminal completely
|
||||||
|
|
||||||
abbr c "clear" # Because 5 letters is too much
|
abbr c "clear" # Because 5 letters is too much
|
||||||
|
abbr e "exit"
|
||||||
abbr l "ls -l"
|
abbr l "ls -l"
|
||||||
abbr t "tree"
|
|
||||||
abbr f "launch feh --auto-zoom" # Easy image viewing with f
|
abbr f "launch feh --auto-zoom" # Easy image viewing with f
|
||||||
abbr z "launch zathura" # Easy document browsing with z
|
abbr z "launch zathura" # Easy document browsing with z
|
||||||
abbr m "launch mpv" # Easy media playing with m
|
abbr m "launch mpv" # Easy media playing with m
|
||||||
|
abbr T "tree"
|
||||||
|
|
||||||
abbr lium "launch chromium" # Launch chromium separate from the terminal
|
abbr lium "launch chromium" # Launch chromium separate from the terminal
|
||||||
abbr lfox "launch firefox" # Launch firefox separate from the terminal
|
abbr lfox "launch firefox" # Launch firefox separate from the terminal
|
@ -9,10 +9,10 @@ function fish_prompt
|
|||||||
set pwd "~"
|
set pwd "~"
|
||||||
end
|
end
|
||||||
|
|
||||||
set_color yellow; echo -n "$USER@$hostname"
|
#set_color yellow; echo -n "$USER@$hostname"
|
||||||
set_color normal; echo -n " "
|
#set_color normal; echo -n " "
|
||||||
set_color magenta; echo -n "($pwd)"
|
#set_color magenta; echo -n "($pwd)"
|
||||||
#set_color magenta; echo -n "$pwd"
|
set_color magenta; echo -n "$pwd"
|
||||||
set_color normal; echo -n " "
|
set_color normal; echo -n " "
|
||||||
set_color red; echo -n "➤"
|
set_color red; echo -n "➤"
|
||||||
set_color green; echo -n "➤"
|
set_color green; echo -n "➤"
|
22
.config/fish/functions/neofetch.fish
Normal file
22
.config/fish/functions/neofetch.fish
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
function neofetch
|
||||||
|
echo -ne '\n'
|
||||||
|
/usr/bin/neofetch \
|
||||||
|
--disable cpu model gpu kernel \
|
||||||
|
--shell_version off \
|
||||||
|
--os_arch off \
|
||||||
|
--gtk_shorthand on \
|
||||||
|
--gtk2 off \
|
||||||
|
--gtk3 off \
|
||||||
|
--package_managers off \
|
||||||
|
--uptime_shorthand tiny \
|
||||||
|
--block_range 1 7 \
|
||||||
|
--bar_char '~' '-' \
|
||||||
|
--bar_border off \
|
||||||
|
--bar_colors 6 7 \
|
||||||
|
--bar_length 11 \
|
||||||
|
--memory_display bar \
|
||||||
|
--loop \
|
||||||
|
--size 48% \
|
||||||
|
--w3m \
|
||||||
|
$argv
|
||||||
|
end
|
@ -1,7 +0,0 @@
|
|||||||
# Easily change the resolution to 1080p
|
|
||||||
# Note: Also changes DPI, but not for the programs you already have open.
|
|
||||||
function 1080p
|
|
||||||
xrandr --output VGA-1 --mode "1920x1080" # Change the resolution
|
|
||||||
sed -i '/Xft.dpi/c\Xft.dpi: 96' ~/.Xresources # Change the dpi line to 96
|
|
||||||
xrdb ~/.Xresources # Reload .Xresources
|
|
||||||
end
|
|
@ -1,24 +0,0 @@
|
|||||||
# Easily change the resolution to 4k
|
|
||||||
# Note: Also changes DPI, but not for the programs you already have open.
|
|
||||||
# TODO: Change this script to support fish
|
|
||||||
function 4k
|
|
||||||
# Get the display type (VGA-1, etc.)
|
|
||||||
local display=$(xrandr | grep -Eo ".{0,20} connected" | awk '{print $1}')
|
|
||||||
|
|
||||||
# Get the default mode name for 4k
|
|
||||||
local mode=$(cvt 3840 2160 | grep "Modeline" | awk '{print $2}')
|
|
||||||
|
|
||||||
# If the 4k mode hasn't been added yet
|
|
||||||
if not (xrandr | grep -q 3840x2160)
|
|
||||||
|
|
||||||
# Create the new mode with cvt settings
|
|
||||||
xrandr --newmode $(cvt 3840 2160 | grep -o '"3840x2160.*')
|
|
||||||
|
|
||||||
# Add the new mode to the display with xrandr
|
|
||||||
xrandr --addmode ${display} ${mode}
|
|
||||||
end
|
|
||||||
|
|
||||||
xrandr --output ${display} --mode ${mode} # Change the resolution to 4k
|
|
||||||
sed -i '/Xft.dpi/c\Xft.dpi: 180' ~/.Xresources # Change the dpi line to 180
|
|
||||||
xrdb ~/.Xresources # Reload .Xresources
|
|
||||||
end
|
|
@ -1,13 +0,0 @@
|
|||||||
function neofetch
|
|
||||||
echo -ne '\n'
|
|
||||||
/usr/bin/neofetch \
|
|
||||||
--disable \
|
|
||||||
model gpu wm_theme theme icons \
|
|
||||||
line_break cols kernel \
|
|
||||||
--ascii_distro linux \
|
|
||||||
--package_managers off \
|
|
||||||
--os_arch off \
|
|
||||||
--speed_shorthand on \
|
|
||||||
--cpu_brand off \
|
|
||||||
--cpu_cores off
|
|
||||||
end
|
|
Loading…
Reference in New Issue
Block a user