if status is-interactive
    # Commands to run in interactive sessions can go here
	abbr --add ll ll -a
	abbr --add adl album-dl.fish
	abbr --add vv nvim
	abbr --add tr gio trash
	abbr --add --set-cursor tldr curl cheat.sh/%

	function copy --description 'Copy to clipboard'
		fish_clipboard_copy
	end

	function paste --description 'Paste from clipboard'
		fish_clipboard_paste
	end

	function open --wraps 'xdg-open'
		xdg-open $argv &>/dev/null & disown
	end

	function detach --description 'Detach a command from shell'
		$argv &>/dev/null & disown
	end

	function vman --description 'Uses Neovim as a manpager'
		man $argv | nvim +Man!
	end

	function mvi --description 'Launches mpv with mvi configuration'
		mpv --config-dir=$HOME/.config/mvi/ $argv
	end

	# Colorscheme
	set fish_color_normal normal
	set fish_color_command brgreen --bold
	set fish_color_keyword brred
	set fish_color_quote green --italics
	set fish_color_redirection yellow
	set fish_color_end cyan
	set fish_color_error red --underline=curly
	set fish_color_param normal
	set fish_color_comment brblack
	set fish_color_selection --background brblack
	set fish_color_search_match
	set fish_color_history_current
	set fish_color_operator yellow
	set fish_color_escape white --bold
	set fish_color_cwd green
	set fish_color_cwd_root red
	set fish_color_option brblue
	set fish_color_valid_path --underline
	set fish_color_autosuggestion white
	set fish_color_user brgreen
	set fish_color_host normal
	set fish_color_host_remote yellow
	set fish_color_history_current --bold
	set fish_color_status red
	set fish_color_cancel white --bold
	set fish_pager_color_prefix normal --bold --underline
	set fish_pager_color_progress normal --reverse
	set fish_pager_color_completion normal
	set fish_pager_color_description yellow --italics
	set fish_pager_color_selected_background --background brblue
	set fish_pager_color_secondary_background
	set fish_pager_color_selected_completion black --bold
	set fish_pager_color_background
	set fish_pager_color_selected_description bryellow --bold --italics
	set fish_pager_color_secondary_prefix
	set fish_pager_color_secondary_description
	set fish_pager_color_selected_prefix black --bold --underline
	set fish_pager_color_secondary_completion
end

if test $XDG_CURRENT_DESKTOP = "niri"
	dconf write /org/gnome/desktop/wm/preferences/button-layout "'appmenu'"
else
	dconf reset /org/gnome/desktop/wm/preferences/button-layout
end


