Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
egpu: false
theme: "blue"
workspaces:
- "1:"
- "2:"
- "3:"
- "4:"
- "5:"
- "6:"
- "7"
- "8"
- "9"
- "1:Mail:"
- "2:Browser:"
- "3:Dev:"
- "4:Misc.1:"
- "5:Misc.2:"
- "6:Misc.3:"
- "7:Misc.4:"
- "8:Misc.5:"
- "9:Spotify:"
roles:
- core
vars_files:
Expand Down
55 changes: 55 additions & 0 deletions roles/core/templates/.bin/switch_display.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/bin/bash

getBashVersion() {
echo $(echo ${BASH_VERSION} | sed -E 's|([0-9])\..*|\1|')
}

bash_version="$(getBashVersion)"

switchDisplay() {
if [ $bash_version -ge 4 ] #$1 contains bash version, we check that it is >=4 to use mapfile
then
mapfile -t activeOutputs < <(xrandr | grep -E " connected (primary )?[1-9]+" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
mapfile -t connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
else
IFS=$'\n' read -r -d '' -a activeOutputs < <(xrandr | grep -E " connected (primary )?[1-9]+" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
IFS=$'\n' read -r -d '' -a connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
fi

outputToActivate=$(echo ${activeOutputs[@]} ${activeOutputs[@]} ${connectedOutputs[@]} | tr ' ' '\n' | sort | uniq -u)

if [ ! -z "$outputToActivate" ]
then
xrandr --output "${activeOutputs[0]}" --off --output "$outputToActivate" --auto
else
xrandr --output "${activeOutputs[1]}" --off --output "${activeOutputs[0]}" --auto
fi
}

activeAll() {
if [ $bash_version -ge 4 ] #$1 contains bash version, we check that it is >=4 to use mapfile
then
mapfile -t connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
else
IFS=$'\n' read -r -d '' -a connectedOutputs < <(xrandr | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/")
fi
execute="xrandr "
for display in ${connectedOutputs[@]}
do
execute=$execute"--output $display --auto "
done
`$execute`
}

if [ -z "$1" ]
then
switchDisplay "${activeOutputs[@]}" "${connectedOutputs[@]}"
elif [ "$1" == "-a" ] || [ "$1" == "--all" ]
then
activeAll $connectedOutputs
else
echo "Unknow given argument \"$1\""
echo "How to use this script =>"
echo "\"switch_display\" will swap your displays"
echo "\"switch_display -a\" or \"switch_display --all\" will switch all your displays on"
fi
8 changes: 8 additions & 0 deletions roles/core/templates/.bin/touchpad.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash
id=$(xinput | sed '/Touchpad/s/.*id=\([0-9]*\).*/\1/;t;d')
status=$(xinput --list-props $id | grep "Device Enabled" | cut -f 3)
if [ $status -eq 1 ]; then
xinput --disable $id
else
xinput --enable $id
fi
82 changes: 49 additions & 33 deletions roles/core/templates/.i3/config
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,18 @@ bindsym $mod+z exec --no-startup-id morc_menu
## sound-section - DO NOT EDIT if you wish to automatically upgrade Alsa -> Pulseaudio later! ##
################################################################################################

exec --no-startup-id volumeicon
##bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
#exec --no-startup-id volumeicon
#bindsym $mod+Ctrl+m exec terminal -e 'alsamixer'
#exec --no-startup-id "pulseaudio --start"
#exec --no-startup-id pa-applet
bindsym $mod+Ctrl+m exec pavucontrol

# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec --no-startup-id "~/.i3/vol.sh up"
bindsym XF86AudioLowerVolume exec --no-startup-id "~/.i3/vol.sh down"
bindsym XF86AudioMute exec "~/.i3/vol.sh toggle"
# Use pactl to adjust volume in PulseAudio.
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status

# Media player controls
bindsym XF86AudioPlay exec playerctl play-pause
Expand All @@ -67,21 +69,21 @@ bindsym XF86AudioPrev exec playerctl previous

# Start Applications
bindsym $mod+Ctrl+b exec terminal -e 'bmenu'
bindsym $mod+F2 exec palemoon
bindsym $mod+F2 exec firefox
bindsym $mod+F3 exec pcmanfm
# bindsym $mod+F3 exec ranger
bindsym $mod+Shift+F3 exec gksu pcmanfm
bindsym $mod+F5 exec terminal -e 'mocp'
bindsym $mod+t exec --no-startup-id pkill compton
bindsym $mod+Ctrl+t exec --no-startup-id compton -b
bindsym $mod+Shift+d --release exec "killall dunst; exec notify-send 'restart dunst'"
bindsym Print exec --no-startup-id flameshot gui
bindsym Print exec --no-startup-id i3-scrot
bindsym $mod+Print --release exec --no-startup-id i3-scrot -w
bindsym $mod+Shift+Print --release exec --no-startup-id i3-scrot -s
bindsym $mod+Shift+h exec xdg-open /usr/share/doc/manjaro/i3_help.pdf
bindsym $mod+Ctrl+x --release exec --no-startup-id xkill

# focus_follows_mouse no
focus_follows_mouse no

# change focus
bindsym $mod+j focus left
Expand Down Expand Up @@ -190,15 +192,15 @@ 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+- move container to workspace $ws6; workspace $ws6
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

# Open applications on specific workspaces
# assign [class="Thunderbird"] $ws1
# assign [class="Pale moon"] $ws2
# assign [class="Pcmanfm"] $ws3
assign [class="Thunderbird"] $ws1
assign [class="firefox"] $ws2
assign [class="Pcmanfm"] $ws8
# assign [class="Skype"] $ws5

# Open specific applications in floating mode
Expand All @@ -225,7 +227,7 @@ for_window [class="qt5ct"] floating enable sticky enable border normal
for_window [class="Qtconfig-qt4"] floating enable sticky enable border normal
for_window [class="Simple-scan"] floating enable border normal
for_window [class="(?i)System-config-printer.py"] floating enable border normal
for_window [class="Skype"] floating enable border normal
#for_window [class="Skype"] floating enable border normal
for_window [class="Timeset-gui"] floating enable border normal
for_window [class="Oracle VM Virtualbox Manager"] floating enable border normal
for_window [class="Xfburn"] floating enable
Expand All @@ -248,7 +250,7 @@ bindsym $mod+Shift+s exec "~/.bin/switch_mono_screen.sh; nitrogen --restore && i
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
bindsym $mod+Delete mode "$mode_system"
set $mode_system (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot, (Shift+s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id i3exit lock, mode "default"
Expand Down Expand Up @@ -295,11 +297,11 @@ exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore;
#exec --no-startup-id nitrogen --restore; sleep 1; compton -b
#exec --no-startup-id manjaro-hello
exec --no-startup-id nm-applet
#exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id pamac-tray
# exec --no-startup-id pamac-tray
# exec --no-startup-id blueman-applet
# exec_always --no-startup-id sbxkb
# exec_alwa#ys --no-startup-id sbxkb
exec --no-startup-id start_conky_maia
# exec --no-startup-id start_conky_green
# exec --no-startup-id xautolock -time 10 -locker blurlock
Expand Down Expand Up @@ -352,27 +354,41 @@ bar {

padding 2

colors {
background #222D31
statusline #F9FAF9
separator #454947
focused_workspace {{ theme.color.normal.highlight }} {{ theme.color.normal.highlight }} #292F34
active_workspace #595B5B #353836 #FDF6E3
inactive_workspace #595B5B #222D31 #EEE8D5
binding_mode {{ theme.color.normal.highlight }} #2C2C2C #F9FAF9
urgent_workspace {{ theme.color.normal.highlight }} #FDF6E3 #E5201D
}
colors {
background #222D31
statusline #F9FAF9
separator #454947
focused_workspace {{ theme.color.normal.highlight }} {{ theme.color.normal.highlight }} #292F34
active_workspace #595B5B #353836 #FDF6E3
inactive_workspace #595B5B #222D31 #EEE8D5
binding_mode {{ theme.color.normal.highlight }} #2C2C2C #F9FAF9
urgent_workspace {{ theme.color.normal.highlight }} #FDF6E3 #E5201D
}
}
# Start i3bar to display a workspace bar (plus the system information i3status if available)
# bar {
# font pango:Inconsolata, Font Awesome 6 Free 14px
# position bottom
# status_command i3status-rs ~/.i3/config.toml
# strip_workspace_numbers yes
# colors {
# background #2e3440
# focused_workspace #0088CC #0088CC #ffffff
# active_workspace #333333 #333333 #ffffff
# inactive_workspace #333333 #2e3440 #888888
# urgent_workspace #2f343a #900000 #ffffff
# }
# }

# hide/unhide i3status bar
# bindsym $mod+m bar mode toggle

# Theme colors
# class border backgr. text indic. child_border
client.focused {{ theme.color.focus.background }} {{ theme.color.focus.background }} {{ theme.color.focus.highlight }} #FDF6E3
client.focused_inactive {{ theme.color.normal.background }} {{ theme.color.normal.background }} {{ theme.color.normal.highlight }} #454948
client.unfocused {{ theme.color.normal.background }} {{ theme.color.normal.background }} {{ theme.color.normal.highlight }} #454948
client.urgent #CB4B16 #FDF6E3 {{ theme.color.normal.highlight }} #268BD2
client.focused #496d86 #496d86 #FDF6E3 #FDF6E3
client.focused_inactive #2F3D44 #2F3D44 #3498db #454948
client.unfocused #2F3D44 #2F3D44 #3498db #454948
client.urgent #CB4B16 #FDF6E3 #3498db #268BD2
client.placeholder #000000 #0c0c0c #ffffff #000000

client.background #2B2C2B
Expand Down Expand Up @@ -432,4 +448,4 @@ mode "$mode_gaps_outer" {

bindsym Return mode "default"
bindsym Escape mode "default"
}
}
Loading