diff --git a/X11/init.d/init.sh b/X11/init.d/init.sh index 02ec45c..be81f62 100755 --- a/X11/init.d/init.sh +++ b/X11/init.d/init.sh @@ -1,8 +1,8 @@ #!/bin/sh -STATUS_BLOCKS="tray vol mic net bat kbd time date" dwmstatus & -dbus-update-activation-environment --systemd --all -systemctl --user import-environment DISPLAY +#STATUS_BLOCKS="tray vol mic net bat kbd time date" dwmstatus & +#dbus-update-activation-environment --systemd --all +#systemctl --user import-environment DISPLAY xset r rate 300 70 setxkbmap en #clipmenud & diff --git a/X11/xinitrc b/X11/xinitrc index 813506f..9c78739 100644 --- a/X11/xinitrc +++ b/X11/xinitrc @@ -45,5 +45,5 @@ if [ -d ~/.config/X11/init.d ] ; then fi while true; do - dwm >/dev/null 2>&1 + i3 >/dev/null 2>&1 done diff --git a/i3/config b/i3/config new file mode 100644 index 0000000..eee8d6c --- /dev/null +++ b/i3/config @@ -0,0 +1,142 @@ +# Preferences +#output * { +# bg ~/.config/backgrounds/default.jpg fill +#} + +#output HDMI-A-1 pos 0 0 + +#input type:touchpad { +# natural_scroll enabled +# dwt disabled +# tap enabled +#} + +#input type:pointer { +# accel_profile flat +#} + +#input type:keyboard { +# xkb_layout latam,us +# xkb_options grp:win_space_toggle +# repeat_delay 300 +# repeat_rate 70 +#} + +#set $opacity 0.9 + +set $mod Mod4 +set $alt Mod1 +set $left h +set $down j +set $up k +set $right l +# - +set $term alacritty +set $menu ~/.config/scripts/menu/menu run "Run:" +set $menu-input ~/.config/scripts/menu/menu-input +set $menu-output ~/.config/scripts/menu/menu-output +set $passmgr alacritty +set $passotp alacritty +set $filemgr thunar +set $browser firefox +# - +# - +set $col_fg #7a8478 +set $col_bg #121212 +set $col_ac #606060 + +# Keybinds +#floating_modifier $mod normal +# - +bindsym $mod+Return exec $term +bindsym $mod+r exec $menu +bindsym $mod+Shift+p exec $passmgr +bindsym $mod+Shift+o exec $passotp +bindsym $mod+e exec $filemgr +bindsym $mod+w exec $browser +bindsym $mod+i exec $menu-input +bindsym $mod+o exec $menu-output +bindsym XF86AudioRaiseVolume exec volup +bindsym XF86AudioLowerVolume exec voldown +bindsym XF86AudioMute exec mute +bindsym Shift+XF86AudioRaiseVolume exec micup +bindsym Shift+XF86AudioLowerVolume exec micdown +bindsym Shift+XF86AudioMute exec micmute +bindsym XF86MonBrightnessUp exec brightup +bindsym XF86MonBrightnessDown exec brightdown +#bindsym Print exec grim -g "$(slurp -d)" - | wl-copy +# - +bindsym $mod+Shift+q reload +bindsym $mod+p exec menu-power +bindsym $mod+c kill +# - +bindsym $mod+$left focus left +bindsym $mod+$down focus down +bindsym $mod+$up focus up +bindsym $mod+$right focus right +bindsym $mod+Left focus left +bindsym $mod+Down focus down +bindsym $mod+Up focus up +bindsym $mod+Right focus right +# - +bindsym $mod+Shift+$left move left +bindsym $mod+Shift+$down move down +bindsym $mod+Shift+$up move up +bindsym $mod+Shift+$right move right +bindsym $mod+Shift+Left move left +bindsym $mod+Shift+Down move down +bindsym $mod+Shift+Up move up +bindsym $mod+Shift+Right move right +# - +bindsym $mod+1 workspace " 1 " +bindsym $mod+2 workspace " 2 " +bindsym $mod+3 workspace " 3 " +bindsym $mod+4 workspace " 4 " +bindsym $mod+5 workspace " 5 " +bindsym $mod+Shift+1 move container to workspace " 1 " +bindsym $mod+Shift+2 move container to workspace " 2 " +bindsym $mod+Shift+3 move container to workspace " 3 " +bindsym $mod+Shift+4 move container to workspace " 4 " +bindsym $mod+Shift+5 move container to workspace " 5 " +# - +bindsym $mod+comma workspace next_on_output +bindsym $mod+period workspace prev_on_output +# - +bindsym $mod+Shift+t layout toggle tabbed split +bindsym $mod+f fullscreen +bindsym $mod+Shift+f floating toggle +# - +#bindsym $mod+Shift+c exec clipman pick -t wofi -T'--show dmenu -I' +bindsym $mod+n split horizontal; layout tabbed +bindsym $mod+s sticky toggle + +# Layout +client.focused $col_fg $col_fg $col_bg $col_fg $col_fg +client.unfocused $col_bg $col_bg $col_ac $col_bg $col_bg +default_border pixel 1 +#titlebar_border_thickness 2 +#titlebar_padding 2 +gaps inner 5 +font pango:JetBrainsMono Medium 8 + +bar { + position bottom + font pango:JetBrainsMono Medium 8 + status_command ~/.config/scripts/sway/swaystatus + tray_padding 4 + + colors { + background #00000000 + statusline #7a847890 + focused_workspace $col_fg $col_fg $col_bg + inactive_workspace #00000000 #00000000 #ebdbb270 + } +} + +for_window [class="Display-im6.q16"] floating enable + +# Autostart +#exec wl-paste -t text --watch clipman store +#exec wl-paste -p -t text --watch clipman store --histpath="~/.local/share/clipman.json" +#exec_always dbus-update-activation-environment WAYLAND_DISPLAY +#exec_always --no-startup-id /usr/libexec/xdg-desktop-portal -r diff --git a/scripts/install-package-list b/scripts/install-package-list new file mode 100755 index 0000000..812471e --- /dev/null +++ b/scripts/install-package-list @@ -0,0 +1,16 @@ +#!/bin/sh +PKG_LIST="${PKG_LIST:-$XDG_CONFIG_HOME/apt/packages}" + +if ! [ -f "$PKG_LIST" ]; then + echo "No package list found at PKG_LIST=$PKG_LIST" + exit 1 +fi + +pkgs="$(while read l; do + pkg="${l%%#*}" + if [ "$pkg" != "" ]; then + printf '%s ' "$pkg" + fi +done < "$PKG_LIST")" + +sudo apt install -y $pkgs diff --git a/scripts/menu/menu b/scripts/menu/menu index 2baab03..edfe45f 100755 --- a/scripts/menu/menu +++ b/scripts/menu/menu @@ -1,12 +1,7 @@ #!/bin/sh -PROMPT="$1" MODE="$2" -if [ "$PROMPT" = "" -o "$PROMPT" = "-h" ] ; then printf "Usage: menu [prompt] [run/pass]\n" ; return 0 ; fi -[ "$MODE" = "pass" ] && BPASS="-x" DPASS="-P" WPASS="-P" -BRUN="-run" DRUN="_run" TRUN="-run" FRUN="" WRUN="--show drun -I" -[ "$MODE" != "run" ] && BRUN="" DRUN="" TRUN="" FRUN="" WRUN="--show dmenu" +MENU_BACKEND="${MENU_BACKEND:-menu_bemenu}" # Configuration -menu="menu_wofi" font="JetbrainsMono" font_size="10" col_white="#ebdbb2" # White @@ -15,6 +10,10 @@ col_nf="#374145" # Normal foreground col_sb="#7fbbb3" # Selected background col_sf="#1e2326" # Selected foreground +_help() { + printf "Usage: menu [run/dmenu/pass] [prompt]\nDefault backend: %s\n" "$MENU_BACKEND" +} + menu_bemenu() { bemenu$BRUN \ --no-exec \ @@ -73,4 +72,26 @@ wofi $WRUN \ $WPASS } -$menu +MODE="$1" PROMPT="$2" +case "$MODE" in + run) + BRUN="-run" + DRUN="_run" + TRUN="-run" + FRUN="" + WRUN="--show drun -I" + $MENU_BACKEND ;; + dmenu) + BRUN="" + DRUN="" + TRUN="" + FRUN="" + WRUN="--show dmenu" + $MENU_BACKEND ;; + pass) + BPASS="-x" + DPASS="-P" + WPASS="-P" + $MENU_BACKEND ;; + *) _help ; exit 0;; +esac diff --git a/scripts/menu/menu-input b/scripts/menu/menu-input index ddd2ed5..7d9d06f 100755 --- a/scripts/menu/menu-input +++ b/scripts/menu/menu-input @@ -2,7 +2,7 @@ # Set default input device # Get proper name from sources -input=$(pactl list short sources | cut -f 2 | grep input | menu "Input:") +input=$(pactl list short sources | cut -f 2 | grep input | menu "dmenu" "Input:") # Set audio device, notify command success pactl set-default-source "$input" && notify-send -r 11 "󰕾 Default Input" "Set to '$input'" || notify-send -r 11 "󰕾 Default Input" "Didn't change" diff --git a/scripts/menu/menu-pass b/scripts/menu/menu-pass index c1d437b..717a7af 100755 --- a/scripts/menu/menu-pass +++ b/scripts/menu/menu-pass @@ -3,6 +3,6 @@ PASSWORD_STORE_DIR="$HOME/.local/share/password-store" MENU="$HOME/.config/scripts/menu/menu" -password="$(find "$PASSWORD_STORE_DIR" -type f -name '*.gpg' | sed "s@$PASSWORD_STORE_DIR/@@g ; s@.gpg@@g" | $MENU "Pass:")" +password="$(find "$PASSWORD_STORE_DIR" -type f -name '*.gpg' | sed "s@$PASSWORD_STORE_DIR/@@g ; s@.gpg@@g" | $MENU "dmenu" "Pass:")" -! [ -z "$password" ] && printf '%s' "$password" +! [ -z "$password" ] && printf '%s' "$password" || exit 1 diff --git a/shell/profile.d/xdgspec.sh b/shell/profile.d/xdgspec.sh index 84b3ee9..852fb1e 100644 --- a/shell/profile.d/xdgspec.sh +++ b/shell/profile.d/xdgspec.sh @@ -34,6 +34,5 @@ export \ PYTHON_HISTORY="$XDG_CACHE_HOME/python_history" \ SQLITE_HISTORY="$XDG_CACHE_HOME/sqlite_history" \ PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass" \ - XDG_DATA_DIRS="$XDG_DATA_HOME/flatpak/exports/share${XDG_DATA_DIRS:+:${XDG_DATA_DIRS}}" \ UNISON="$XDG_DATA_HOME"/unison