├── LICENSE ├── README.md ├── ambulance ├── .ambulance.txt └── ambulance.py ├── space-clock ├── .spaceclock.txt └── space-clock.py ├── space-ship ├── .space-ship.txt └── space-ship.py └── space-ship2 ├── .space-ship2.txt └── space-ship2.py /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Stavros Grigoriou 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Polybar Animations 2 | 3 | Collection of varius Polybar animations I've made. 4 | 5 | To use them, add them as custom modules in your polybar config like that: 6 | 7 | [module/script-name] 8 | type = custom/script 9 | exec = ~/path/to/script.py 10 | interval = 0.25 ;or whatever interval you wish 11 | label = %output% 12 | -------------------------------------------------------------------------------- /ambulance/.ambulance.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /ambulance/ambulance.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | 3 | # Author : unix121 4 | # GitHub : https://github.com/unix121 5 | 6 | import re 7 | import time 8 | 9 | if __name__=="__main__" : 10 | 11 | max = 250 12 | 13 | with open( ".ambulance.txt", 'r+' ) as file: 14 | line = file.read( ) 15 | line = line.strip( ) 16 | 17 | output = (max-int(line))*' ' + '' 18 | print( output ) 19 | int_line = int( line ) 20 | int_line = int_line+1 21 | 22 | if int_line > max : 23 | int_line = 0 24 | 25 | file.seek( 0 ) 26 | file.write( str( int_line ) ) 27 | file.truncate( ) 28 | file.close( ) 29 | 30 | -------------------------------------------------------------------------------- /space-clock/.spaceclock.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /space-clock/space-clock.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | 3 | # Author : unix121 4 | # Github : https://github.com/unix121 5 | 6 | import re 7 | import time 8 | 9 | if __name__=="__main__" : 10 | 11 | max = 275 12 | 13 | with open( ".spaceclock.txt", 'r+' ) as file: 14 | line = file.read( ) 15 | line = line.strip( ) 16 | 17 | output = int(line)*' ' + '[' + time.strftime("%X") + ']>- ' 18 | print( output ) 19 | int_line = int( line ) 20 | int_line = int_line+1 21 | 22 | if int_line > max : 23 | int_line = 0 24 | 25 | file.seek( 0 ) 26 | file.write( str( int_line ) ) 27 | file.truncate( ) 28 | file.close( ) 29 | -------------------------------------------------------------------------------- /space-ship/.space-ship.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /space-ship/space-ship.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | 3 | # Author : unix121 4 | # GitHub : https://github.com/unix121 5 | 6 | import re 7 | import time 8 | 9 | if __name__=="__main__" : 10 | 11 | max = 275 12 | 13 | with open( ".spaceclock.txt", 'r+' ) as file: 14 | line = file.read( ) 15 | line = line.strip( ) 16 | 17 | output = int(line)*' ' + ' ' 18 | print( output ) 19 | int_line = int( line ) 20 | int_line = int_line+1 21 | 22 | if int_line > max : 23 | int_line = 0 24 | 25 | file.seek( 0 ) 26 | file.write( str( int_line ) ) 27 | file.truncate( ) 28 | file.close( ) 29 | 30 | -------------------------------------------------------------------------------- /space-ship2/.space-ship2.txt: -------------------------------------------------------------------------------- 1 | 0 2 | -------------------------------------------------------------------------------- /space-ship2/space-ship2.py: -------------------------------------------------------------------------------- 1 | #!/bin/env python 2 | 3 | # Author : unix121 4 | # GitHub : https://github.com/unix121 5 | 6 | import re 7 | import time 8 | 9 | if __name__=="__main__" : 10 | 11 | max = 275 12 | 13 | with open( ".space-ship2.txt", 'r+' ) as file: 14 | line = file.read( ) 15 | line = line.strip( ) 16 | 17 | output = int(line)*'•' + ' ' 18 | print( output ) 19 | int_line = int( line ) 20 | int_line = int_line+1 21 | 22 | if int_line > max : 23 | int_line = 0 24 | 25 | file.seek( 0 ) 26 | file.write( str( int_line ) ) 27 | file.truncate( ) 28 | file.close( ) 29 | 30 | --------------------------------------------------------------------------------