Skip to content

Commit 8662fbc

Browse files
committed
Using i3wm and some small tools
1 parent 04e2adc commit 8662fbc

File tree

22 files changed

+608
-11
lines changed

22 files changed

+608
-11
lines changed

.gitignore

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
vim/plugged
22
.directory
33

4-
mpd/*
5-
!mpd/mpd.conf
4+
config/mpd/*
5+
!config/mpd/mpd.conf
66

7-
ncmpcpp/*
8-
!ncmpcpp/config
9-
!ncmpcpp/bindings
7+
config/ncmpcpp/*
8+
!config/ncmpcpp/config
9+
!config/ncmpcpp/bindings

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@
33
chmod +x setup.sh
44
./setup.sh
55
```
6+
7+
# Troubleshooting
8+
1. [Graphic Tearing](https://wiki.archlinux.org/index.php/Intel_graphics#Tearing)
9+
2. [i3lock after sleep](https://github.com/i3/i3lock/issues/229)

config/compton.conf

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
## shadow
2+
shadow = true;
3+
no-dnd-shadow = true;
4+
no-dock-shadow = true;
5+
clear-shadow = true;
6+
shadow-radius = 12;
7+
shadow-offset-x = -12;
8+
shadow-offset-y = -12;
9+
shadow-opacity = 0.95;
10+
shadow-red = 0.18;
11+
shadow-green = 0.20;
12+
shadow-blue = 0.25;
13+
shadow-exclude = [ "class_g = 'Cairo-clock'" ,
14+
"class_g = 'CoverGloobus'",
15+
"class_g = 'Tilda'",
16+
"class_g = 'Conky'",
17+
"class_g ?= 'Notify-osd'",
18+
"class_g = 'Firefox'",
19+
"class_g = 'Firefox-esr'",
20+
"class_g = 'Dmenu'",
21+
"name = 'Notification'",
22+
"_GTK_FRAME_EXTENTS@:c"
23+
];
24+
25+
## fading
26+
fading = true;
27+
fade-delta = 0.25;
28+
fade-in-step = 0.02;
29+
fade-out-step = 0.02;
30+
fade-exclude = [
31+
];
32+
33+
## other
34+
backend = "xrender";
35+
mark-wmwin-focused = true;
36+
mark-ovredir-focused = true;
37+
detect-rounded-corners = true;
38+
detect-client-opacity = true;
39+
refresh-rate = 0;
40+
vsync = "none";
41+
dbe = false;
42+
paint-on-overlay = true;
43+
focus-exclude = [ "class_g = 'Cairo-clock'" ,
44+
"class_g = 'CoverGloobus'",
45+
"class_g = 'Tilda'",
46+
"class_g = 'Firefox'",
47+
"class_g = 'Firefox-esr'"
48+
];
49+
detect-transient = true;
50+
detect-client-leader = true;
51+
invert-color-include = [ ];
52+
glx-copy-from-front = false;
53+
glx-swap-method = "undefined";
54+
wintypes:
55+
{
56+
tooltip = { fade = true; shadow = true; opacity = 0.75; focus = true; };
57+
};

config/dunst/complete.oga

20.6 KB
Binary file not shown.

config/dunst/dunstrc

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
[global]
2+
monitor = 0
3+
geometry = "270x50-24+24"
4+
indicate_hidden = yes
5+
shrink = no
6+
separator_height = 4
7+
padding = 16
8+
horizontal_padding = 24
9+
frame_width = 2
10+
sort = no
11+
idle_threshold = 120
12+
font = Noto Sans 10
13+
line_height = 4
14+
markup = full
15+
format = "<b>%s</b>\n%b"
16+
alignment = left
17+
show_age_threshold = 60
18+
word_wrap = yes
19+
ignore_newline = no
20+
stack_duplicates = false
21+
hide_duplicate_count = yes
22+
show_indicators = no
23+
icon_position = off
24+
sticky_history = yes
25+
history_length = 20
26+
browser = /usr/bin/chromium-browser -new-tab
27+
always_run_script = true
28+
title = Dunst
29+
class = Dunst
30+
31+
[shortcuts]
32+
close = ctrl+space
33+
close_all = ctrl+shift+space
34+
history = ctrl+grave
35+
context = ctrl+shift+period
36+
37+
[play_sound]
38+
summary = "*"
39+
script = ~/.config/dunst/play_sound
40+
41+
[urgency_low]
42+
background = "#1c1c1c"
43+
foreground = "#d8dee8"
44+
frame_color = "#a1d569"
45+
timeout = 4
46+
47+
[urgency_normal]
48+
background = "#1c1c1c"
49+
foreground = "#d8dee8"
50+
frame_color = "#a1d569"
51+
timeout = 7
52+
53+
[urgency_critical]
54+
background = "#1c1c1c"
55+
foreground = "#d8dee8"
56+
frame_color = "#a1d569"
57+
timeout = 0

config/dunst/play_sound

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
# this is ubuntu sound
3+
paplay ~/.config/dunst/complete.oga

config/i3/.wallpaper.png

445 KB
Loading

config/i3/config

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
# set modifier
2+
set $super Mod4
3+
set $alt Mod1
4+
5+
set $ws1 "1:  "
6+
set $ws2 "2:  "
7+
set $ws3 "3:  "
8+
set $ws4 "4:  "
9+
set $ws5 "5:  "
10+
set $ws6 "6:  "
11+
12+
workspace $ws1 output HDMI1
13+
workspace $ws2 output HDMI1
14+
workspace $ws3 output HDMI1
15+
workspace $ws4 output HDMI2
16+
workspace $ws5 output HDMI2
17+
18+
# set font
19+
font pango: Noto Sans Regular 11
20+
21+
# Use Mouse+$super to drag floating windows to their wanted position
22+
floating_modifier $super
23+
24+
#autostart
25+
exec --no-startup-id hsetroot -fill ~/.config/i3/wallpaper.png
26+
exec --no-startup-id xsettingsd &
27+
exec --no-startup-id compton -b
28+
exec --no-startup-id dunst
29+
exec --no-startup-id setxkbmap -option caps:super
30+
exec --no-startup-id fcitx -d
31+
exec --no-startup-id goldendict
32+
exec --no-startup-id dropbox
33+
34+
# start a terminal
35+
bindsym $super+Return exec i3-sensible-terminal
36+
37+
# start dmenu (a program launcher)
38+
bindsym $super+Shift+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Hack Regular 9'
39+
bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans Regular 9'
40+
41+
# common apps keybinds
42+
bindsym Print exec scrot 'Cheese_%a-%d%b%y_%H.%M.png' -e 'viewnior ~/$f'
43+
bindsym $alt+l exec i3lock -t -i ~/.config/i3/i3lock.png
44+
bindsym $super+Shift+w exec firefox
45+
bindsym $super+Shift+f exec thunar;workspace 3;focus
46+
bindsym $super+Shift+g exec geany
47+
48+
#change volume
49+
# bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+
50+
# bindsym XF86AudioLowerVolume exec amixer -q set Master 5%-
51+
# bindsym XF86AudioMute exec amixer set Master toggle
52+
bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+10 i3blocks
53+
bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+10 i3blocks
54+
bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+10 i3blocks
55+
56+
# brightness control with xbacklight
57+
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
58+
bindsym XF86MonBrightnessUp exec xbacklight -inc 5
59+
60+
# music control
61+
bindsym XF86AudioNext exec mpc next
62+
bindsym XF86AudioPrev exec mpc prev
63+
bindsym XF86AudioPlay exec mpc toggle
64+
bindsym XF86AudioStop exec mpc stop
65+
66+
# kill focused window
67+
bindsym $super+x kill
68+
bindsym $alt+F4 kill
69+
70+
# change focus
71+
bindsym $super+h focus left
72+
bindsym $super+j focus down
73+
bindsym $super+k focus up
74+
bindsym $super+l focus right
75+
76+
# move focused window
77+
bindsym $super+Shift+h move left
78+
bindsym $super+Shift+j move down
79+
bindsym $super+Shift+k move up
80+
bindsym $super+Shift+l move right
81+
82+
# split in horizontal orientation
83+
bindsym $super+s split v
84+
85+
# split in vertical orientation
86+
bindsym $super+v split h
87+
88+
# enter fullscreen mode for the focused container
89+
bindsym $super+f fullscreen toggle
90+
91+
# change container layout split
92+
bindsym $super+t layout toggle split
93+
94+
# toggle tiling / floating
95+
bindsym $super+space floating toggle
96+
97+
# change focus between tiling / floating windows
98+
bindsym $super+Shift+space focus mode_toggle
99+
100+
# switch to workspace
101+
bindsym $alt+Control+Right workspace next
102+
bindsym $alt+Control+Left workspace prev
103+
bindsym $super+1 workspace $ws1
104+
bindsym $super+2 workspace $ws2
105+
bindsym $super+3 workspace $ws3
106+
bindsym $super+4 workspace $ws4
107+
bindsym $super+5 workspace $ws5
108+
bindsym $super+6 workspace $ws6
109+
110+
# move focused container to workspace
111+
bindsym $super+Shift+1 move container to workspace $ws1
112+
bindsym $super+Shift+2 move container to workspace $ws2
113+
bindsym $super+Shift+3 move container to workspace $ws3
114+
bindsym $super+Shift+4 move container to workspace $ws4
115+
bindsym $super+Shift+5 move container to workspace $ws5
116+
bindsym $super+Shift+6 move container to workspace $ws6
117+
118+
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
119+
bindsym $super+Shift+r restart
120+
121+
# exit i3
122+
bindsym $super+q exec "i3-nagbar -t warning -m 'Really, exit?' -b 'Yes' 'i3-msg exit'"
123+
bindsym $super+Escape exec "i3-nagbar -t warning -m 'Really, suspend?' -b 'Yes' 'systemctl suspend'"
124+
125+
# resize window (you can also use the mouse for that)
126+
mode "resize" {
127+
bindsym Left resize shrink width 5 px or 5 ppt
128+
bindsym Down resize grow height 5 px or 5 ppt
129+
bindsym Up resize shrink height 5 px or 5 ppt
130+
bindsym Right resize grow width 5 px or 5 ppt
131+
bindsym Return mode "default"
132+
}
133+
bindsym $super+r mode "resize"
134+
135+
# panel
136+
bar {
137+
height 23
138+
strip_workspace_numbers no
139+
font pango: Noto Sans 10, FontAwesome 10
140+
colors {
141+
background #1C1C1C
142+
statusline #000000
143+
# separator #4b5262
144+
145+
# colour of border, background, and text
146+
focused_workspace #2f343f #bf616a #d8dee8
147+
active_workspace #2f343f #2f343f #d8dee8
148+
inactive_workspace #2f343f #2f343f #d8dee8
149+
urgent_workspace #2f343f #ebcb8b #2f343f
150+
}
151+
status_command i3blocks
152+
}
153+
154+
# window rules, you can find the window class using xprop
155+
for_window [class=".*"] border pixel 4
156+
assign [class=URxvt] 1
157+
assign [class=Firefox|Transmission-gtk] 2
158+
assign [class=Thunar|File-roller] 3
159+
assign [class=Geany|Evince|Gucharmap|Soffice|libreoffice*] 4
160+
assign [class=Audacity|Vlc|mpv|Ghb|Xfburn|Gimp*|Inkscape] 5
161+
assign [class=Lxappearance|System-config-printer.py|Lxtask|GParted|Pavucontrol|Exo-helper*|Lxrandr|Arandr] 6
162+
for_window [class=Viewnior|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable
163+
for_window [class=URxvt|Firefox|Geany|Evince|Soffice|libreoffice*|mpv|Ghb|Xfburn|Gimp*|Inkscape|Vlc|Lxappearance|Audacity] focus
164+
for_window [class=Xfburn|GParted|System-config-printer.py|Lxtask|Pavucontrol|Exo-helper*|Lxrandr|Arandr] focus
165+
166+
# colour of border, background, text, indicator, and child_border
167+
client.focused #bf616a #2f343f #d8dee8 #bf616a #d8dee8
168+
client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f
169+
client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f
170+
client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f
171+
client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f
172+
client.background #2f343f
173+
174+
# I3gaps
175+
for_window [class="^.*"] border pixel 2
176+
gaps inner 9
177+
gaps outer 7
178+
# Only enable gaps on a workspace when there is at least one container
179+
# smart_gaps on
180+
# Only enable outer gaps when there is exactly one container

config/i3/i3lock.png

1.1 MB
Loading

config/i3/wallpaper.png

1.01 MB
Loading

0 commit comments

Comments
 (0)