Can someone review this commit, please ?

This commit is contained in:
coolnsx
2023-09-08 00:13:17 +05:30
parent 46a74bdbb5
commit e5965d8697
12 changed files with 115 additions and 84 deletions

0
cni/net.d/cni.lock Normal file
View File

18
environment.d/10-env.conf Normal file
View File

@@ -0,0 +1,18 @@
SDL_VIDEODRIVER=wayland
QT_QPA_PLATFORM=wayland
XDG_CURRENT_DESKTOP=Hyprland
XDG_SESSION_DESKTOP=Hyprland
QT_QPA_PLATFORMTHEME=qt5ct
GDK_BACKEND=wayland,x11
MOZ_ENABLE_WAYLAND=1
XDG_SESSION_TYPE=wayland
EDITOR=nvim
VISUAL=nvim
TERMINAL=foot
OPENER=xdg-open
VIDEO=mpv
WM=hyprland
IMAGE=nsxiv
LIBSEAT_BACKEND=logind
PATH=$PATH:$HOME/.local/bin
VDPAU_DRIVER=va_gl

View File

@@ -1,2 +1,22 @@
#these environment variables are imported by systemd for this user only
[Service] [Service]
Environment="PATH=$PATH:$HOME/.local/bin/"
Environment="SDL_VIDEODRIVER=wayland"
Environment="QT_QPA_PLATFORM=wayland"
Environment="XDG_CURRENT_DESKTOP=Hyprland"
Environment="XDG_SESSION_DESKTOP=Hyprland"
Environment="QT_QPA_PLATFORMTHEME=qt5ct"
Environment="GDK_BACKEND=wayland,x11"
Environment="MOZ_ENABLE_WAYLAND=1"
Environment="XDG_SESSION_TYPE=wayland"
Environment="EDITOR=nvim"
Environment="VISUAL=nvim"
Environment="TERMINAL=foot"
Environment="OPENER=xdg-open"
Environment="VIDEO=mpv"
Environment="WM=hyprland"
Environment="IMAGE=nsxiv"
Environment="LIBSEAT_BACKEND=logind"
Environment="PATH=$PATH:$HOME/.local/bin"
Environment="VDPAU_DRIVER=va_gl"

View File

@@ -40,7 +40,7 @@
color: #8FBCBB; color: #8FBCBB;
font-size : 24px; font-size : 24px;
font-weight : bold; font-weight : bold;
margin : 30px 0px 0px 0px; margin : 20px 0px 0px 0px;
} }
.artist { .artist {
color: #EBCB8B; color: #EBCB8B;
@@ -66,7 +66,7 @@
} }
.lyrics { .lyrics {
color: #EBCB8B; color: #EBCB8B;
margin : -10px 0px 0px 0px; margin : -20px 0px 0px 0px;
} }
.music_bar { .music_bar {
color: #81A1C1; color: #81A1C1;

View File

@@ -25,19 +25,16 @@
:wm-ignore false :wm-ignore false
(clock)) (clock))
(defpoll HOUR :interval "2s" `date +'%I'`) (defpoll CLOCK :interval "4s" "date +'{\"hour\": \"%I\" ,\"min\": \"%M\" ,\"mer\" : \"%p\",\"day\" : \"%A\" }'")
(defpoll MIN :interval "2s" `date +'%M'`)
(defpoll MER :interval "2s" `date +'%p'`)
(defpoll DAY :interval "5s" `date +'%A'`)
(defwidget clock [] (defwidget clock []
(box :class "genwin" :orientation "h" :spacing 50 :space-evenly false :vexpand "false" :hexpand "false" (box :class "genwin" :orientation "h" :spacing 50 :space-evenly false :vexpand "false" :hexpand "false"
(box :orientation "h" :spacing 0 (box :orientation "h" :spacing 0
(label :class "time_hour" :valign "start" :wrap "true" :limit-width 25 :text HOUR) (label :class "time_hour" :valign "start" :wrap "true" :limit-width 25 :text "${CLOCK.hour}")
(label :class "time_min" :valign "end" :wrap "true" :limit-width 25 :text MIN)) (label :class "time_min" :valign "end" :wrap "true" :limit-width 25 :text "${CLOCK.min}"))
(box :orientation "v" :spacing 0 :space-evenly true (box :orientation "v" :spacing 0 :space-evenly true
(label :class "time_mer" :valign "start" :halign "end" :wrap "true" :limit-width 25 :text MER) (label :class "time_mer" :valign "start" :halign "end" :wrap "true" :limit-width 25 :text "${CLOCK.mer}")
(label :class "time_day" :valign "end" :halign "end" :wrap "true" :limit-width 25 :text DAY)))) (label :class "time_day" :valign "end" :halign "end" :wrap "true" :limit-width 25 :text "${CLOCK.day}"))))
;; music ;; music
(defwindow music_0 (defwindow music_0
@@ -66,25 +63,23 @@
:wm-ignore true :wm-ignore true
(music)) (music))
(defpoll SONG :interval "2s" `./script song`) (defpoll song :interval "2s" "./script songdata")
(defpoll ARTIST :interval "2s" `./script artist`) (defpoll STATUS :interval "0.4s" "./script status")
(defpoll STATUS :interval "0.4s" `./script status`) (defpoll CURRENT :interval "0.4s" "./script time")
(defpoll COVER :interval "2s" `./script cover`) (defpoll LYRICS :interval "0.4s" "./script lyrics")
(defpoll CURRENT :interval "0.4s" `./script time`)
(defpoll LYRICS :interval "0.4s" `./script lyrics`)
(defwidget music [] (defwidget music []
(box :class "genwin" :orientation "h" :spacing 50 :space-evenly "false" :vexpand "false" :hexpand "false" (box :class "genwin" :orientation "h" :spacing 50 :space-evenly "false" :vexpand "false" :hexpand "false"
(box :class "box_art" :vexpand "false" :hexpand "false" (box :class "box_art" :vexpand "false" :hexpand "false"
(circular-progress :class "music_bar" :value CURRENT :thickness 10 :clockwise true :start-at 75 (circular-progress :class "music_bar" :value CURRENT :thickness 10 :clockwise true :start-at "${(CURRENT+75)%100}"
(image :path COVER :image-height 300 :image-width 300))) (image :path "${song.cover}" :image-height 270 :image-width 270)))
(box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false" (box :orientation "v" :spacing 20 :space-evenly "false" :vexpand "false" :hexpand "false"
(label :halign "center" :class "song" :wrap "false" :limit-width 30 :text SONG) (label :tooltip "${song.name}" :halign "center" :class "song" :wrap "false" :limit-width 20 :text "${song.name}")
(label :halign "center" :class "artist" :wrap "false" :text ARTIST) (label :halign "center" :class "artist" :wrap "false" :limit-width 20 :text "${song.artist}")
(box :orientation "h" :spacing 30 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false" (box :orientation "h" :spacing 35 :halign "center" :space-evenly "true" :vexpand "false" :hexpand "false"
(button :class "btn_controls" :onclick "./script prev" "") (button :class "btn_controls" :onclick "./script prev" "󰒮")
(button :class "btn_controls" :onclick "./script seek '-1'" "") (button :class "btn_controls" :onclick "./script seek '-1'" "")
(button :class "btn_play" :onclick "./script play_toggle" STATUS) (button :class "btn_play" :onclick "./script play_toggle" STATUS)
(button :class "btn_controls" :onclick "./script seek '1'" "") (button :class "btn_controls" :onclick "./script seek '1'" "")
(button :class "btn_controls" :onclick "./script next" "")) (button :class "btn_controls" :tooltip "Upcoming : ${song.next}" :onclick "./script next" "󰒭"))
(label :halign "center" :wrap "true" :class "lyrics" :text LYRICS)))) (label :justify "left" :wrap "true" :class "lyrics" :text LYRICS))))

View File

@@ -1,37 +1,35 @@
#!/bin/sh #!/bin/sh
out=$(printf '{ "command": ["get_property", "pause"]}\n' | socat - /tmp/mpvsocket 2>/dev/null)
case $1 in case $1 in
song) songdata)
out=$(printf '{ "command": ["get_property", "pause"]}\n' | socat - /tmp/mpvsocket 2>/dev/null)
if [ -n "$out" ] && pgrep -f mpvsocket >/dev/null 2>&1;then if [ -n "$out" ] && pgrep -f mpvsocket >/dev/null 2>&1;then
cut -d'>' -f1 < "/tmp/yt-music/current" | cut -d':' -f2 | sed 's|[^-]*$||;s|[-| ]$||' printf '{"name":"%s","artist":"%s","cover":"/tmp/yt-music/default.jpg","next":"%s"}' "$(cut -d'>' -f1 < "/tmp/yt-music/current" | cut -d':' -f2 | sed 's|[^-]*$||;s|-$||;s| $||;s|^ ||')" "$(cut -d'>' -f1 < "/tmp/yt-music/current" | sed 's_.* - __;s| $||')" "$(sed -n "/$(cut -d'>' -f2 < /tmp/yt-music/current )/{n;p}" /tmp/yt-music/next | cut -f1)"
else else
printf "OFFLINE" printf '{"name":"OFFLINE","artist":"offline","cover":"%s/.config/eww/music.png"}' "$HOME"
fi
;;
artist)
if [ -n "$out" ] && pgrep -f mpvsocket >/dev/null 2>&1;then
cut -d'>' -f1 < "/tmp/yt-music/current" | sed 's_.* -__;s| $||'
else
printf "Offline"
fi
;;
cover)
if [ -n "$out" ] && pgrep -f mpvsocket >/dev/null 2>&1;then
printf "/tmp/yt-music/default.jpg"
else
printf "%s/.config/eww/music.png" "$HOME"
fi fi
;; ;;
status) status)
out=$(printf '{ "command": ["get_property", "pause"]}\n' | socat - /tmp/mpvsocket 2>/dev/null)
if [ -z "$out" ];then if [ -z "$out" ];then
printf "" printf ""
elif printf "%s" "$out" | grep -q "true";then elif printf "%s" "$out" | grep -q "true";then
printf "" printf "󰐌"
else else
printf "" printf "󰏥"
fi fi
;; ;;
lyrics)
if [ -f "/tmp/yt-music/lyrics" ]; then
awk -F'\t' -v value="$(echo '{ "command": ["get_property", "time-pos"] }' | socat - /tmp/mpvsocket | sed -nE 's|.*data":([^,]*).*|\1|p')" '$1 > value*1000 {print $2;exit}' /tmp/yt-music/lyrics
else
printf "Lyrics will show here"
fi
;;
time)
out=$(echo '{"command" :["get_property" , "percent-pos"]}' | socat - /tmp/mpvsocket 2>/dev/null | sed -nE 's_.*data":([^,]*).*_\1_p')
printf '%s' "${out:-100}"
;;
play_toggle) play_toggle)
echo cycle pause | socat - "/tmp/mpvsocket" echo cycle pause | socat - "/tmp/mpvsocket"
;; ;;
@@ -44,18 +42,7 @@ case $1 in
prev) prev)
pgrep -f mpvsocket >/dev/null 2>&1 && ("$HOME/repos_scripts/yt-music" play "$(sed 's| >|\t|g' /tmp/yt-music/prev | cut -d':' -f2)") pgrep -f mpvsocket >/dev/null 2>&1 && ("$HOME/repos_scripts/yt-music" play "$(sed 's| >|\t|g' /tmp/yt-music/prev | cut -d':' -f2)")
;; ;;
time)
out=$(echo '{"command" :["get_property" , "percent-pos"]}' | socat - /tmp/mpvsocket 2>/dev/null | sed -nE 's_.*data":([^,]*).*_\1_p')
printf '%s' "${out:-100}"
;;
seek) seek)
echo "{\"command\" :[\"seek\" ,\"$2\",\"relative-percent\"]}" | socat - /tmp/mpvsocket echo "{\"command\" :[\"seek\" ,\"$2\",\"relative-percent\"]}" | socat - /tmp/mpvsocket
;; ;;
lyrics)
if [ -f "/tmp/yt-music/lyrics" ]; then
sed -n "/^$(awk -v value="$(echo '{ "command": ["get_property", "time-pos"] }' | socat - /tmp/mpvsocket | sed -nE 's|.*data":([^,]*).*|\1|p')" '$1 > value*1000 {print $1;exit}' /tmp/yt-music/lyrics)\t/p" /tmp/yt-music/lyrics | cut -f2
else
printf "Lyrics will show here"
fi
;;
esac esac

View File

@@ -163,8 +163,8 @@ windowrulev2=workspace 3,class:^(pcmanfm)$
windowrulev2=workspace 3,class:^(mpv)$ windowrulev2=workspace 3,class:^(mpv)$
windowrulev2=workspace 3,class:^([c|C]ode) windowrulev2=workspace 3,class:^([c|C]ode)
windowrulev2=workspace 4,class:^(pavucontrol)$ windowrulev2=workspace 4,class:^(pavucontrol)$
windowrulev2=workspace 4,class:^(Xephyr)$ windowrulev2=workspace 4,class:^(org.freedesktop.Xwayland)$
windowrulev2=fullscreen,class:^(Xephyr)$ windowrulev2=fullscreen,class:^(org.freedesktop.Xwayland)$
#startup applications #startup applications
exec-once=dbus-update-activation-environment --systemd --all exec-once=dbus-update-activation-environment --systemd --all

View File

@@ -5,10 +5,10 @@ setup_dual_monitor(){
sleep 2 sleep 2
if hyprctl monitors | grep -q "HDMI-A-1";then if hyprctl monitors | grep -q "HDMI-A-1";then
notify-send "Setting up dual monitor workflow" notify-send "Setting up dual monitor workflow"
hyprctl dispatch moveworkspacetomonitor "2 1"
hyprctl dispatch moveworkspacetomonitor "3 1"
hyprctl dispatch moveworkspacetomonitor "1 0" hyprctl dispatch moveworkspacetomonitor "1 0"
hyprctl dispatch moveworkspacetomonitor "4 0" hyprctl dispatch moveworkspacetomonitor "2 0"
hyprctl dispatch moveworkspacetomonitor "3 0"
hyprctl dispatch moveworkspacetomonitor "4 1"
eww kill eww kill
eww open-many time_1 music_1 eww open-many time_1 music_1
fi fi

View File

@@ -23,20 +23,7 @@ require('lazy').setup({
{ 'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true } }, { 'nvim-lualine/lualine.nvim', requires = { 'kyazdani42/nvim-web-devicons', opt = true } },
'https://gitlab.com/__tpb/monokai-pro.nvim', 'https://gitlab.com/__tpb/monokai-pro.nvim',
{ "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", "neovim/nvim-lspconfig", }, { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim", "neovim/nvim-lspconfig", },
{ { "nvim-telescope/telescope.nvim" },
"adalessa/laravel.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
},
cmd = {"Sail", "Artisan", "Composer"},
keys = {
{"<leader>pa", ":Artisan<cr>"},
},
config = function()
require("laravel").setup()
require("telescope").load_extension("laravel")
end
},
{ {
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
config = function() require("nvim-autopairs").setup {} end config = function() require("nvim-autopairs").setup {} end

View File

@@ -1,26 +1,25 @@
{ {
"LuaSnip": { "branch": "master", "commit": "c4d6298347f7707e9757351b2ee03d0c00da5c20" }, "LuaSnip": { "branch": "master", "commit": "ea7d7ea510c641c4f15042becd27f35b3e5b3c2b" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" }, "cmp-cmdline": { "branch": "main", "commit": "8ee981b4a91f536f52add291594e89fb6645e451" },
"cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" },
"friendly-snippets": { "branch": "main", "commit": "00e191fea2cfbbdd378243f35b5953296537a116" }, "friendly-snippets": { "branch": "main", "commit": "ebf6d6e83494cdd88a54a429340256f4dbb6a052" },
"laravel.nvim": { "branch": "main", "commit": "23d6cba80e03d16a18034a54b2b0be1f57400bd3" },
"lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" }, "lazy.nvim": { "branch": "main", "commit": "2a9354c7d2368d78cbd5575a51a2af5bd8a6ad01" },
"lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" }, "lualine.nvim": { "branch": "master", "commit": "45e27ca739c7be6c49e5496d14fcf45a303c3a63" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "dfdd771b792fbb4bad8e057d72558255695aa1a7" },
"mason.nvim": { "branch": "main", "commit": "0942198fb9a998b6ccee36fb8dd7495eb8ba659c" }, "mason.nvim": { "branch": "main", "commit": "ee6a7f179ebf8aa9da9d53b1cf1b57d292ea0182" },
"monokai-pro.nvim": { "branch": "main", "commit": "826d028edbcc7a8aadc0f7a32b32747d97575615" }, "monokai-pro.nvim": { "branch": "main", "commit": "826d028edbcc7a8aadc0f7a32b32747d97575615" },
"nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" }, "nvim-autopairs": { "branch": "master", "commit": "35493556b895f54c129918aca43ae9a63af42a1f" },
"nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" }, "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
"nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" }, "nvim-colorizer.lua": { "branch": "master", "commit": "36c610a9717cc9ec426a07c8e6bf3b3abcb139d6" },
"nvim-dap": { "branch": "master", "commit": "4377a05b9476587b7b485d6a9d9745768c4e4b37" }, "nvim-dap": { "branch": "master", "commit": "0e6b7c47dd70e80793ed39271b2aa712d9366dbc" },
"nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" }, "nvim-dap-python": { "branch": "master", "commit": "37b4cba02e337a95cb62ad1609b3d1dccb2e5d42" },
"nvim-lspconfig": { "branch": "master", "commit": "a27356f1ef9c11e1f459cc96a3fcac5c265e72d6" }, "nvim-lspconfig": { "branch": "master", "commit": "0517d8522dcec286b1dba47aa3ee1ed8f523aed6" },
"nvim-parinfer": { "branch": "master", "commit": "5ca09287ab3f4144f78ff7977fabc27466f71044" }, "nvim-parinfer": { "branch": "master", "commit": "5ca09287ab3f4144f78ff7977fabc27466f71044" },
"nvim-treesitter": { "branch": "master", "commit": "7f6ff292e3f53e7b12554ee92264c23762dc7906" }, "nvim-treesitter": { "branch": "master", "commit": "80b4fa7970ee159e5c2c715bbcd386143c48dcb1" },
"packer.nvim": { "branch": "master", "commit": "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3" }, "packer.nvim": { "branch": "master", "commit": "ea0cc3c59f67c440c5ff0bbe4fb9420f4350b9a3" },
"telescope.nvim": { "branch": "master", "commit": "32e6792f865221dfaf2a3751fd3cfeac96557433" } "telescope.nvim": { "branch": "master", "commit": "20a37e43bb43c74c6091f9fea6551af0964ad45a" }
} }

View File

@@ -0,0 +1 @@
/usr/lib/systemd/user/podman.service

View File

@@ -0,0 +1,24 @@
[Unit]
Description=Docker Application Container Engine (Rootless)
Documentation=https://docs.docker.com/go/rootless/
[Service]
Environment=PATH=/home/tanveer/bin:/sbin:/usr/sbin:/home/tanveer/bin:$PATH:$HOME/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
ExecStart=/home/tanveer/bin/dockerd-rootless.sh
ExecReload=/bin/kill -s HUP $MAINPID
TimeoutSec=0
RestartSec=2
Restart=always
StartLimitBurst=3
StartLimitInterval=60s
LimitNOFILE=infinity
LimitNPROC=infinity
LimitCORE=infinity
TasksMax=infinity
Delegate=yes
Type=notify
NotifyAccess=all
KillMode=mixed
[Install]
WantedBy=default.target