diff options
-rw-r--r-- | .config/env | 15 | ||||
-rw-r--r-- | .config/go2work/go2work.toml | 8 | ||||
-rw-r--r-- | .config/imv/config | 64 | ||||
-rw-r--r-- | .config/lf/lfrc | 5 | ||||
-rw-r--r-- | .config/mimeapps.list | 1 | ||||
-rw-r--r-- | .config/nvim/after/plugin/gitsigns.lua | 3 | ||||
-rw-r--r-- | .config/nvim/after/plugin/lualine.lua | 2 | ||||
-rw-r--r-- | .config/pipe-viewer/pipe-viewer.conf | 7 | ||||
-rwxr-xr-x | .config/wayland/init.sh | 56 | ||||
-rw-r--r-- | .config/x11/xinitrc | 8 | ||||
-rwxr-xr-x | .local/bin/dmapps | 215 | ||||
-rwxr-xr-x | .local/bin/dmbookm | 8 | ||||
-rwxr-xr-x | .local/bin/dmlog | 40 | ||||
-rwxr-xr-x | .local/bin/dmotp | 8 | ||||
-rwxr-xr-x | .local/bin/dmpass | 20 | ||||
-rwxr-xr-x | .local/bin/dmrun | 6 | ||||
-rwxr-xr-x | .local/bin/linkview | 37 | ||||
-rwxr-xr-x | .local/bin/setwp | 59 | ||||
-rw-r--r-- | .local/state/w3m/config (renamed from .w3m/config) | 0 | ||||
-rw-r--r-- | .local/state/w3m/history | 9 | ||||
-rw-r--r-- | .local/state/w3m/keymap (renamed from .w3m/keymap) | 0 | ||||
-rw-r--r-- | .local/state/w3m/mailcap (renamed from .w3m/mailcap) | 0 | ||||
-rw-r--r-- | .ssh/config | 1 |
23 files changed, 352 insertions, 220 deletions
diff --git a/.config/env b/.config/env index 69fa266..761ef8b 100644 --- a/.config/env +++ b/.config/env @@ -16,6 +16,7 @@ unset MAILCHECK export XDG_DATA_HOME="$HOME"/.local/share export XDG_CONFIG_HOME="$HOME"/.config export XDG_CACHE_HOME="$HOME"/.cache +export XDG_STATE_HOME="$HOME"/.local/state export XDG_PACKAGE_HOME="$HOME"/.local/packs export XDG_DESKTOP_DIR="$HOME" export XDG_DOCUMENTS_DIR="$HOME"/docs @@ -59,6 +60,7 @@ export GPG_TUI_CONFIG="$XDG_CONFIG_HOME"/gpg-tui/gpg-tui.toml export GOPATH="$XDG_DATA_HOME"/go export GOBIN="$GOPATH"/bin export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_DATA_HOME"/java +export KDEHOME="$XDG_CONFIG_HOME"/kde export LESSHISTFILE='-' export MACHINE_STORAGE_PATH="$XDG_DATA_HOME"/docker-machine export MOST_INITFILE="$XDG_CONFIG_HOME"/mostrc @@ -66,12 +68,17 @@ export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history export NOTMUCH_CONFIG="$XDG_CONFIG_HOME"/notmuch/notmuchrc export NMBGIT="$XDG_DATA_HOME"/notmuch/nmbug export NPM_CONFIG_USERCONFIG="$XDG_CONFIG_HOME"/npm/npmrc +export NUGET_PACKAGES="$XDG_CACHE_HOME"/NuGetPackages +export PARALLEL_HOME="$XDG_CONFIG_HOME"/parallel export PASSWORD_STORE_DIR="$XDG_DATA_HOME"/pass export PYENV_ROOT="$HOME"/.pyenv export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc export STACK_ROOT="$XDG_DATA_HOME"/stack export TSH_HOME="$XDG_CONFIG_HOME"/tsh -export WGETRC="$XDG_CONFIG_HOME/wgetrc" +export WGETRC="$XDG_CONFIG_HOME"/wgetrc +export WINEPREFIX="$XDG_DATA_HOME"/wineprefixes/default +export W3M_DIR="$XDG_STATE_HOME"/w3m + export XINITRC="$XDG_CONFIG_HOME"/x11/xinitrc export XSERVERRC="$XDG_CONFIG_HOME"/x11/xserverrc export _Z_DATA="$XDG_DATA_HOME"/z @@ -93,5 +100,11 @@ export RUSTFLAGS='-L /usr/local/lib' export WWW_HOME='https://start.duckduckgo.com/' export YTFZF_HIST='0' +# wayland +export WLR_DRM_NO_ATOMIC=1 +export XDG_SESSION_TYPE=wayland +export XDG_CURRENT_DESKTOP=dwl +export MOZ_ENABLE_WAYLAND=1 + # PATH export PATH="$HOME"/.local/bin:"$HOME"/.local/bin/status:/usr/local/llvm13/bin:"$HOME"/.pyenv/bin:"$PATH" diff --git a/.config/go2work/go2work.toml b/.config/go2work/go2work.toml index a98b346..0fecd1e 100644 --- a/.config/go2work/go2work.toml +++ b/.config/go2work/go2work.toml @@ -9,10 +9,12 @@ files = [ # '/usr/local/hdd/jozan/dl/Songs Of Anarchy/2015 Songs of Anarchy:Vol. 4 (US, 88875 06146 2)/05 Billy Valentine & The Forest Rangers - All Along The Watchtower.flac', # 'dl/Songs Of Anarchy/2011 Songs of Anarchy:Music From Sons of Anarchy Seasons 1-4 (US, 88691 91432 2)/09 Paul Brady & The Forest Rangers - Gimme Shelter.flac', # '/home/jozan/mu/ost/mick_gordon/2020_doom_eternal_original_game_soundtrack/54_meathook.flac', - #'/home/jozan/mu/ost/mick_gordon/2020_doom_eternal_original_game_soundtrack/21_the_super_gore_nest.flac', + # '/home/jozan/mu/rock/punk/guerilla_poubelle/2007_punk_existentialisme/10_dans_la_diagonale.flac', + # '/var/hdd/files/mu/rock/punk/guerilla_poubelle/2005_il_faut_repeindre_le_monde_en_noir/15_exception_culturelle_trafic_darmes.flac', + # '/home/jozan/mu/ost/mick_gordon/2020_doom_eternal_original_game_soundtrack/21_the_super_gore_nest.flac', # '/home/jozan/16-441/06_conflagration.wav', - '/home/jozan/mu/progressive/progressive_black_metal/deathspell_omega/2010_paracletus/02_wings_of_predation.flac', - # '/home/jozan/mu/metal/technical_death_metal/gojira/2016_magma/04_stranded.flac', + # '/home/jozan/mu/progressive/progressive_black_metal/deathspell_omega/2010_paracletus/02_wings_of_predation.flac', + '/home/jozan/mu/metal/technical_death_metal/gojira/2016_magma/04_stranded.flac', # '/home/jozan/mu/metal/technical_death_metal/gojira/2005_form_mars_to_sirius/02_backbone.flac', # '/usr/home/jozan/mu/metal/technical_death_metal/ulcerate/2011_the_destroyers_of_all/07_the_destroyers_of_all.flac', #'/home/jozan/mu/rock/grunge/nirvana/2011_nevermind_20th_anniversary_deluxe_edition/cd_1/04_breed.flac', diff --git a/.config/imv/config b/.config/imv/config new file mode 100644 index 0000000..21452a0 --- /dev/null +++ b/.config/imv/config @@ -0,0 +1,64 @@ +# Default config for imv + +[options] + +# Suppress built-in key bindings, and specify them explicitly in this +# config file. +background = 1d2021 +suppress_default_binds = true + +[aliases] +# Define aliases here. Any arguments passed to an alias are appended to the +# command. +# alias = command to run + +[binds] +# Define some key bindings +q = quit +# y = exec echo working! + +# Image navigation +p = prev +<bracketleft> = prev +<Ctrl+b> = prev +n = next +<bracketright> = next +<Ctrl+f> = next +gg = goto 1 +<Shift+G> = goto -1 + +# Panning +j = pan 0 -50 +k = pan 0 50 +h = pan 50 0 +l = pan -50 0 + +# Zooming +<Up> = zoom 1 +<Shift+plus> = zoom 1 +i = zoom 1 +<Down> = zoom -1 +<minus> = zoom -1 +o = zoom -1 + +# Rotate Clockwise by 90 degrees +<Ctrl+r> = rotate by 90 + +# Other commands +x = close +f = fullscreen +d = overlay +m = exec echo $imv_current_file +c = center +s = scaling next +<Shift+S> = upscaling next +a = zoom actual +r = reset + +# Gif playback +<period> = next_frame +<space> = toggle_playing + +# Slideshow control +t = slideshow +1 +<Shift+T> = slideshow -1 diff --git a/.config/lf/lfrc b/.config/lf/lfrc index 563c155..b121f04 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -23,8 +23,9 @@ cmd open ${{ text/*|application/json|inode/x-empty) bat --style=plain --tabs 4 --paging=always -f $fx ;; image/x-xcf) gimp $f >/dev/null 2>&1 ;; image/svg+xml) display -- $f ;; - image/*) rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | - nsxiv -aibof 2>/dev/null | while read -r file; do + image/*) + rotdir $f | grep -i "\.\(png\|jpg\|jpeg\|gif\|webp\|tif\|ico\)\(_large\)*$" | + imv 2>/dev/null | while read -r file; do [ -z "$file" ] && continue lf -remote "send select \"$file\"" lf -remote "send toggle" diff --git a/.config/mimeapps.list b/.config/mimeapps.list index 7fc2aba..af1787d 100644 --- a/.config/mimeapps.list +++ b/.config/mimeapps.list @@ -53,6 +53,7 @@ x-scheme-handler/discord-424004941485572097=discord-424004941485572097.desktop video/quicktime=mpv.desktop x-scheme-handler/forticlient=FortiClient.desktop x-scheme-handler/discord-460807638964371468=discord-460807638964371468.desktop +x-scheme-handler/discord=vesktop.desktop [Added Associations] x-scheme-handler/https=userapp-Firefox-NVLWI0.desktop;librewolf.desktop;firefox.desktop;userapp-Firefox-SWW0Y1.desktop; diff --git a/.config/nvim/after/plugin/gitsigns.lua b/.config/nvim/after/plugin/gitsigns.lua index 8070d1a..7b4d6a2 100644 --- a/.config/nvim/after/plugin/gitsigns.lua +++ b/.config/nvim/after/plugin/gitsigns.lua @@ -36,7 +36,4 @@ require('gitsigns').setup { row = 0, col = 1 }, - yadm = { - enable = false - }, } diff --git a/.config/nvim/after/plugin/lualine.lua b/.config/nvim/after/plugin/lualine.lua index b266af3..7f94ccd 100644 --- a/.config/nvim/after/plugin/lualine.lua +++ b/.config/nvim/after/plugin/lualine.lua @@ -224,7 +224,7 @@ ins_right { function() local msg = 'no lsp' local buf_ft = vim.api.nvim_buf_get_option(0, 'filetype') - local clients = vim.lsp.get_active_clients() + local clients = vim.lsp.get_clients() if next(clients) == nil then icon = '' return '' diff --git a/.config/pipe-viewer/pipe-viewer.conf b/.config/pipe-viewer/pipe-viewer.conf index c656d8b..6c0d13f 100644 --- a/.config/pipe-viewer/pipe-viewer.conf +++ b/.config/pipe-viewer/pipe-viewer.conf @@ -1,6 +1,6 @@ -#!/usr/bin/perl -I/nix/store/3vq9qasxlqpyq1k95nq3s13g2m6w59ay-perl-5.40.0/lib/perl5/site_perl -I/nix/store/l02g9sqkb5625739p07v9a7c5r2q167c-perl5.40.0-Test-Pod-1.52/lib/perl5/site_perl -I/nix/store/ld4ajgzsdkyjh1bpnns8ymm0xrvzdzvy-perl-5.40.0-env/lib/perl5/site_perl -I/nix/store/jy6wvmgmddhh4d82ciq1r3dwgfcialll-perl5.40.0-Module-Build-0.4234/lib/perl5/site_perl -I/nix/store/39z485wv6fl420p04v9dxcf5fz7p64pi-perl5.40.0-pipe-viewer-0.5.3/lib/perl5/site_perl +#!/usr/bin/perl -I/nix/store/gndky4p2sjhsh0zdlqs3dnyzyslccxha-perl-5.40.0/lib/perl5/site_perl -I/nix/store/v9p0424f6q65zmjq29lqdbr1bj917j9c-perl5.40.0-Test-Pod-1.52/lib/perl5/site_perl -I/nix/store/sfz5ykgb8dg7zb9d0yqf3kxiw3ld4gmv-perl-5.40.0-env/lib/perl5/site_perl -I/nix/store/v37hnszhgvq3c68p3knbhva2dmb3lwna-perl5.40.0-Gtk3-0.038/lib/perl5/site_perl -I/nix/store/mbm6vxxhsadm5b0c4bcl174f8c456n60-perl5.40.0-Cairo-GObject-1.005/lib/perl5/site_perl -I/nix/store/3qbxs296i5znxv9g8p3vr7z6xhpb5mc3-perl5.40.0-Cairo-1.109/lib/perl5/site_perl -I/nix/store/rrkcxg15312yiy9axx6qr5s7wi6djsk0-perl5.40.0-ExtUtils-Depends-0.8001/lib/perl5/site_perl -I/nix/store/3wq4i7l0fvqmkjqv74pz5lkdmwamc22d-perl5.40.0-ExtUtils-PkgConfig-1.16/lib/perl5/site_perl -I/nix/store/hs6y91z06r9j95k35j5y143cvkw718sz-perl5.40.0-Glib-1.3294/lib/perl5/site_perl -I/nix/store/2g298acj7fsnj9grc1h9sl1whmks7gjj-perl5.40.0-Glib-Object-Introspection-0.051/lib/perl5/site_perl -I/nix/store/cg11rf957k3h37h4inyqx4y5gq53nkyz-perl5.40.0-Module-Build-0.4234/lib/perl5/site_perl -I/nix/store/jx8cqiwd6j0163qmfvd1c56a1401y03a-perl5.40.0-pipe-viewer-0.5.4/lib/perl5/site_perl -# CLI Pipe Viewer 0.5.3 - configuration file +# CLI Pipe Viewer 0.5.4 - configuration file use utf8; @@ -48,6 +48,8 @@ our $CONFIG = { date => undef, debug => 0, download_and_play => 0, + download_in_subdir => 0, + download_in_subdir_format => "*AUTHOR*", download_with_wget => 0, download_with_ytdl => 1, downloads_dir => ".", @@ -86,6 +88,7 @@ our $CONFIG = { remove_played_file => 0, resolution => "best", saved_channels_file => "$ENV{HOME}/.config/pipe-viewer/users.txt", + set_mtime => 1, show_video_info => 1, skip_if_exists => 1, skip_watched => 0, diff --git a/.config/wayland/init.sh b/.config/wayland/init.sh new file mode 100755 index 0000000..62d90ed --- /dev/null +++ b/.config/wayland/init.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +source "$HOME"/.config/env + +case $(hostname -s) in + mother) + icon=" " + mpd="mpd" + xscr="xscreensaver --no-splash" + sleep="sleep 1" + ping="ping -c1 -w1 9.9.9.9 >/dev/null 2>&1" + host="mother" + doas mkdir /var/run/jozan && doas chown -v jozan: /var/run/jozan + wlr-randr --output DP-3 --off + setwp "$HOME"/pics/wp.png + ;; + po-rbo) + icon=" " + mpd="mpd" + xscr="xscreensaver" + sleep="sleep 0.1" + ping="ping -c1 -w1 9.9.9.9 >/dev/null 2>&1" + host="po-rbo" + doas mkdir /var/run/r_bousset && doas chown -v r_bousset: /var/run/r_bousset + setwp "$HOME"/pics/wp/liminal + ;; + mars) + icon=" " + mpd="musicpd" + xscr="xscreensaver --no-splash" + sleep="gsleep 1" + ping="ping -c1 -t1 9.9.9.9 >/dev/null 2>&1" + host="mars" + doas mkdir /var/run/jozan && doas chown -v jozan: /var/run/jozan + setwp "$HOME"/pics/wp + ;; +esac + +startif() { + pidof "$(basename "$1")" >/dev/null || "$@" >/dev/null 2>&1 & +} + +startif ydotoold +startif dunst +pgrep $mpd >/dev/null || $mpd >/dev/null 2>&1 +startif pipewire +sleep 1 +startif pipewire-pulse +sleep 1 +startif wireplumber +export QT_QPA_PLATFORM=xcb +startif copyq +startif nextcloud +startif stalonetray +firefox & +notify-send -u normal 'welcome' "$icon welcome back, partner!" diff --git a/.config/x11/xinitrc b/.config/x11/xinitrc index 2b73786..0519270 100644 --- a/.config/x11/xinitrc +++ b/.config/x11/xinitrc @@ -47,7 +47,7 @@ dunst_shit() { for pid in $(ps aux | grep local/bin/kb | awk '{print $2}'); do kill -9 $pid done - [ $host = "mother" ] && "$HOME"/.local/bin/setwp "$HOME"/pics/wp.png || "$HOME"/.local/bin/setwp "$HOME"/pics/wp/129.jpg + [ $host = "mother" ] && "$HOME"/.local/bin/setwp "$HOME"/pics/wp.png || "$HOME"/.local/bin/setwp "$HOME"/pics/wp.png "$HOME"/.local/bin/kb & } @@ -57,9 +57,9 @@ start_apps() { startif copyq startif nextcloud QT_SCALE_FACTOR=1.35 startif rclone-browser - startif nixGL teams-for-linux + # startif nixGL teams-for-linux startif thunderbird - startif firefox + # startif firefox } export LANG='en_US.UTF-8' @@ -103,4 +103,4 @@ xrdb "$HOME"/.config/x11/xresources start_apps & notify-send -u normal 'Welcome' "$icon Welcome back, partner!" -[ $host = "po-rbo" ] && exec dwm +[ $host = "po-rbo" ] && exec dbus-run-session dwm diff --git a/.local/bin/dmapps b/.local/bin/dmapps index 51b0625..ccefc76 100755 --- a/.local/bin/dmapps +++ b/.local/bin/dmapps @@ -2,9 +2,9 @@ use strict; use warnings; +use feature qw/switch/; use Data::Dump qw(dump); use POSIX qw(setsid); -use Switch; use Sys::Hostname qw(hostname); use constant PROG_LIST => "" . @@ -23,6 +23,7 @@ use constant PROG_LIST => "" . "Stellarium" . "\n" . "Google Earth" . "\n" . "DBeaver" . "\n" . +"OnlyOffice" . "\n" . "--- Editors ---" . "\n" . "NeoVim" . "\n" . "Emacs" . "\n" . @@ -77,161 +78,57 @@ sub run $pid = fork(); exit if $pid; setsid(); - switch ($action) { - case "Terminal" { - exec("alacritty"); - } - case "File manager" { - exec("pcmanfm"); - } - case "Web browser" { - exec("firefox"); - } - case "Mail client" { - exec("thunderbird"); - } - case "Arduino" { - exec("arduino-ide"); - } - case "cool-retro-term" { - exec("cool-retro-term"); - } - case "Qalculate!" { - exec("qalculate-gtk"); - } - case "Kleopatra" { - exec("kleopatra"); - } - case "Transmission" { - exec("transmission-gtk"); - } - case "Wireshark" { - exec("doas", "wireshark"); - } - case "MKVToolNix" { - exec("mkvtoolnix-gui"); - } - case "Stellarium" { - exec("stellarium"); - } - case "Google Earth" { - exec("google-earth-pro"); - } - case "NeoVim" { - exec("alacritty", "-e", "nvim"); - } - case "Emacs" { - exec("emacs"); - } - case "Emacs-NoX" { - exec("alacritty", "-e", "emacs-nw"); - } - case "GIMP - GNU Image Manipulation Program" { - exec("gimp"); - } - case "Inkscape" { - exec("inkscape"); - } - case "LibreWolf" { - exec("librewolf"); - } - case "Firefox" { - exec("firefox"); - } - case "Iridium" { - exec("iridium", "--force-dark-mode"); - } - case "Chromium" { - exec("chromium"); - } - case "Discord" { - exec("discord"); - } - case "Signal" { - exec("signal-desktop"); - } - case "Liferea" { - exec("liferea"); - } - case "HexChat" { - exec("hexchat"); - } - case "REAPER" { - exec("reaper"); - } - case "Audacity" { - exec("audacity"); - } - case "Pulse Control Panel" { - exec("pavucontrol"); - } - case "JACK Audio Connection Kit" { - exec("qjackctl"); - } - case "Ario" { - exec("ario"); - } - case "Kdenlive" { - exec("kdenlive"); - } - case "OBS Studio" { - exec("obs"); - } - case "Steam" { - exec("steam"); - } - case "Lutris" { - exec("lutris"); - } - case "GZDoom" { - exec("gzdoom"); - } - case "DOSBox" { - exec("dosbox"); - } - case "Mupen64Plus" { - exec("mupen64plus-qt"); - } - case "Cemu" { - exec("cemu"); - } - case "PCSX2" { - exec("pcsx2"); - } - case "RPCS3" { - exec("rpcs3"); - } - case "Remmina" { - exec("remmina"); - } - case "Rclone Browser" { - exec("rclone-browser"); - } - case "Insomnia" { - exec("insomnia"); - } - case "VMware" { - exec("vmware"); - } - case "DBeaver" { - exec("dbeaver"); - } - case "MongoDB Compass" { - exec("nixGL", "mongodb-compass"); - } - case "Miro" { - exec("miro"); - } - case "FortiClient VPN" { - exec("/opt/forticlient/gui/FortiClient-linux-x64/FortiClient"); - } - case "Teams" { - exec("nixGL", "teams-for-linux"); - } - else { - return; - } - } + exec("alacritty") if $action =~ "Terminal"; + exec("pcmanfm") if $action =~ "File manager"; + exec("firefox") if $action =~ "Web browser"; + exec("thunderbird") if $action =~ "Mail client"; + exec("arduino-ide") if $action =~ "Arduino"; + exec("cool-retro-term") if $action =~ "cool-retro-term"; + exec("qalculate-gtk") if $action =~ "Qalculate!"; + exec("kleopatra") if $action =~ "Kleopatra"; + exec("transmission-gtk") if $action =~ "Transmission"; + exec("doas", "wireshark") if $action =~ "Wireshark"; + exec("mkvtoolnix-gui") if $action =~ "MKVToolNix"; + exec("stellarium") if $action =~ "Stellarium"; + exec("google-earth-pro") if $action =~ "Google Earth"; + exec("alacritty", "-e", "nvim") if $action =~ "NeoVim"; + exec("emacs") if $action =~ "Emacs"; + exec("alacritty", "-e", "emacs-nw") if $action =~ "Emacs-NoX"; + exec("gimp") if $action =~ "GIMP - GNU Image Manipulation Program"; + exec("inkscape") if $action =~ "Inkscape"; + exec("librewolf") if $action =~ "LibreWolf"; + exec("firefox") if $action =~ "Firefox"; + exec("iridium", "--force-dark-mode") if $action =~ "Iridium"; + exec("chromium") if $action =~ "Chromium"; + exec("discord") if $action =~ "Discord"; + exec("signal-desktop") if $action =~ "Signal"; + exec("liferea") if $action =~ "Liferea"; + exec("hexchat") if $action =~ "HexChat"; + exec("reaper") if $action =~ "REAPER"; + exec("audacity") if $action =~ "Audacity"; + exec("pavucontrol") if $action =~ "Pulse Control Panel"; + exec("qjackctl") if $action =~ "JACK Audio Connection Kit"; + exec("ario") if $action =~ "Ario"; + exec("kdenlive") if $action =~ "Kdenlive"; + exec("obs") if $action =~ "OBS Studio"; + exec("steam") if $action =~ "Steam"; + exec("lutris") if $action =~ "Lutris"; + exec("gzdoom") if $action =~ "GZDoom"; + exec("dosbox") if $action =~ "DOSBox"; + exec("mupen64plus-qt") if $action =~ "Mupen64Plus"; + exec("cemu") if $action =~ "Cemu"; + exec("pcsx2") if $action =~ "PCSX2"; + exec("rpcs3") if $action =~ "RPCS3"; + exec("remmina") if $action =~ "Remmina"; + exec("rclone-browser") if $action =~ "Rclone Browser"; + exec("insomnia") if $action =~ "Insomnia"; + exec("vmware") if $action =~ "VMware"; + exec("dbeaver") if $action =~ "DBeaver"; + exec("onlyoffice-desktopeditors") if $action =~ "OnlyOffice"; + exec("nixGL", "mongodb-compass") if $action =~ "MongoDB Compass"; + exec("miro") if $action =~ "Miro"; + exec("/opt/forticlient/gui/FortiClient-linux-x64/FortiClient") if $action =~ "FortiClient VPN"; + exec("nixGL", "teams-for-linux") if $action =~ "Teams"; return; } @@ -249,7 +146,11 @@ sub main if (hostname() eq "po-rbo.ln.ysosecure.com") { $prompt .= WORK_LIST; } - $action = `dmenu -i -l 100 -sb '$color' -shb '$color' <<LIST + my $menu = "dmenu -sb '$color' -shb '$color'"; + if (defined $ENV{WAYLAND_DISPLAY}) { + $menu = "wmenu -S '$color'"; + } + $action = `$menu -i -l 100 <<LIST $prompt LIST`; if (not $action) { diff --git a/.local/bin/dmbookm b/.local/bin/dmbookm index 2bfeb21..22a9e52 100755 --- a/.local/bin/dmbookm +++ b/.local/bin/dmbookm @@ -15,6 +15,7 @@ use constant { use constant LIST => { graf => 'http://graf.joe.town/', zhinu => 'https://zhinu.jozan.org/', + claude => 'https://claude.ai', perplexity => 'https://perplexity.ai/', chatgpt => 'https://chatgpt.com/', discord => 'https://discord.com/', @@ -24,6 +25,7 @@ use constant LIST => { nua_gr_restops => 'https://grafana.nuabee.fr/d/Mz11bd07k/vue-d-ensemble-machines-atelier', nua_gr_alertops => 'https://grafana.nuabee.fr/d/WojOgXTmk/ops-alerts', nua_git => 'https://gitlab.int.ysosecure.com/', + nua_pipes => 'https://gitlab.int.ysosecure.com/ops/NuaProv/-/pipelines', nua_mbs => 'https://mbs.nuabee.com/', nua_hedgedoc => 'http://hedgedoc.int.ysosecure.com/', nua_doc => 'https://doc.int.ysosecure.com/', @@ -31,6 +33,10 @@ use constant LIST => { nua_zammad => 'https://support.nuabee.fr/', nua_atlas => 'https://atlas.nuabee.fr/', nua_share => 'https://share.nuabee.fr/', + nua_windmill => 'https://windmill.nuabee.fr/', + nua_aether => 'https://aether.int.ysosecure.com/ui', + nua_gaia => 'https://gaia.int.ysosecure.com/', + nua_certsrv => 'https://orca1.int.ysosecure.com/certsrv', }; sub main @@ -50,7 +56,7 @@ sub main if (HOSTNAME eq "mars") { $prefix += '/local'; } - for (keys %{LIST()}) { + for (sort keys %{LIST()}) { $list .= $_ . "\n"; } $choice = `printf "$list" | dmenu -i -l 100 -sb '$color' -shb '$color'`; diff --git a/.local/bin/dmlog b/.local/bin/dmlog index 756d9b9..7264d75 100755 --- a/.local/bin/dmlog +++ b/.local/bin/dmlog @@ -36,8 +36,13 @@ sub confirm for (@{+CONFIRM}) { $list .= $_ . "\n"; } + + my $menu = "dmenu -sb '$color' -shb '$color'"; + if (defined $ENV{WAYLAND_DISPLAY}) { + $menu = "wmenu -S '$color'"; + } $choice = `printf "%s" "$list" | \ - dmenu -i -p "$var?" -sb '$color' -shb '$color'`; + $menu -i -p "$var?"`; chomp $choice; if ($choice eq ${+CONFIRM}[1]) { return (1); @@ -52,12 +57,28 @@ sub action chomp $var; if ($var eq ${+LIST}[0]) { - exec(XSCREENSAVER_PATH, '-lock'); + if (defined $ENV{WAYLAND_DISPLAY}) { + exec("waylock", + "-init-color", "0x1d2021", + "-input-color", "0xd79921", + "-fail-color", "0xcc241d"); + } + else { + exec(XSCREENSAVER_PATH, '-lock'); + } } elsif ($var eq ${+LIST}[1]) { $pid = fork(); if (not $pid) { - exec(XSCREENSAVER_PATH, '-lock'); + if (defined $ENV{WAYLAND_DISPLAY}) { + exec("waylock", + "-init-color", "0x1d2021", + "-input-color", "0xd79921", + "-fail-color", "0xcc241d"); + } + else { + exec(XSCREENSAVER_PATH, '-lock'); + } } else { system( @@ -72,7 +93,7 @@ sub action exec(LOGINCTL_PATH, 'suspend'); } elsif (HOSTNAME eq 'po-rbo') { - exec('systemctl', 'suspend'); + exec('doas', 'systemctl', 'suspend'); } exec(ACPI_PATH, '-s', '3'); } @@ -91,7 +112,7 @@ sub action exec(LOGINCTL_PATH, 'reboot'); } elsif (HOSTNAME eq 'po-rbo') { - exec('systemctl', 'reboot'); + exec('doas', 'systemctl', 'reboot'); } system( NOTIF_PATH, @@ -117,7 +138,7 @@ sub action exec(LOGINCTL_PATH, 'poweroff'); } elsif (HOSTNAME eq 'po-rbo') { - exec('systemctl', 'poweroff'); + exec('doas', 'systemctl', 'poweroff'); } exec(SHUTDOWN_PATH, '-p', 'now'); } @@ -138,7 +159,12 @@ sub main for (@{+LIST}) { $list .= $_ . "\n"; } - $choice = `printf "%s" "$list" | dmenu -i -sb '$color' -shb '$color'`; + + my $menu = "dmenu -sb '$color' -shb '$color'"; + if (defined $ENV{WAYLAND_DISPLAY}) { + $menu = "wmenu -S '$color'"; + } + $choice = `printf "%s" "$list" | $menu -i`; action($choice, $color); return (0); } diff --git a/.local/bin/dmotp b/.local/bin/dmotp index 97f015f..243f48c 100755 --- a/.local/bin/dmotp +++ b/.local/bin/dmotp @@ -6,10 +6,10 @@ if echo "$1" | grep '^#' 2>&1; then fi if [ -n "$WAYLAND_DISPLAY" ]; then - dmenu=dmenu-wl - xdotool="ydotool type --file -" + dmenu="wmenu -i -l 15 -S $color" + xdotool="ydotool type --delay 15 --file -" elif [ -n "$DISPLAY" ]; then - dmenu=dmenu + dmenu="dmenu -i -l 15 -sb $color -shb $color" xdotool="xdotool type --delay 15 --clearmodifiers --file -" else echo "Error: No Wayland or X11 display detected" >&2 @@ -19,7 +19,7 @@ fi prefix=${PASSWORD_STORE_DIR-~/.local/share/pass}/otp rprefix=$(printf "%s" $prefix | sed 's/\//\\\//g') password_files=$(ls "$prefix"/*.gpg | sed 's/^'${rprefix}'\///g' | sed 's/\.gpg//g') -password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15 -sb "$color" -shb "$color") +password=$(printf "%s\n" "${password_files}" | $dmenu) [ -n "$password" ] || exit diff --git a/.local/bin/dmpass b/.local/bin/dmpass index d5b0494..475b96e 100755 --- a/.local/bin/dmpass +++ b/.local/bin/dmpass @@ -13,10 +13,10 @@ fi if [ -n "$WAYLAND_DISPLAY" ]; then - dmenu=dmenu-wl - xdotool="ydotool type --file -" + dmenu="wmenu -i -l 15 -S $color" + xdotool="ydotool type --delay 15 --file -" elif [ -n "$DISPLAY" ]; then - dmenu=dmenu + dmenu="dmenu -i -l 15 -sb $color -shb $color" xdotool="xdotool type --delay 15 --clearmodifiers --file -" else echo "Error: No Wayland or X11 display detected" >&2 @@ -26,7 +26,7 @@ fi prefix=${PASSWORD_STORE_DIR-~/.local/share/pass} rprefix=$(printf "%s" $prefix | sed 's/\//\\\//g') password_files=$(ls "$prefix"/*.gpg "$prefix"/*/*.gpg | sed 's/^'${rprefix}'\///g' | sed 's/\.gpg//g') -password=$(printf "%s\n" "${password_files}" | "$dmenu" -i -l 15 -sb "$color" -shb "$color") +password=$(printf "%s\n" "${password_files}" | $dmenu) [ -n "$password" ] || exit @@ -35,9 +35,17 @@ p="$(pass show "$password")" if [ $full -eq 1 ]; then id=$(printf "%s" "$password" | sed 's/.*___//') printf "%s\n" $id | { IFS= read -r pass; printf %s "$id"; } | $xdotool - xdotool key Tab + if [ -n "$WAYLAND_DISPLAY" ]; then + ydotool key 15:1 15:0 + else + xdotool key Tab + fi printf "%s\n" "$p" | { IFS= read -r pass; printf %s "$pass"; } | $xdotool - xdotool key Return + if [ -n "$WAYLAND_DISPLAY" ]; then + ydotool key 28:1 28:0 + else + xdotool key Return + fi exit fi diff --git a/.local/bin/dmrun b/.local/bin/dmrun index f47c232..41c0e0e 100755 --- a/.local/bin/dmrun +++ b/.local/bin/dmrun @@ -11,7 +11,11 @@ sub main if (@ARGV == 1) { $color = $ARGV[0]; } - return exec("dmenu_run -i -sb '$color' -shb '$color'"); + my $menu = "dmenu_run -sb '$color' -shb '$color'"; + if (defined $ENV{WAYLAND_DISPLAY}) { + $menu = "wmenu-run -S '$color'"; + } + return exec("$menu -i"); } main(); diff --git a/.local/bin/linkview b/.local/bin/linkview index 1523e33..d276634 100755 --- a/.local/bin/linkview +++ b/.local/bin/linkview @@ -14,13 +14,20 @@ use POSIX qw(setsid); use feature qw(switch); no warnings qw(experimental::smartmatch); +my $menu = "dmenu"; +my $IMGVIEW_PATH = 'nsxiv -b -a'; + +if (defined $ENV{WAYLAND_DISPLAY}) { + $menu = "wmenu"; + $IMGVIEW_PATH = 'imv'; +} + use constant { TERMINAL_PATH => $TERMINAL, MPV_PATH => 'mpv', YTDL_PATH => 'yt-dlp', FETCH_PATH => 'fetch', CURL_PATH => 'curl', - IMGVIEW_PATH => 'nsxiv', ZATHURA_PATH => 'zathura', W3M_PATH => 'w3m', BROWSER_PATH => $BROWSER, @@ -34,7 +41,7 @@ use constant PROG_LIST => "" . "ytdl" . "\n" . "ytdl thumbnail" . "\n" . "fetch" . "\n" . -"nsxiv" . "\n" . +"img" . "\n" . "zathura" . "\n" . "w3m" . "\n" . "browser" . "\n" . @@ -88,7 +95,7 @@ sub open_link $ret = -1; if ($a eq "ytdl") { $list = QUAL_LIST; - $quality = `printf "$list" | dmenu -i -l 8`; + $quality = `printf "$list" | $menu -l 8`; if (not $quality) { exit 0; } @@ -328,12 +335,14 @@ sub open_link $file_name = $tmp; $file_name =~ s/.+\///g; chomp $file_name; - system(IMGVIEW_PATH, '-b', '-a', $file_name); + system("magick", $file_name, $file_name . ".jpg"); + system($IMGVIEW_PATH . " " . $file_name . ".jpg"); unlink($file_name); + unlink($file_name . ".jpg"); exit 0; } } - elsif ($a eq "nsxiv" || $a eq "zathura") { + elsif ($a eq "img" || $a eq "zathura") { $pid = fork(); if (not $pid) { setsid(); @@ -355,8 +364,8 @@ sub open_link system(FETCH_PATH, '-q', $url); } } - if ($a eq "nsxiv") { - exec(IMGVIEW_PATH, '-b', '-a', $file_name); + if ($a eq "img") { + exec($IMGVIEW_PATH . " " . $file_name); } else { exec(ZATHURA_PATH, $file_name); @@ -379,9 +388,15 @@ sub open_link $pid = fork(); if (not $pid) { setsid(); - capture { - exec(COPYQ_PATH, "copy", $url); - }; + if (defined $ENV{WAYLAND_DISPLAY}) { + system("echo -n " . $url . " | wl-copy"); + exit(0); + } + else { + capture { + exec(COPYQ_PATH, "copy", $url); + }; + } } } return; @@ -393,7 +408,7 @@ sub dmenu_prompt my $answer; my $list = PROG_LIST; - $answer = `printf "$list\nURL: $url\n" | dmenu -i`; + $answer = `printf "$list\nURL: $url\n" | $menu -i`; chomp $answer; return $answer; } diff --git a/.local/bin/setwp b/.local/bin/setwp index 98938c5..5340138 100755 --- a/.local/bin/setwp +++ b/.local/bin/setwp @@ -4,6 +4,8 @@ use strict; use warnings; use File::HomeDir qw(home); use File::Copy; +use File::Find; +use POSIX qw(setsid); use constant { WP_POOL => home() . '/pics/wp/' @@ -12,11 +14,13 @@ use constant FEH_PATH => 'feh'; sub get_pool_files { + my ($pool) = (@_); my @files; - opendir(DIR, WP_POOL) or die "Couldn't open directory " . WP_POOL . ": $!"; - @files = grep { !/^\./ } readdir(DIR); - closedir(DIR); + $pool = WP_POOL if not @_; + find(sub { + push @files, $File::Find::name if -f; + }, $pool); return @files; } @@ -27,27 +31,44 @@ sub choose_wp my $wp; $rand = int(rand(@files)); - $wp = WP_POOL . $files[$rand]; + $wp = $files[$rand]; return $wp; } sub set_wp { my ($wp) = @_; + my $pid; + my $old_pid; return 1 if !(-r $wp) || !(-f $wp); - system( - FEH_PATH, - '--no-fehbg', - '--image-bg', - '#1d2021', - '--bg-fill', - $wp, - '--bg-fill', - $wp, - '--bg-fill', - $wp - ); + + if (defined $ENV{WAYLAND_DISPLAY}) { + $old_pid = `pidof swaybg`; + chomp $old_pid; + $pid = fork(); + if (not $pid) { + setsid(); + exec("swaybg", "--image", $wp); + } else { + sleep(1); + exec("kill", $old_pid); + } + } + else { + system( + FEH_PATH, + '--no-fehbg', + '--image-bg', + '#1d2021', + '--bg-fill', + $wp, + '--bg-fill', + $wp, + '--bg-fill', + $wp + ); + } return 0; } @@ -87,8 +108,12 @@ sub main if (@ARGV != 0 && -f $ARGV[0]) { $ret = set_wp($ARGV[0]); } + elsif (@ARGV != 0 && -d $ARGV[0]) { + $wp = choose_wp(get_pool_files($ARGV[0])); + $ret = set_wp($wp); + } else { - $wp = choose_wp(get_pool_files()); + $wp = choose_wp(get_pool_files(WP_POOL)); $ret = set_wp($wp); } if (@ARGV == 0 || (@ARGV != 0 && $ARGV[0] ne "-nw")) { diff --git a/.w3m/config b/.local/state/w3m/config index 0bb7e83..0bb7e83 100644 --- a/.w3m/config +++ b/.local/state/w3m/config diff --git a/.local/state/w3m/history b/.local/state/w3m/history new file mode 100644 index 0000000..d2b593c --- /dev/null +++ b/.local/state/w3m/history @@ -0,0 +1,9 @@ +https://www.google.com/ +https://www.google.com/search?ie=ISO-8859-1&hl=fr&source=hp&q=cours+du+bitcoin&btnG=Recherche+Google&iflsig=AO6bgOgAAAAAZY1Cs3AMLLjrqqFlzuOFHPgJsUMgl45-&gbv=1 +file:///home/r_bousset/atlas.nuabee.fr +https://atlas.nuabee.fr/account/login/ +https://atlas.nuabee.fr/ +file:///tmp/tmpmail/tmpmail.html +file:///home/r_bousset/nuabee.fr +https://nuabee.fr/ +https://lite.duckduckgo.com/lite/ diff --git a/.w3m/keymap b/.local/state/w3m/keymap index c0b357c..c0b357c 100644 --- a/.w3m/keymap +++ b/.local/state/w3m/keymap diff --git a/.w3m/mailcap b/.local/state/w3m/mailcap index b51796f..b51796f 100644 --- a/.w3m/mailcap +++ b/.local/state/w3m/mailcap diff --git a/.ssh/config b/.ssh/config index b2fd9ba..6c52b02 100644 --- a/.ssh/config +++ b/.ssh/config @@ -1,5 +1,6 @@ Host * !mars !mother !helios User root + StrictHostKeyChecking no Host mars User jozan Host mother |