From e9a60169b50f22fac2b806bc77be18e27c76d74b Mon Sep 17 00:00:00 2001 From: Klesh Wong Date: Wed, 18 Nov 2020 10:34:52 +0800 Subject: [PATCH] [misc] remove bak folder --- README.md | 1 - apps/wd-passport.sh | 23 + bak/bin/02-install-base-pkgs.fish | 91 ---- bak/bin/03-create-user.fish | 7 - bak/bin/03-install-bspwm.fish | 6 - bak/bin/03-install-dwm.fish | 19 - bak/bin/03-install-i3.fish | 6 - bak/bin/04-install-aur-pkgs.fish | 18 - bak/bin/05-config-sys.fish | 57 --- bak/bin/06-config-user.fish | 74 --- bak/bin/07-intel-graphic.fish | 1 - bak/bin/07-kvm.fish | 13 - bak/bin/07-nodejs.fish | 18 - bak/bin/07-printing.fish | 3 - bak/bin/07-wd-passport.fish | 9 - bak/config/bspwm/arrange-desktops | 66 --- bak/config/bspwm/bspwmrc | 34 -- bak/config/i3/config | 237 ---------- bak/config/i3/lock.fish | 9 - bak/config/polybar/config | 435 ----------------- bak/config/polybar/config-internal | 436 ------------------ bak/config/polybar/launch.sh | 20 - bak/config/rofi/config.rasi | 74 --- bak/config/sxhkd/arrange | 85 ---- bak/config/sxhkd/launch.sh | 10 - bak/config/sxhkd/sxhkdrc | 102 ---- .../consolefont-for-hidpi | 2 +- 27 files changed, 24 insertions(+), 1832 deletions(-) create mode 100755 apps/wd-passport.sh delete mode 100644 bak/bin/02-install-base-pkgs.fish delete mode 100644 bak/bin/03-create-user.fish delete mode 100644 bak/bin/03-install-bspwm.fish delete mode 100644 bak/bin/03-install-dwm.fish delete mode 100644 bak/bin/03-install-i3.fish delete mode 100644 bak/bin/04-install-aur-pkgs.fish delete mode 100644 bak/bin/05-config-sys.fish delete mode 100644 bak/bin/06-config-user.fish delete mode 100644 bak/bin/07-intel-graphic.fish delete mode 100644 bak/bin/07-kvm.fish delete mode 100644 bak/bin/07-nodejs.fish delete mode 100644 bak/bin/07-printing.fish delete mode 100644 bak/bin/07-wd-passport.fish delete mode 100644 bak/config/bspwm/arrange-desktops delete mode 100644 bak/config/bspwm/bspwmrc delete mode 100644 bak/config/i3/config delete mode 100644 bak/config/i3/lock.fish delete mode 100644 bak/config/polybar/config delete mode 100644 bak/config/polybar/config-internal delete mode 100755 bak/config/polybar/launch.sh delete mode 100644 bak/config/rofi/config.rasi delete mode 100644 bak/config/sxhkd/arrange delete mode 100755 bak/config/sxhkd/launch.sh delete mode 100644 bak/config/sxhkd/sxhkdrc rename bak/bin/01-set-hidpi-font.fish => bin/consolefont-for-hidpi (57%) mode change 100644 => 100755 diff --git a/README.md b/README.md index 2a5df9d..f6cf9b0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ -TODO # dotfiles * openurl copy move to dmenu diff --git a/apps/wd-passport.sh b/apps/wd-passport.sh new file mode 100755 index 0000000..16e16e5 --- /dev/null +++ b/apps/wd-passport.sh @@ -0,0 +1,23 @@ +#!/bin/sh + +DIR=$(dirname "$(readlink -f "$0")") +. "$DIR/../env.sh" + + +# install WD Passport decryption +case "$PM" in + apt) + ;; + pacman) + sudo pacman -Sy python2-pip lsscsi + sudo pip2 install py_sg + ;; +esac + +# download python script +PREFIX=~/.local/bin +mkdir -p $PREFIX +curl -L https://github.com/0-duke/wdpassport-utils/raw/master/wdpassport-utils.py \ + | sed 's/python/python2/' \ + > $PREFIX/wdpassport-utils +chmod +x $PREFIX/wdpassport-utils diff --git a/bak/bin/02-install-base-pkgs.fish b/bak/bin/02-install-base-pkgs.fish deleted file mode 100644 index 55e2c43..0000000 --- a/bak/bin/02-install-base-pkgs.fish +++ /dev/null @@ -1,91 +0,0 @@ -#!/usr/bin/env fish - -set DIR (dirname (dirname (readlink -f (status --current-filename)))) - -# cli basic tooling -pacman -S \ - base-devel \ - vim neovim \ - tmux bc \ - unzip p7zip \ - openssh \ - numlockx \ - axel \ - exfat-utils \ - man \ - sudo - -# gui basic tooling -pacman -S \ - xorg-server xorg-xinit xorg-xrandr xorg-xev xorg-xbacklight xorg-xprop \ - xss-lock \ - xorg-xsetroot xdo xdotool \ - alsa-firmware alsa-utils alsa-plugins pulseaudio-alsa pulseaudio pavucontrol \ - arandr autorandr \ - dunst \ - picom \ - xclip xsel \ - ibus ibus-table ibus-table-chinese - #fcitx fcitx-configtool fcitx-gtk2 fcitx-gtk3 fcitx-qt5 - - -# gui file manager -pacman -S \ - thunar gvfs-smb gvfs-mtp thunar-archive-plugin file-roller tumbler - -# network manger -pacman -S \ - networkmanager network-manager-applet -systemctl enable NetworkManager -systemctl start NetworkManager - -# keyring -pacman -S \ - gnome-keyring libsecret - - -# gui apps -pacman -S \ - #chromium \ - flameshot \ - keepassxc \ - libreoffice-fresh \ - gimp \ - nitrogen \ - alacritty \ - nextcloud-client \ - zathura zathura-pdf-mupdf sxiv\ - lxappearance arc-gtk-theme arc-icon-theme qt5ct qt5-styleplugins -# open qt5ct and set theme to gtk2 - - -# fonts -pacman -S \ - terminus-font ttf-droid freetype2 ttf-cascadia-code ttf-dejavu wqy-microhei-lite \ - gucharmap - -# media playing -pacman -S \ - mpd mpc ncmpcpp mpv - -# bluetooth -pacman -S \ - bluez bluez-utils blueman pulseaudio-bluetooth -systemctl enable bluetooth -systemctl start bluetooth - -# docker -pacman -S docker -mkdir -p /etc/docker -echo '{ - "registry-mirrors": ["https://izuhlbap.mirror.aliyuncs.com"] -}' > /etc/docker/daemon.json -systemctl enable docker -systemctl restart docker - - -# python -sudo pacman -S python python-pip -sudo cp -r $DIR/pip /root/.pip -sudo pip install ranger-fm ueberzug - diff --git a/bak/bin/03-create-user.fish b/bak/bin/03-create-user.fish deleted file mode 100644 index c9ec88d..0000000 --- a/bak/bin/03-create-user.fish +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env fish - -if test -z "$argv" - echo please provide a user name to proceed - exit -1 -end -useradd -G wheel,docker -m $argv diff --git a/bak/bin/03-install-bspwm.fish b/bak/bin/03-install-bspwm.fish deleted file mode 100644 index 569f45d..0000000 --- a/bak/bin/03-install-bspwm.fish +++ /dev/null @@ -1,6 +0,0 @@ -pacman -S \ - bspwm sxhkd i3lock - -yay -S \ - otf-nerd-fonts-fira-code \ - polybar-git diff --git a/bak/bin/03-install-dwm.fish b/bak/bin/03-install-dwm.fish deleted file mode 100644 index 6b82aa1..0000000 --- a/bak/bin/03-install-dwm.fish +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env fish - -# install dmenu -sudo pacman -S \ - dmenu xorg-xsetroot trayer man-pages - -mkdir -p ~/Projects/suckless - -git clone https://gitee.com/klesh/st.git ~/Projects/suckless/st -cd ~/Projects/suckless/st && sudo rm -f config.h && sudo make clean install - -git clone https://gitee.com/klesh/slock.git ~/Projects/suckless/slock -cd ~/Projects/suckless/slock && sudo rm -f config.h && sudo make clean install - -git clone https://gitee.com/klesh/dwm.git ~/Projects/suckless/dwm -cd ~/Projects/suckless/dwm && sudo rm -f config.h && sudo make clean install - -git clone https://gitee.com/klesh/dmenu.git ~/Projects/suckless/dmenu -cd ~/Projects/suckless/dmenu && sudo rm -f config.h && sudo make clean install diff --git a/bak/bin/03-install-i3.fish b/bak/bin/03-install-i3.fish deleted file mode 100644 index 84a6f2e..0000000 --- a/bak/bin/03-install-i3.fish +++ /dev/null @@ -1,6 +0,0 @@ - pacman -S \ - i3-gaps i3lock - -yay -S \ - otf-nerd-fonts-fira-code \ - polybar-git diff --git a/bak/bin/04-install-aur-pkgs.fish b/bak/bin/04-install-aur-pkgs.fish deleted file mode 100644 index e2908fa..0000000 --- a/bak/bin/04-install-aur-pkgs.fish +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env fish - -if not type yay 1>/dev/null 2>/dev/null - git clone https://aur.archlinux.org/yay.git ~/.yay - cd ~/.yay - makepkg -si -end - -# ttf-symbola-free: st might crash if emoji font inexists when rendering - -yay -S \ - google-chrome \ - fcitx-skins \ - ttf-nerd-fonts-symbols \ - autojump - -# for feh -yay -S ttf-consolas-with-yahei-powerline-git diff --git a/bak/bin/05-config-sys.fish b/bak/bin/05-config-sys.fish deleted file mode 100644 index 9779709..0000000 --- a/bak/bin/05-config-sys.fish +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env fish - -if test (id -u) -ne 0 - set script_name (status --current-filename) - echo "please run this script as `sudo $script_name`" - exit -1 -end - -set DIR (dirname (dirname (readlink -f (status --current-filename)))) -set DRYRUN 0 - -function run-cmd - if [ "$DRYRUN" = "1" ] - echo $argv - else - eval $argv - end -end - -echo '1. enlarge font size for HiDPI console' -run-cmd "echo 'FONT=ter-u24b' > /etc/vconsole.conf" - -echo '2. enlarge font size for HiDPI disk encryption interface' -echo make sure that `keyboard consolefont` hooks are before `encrypt` in /etc/mkinitcpio.conf -read -l -P 'Are you sure that HOOKS were set properly? [y/N]: ' answer -if [ "$answer" != 'y' ] - echo skip disk decryption interface enhancement...`` -else - run-cmd mkinitcpio -p linux -end - -echo '3. enhance font rendering for CJK users' -run-cmd ln -sf /etc/fonts/conf.avail/70-no-bitmaps.conf /etc/fonts/conf.d -run-cmd ln -sf /etc/fonts/conf.avail/10-sub-pixel-rgb.conf /etc/fonts/conf.d -run-cmd ln -sf /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d -run-cmd cp $DIR/fonts/freetype2.sh /etc/profile.d/freetype2.sh -run-cmd cp $DIR/fonts/local.conf /etc/fonts/local.conf - -echo '4. setting autologin on tty1' -read -l -P 'Please enter autologin username (empty to skip): ' username -if test -z "$username" - echo skip autologin setup -else - run-cmd mkdir -p /etc/systemd/system/getty@tty1.service.d - run-cmd sed -r "s/USERNAME/$username/g" $DIR/systemd/getty1-override.conf > /etc/systemd/system/getty@tty1.service.d/override.conf -end - -# install lock-on-suspend -#echo '5. install lock-on-suspend for systemd' -## make sure locking before suspended -#cp $DIR/systemd/lock-on-suspend.service /etc/systemd/system/ -#systemctl enable lock-on-suspend - -# make Thunar show image size on status bar -xfconf-query --channel thunar --property /misc-image-size-in-statusbar --create --type bool --set true - -echo 'FINISHED' diff --git a/bak/bin/06-config-user.fish b/bak/bin/06-config-user.fish deleted file mode 100644 index 9ce74ca..0000000 --- a/bak/bin/06-config-user.fish +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env fish - -switch (uname) -case Darwin - if not which greadlink 1>/dev/null 2>/dev/null - brew install coreutils - end - set DIR (dirname (dirname (greadlink -e (status --current-filename)))) -case '*' - set DIR (dirname (dirname (readlink -f (status --current-filename)))) -end - -set DRYRUN 0 - -function run-cmd - if [ "$DRYRUN" = "1" ] - echo $argv - else - eval $argv - end -end - -function link-dotfolder - echo making link to ~/.$argv - run-cmd "mkdir -p ~/.$argv/" - for i in (ls $DIR/$argv) - if test -e ~/.$argv/$i - run-cmd "rm -rf ~/.$argv/$i" - end - set CMD "ln -sf $DIR/$argv/$i ~/.$argv/" - run-cmd $CMD - end -end - -function link-dotfile - echo making link to ~/.$argv - if test -e ~/.$argv - run-cmd "rm -rf ~/.$argv" - end - run-cmd "ln -sf $DIR/$argv ~/.$argv" -end - -set -l argv -argparse 'c/cli-only' -- $argv - - -link-dotfolder config -link-dotfolder pip -link-dotfile tmux.conf -#link-dotfile vimrc -rm -rf ~/.vimrc ~/.vim/coc-settings.json -ln -s $DIR/config/nvim/init.vim ~/.vimrc -mkdir -p ~/.vim -ln -s $DIR/config/nvim/coc-settings.json ~/.vim/coc-settings.json -# install tpm -git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm - -if [ -n "$_flag_c" ] - link-dotfile xinitrc - link-dotfile Xresources - #link-dotfile Xmodmap - # set zathura as default pdf viewer - xdg-mime default org.pwmt.zathura.desktop application/pdf - - - # setup mpd - mkdir -p ~/.mpd/playlists - systemctl --user enable mpd - systemctl --user start mpd - - # install ranger plugin - yay -S ttf-nerd-fonts-symbols - git clone https://github.com/alexanderjeurissen/ranger_devicons ~/.config/ranger/plugins/ranger_devicons -end diff --git a/bak/bin/07-intel-graphic.fish b/bak/bin/07-intel-graphic.fish deleted file mode 100644 index 666697d..0000000 --- a/bak/bin/07-intel-graphic.fish +++ /dev/null @@ -1 +0,0 @@ -sudo pacman -S xf86-video-intel mesa-demos diff --git a/bak/bin/07-kvm.fish b/bak/bin/07-kvm.fish deleted file mode 100644 index 55489fb..0000000 --- a/bak/bin/07-kvm.fish +++ /dev/null @@ -1,13 +0,0 @@ -#!/usr/bin/env fish - -sudo pacman -S qemu libvirt virt-manager ebtables dnsmasq virt-viewer - -# pcie passthrough -#sudo pacman -S ovmf - -sudo systemctl enable libvirtd.service -sudo systemctl start libvirtd.service - -# use vm by virsh/virt-viewer -# $ virsh start -# $ virt-viewer diff --git a/bak/bin/07-nodejs.fish b/bak/bin/07-nodejs.fish deleted file mode 100644 index 50188ce..0000000 --- a/bak/bin/07-nodejs.fish +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env fish - - -sudo pacman -S nodejs yarn -yarnpkg config set registry https://registry.npm.taobao.org --global && \ -yarnpkg config set disturl https://npm.taobao.org/dist --global && \ -yarnpkg config set sass_binary_site https://npm.taobao.org/mirrors/node-sass --global && \ -yarnpkg config set electron_mirror https://npm.taobao.org/mirrors/electron/ --global && \ -yarnpkg config set puppeteer_download_host https://npm.taobao.org/mirrors --global && \ -yarnpkg config set chromedriver_cdnurl https://npm.taobao.org/mirrors/chromedriver --global && \ -yarnpkg config set operadriver_cdnurl https://npm.taobao.org/mirrors/operadriver --global && \ -yarnpkg config set phantomjs_cdnurl https://npm.taobao.org/mirrors/phantomjs --global && \ -yarnpkg config set selenium_cdnurl https://npm.taobao.org/mirrors/selenium --global && \ -yarnpkg config set sqlite3_binary_host_mirror "https://foxgis.oss-cn-shanghai.aliyuncs.com/" --global && \ -yarnpkg config set profiler_binary_host_mirror "https://npm.taobao.org/mirrors/node-inspector/" --global && \ -yarnpkg config set chromedriver_cdnurl "https://cdn.npm.taobao.org/dist/chromedriver" --global && \ -yarnpkg config set node_inspector_cdnurl https://npm.taobao.org/mirrors/node-inspector --global && \ -yarnpkg config set sentrycli_cdnurl 'https://npm.taobao.org/mirrors/sentry-cli' diff --git a/bak/bin/07-printing.fish b/bak/bin/07-printing.fish deleted file mode 100644 index 8920c91..0000000 --- a/bak/bin/07-printing.fish +++ /dev/null @@ -1,3 +0,0 @@ -# network printer -pacman -S \ - samba cups ghostscript diff --git a/bak/bin/07-wd-passport.fish b/bak/bin/07-wd-passport.fish deleted file mode 100644 index 5ab4a27..0000000 --- a/bak/bin/07-wd-passport.fish +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env fish - -sudo pacman -Sy python2-pip lsscsi -sudo pip2 install py_sg - -mkdir -p ~/Programs/bin -curl -L https://github.com/0-duke/wdpassport-utils/raw/master/wdpassport-utils.py | sed 's/python/python2/' \ - > ~/Programs/bin/wdpassport-utils -chmod +x ~/Programs/bin/wdpassport-utils diff --git a/bak/config/bspwm/arrange-desktops b/bak/config/bspwm/arrange-desktops deleted file mode 100644 index bb85898..0000000 --- a/bak/config/bspwm/arrange-desktops +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env fish - - -function arrange-desktops - - # spread desktops to monitors - set monitors (bspc query --monitors --names) - set desktops (bspc query --desktops --names | grep -P '\d') - set monitor_count (count $monitors) - set desktop_count (count $desktops) - # make sure desktops are sufficent for all monitors - if test $desktop_count -lt $monitor_count - for i in (seq 1 9) - if not bspc query --desktops $i - bspc monitor --add-desktops $i - set desktops $desktops $i - set desktop_count (math "$desktop_count + 1") - if test $desktop_count -ge $monitor_count - break - end - end - end - end - # sort desktops - set desktops (echo $desktops | tr ' ' '\n' | sort) - # spreading - set dpm (math "ceil($desktop_count/$monitor_count)") - for i in (seq $monitor_count) - set start (math "(($i - 1) * $dpm) + 1") - set end (math "$start + $dpm - 1") - echo $start $end $desktops[$start..$end] - for d in $desktops[$start..$end] - bspc desktop $d --to-monitor $monitors[$i] - end - bspc monitor $monitors[$i] --reorder-desktops $desktops[$start..$end] - end - - # remove non-digital desktop - for desktop in (bspc query --desktops --names) - if not string match -r '^[1-9]$' $desktop - bspc desktop $desktop --remove - end - end -end - -function watch - while read - $HOME/.config/polybar/launch.sh - arrange-desktops - end -end - -function launch - killall -q bspc - bspc subscribe monitor_add monitor_remove | watch -end - -switch "$argv[1]" -case 'arrange' - arrange-desktops -case 'launch' - launch -case '*' - $HOME/.config/bspwm/arrange-desktops arrange - $HOME/.config/bspwm/arrange-desktops launch & -end diff --git a/bak/config/bspwm/bspwmrc b/bak/config/bspwm/bspwmrc deleted file mode 100644 index 39d47f0..0000000 --- a/bak/config/bspwm/bspwmrc +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env fish - -bspc config focus_follows_pointer true -bspc config pointer_follows_focus true -bspc config pointer_follows_monitor true -bspc config remove_disabled_monitors true -bspc config remove_unplugged_monitors true -bspc config pointer_modifier control -bspc config pointer_action1 none -bspc config pointer_action2 resize_corner -bspc config pointer_action3 move -bspc config border_width 2 -bspc config focused_border_color '#5b97f7' - - - -# set default cursor -xsetroot -cursor_name left_ptr -bspc rule --add Zathura state=tiled - - -$HOME/.config/bspwm/postswitch -$HOME/.config/polybar/launch.sh -$HOME/.config/picom/launch.sh -$HOME/.config/sxhkd/launch.sh -$HOME/.config/bspwm/arrange-desktops -xss-lock ~/.config/i3/lock.fish & -nm-applet & -blueman-applet & -numlockx & -dunst & -flameshot & -fcitx & -nextcloud & diff --git a/bak/config/i3/config b/bak/config/i3/config deleted file mode 100644 index 7b029da..0000000 --- a/bak/config/i3/config +++ /dev/null @@ -1,237 +0,0 @@ -# This file has been auto-generated by i3-config-wizard(1). -# It will not be overwritten, so edit it as you like. -# -# Should you change your keyboard layout some time, delete -# this file and re-run i3-config-wizard(1). -# - -# note: you can use `xev` to observe the keyname - -# i3 config file (v4) -# -# Please see https://i3wm.org/docs/userguide.html for a complete reference! - -set $mod Mod4 - -# Font for window titles. Will also be used by the bar unless a different font -# is used in the bar {} block below. -font pango:monospace 7 - -# Configure border style -new_window pixel 2 -#new_window normal 0 - -# Hide borders -hide_edge_borders none - -# set gaps -gaps inner 5 -gaps outer 0 - -# Smart gaps (gaps used if only more than one container on the workspace) -#smart_gaps on - -# Smart borders (draw borders around container only if it is not the only container on this workspace) -# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0) -smart_borders no_gaps - -# This font is widely installed, provides lots of unicode glyphs, right-to-left -# text rendering and scalability on retina/hidpi displays (thanks to pango). -#font pango:DejaVu Sans Mono 8 - -# Before i3 v4.8, we used to recommend this one as the default: -# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1 -# The font above is very space-efficient, that is, it looks good, sharp and -# clear in small sizes. However, its unicode glyph coverage is limited, the old -# X core fonts rendering does not support right-to-left and this being a bitmap -# font, it doesn’t scale on retina/hidpi displays. - -# Use Mouse+$mod to drag floating windows to their wanted position -floating_modifier $mod - -# define locker -set $lock "$HOME/.config/i3/lock.fish" - -# Define names for default workspaces for which we configure key bindings later on. -# We use variables to avoid repeating the names in multiple places. -set $ws1 "1" -set $ws2 "2" -set $ws3 "3" -set $ws4 "4" -set $ws5 "5" -set $ws6 "6" -set $ws7 "7" -set $ws8 "8" -set $ws9 "9" - -# Theme colors -# class border backgr. text indic. child_border -client.focused #5b97f7 #5b97f7 #ffffff #ff0000 -client.focused_inactive #002b36 #002b36 #ffffff #073642 -client.unfocused #002b36 #073642 #ffffff #073642 -client.urgent #002b36 #dc322f #fdf6e3 #002b36 -client.placeholder #000000 #0c0c0c #ffffff #000000 - -client.background #2B2C2B - -# switch to workspace -bindsym $mod+1 workspace $ws1 -bindsym $mod+2 workspace $ws2 -bindsym $mod+3 workspace $ws3 -bindsym $mod+4 workspace $ws4 -bindsym $mod+5 workspace $ws5 -bindsym $mod+6 workspace $ws6 -bindsym $mod+7 workspace $ws7 -bindsym $mod+8 workspace $ws8 -bindsym $mod+9 workspace $ws9 - -# move focused container to workspace -bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1 -bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2 -bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3 -bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4 -bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5 -bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6 -bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7 -bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8 -bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9 - -# move focused workspace -bindsym $mod+Ctrl+h move workspace to output left -bindsym $mod+Ctrl+j move workspace to output down -bindsym $mod+Ctrl+k move workspace to output up -bindsym $mod+Ctrl+l move workspace to output right - -# reload the configuration file -bindsym $mod+Shift+c reload -# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) -bindsym $mod+Shift+r restart -# toggle compositor -bindsym $mod+Shift+o exec --no-startup-id ~/.config/picom/toggle.fish -# restart polybar -bindsym $mod+Shift+p exec --no-startup-id ~/.config/polybar/launch.sh -# restart dunst -bindsym $mod+Shift+d exec --no-startup-id "killall dunst || dunst" -# redetect monitors profile -bindsym $mod+Shift+m exec --no-startup-id autorandr --change --force -# restart input method -bindsym $mod+Shift+i exec --no-startup-id fcitx -r - -# Set shut down, restart and locking features -bindsym $mod+0 mode "$mode_system" -set $mode_system (l)ock, (e)xit, (r)eboot, (s)hutdown -mode "$mode_system" { - bindsym l exec --no-startup-id $lock, mode "default" - bindsym e exec --no-startup-id i3-msg exit - bindsym r exec --no-startup-id reboot - bindsym s exec --no-startup-id shutdown now - - # exit system mode: "Enter" or "Escape" - bindsym Return mode "default" - bindsym Escape mode "default" -} - -# volume -bindsym XF86AudioRaiseVolume exec amixer -q sset Master 5%+ unmute -bindsym $mod+equal exec amixer -q sset Master 5%+ unmute - -bindsym XF86AudioLowerVolume exec amixer -q sset Master 5%- unmute -bindsym $mod+minus exec amixer -q sset Master 5%- unmute - -bindsym XF86AudioMute exec amixer -q sset Master toggle -bindsym $mod+BackSpace exec amixer -q sset Master toggle - -# mpc -bindsym XF86AudioPlay exec --no-startup-id mpc toggle -bindsym $mod+backslash exec --no-startup-id mpc toggle - -bindsym XF86AudioPrev exec --no-startup-id mpc prev -bindsym $mod+bracketleft exec --no-startup-id mpc prev - -bindsym XF86AudioNext exec --no-startup-id mpc next -bindsym $mod+bracketright exec --no-startup-id mpc next - -bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 15 -bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 15 - -# change focus -bindsym $mod+h focus left -bindsym $mod+j focus down -bindsym $mod+k focus up -bindsym $mod+l focus right - - -# changing workspace -bindsym $mod+n workspace next -bindsym $mod+p workspace prev -bindsym mod1+Tab workspace back_and_forth - -# container control -bindsym $mod+q [instance="^(?!floating-).*" con_id="__focused__"] kill -bindsym $mod+f fullscreen toggle -bindsym $mod+v split v -bindsym $mod+b split h -bindsym $mod+t layout tabbed -bindsym $mod+s layout toggle split -bindsym $mod+w focus parent -bindsym $mod+Shift+w focus child - - -set $step 64 -bindsym $mod+m resize grow width $step px -bindsym $mod+comma resize shrink width $step px -bindsym $mod+period resize grow height $step px -bindsym $mod+slash resize shrink height $step px - -# move focused window -bindsym $mod+Shift+h move left $step px -bindsym $mod+Shift+j move down $step px -bindsym $mod+Shift+k move up $step px -bindsym $mod+Shift+l move right $step px - -bindsym $mod+Shift+plus gaps inner current plus 5 -bindsym $mod+Shift+minus gaps inner current minus 5 -bindsym $mod+Ctrl+plus gaps outer current plus 5 -bindsym $mod+Ctrl+minus gaps outer current minus 5 - - -# floating -bindsym $mod+Shift+space floating toggle - -# hotkey for frequently used apps -bindsym F1 --release exec --no-startup-id flameshot gui -#bindsym $mod+Return exec urxvt -bindsym $mod+Return exec alacritty -bindsym $mod+space exec --no-startup-id "rofi -show combi" -bindsym Ctrl+Mod1+l exec --no-startup-id $lock -bindsym Ctrl+Mod1+n exec --no-startup-id chromium -bindsym Ctrl+Mod1+f exec --no-startup-id thunar -bindsym $mod+y [instance="^floating-music$"] scratchpad show move position center -bindsym $mod+g [instance="^floating-ranger$"] scratchpad show move position center -bindsym $mod+i [instance="^floating-ipython$"] scratchpad show move position center -bindsym $mod+o [instance="^floating-terminal$"] scratchpad show move position center - -# toggle capslock -bindsym $mod+c exec --no-startup-id xmodmap ~/Xmodmap - -# autostart apps -#exec --no-startup-id urxvt -name floating-music -e ncmpcpp -#for_window [instance="^floating-music$"] move scratchpad resize set 1600 800 -#exec --no-startup-id urxvt -name floating-ranger -e ranger --cmd="unmap q" -#for_window [instance="^floating-ranger$"] move scratchpad resize set 1600 800 -#exec --no-startup-id urxvt -name floating-ipython -e ipython -#for_window [instance="^floating-ipython$"] move scratchpad resize set 1600 800 -#exec --no-startup-id urxvt -name floating-terminal -#for_window [instance="^floating-terminal$"] move scratchpad resize set 1600 800 -#for_window [class="^ffplay$"] floating enable resize set 320 256, move position mouse -exec --no-startup-id ~/.config/picom/start.fish -exec --no-startup-id dunst -exec --no-startup-id nm-applet -exec --no8startup-id flameshot -exec --no-startup-id numlockx -exec --no-startup-id fcitx -exec --no-startup-id xss-lock $lock -exec --no-startup-id blueman-applet -exec --no-startup-id "sleep 5; nextcloud" -exec --no-startup-id ~/.config/polybar/launch.sh -exec --no-startup-id autorandr --change --force diff --git a/bak/config/i3/lock.fish b/bak/config/i3/lock.fish deleted file mode 100644 index 537e75c..0000000 --- a/bak/config/i3/lock.fish +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env fish - -if test -z (pidof i3lock) - if test -e ~/.config/locking.png - i3lock -i ~/.config/locking.png -t - else - i3lock -c 000000 - end -end diff --git a/bak/config/polybar/config b/bak/config/polybar/config deleted file mode 100644 index c91bb9f..0000000 --- a/bak/config/polybar/config +++ /dev/null @@ -1,435 +0,0 @@ -;========================================================== -; -; -; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗ -; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗ -; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝ -; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗ -; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║ -; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝ -; -; -; To learn more about how to configure Polybar -; go to https://github.com/jaagr/polybar -; -; The README contains alot of information -; -;========================================================== - -[colors] -;background = ${xrdb:color0:#222} -background = #66222222 -background-alt = #66444444 -;foreground = ${xrdb:color7:#222} -foreground = #dfdfdf -foreground-alt = #aaa -primary = #ffb52a -secondary = #e60053 -alert = #bd2c40 - -[bar/example] -monitor = ${env:MONITOR:eDP-1} -width = 100% -height = 27 -;offset-x = 1% -;offset-y = 1% -radius = 6.0 -fixed-center = false - -background = ${colors.background} -foreground = ${colors.foreground} - -line-size = 3 -line-color = #f00 - -border-size = 4 -border-color = #00000000 - -padding-left = 0 -padding-right = 2 - -module-margin-left = 1 -module-margin-right = 2 - -font-0 = Cascadia Code:size=10:style=regular -font-1 = WenQuanYi Micro Hei Light:size=9:antialias=true;0 -font-2 = FuraCode Nerd Font Mono:size=12;1 -font-3 = Wuncon Siji:pixelsize=12;1 - -modules-left = bspwm mpd -modules-center = -;modules-right = xbacklight pulseaudio cpu memory wlan eth battery temperature date -modules-right = xbacklight pulseaudio cpu memory battery temperature date - -tray-position = right -tray-padding = 2 -;tray-background = #0063ff - -wm-restack = bspwm -;wm-restack = i3 - -;override-redirect = true - -;scroll-up = bspwm-desknext -;scroll-down = bspwm-deskprev - -;scroll-up = i3wm-wsnext -;scroll-down = i3wm-wsprev - -cursor-click = pointer -cursor-scroll = ns-resize - -[module/xwindow] -type = internal/xwindow -label = %title:0:30:...% - -[module/xkeyboard] -type = internal/xkeyboard -blacklist-0 = num lock - -format-prefix = " " -format-prefix-foreground = ${colors.foreground-alt} -format-prefix-underline = ${colors.secondary} - -label-layout = %layout% -label-layout-underline = ${colors.secondary} - -label-indicator-padding = 2 -label-indicator-margin = 1 -label-indicator-background = ${colors.secondary} -label-indicator-underline = ${colors.secondary} - -[module/filesystem] -type = internal/fs -interval = 25 - -mount-0 = / - -label-mounted = %{F#0a81f5}%mountpoint%%{F-}: %percentage_used%% -label-unmounted = %mountpoint% not mounted -label-unmounted-foreground = ${colors.foreground-alt} - -[module/bspwm] -type = internal/bspwm - -;label-focused = %index% -label-focused = %name% -label-focused-background = ${colors.background-alt} -label-focused-underline= ${colors.primary} -label-focused-padding = 2 - -;label-occupied = %index% -label-occupied = %name% -label-occupied-padding = 2 - -;label-urgent = %index%! -label-urgent = %name%! -label-urgent-background = ${colors.alert} -label-urgent-padding = 2 - -;label-empty = %index% -label-empty = %name% -label-empty-foreground = ${colors.foreground-alt} -label-empty-padding = 2 - -; Separator in between workspaces -; label-separator = | - -[module/i3] -type = internal/i3 -format = -index-sort = true -wrapping-scroll = false - -; Only show workspaces on the same output as the bar -pin-workspaces = true - -label-mode-padding = 2 -label-mode-foreground = #000 -label-mode-background = ${colors.primary} - -; focused = Active workspace on focused monitor -label-focused = %index% -label-focused-background = ${module/bspwm.label-focused-background} -label-focused-underline = ${module/bspwm.label-focused-underline} -label-focused-padding = ${module/bspwm.label-focused-padding} - -; unfocused = Inactive workspace on any monitor -label-unfocused = %index% -label-unfocused-padding = ${module/bspwm.label-occupied-padding} - -; visible = Active workspace on unfocused monitor -label-visible = %index% -label-visible-background = ${self.label-focused-background} -label-visible-underline = ${self.label-focused-underline} -label-visible-padding = ${self.label-focused-padding} - -; urgent = Workspace with urgency hint set -label-urgent = %index% -label-urgent-background = ${module/bspwm.label-urgent-background} -label-urgent-padding = ${module/bspwm.label-urgent-padding} - -; Separator in between workspaces -; label-separator = | - - -[module/mpd] -type = internal/mpd -#format-online = -format-online = - -icon-prev =  -icon-stop =  -icon-play =  -icon-pause =  -icon-next =  - -label-song-maxlen = 40 -label-song-ellipsis = true - -[module/xbacklight] -type = internal/xbacklight - -format =