i3
This commit is contained in:
parent
9c21fb5f5c
commit
03618910f0
8 changed files with 193 additions and 15 deletions
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
STATUS_BLOCKS="tray vol mic net bat kbd time date" dwmstatus &
|
#STATUS_BLOCKS="tray vol mic net bat kbd time date" dwmstatus &
|
||||||
dbus-update-activation-environment --systemd --all
|
#dbus-update-activation-environment --systemd --all
|
||||||
systemctl --user import-environment DISPLAY
|
#systemctl --user import-environment DISPLAY
|
||||||
xset r rate 300 70
|
xset r rate 300 70
|
||||||
setxkbmap en
|
setxkbmap en
|
||||||
#clipmenud &
|
#clipmenud &
|
||||||
|
|
|
||||||
|
|
@ -45,5 +45,5 @@ if [ -d ~/.config/X11/init.d ] ; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
dwm >/dev/null 2>&1
|
i3 >/dev/null 2>&1
|
||||||
done
|
done
|
||||||
|
|
|
||||||
142
i3/config
Normal file
142
i3/config
Normal file
|
|
@ -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
|
||||||
16
scripts/install-package-list
Executable file
16
scripts/install-package-list
Executable file
|
|
@ -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
|
||||||
|
|
@ -1,12 +1,7 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
PROMPT="$1" MODE="$2"
|
MENU_BACKEND="${MENU_BACKEND:-menu_bemenu}"
|
||||||
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"
|
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
menu="menu_wofi"
|
|
||||||
font="JetbrainsMono"
|
font="JetbrainsMono"
|
||||||
font_size="10"
|
font_size="10"
|
||||||
col_white="#ebdbb2" # White
|
col_white="#ebdbb2" # White
|
||||||
|
|
@ -15,6 +10,10 @@ col_nf="#374145" # Normal foreground
|
||||||
col_sb="#7fbbb3" # Selected background
|
col_sb="#7fbbb3" # Selected background
|
||||||
col_sf="#1e2326" # Selected foreground
|
col_sf="#1e2326" # Selected foreground
|
||||||
|
|
||||||
|
_help() {
|
||||||
|
printf "Usage: menu [run/dmenu/pass] [prompt]\nDefault backend: %s\n" "$MENU_BACKEND"
|
||||||
|
}
|
||||||
|
|
||||||
menu_bemenu() {
|
menu_bemenu() {
|
||||||
bemenu$BRUN \
|
bemenu$BRUN \
|
||||||
--no-exec \
|
--no-exec \
|
||||||
|
|
@ -73,4 +72,26 @@ wofi $WRUN \
|
||||||
$WPASS
|
$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
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
# Set default input device
|
# Set default input device
|
||||||
|
|
||||||
# Get proper name from sources
|
# 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
|
# 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"
|
pactl set-default-source "$input" && notify-send -r 11 " Default Input" "Set to '$input'" || notify-send -r 11 " Default Input" "Didn't change"
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,6 @@
|
||||||
PASSWORD_STORE_DIR="$HOME/.local/share/password-store"
|
PASSWORD_STORE_DIR="$HOME/.local/share/password-store"
|
||||||
MENU="$HOME/.config/scripts/menu/menu"
|
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
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,5 @@ export \
|
||||||
PYTHON_HISTORY="$XDG_CACHE_HOME/python_history" \
|
PYTHON_HISTORY="$XDG_CACHE_HOME/python_history" \
|
||||||
SQLITE_HISTORY="$XDG_CACHE_HOME/sqlite_history" \
|
SQLITE_HISTORY="$XDG_CACHE_HOME/sqlite_history" \
|
||||||
PGPASSFILE="$XDG_CONFIG_HOME/pg/pgpass" \
|
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
|
UNISON="$XDG_DATA_HOME"/unison
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue