Pro Tip: Double check XNAMEX's PRs

This commit is contained in:
coolnsx
2024-10-04 13:19:52 +05:30
parent ca04d815e9
commit 5c87fbac7d
22 changed files with 212 additions and 86 deletions

1
.gitignore vendored
View File

@@ -3,6 +3,7 @@ Code/*
composer
dconf
google-chrome
chromium
httptoolkit
libfm
lol.toml

View File

@@ -1,7 +1,7 @@
[FileDialog]
history=@Invalid()
lastVisited=file:///home/tanveer
qtVersion=6.7.2
lastVisited=file:///home/tanveer/Downloads
qtVersion=5.15.15
shortcuts=file:, file:///home/tanveer
sidebarWidth=48
treeViewHeader=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x1\xb8\0\0\0\x4\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x4\0\0\0\xe8\0\0\0\x1\0\0\0\0\0\0\0\x36\0\0\0\x1\0\0\0\0\0\0\0:\0\0\0\x1\0\0\0\0\0\0\0`\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff)

View File

@@ -136,7 +136,7 @@
### Text ###
font = Roboto Medium 14
font = IBM Plex Sans 14
# The spacing between lines. If the height is smaller than the
# font height, it will get raised to the font height.

View File

@@ -1,11 +1,11 @@
;;time
(defwindow time_1
:monitor 1
:geometry (geometry :x "50px"
:y "20px"
:width "35%"
:geometry (geometry :x "30px"
:y "30px"
:width "25%"
:height "200px"
:anchor "bottom right")
:anchor "top right")
:stacking "bg"
:reserve (struts :distance "40px" :side "top")
:windowtype "dock"

View File

@@ -8,7 +8,7 @@ term=xterm-256color
# title=foot
# locked-title=no
font=Iosevka NFM:size=14
font=IBM Plex Mono:size=13.5
#font-bold=
#font-italic=Victor Mono:style=Italic:size=12
#font-bold-italic=<bold+italic variant of regular font>

View File

@@ -1,7 +1,7 @@
#!/bin/sh
menu() {
bemenu --fn 'Cascadia Mono 15' -i -c -W "0.${2:-4}" -B 3 -l 20 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT"
bemenu --fn 'IBM Plex Sans 15' -i -c -W "0.${2:-4}" -B 3 -l 20 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT"
}
notify() {

View File

@@ -8,7 +8,7 @@ file="$HOME/.cache/bookmarks"
oshi_file="$HOME/.cache/oshi-urls"
menu() {
bemenu --fn 'Roboto 15' -i -c -W 0.6 -B 3 -l 30 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT"
bemenu --fn 'IBM Plex Sans 15' -i -c -W 0.6 -B 3 -l 30 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT"
}
case $1 in

View File

@@ -257,7 +257,7 @@ show_menu() {
# Human-readable names of devices, one per line
# If scan is off, will only list paired devices
devices=$(bluetoothctl devices | grep -F Device | cut -d ' ' -f 3-)
devices=$(bluetoothctl devices | sed -nE 's|^Device ([A-Z0-9:]*) (.*)|\2|p')
# Get controller flags
scan=$(scan_on)
@@ -304,7 +304,7 @@ original_args=("$@")
# dmenu command to pipe into. Extra arguments to dmenu-bluetooth are passed through to dmenu. This
# allows the user to set fonts, sizes, colours, etc.
run_dmenu() {
bemenu "${original_args[@]}" --fn 'Roboto 16' -i -l 10 -c -W 0.4 -B 3 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT"
bemenu "${original_args[@]}" --fn 'IBM Plex Sans 15' -i -l 10 -c -W 0.4 -B 3 -p "$1" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT"
}
case "$1" in

View File

@@ -6,7 +6,7 @@ historyfile=$cachedir/dmenu_history
ls /bin >"$cache"
cut -f2 "$historyfile" "$cache" | bemenu -R 20 --fixed-height --fn 'JetBrainsMono Nerd Font 15' -i -c -W 0.5 -B 3 -p "RUN: " -l 15 -P ">>" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT" |
cut -f2 "$historyfile" "$cache" | bemenu -R 20 --fixed-height --fn 'IBM Plex Sans 15' -i -c -W 0.5 -B 3 -p "RUN: " -l 15 -P ">>" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT" |
awk -v histfile="$historyfile" '
BEGIN {
FS=OFS="\t"

View File

@@ -1,11 +1,10 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=eDP-1,highres,auto,1.5,bitdepth,10,vrr,1
#monitor=HDMI-A-1,highres,auto,1
monitor=eDP-1,highres,auto,1.5,vrr,0,bitdepth,10
$hypr_dir="$HOME/.config/hypr"
$accent=6FAAFF
$browser=google-chrome-stable
#$browser=firefox
#$browser=google-chrome-stable
$browser=firefox
#envs
env = BROWSER,$browser
@@ -112,7 +111,7 @@ misc {
force_default_wallpaper = 0
vfr = 1
#vrr = 1
no_direct_scanout = false
#no_direct_scanout = false
}
xwayland {
@@ -226,7 +225,7 @@ exec-once = dbus-update-activation-environment --systemd --all
exec-once = hypridle
exec-once = ssh-agent
exec-once = /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec-once = swaybg -i $HOME/.config/wall/1.png -m fill
exec-once = swaybg -i $HOME/.config/wall/4.jpg -m fill
exec-once = xrdb -merge $HOME/.config/.Xresource
exec-once = $hypr_dir/workspace 'focus'
exec-once = $hypr_dir/battery

View File

@@ -35,7 +35,7 @@ input-field {
outer_color = $foreground
inner_color = rgb(0,0,0)
font_color = $foreground
fade_on_empty = false
fade_on_empty = true
fade_timeout = 1000
placeholder_text = <i><span foreground="##$GLOBAL_ACCENT">Input Password...</span></i> # Text rendered in the input box when it's empty.
hide_input = false

View File

@@ -5,7 +5,7 @@ gamedir="$HOME/games"
games=$(find "$gamedir" -maxdepth 2 -type f -name '*.exe' -executable | sed "s|$gamedir/||g;/[U|u]nin.*/d")
[ -z "$games" ] && notify-send -e -u critical "No games installed" && exit 1
game=$(printf '%s\n' "$games" | bemenu --fn 'JetBrainsMono Nerd Font 15' -i -c -W 0.5 -B 3 -p "PLAY GAME: " -l 15 -P ">> " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
game=$(printf '%s\n' "$games" | bemenu --fn 'IBM Plex Sans 15' -i -c -W 0.5 -B 3 -p "PLAY GAME: " -l 15 -P ">> " --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
[ -z "$game" ] && notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u critical "No game selected" && exit 1

View File

@@ -13,6 +13,7 @@ case "$1" in
fullsave)
tmp_file="$HOME/Pictures/$(date -u "+%Y-%m-%d_%H-%M-%S").png"
message="Screenshot saved."
[ -d "$HOME/Pictures" ] || mkdir -p "$HOME/Pictures"
grim "$tmp_file"
;;
selclip)

100
hypr/wifi
View File

@@ -1,9 +1,93 @@
#!/bin/bash
if nmcli radio wifi | grep -q 'enabled'; then
nmcli radio wifi off
wifi_icon="offline"
else
nmcli radio wifi on
wifi_icon="acquiring"
#!/bin/sh
# Wifi wrapper using iwctl
# config
adapter="wlan0"
divider="--------------------"
#menu
menu () {
bemenu -R 20 --fn 'IBM Plex Sans 15' -i -c -W 0.5 -B 3 -p "$1" -l 26 -I "${2:-0}" -P ">>" --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT" -x "$3"
}
#notify
notify() {
notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" "$1" -i "$2" -t "${3:-1200}"
}
# show list of networks and also the connected one
show_networks() {
iwctl station $adapter get-networks | sed -nE 's|^[[:space:]]*(.*)[[:space:]]*psk.*|\1|p' | tr -cd '[:print:]\n' | sed 's/\[0m[[:space:]]*//g;s/\[1\;90m>[[:space:]]*/(connected) /g' | sed 's/[[:space:]]*$//g'
}
connect() {
temp=$(printf '%s' "$1" | sed -nE 's|\(connected\) (.*)|\1|p')
wifi_name=${temp:-$1}
output=0
if iwctl known-networks "$wifi_name" show | grep -q "$wifi_name"; then
iwctl station $adapter connect "$wifi_name"
else
password=$(: | menu "Enter Password:" "" "indicator")
[ -z "$password" ] && notify "No credentials Provided" && return 1
notify "Authenticating to $wifi_name" "" "10000"
iwctl --passphrase "$password" station $adapter connect "$wifi_name"
output=$?
fi
while iwctl station $adapter show | grep -q connecting;do
notify "Connecting to $wifi_name"
sleep 1
done
if [ "$output" -ne 0 ]; then
notify "Unable to connect to $wifi_name, try again later."
return 0
fi
notify "Connected: $wifi_name"
}
if iwctl device $adapter show | grep -q 'Powered.*off';then
option=$(printf 'Turn On' | menu '[iwd]')
[ -z "$option" ] && exit 0
iwctl device $adapter set-property Powered on
while iwctl device $adapter show | grep -q 'Powered.*off'; do
notify "Turning On Wifi"
sleep 1
done
notify "Wifi On"
fi
notify-send -e -i "/usr/share/icons/Papirus/16x16/panel/network-wireless-$wifi_icon.svg" "wifi $(nmcli radio wifi)" -h "string:x-canonical-private-synchronous:${0##*/}"
while option=$(printf 'Scan\nDisconnect\nTurn Off\nExit\n%s\n%s' "$divider" "$(show_networks)" | menu "[iwd]"); do
case $option in
"" | "$divider")
notify "Bye.."
break
;;
Scan)
iwctl station $adapter scan
while iwctl station wlan0 show | grep -q 'Scanning.*yes';do
notify "Scanning For Networks"
sleep 1
done
;;
Exit)
notify "Bye.."
break
;;
Disconnect)
iwctl station $adapter disconnect
;;
"Turn Off")
notify "Turning Off Wifi..."
iwctl device $adapter set-property Powered off
notify "Wifi Off"
break
;;
*)
connect "$option"
break
;;
esac
done

View File

@@ -1,13 +1,13 @@
#!/bin/sh
setup_dual_monitor() {
sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highrr,auto,1/g" "$HOME/.config/hypr/hyprland.conf"
sleep 2
if hyprctl monitors | grep -q "HDMI-A-1"; then
monitor=$(hyprctl monitors | sed -nE 's|.*(HDMI-A-[0-9]).*|\1|p')
if [ -n "$monitor" ]; then
notify-send -e "Setting up dual monitor workflow"
hyprctl keyword monitor "$(hyprctl monitors | sed -nE 's|.*(HDMI-A-[0-9]).*|\1|p')",highres,auto,1
hyprctl dispatch moveworkspacetomonitor "1 0"
hyprctl dispatch moveworkspacetomonitor "2 0"
hyprctl dispatch moveworkspacetomonitor "3 0"
hyprctl dispatch moveworkspacetomonitor "3 1"
hyprctl dispatch moveworkspacetomonitor "4 1"
eww kill
eww open-many time_1 music_1
@@ -16,13 +16,13 @@ setup_dual_monitor() {
handle_it() {
[ -z "$1" ] || notify-send -e "$1"
choice=$(printf "Mirror\nExtend" | bemenu --fn 'Roboto 15' -i -c -W 0.2 -B 3 -l 20 -p "what to do??: " -m 1 --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
choice=$(printf "Mirror\nExtend" | bemenu --fn 'IBM Plex Sans 15' -i -c -W 0.2 -B 3 -l 20 -p "what to do??: " -m 1 --bdr="#$GLOBAL_ACCENT" --tf="#$GLOBAL_ACCENT" --hf="#$GLOBAL_ACCENT")
[ -z "$choice" ] && return 0
notify-send -e "${choice}ing screen"
if [ "$choice" = "Extend" ]; then
setup_dual_monitor
else
sed -i "s/monitor=,highrr,auto,1/monitor=,1920x1080,0x0,1,mirror,eDP-1/g" "$HOME/.config/hypr/hyprland.conf"
hyprctl keyword monitor "$(hyprctl monitors | sed -nE 's|.*(HDMI-A-[0-9]).*|\1|p')",preferred, auto, 1, mirror, eDP-1
fi
}
@@ -41,13 +41,8 @@ case $1 in
socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do
printf "%s" "$line" | grep -qE "monitoraddedv2.*HEADLESS" && continue
printf "%s" "$line" | grep -q "monitoraddedv2" && handle_it "$line"
printf "%s" "$line" | grep -q "monitorremoved" && sed -i "s/monitor=,1920x1080,0x0,1,mirror,eDP-1/monitor=,highrr,auto,1/g" "$HOME/.config/hypr/hyprland.conf" && eww kill && eww open_many time_0 music_0
#recent workspace switcher
current=$(printf "%s" "$line" | sed -nE 's_^(workspace)v2>>([^,]*),.*_\1 \2_p')
if [ -n "$current" ]; then
cat /tmp/workcurr >/tmp/workprev
printf "%s" "$current" >/tmp/workcurr
fi
notify-send -e -i "lol" "$current" -h "string:x-canonical-private-synchronous:monitor" -t 700 2>/dev/null
done
;;

View File

@@ -1,12 +1,12 @@
[Default Applications]
inode/directory=pcmanfm.desktop
image/jpeg=nsxiv.desktop
application/pdf=org.pwmt.zathura.desktop
text/html=google-chrome.desktop
x-scheme-handler/http=google-chrome.desktop
x-scheme-handler/https=google-chrome.desktop
x-scheme-handler/about=google-chrome.desktop
x-scheme-handler/unknown=google-chrome.desktop
application/pdf=firefox.desktop
text/html=firefox.desktop
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/about=firefox.desktop
x-scheme-handler/unknown=firefox.desktop
image/png=nsxiv.desktop
plain/text=nvim.desktop
text/x-python=nvim.desktop
@@ -28,31 +28,34 @@ text/x-c++=nvim.deskop
video/x-matroska=mpv.desktop
application/json=nvim.desktop;
video/vnd.radgamettools.bink=mpv.desktop
x-scheme-handler/mailto=google-chrome.desktop
x-scheme-handler/chrome=google-chrome.desktop
application/x-extension-htm=google-chrome.desktop
application/x-extension-html=google-chrome.desktop
application/x-extension-shtml=google-chrome.desktop
application/xhtml+xml=google-chrome.desktop
application/x-extension-xhtml=google-chrome.desktop
application/x-extension-xht=google-chrome.desktop
x-scheme-handler/mailto=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
application/x-bittorrent=torrent.desktop
x-scheme-handler/magnet=torrent.desktop
[Added Associations]
video/x-matroska=mpv.desktop;
application/octet-stream=mpv.desktop;google-chrome.desktop;
application/octet-stream=mpv.desktop;firefox.desktop;
video/vnd.radgamettools.bink=mpv.desktop;
x-scheme-handler/mailto=google-chrome.desktop;
x-scheme-handler/http=google-chrome.desktop;
x-scheme-handler/https=google-chrome.desktop;
x-scheme-handler/chrome=google-chrome.desktop;
text/html=google-chrome.desktop;
application/x-extension-htm=google-chrome.desktop;
application/x-extension-html=google-chrome.desktop;
application/x-extension-shtml=google-chrome.desktop;
application/xhtml+xml=google-chrome.desktop;
application/x-extension-xhtml=google-chrome.desktop;
application/x-extension-xht=google-chrome.desktop;
x-scheme-handler/mailto=firefox.desktop;
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=firefox.desktop
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop
application/xhtml+xml=firefox.desktop
application/x-extension-xhtml=firefox.desktop
application/x-extension-xht=firefox.desktop
application/x-zerosize=nvim.desktop;
video/mpeg=google-chrome.desktop;
video/mpeg=firefox.desktop;
x-scheme-handler/magnet=torrent.desktop;
application/x-bittorrent=torrent.desktop;
application/x-desktop=nvim.desktop;

View File

@@ -84,6 +84,15 @@ if not configs.intelephense then
}
end
--for enabling phpactor
lspconfig.phpactor.setup{
on_attach = on_attach,
init_options = {
["language_server_phpstan.enabled"] = false,
["language_server_psalm.enabled"] = false,
}
}
-- for arduino lsp server
--local MY_FQBN = "esp8266:esp8266:nodemcu"
--lspconfig.arduino_language_server.setup {

View File

@@ -1,25 +1,26 @@
{
"LuaSnip": { "branch": "master", "commit": "2b6860d15aaab01d3fb90859c0ba97f20ad7bc5f" },
"LuaSnip": { "branch": "master", "commit": "b84eeb3641b08324287587b426ec974b888390d9" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"friendly-snippets": { "branch": "main", "commit": "e11b09bf10706bb74e16e4c3d11b2274d62e687f" },
"lazy.nvim": { "branch": "main", "commit": "0fc34a0cf5f5f6f998a0897119a7d846b47eaa9d" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" },
"mason.nvim": { "branch": "main", "commit": "0950b15060067f752fde13a779a994f59516ce3d" },
"friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" },
"lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" },
"lualine.nvim": { "branch": "master", "commit": "b431d228b7bbcdaea818bdc3e25b8cdbe861f056" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "f2acd4a21db1ca0a12559e7a9f7cdace3bdbfb09" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"monokai-pro.nvim": { "branch": "main", "commit": "8ba1fea7774e7c522b006091a9adb32b5cef95b9" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" },
"nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" },
"nvim-autopairs": { "branch": "master", "commit": "48ca9aaee733911424646cb1605f27bc01dedbe3" },
"nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" },
"nvim-dap-python": { "branch": "master", "commit": "ae0225d0d4a46e18e6057ab3701ef87bbbd6aaad" },
"nvim-lspconfig": { "branch": "master", "commit": "d1ab6b6051976b04948e127b0f302a465b1394d6" },
"nvim-dap": { "branch": "master", "commit": "2b428ff2632e73295e9decbcf1c40d8e26213305" },
"nvim-dap-python": { "branch": "master", "commit": "d777c2b32ed39f61209c09bede28d7491621a631" },
"nvim-lspconfig": { "branch": "master", "commit": "037ea0901ce9a28cfcaa36302618f06d2e164fbf" },
"nvim-parinfer": { "branch": "master", "commit": "5ca09287ab3f4144f78ff7977fabc27466f71044" },
"nvim-treesitter": { "branch": "master", "commit": "49e4e2b4b62360677568c47b6467f31c809b391c" },
"nvim-treesitter": { "branch": "master", "commit": "3de418e73d5b912096229aaeea8bb7aef5094e0d" },
"packer.nvim": { "branch": "master", "commit": "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3" },
"telescope.nvim": { "branch": "master", "commit": "dfa230be84a044e7f546a6c2b0a403c739732b86" }
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope.nvim": { "branch": "master", "commit": "5972437de807c3bc101565175da66a1aa4f8707a" }
}

View File

@@ -25,7 +25,7 @@ focus_previous=0
side_pane_mode=places
view_mode=list
show_hidden=0
sort=name;ascending;
sort=desc;ascending;
columns=name:200;desc:143;size;mtime:1143;
toolbar=newtab;navigation;home;
show_statusbar=1

BIN
wall/9.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 978 KiB

21
zed/settings.json Normal file
View File

@@ -0,0 +1,21 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette
{
"telemetry": {
"diagnostics": false,
"metrics": false
},
"ui_font_size": 16,
"buffer_font_size": 16,
"theme": {
"mode": "system",
"light": "Base16 Oxocarbon Dark",
"dark": "One Dark"
}
}

View File

@@ -126,9 +126,10 @@ headless_rm() {
get_cookies() {
# the user has firefox installed
logdir="/tmp"
if [ ! -f "$HOME/.config/google-chrome/Default/Cookies" ];then
cp "$(find "$HOME/.mozilla" -type f -iname 'cookies.sqlite' | head -1)" "$logdir/cookies.sqlite"
sqlite3 "$logdir/cookies.sqlite" "SELECT name, value FROM moz_cookies WHERE host='$1' and name NOT like 'ST-%';" | tr '|\n' '=;'
sqlite3 "$logdir/cookies.sqlite" "SELECT name, value FROM moz_cookies WHERE host='.youtube.com' and name NOT like 'ST-%' and name NOT like 'VISITOR%' and name NOT like 'PREF%';" | tr '|\n' '=;'
rm "$logdir/cookies.sqlite"
return 0
fi
@@ -188,7 +189,16 @@ url_nextcloud() {
#To enable sharing, the output will be in json containing share link
curl -u "$NC_USER:$NC_TOKEN" -s "$NC_URL/ocs/v2.php/apps/files_sharing/api/v1/shares" -H 'content-type: application/json' -H 'accept: application/json, text/plain, */*' -H 'OCS-APIRequest: true' --data-raw '{"path":"'"${NC_SHARE_PATH}/$cloudname"'","shareType":3,"expireDate":"'"$expire_date"'"}' | sed -nE 's|.*"url":"([^"]*)".*|\1|p' | sed 's/\\//g' | wl-copy && info "com.github.davidmhewitt.clipped" "2000" "Share Link Created and copied to clipboard"
unset NC_URL NC_USER NC_SHARE_PATH NC_TOKEN NC_FOLDER_ID
nextcloud_creds "unload"
}
open_nc_aio() {
[ ! -f "$HOME/.config/.env" ] && notify-send "Credentials not found" -u critical && return 1
source "$HOME"/.config/.env
nextcloud_creds #load creds
xdg-open $(curl -s "$NC_URL/settings/admin/overview" -u "$NC_USER:$NC_TOKEN" | sed -nE 's|.* href="([^"]*)".*AIO.*|\1|p')
nextcloud_creds "unload"
}
@@ -212,7 +222,7 @@ gtr() {
gtu() { [ -z "$1" ] || curl -s "https://api.github.com/search/users?q=$1" | sed -nE 's_.*login": "([^"]*)".*_\1_p' | fzf --layout=reverse --border --height=10 -0; }
clshist() {
a=$(cat ~/.histfile | wc -l)
a=$(\cat ~/.histfile | wc -l)
[ "$a" -gt $HISTSIZE ] && sed -i "1,$((a - HISTSIZE))d" ~/.histfile
}
@@ -236,6 +246,7 @@ rmpkg() {
# Alias and exports
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
export TZ="Asia/Kolkata"
export PODMAN_COMPOSE_WARNING_LOGS=false
alias cat="bat -pp --color=always"
alias open="xdg-open"
alias cp="cp -v"
@@ -251,6 +262,7 @@ alias ls="lsd --color=auto"
alias nchh="nvim ~/.config/hypr/hyprland.conf"
alias shfmt="shfmt -ci -d -w"
alias reboot_firmware="systemctl reboot --firmware-setup"
alias sail="PODMAN_COMPOSE_WARNING_LOGS=false ./vendor/bin/sail"
#config
HISTFILE=~/.histfile