Does this work

This commit is contained in:
2026-05-18 16:36:44 +05:30
parent b370921034
commit 2692a446ed
17 changed files with 167 additions and 62 deletions
+2
View File
@@ -25,3 +25,5 @@ psysh
zoom*
.env
systemd
sunshine
uad
+10
View File
@@ -0,0 +1,10 @@
{
"workspace": {
"library": [
"/usr/share/hypr/stubs"
]
},
"diagnostics": {
"globals": ["hl"]
}
}
+25 -5
View File
@@ -1,7 +1,7 @@
#!/bin/sh
remind() {
notify-send -e -i "$icon_dir/battery-010.svg" -h "string:x-canonical-private-synchronous:${0##*/}" "$1 % Battery $2, Please Plugin Charger!!" -u "$2"
notify() {
notify-send -e -i "$icon_dir/$1" -h "string:x-canonical-private-synchronous:${0##*/}" "$2" -u "${3:-normal}"
}
print_sleep() {
@@ -12,9 +12,29 @@ print_sleep() {
#declaration
battery="BAT0" #change accordingly
dir="/sys/class/power_supply/$battery/"
icon_dir="/usr/share/icons/Papirus/22x22/panel/" #change accordingly
icon_dir="/usr/share/icons/Papirus-Dark/22x22/panel/" #change accordingly
i=0
status="normal"
charge=$(cat "$dir"/capacity)
power_status=$(cat "$dir"/status)
case "$1" in
ac)
notify "battery-$(( charge / 10))0-charging.svg" "Power: AC Mode ($charge % $power_status)"
hyprctl keyword decoration:blur:enabled true
hyprctl keyword decoration:shadow:enabled true
exit 0
;;
battery)
notify "battery-$(( charge / 10))0.svg" "Power: Battery Mode ($charge % $power_status)"
hyprctl keyword decoration:blur:enabled false
hyprctl keyword decoration:shadow:enabled false
exit 0
;;
*) ;;
esac
#infinite loop
while charge=$(cat "$dir"/capacity); do
@@ -41,7 +61,7 @@ while charge=$(cat "$dir"/capacity); do
esac
# remind appropriately
[ "$status" != "normal" ] && remind "$charge" "$status"
[ "$status" != "normal" ] && notify "battery-010.svg" "$charge % Battery $status, Please Plugin Charger!!" "$status"
fi
print_sleep "$i" "$charge" "$status" "$1" #pass 'log' as argument to print logs
print_sleep "$i" "$charge" "$status" "$2" #pass 'log' as argument to print logs
done
+4 -6
View File
@@ -1,10 +1,10 @@
# See https://wiki.hyprland.org/Configuring/Monitors/
monitorv2 {
output = eDP-1
mode = highrr
mode = preferred
position = auto
scale = 1.5
vrr = 1
vrr = 2
bitdepth = 10
}
@@ -107,7 +107,6 @@ animations {
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = yes # you probably want this
force_split=2
}
@@ -120,7 +119,6 @@ gestures {
misc {
force_default_wallpaper = 0
vfr = 1
}
xwayland {
@@ -140,7 +138,7 @@ bind = $mainMod, W, killactive,
bind = $mainMod, M, fullscreen,
bind = $mainMod, F, togglefloating,
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
bind = $mainMod, J, layoutmsg,togglesplit
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
@@ -300,6 +298,6 @@ exec-once = hypridle
exec-once = ssh-agent
exec-once = systemctl --user start hyprpolkitagent
exec-once = swaybg -i $HOME/.config/wall/1.png -m fill
exec-once = $hypr_dir/workspace 'focus'
exec-once = $hypr_dir/workspace focus
exec-once = $hypr_dir/battery
exec-once = $hypr_dir/themes
-1
View File
@@ -27,4 +27,3 @@ case "$1" in
esac
notify-send -e -h "string:x-canonical-private-synchronous:${0##*/}" -u "$urgency" -i "$tmp_file" "$message"
+35
View File
@@ -0,0 +1,35 @@
#!/bin/sh
load() {
device=$(adb devices | sed '/^\*/d;/^List of devices/d;/^$/d' | cut -f1 | fzf -1)
[ -z "$device" ] && printf "Unable to detect Android using ADB" && exit 1
RES=$(adb -s "$device" shell dumpsys display | sed -nE 's|^[[:space:]]*DisplayModeRecord.*width=([0-9]*), height=([0-9]*), fps=([0-9\.]*).*|\2x\1@\3|p' | fzf --prompt="Select Resolution > " -1)
position=$(printf 'auto\nauto-left' | fzf --prompt="Which position? >")
if ! hyprctl monitors | grep -q "$HEADLESS"; then
hyprctl output create headless "$HEADLESS" | grep -q 'ok' && printf '\n\nCreate Headless Display: %s' "$HEADLESS"
fi
[ -z "$HEADLESS" ] && printf "Something went wrong\n" && return 1
hyprctl keyword monitor "$HEADLESS","$RES","$position",'1'
adb shell svc usb setFunctions rndis
printf "Sleep 2 seconds for USB tethering Interface to be UP and connected/"
sleep 2
# show ip
ip r
# start sunshine
sunshine > /dev/null
}
unload() {
hyprctl output remove "$HEADLESS"
}
HEADLESS="HEADLESS-ANDROID"
trap 'unload' INT HUP
# run the function
[ -z "$1" ] && help "$@"
$1 "$2"
-1
View File
@@ -1,6 +1,5 @@
#!/bin/sh
# Wifi wrapper using iwctl
# config
+2
View File
@@ -40,6 +40,7 @@ application/x-extension-xht=firefox.desktop
application/x-bittorrent=torrent.desktop
x-scheme-handler/magnet=torrent.desktop
hoppscotch=hoppscotch-handler.desktop
audio/flac=mpv.desktop
[Added Associations]
video/x-matroska=mpv.desktop;
@@ -62,3 +63,4 @@ x-scheme-handler/magnet=torrent.desktop;
application/x-bittorrent=torrent.desktop;
application/x-desktop=nvim.desktop;
application/x-php=firefox.desktop;
audio/flac=mpv.desktop;
+14 -12
View File
@@ -19,6 +19,11 @@ if not vim.loop.fs_stat(lazypath) then
end
set.rtp:prepend(lazypath)
require('lazy').setup({
{
'nvim-treesitter/nvim-treesitter',
lazy = false,
build = ':TSUpdate'
},
'wbthomason/packer.nvim',
{ 'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true } },
'https://gitlab.com/__tpb/monokai-pro.nvim',
@@ -58,16 +63,11 @@ require("mason-lspconfig").setup {
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local lspconfig = require('lspconfig')
--for enabling phpactor
lspconfig.phpactor.setup{
vim.lsp.config("phpactor", {
capabilities = capabilities,
on_attach = on_attach,
init_options = {
["language_server_phpstan.enabled"] = true,
["language_server_psalm.enabled"] = false,
}
}
})
-- for arduino lsp server
--local MY_FQBN = "esp8266:esp8266:nodemcu"
@@ -82,11 +82,13 @@ lspconfig.phpactor.setup{
-- Enable some language servers with the additional completion capabilities offered by nvim-cmp
local servers = { 'bashls', 'pyright', 'lua_ls', 'html' ,'cssls'}
for _, lsp in ipairs(servers) do
lspconfig[lsp].setup {
local servers = { 'bashls', 'pyright', 'lua_ls', 'html' ,'cssls', 'phpactor'}
for _, name in ipairs(servers) do
vim.lsp.config(name, {
capabilities = capabilities,
}
on_attach = on_attach,
})
vim.lsp.enable(name)
end
-- luasnip setup
+18 -18
View File
@@ -1,26 +1,26 @@
{
"LuaSnip": { "branch": "master", "commit": "66b5c2707e624dcd2cd3605676c64a2efe47e9d1" },
"LuaSnip": { "branch": "master", "commit": "a62e1083a3cfe8b6b206e7d3d33a51091df25357" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-cmdline": { "branch": "main", "commit": "d126061b624e0af6c3a556428712dd4d4194ec6d" },
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" },
"cmp-path": { "branch": "main", "commit": "c642487086dbd9a93160e1679a1327be111cbc25" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"lualine.nvim": { "branch": "master", "commit": "a94fc68960665e54408fe37dcf573193c4ce82c9" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "c2465eb07db648026eee81005a659abe26e6d077" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" },
"mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" },
"monokai-pro.nvim": { "branch": "main", "commit": "8ba1fea7774e7c522b006091a9adb32b5cef95b9" },
"nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
"nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" },
"nvim-dap": { "branch": "master", "commit": "1c75a797b4017fec6491f509cf196c8c8833f26f" },
"nvim-dap-python": { "branch": "master", "commit": "261ce649d05bc455a29f9636dc03f8cdaa7e0e2c" },
"nvim-lspconfig": { "branch": "master", "commit": "7fac9025a967a4d0846660f751cd392fac6bb788" },
"nvim-parinfer": { "branch": "master", "commit": "5ca09287ab3f4144f78ff7977fabc27466f71044" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" },
"nvim-dap-python": { "branch": "master", "commit": "1808458eba2b18f178f990e01376941a42c7f93b" },
"nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" },
"nvim-parinfer": { "branch": "master", "commit": "3968e669d9f02589aa311d33cb475b16b27c5fbb" },
"nvim-treesitter": { "branch": "master", "commit": "cf12346a3414fa1b06af75c79faebe7f76df080a" },
"packer.nvim": { "branch": "master", "commit": "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"telescope.nvim": { "branch": "master", "commit": "ec009610d5d259ec59a6edf0219ef3f7ee4732e5" }
}
+1 -1
View File
@@ -26,7 +26,7 @@ side_pane_mode=places
view_mode=list
show_hidden=0
sort=name;ascending;
columns=name:200;desc:143;size:76;mtime:127;
columns=name:200;desc:143;size:76;mtime:1119;
toolbar=newtab;navigation;home;
show_statusbar=1
pathbar_mode_buttons=0
+6
View File
@@ -0,0 +1,6 @@
[Unit]
Description=Power Mode (%i)
[Service]
Type=oneshot
ExecStart=/home/tanveer/.config/hypr/battery %i
+32
View File
@@ -1,4 +1,32 @@
{
"agent_servers": {
"gemini": {
"type": "registry"
}
},
"cli_default_open_behavior": "new_window",
"project_panel": {
"dock": "left"
},
"outline_panel": {
"dock": "left"
},
"agent": {
"default_model": {
"provider": "google",
"model": "gemini-3-flash-preview",
"enable_thinking": false
},
"profiles": {
},
"dock": "right",
"favorite_models": [],
"model_parameters": []
},
"git_panel": {
"dock": "left"
},
"git": {
"inline_blame": {
"show_commit_summary": true
@@ -48,6 +76,10 @@
"yaml": {
"format_on_save": "off",
"tab_size": 4,
},
"Markdown": {
"format_on_save": "off",
"tab_size": 4,
}
},
}
+2 -2
View File
@@ -165,7 +165,7 @@ headless_add() {
# kill existing wayvnc and start a new one
#pgrep -af "wayvnc" && killall wayvnc
setsid -f wayvnc --output="$headless" --disable-input --socket="/tmp/$headless" --max-fps="$device_fps" 0.0.0.0 $PORT
setsid -f wayvnc --gpu --output="$headless" --disable-input --socket="/tmp/$headless" --max-fps="$((device_fps * 2))" 0.0.0.0 $PORT
#reverse port forward to device, and start VNC
adb -s "$device" reverse tcp:$PORT tcp:$PORT
@@ -181,7 +181,7 @@ headless_rm() {
set -x
headless=$(hyprctl monitors | sed -nE 's|.*(HEADLESS-ANDROID-[^ ]*).*|\1|p' | fzf --prompt="Select Which Device to Remove >" -0 -1)
[ -n "$headless" ] && hyprctl output remove $headless
pid=$(pgrep -af "wayvnc --output=$headless" | cut -d' ' -f1)
pid=$(pgrep "wayvnc --gpu --output=$headless" | cut -d' ' -f1)
kill -9 $pid
unset headless
set +x